This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] extern crate lazy_static; | |
use std::env::args; | |
use std::path::Path; | |
use std::{fmt, fs}; | |
use anyhow::{bail, Context, Result}; | |
use regex::bytes::Regex; | |
use walkdir::WalkDir; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.8" | |
# set the environment variable DATA_ROOT to specify where all the files are going to end up | |
x-environment: &common-env | |
TZ: Europe/Berlin # CHANGE! | |
PUID: 1000 | |
PGID: 1000 | |
services: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] | |
use std::ffi::OsStr; | |
use std::os::windows::fs::MetadataExt; | |
use std::sync::Arc; | |
use indicatif::{ProgressBar, ProgressStyle}; | |
use log::{error, info, warn}; | |
use reqwest::Client; | |
use tokio::sync::Semaphore; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Path to the bin directory of the rocm windows sdk (change path if necessary), | |
:: set ROCM_BIN=C:\Program Files\AMD\ROCm\5.5\bin | |
set ROCM_BIN=%HIP_PATH%\bin | |
set LLAMA_DIR=%CD%\llama.cpp | |
set LLAMA_BIN_OUT=%CD%\llama.cpp.bin | |
:: By default the bin directory of the rocm windows sdk does not seem to be in path so we add it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(path_file_prefix)] | |
use std::io::{BufRead, BufReader, ErrorKind}; | |
use std::path::PathBuf; | |
use std::process::{Command, Stdio}; | |
use anyhow::{bail, Context, Result}; | |
use clap::Parser; | |
use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; | |
use serde::Deserialize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! Basic display driver for the waveshare oled 2.23 (128x32) | |
//! | |
//! # Example for a raspberry pi pico | |
//! | |
//! ```rust | |
//! #![no_std] | |
//! #![no_main] | |
//! #![feature(type_alias_impl_trait)] | |
//! | |
//! use embassy_rp::spi::Spi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log { | |
param( | |
[parameter(mandatory)] | |
[string]$msg | |
) | |
write-host "$("[{0:HH:mm:ss}]" -f (get-date)) $msg" | |
} | |
function request-endpoint { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! # Connections | |
//! | |
//! IMPORTANT: Do *not* use PIN24 / BCM8 / CE0 as the NSS pin | |
//! | |
//! - PIN1 = 3V3 = VCC | |
//! - PIN19 = BCM10 = MOSI | |
//! - PIN21 = BCM9 = MISO (SCL) | |
//! - PIN23 = BCM11 = SCLK | |
//! - PIN22 = BCM25 = NSS (SDA) | |
//! - PIN6 = GND = GND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fs; | |
use std::path::{Path, PathBuf}; | |
use anyhow::{Context, Result}; | |
use clap::Parser; | |
#[derive(Parser, Debug)] | |
#[clap(about, author, version)] | |
struct Opt { | |
/// Path to the bios rom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.InteropServices; | |
using System.Diagnostics; | |
[DllImport("user32.dll")] | |
static extern nint GetForegroundWindow(); | |
[DllImport("user32.dll", SetLastError = true)] | |
[return: MarshalAs(UnmanagedType.Bool)] | |
static extern bool GetCursorPos( | |
out Point lpPoint |
NewerOlder