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
import numpy as np | |
from math import * | |
def bc_func_left(_ya, _p, _aux): | |
# Declare all auxiliary variables | |
g = _aux['const']['g'] | |
_constraint1 = _aux['const']['_constraint1'] | |
eps_constraint1 = _aux['const']['eps_constraint1'] | |
[] = _p | |
# Generalize to multipoint later |
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
# Save the transcripts using the "Save Page WE" Chrome Extension | |
# This script was generated by ChatGPT | |
import sys | |
from bs4 import BeautifulSoup | |
# Check if a file was provided as a command line argument | |
if len(sys.argv) < 2: | |
print("Please provide an HTML file as a command line argument.") | |
sys.exit(1) |
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
#!/bin/sh | |
# Build and install llvm from source | |
wget https://github.com/llvm/llvm-project/archive/refs/heads/main.zip | |
unzip llvm-project-main.zip | |
rm llvm-project-main.zip | |
cd llvm-project-main | |
# cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS="clang;lld" | |
cmake -S llvm -B build -DLLVM_DEFAULT_TARGET_TRIPLE="i686-pc-windows-msvc" -DLLVM_ENABLE_PROJECTS="clang;lld" |
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
#include "rust/cxx.h" | |
#include <memory> | |
using std::shared_ptr; | |
using std::unique_ptr; | |
using rust::Box; | |
template <typename T> struct BoxDeleter { | |
void operator()(T* ptr){ | |
Box<T> val = Box<T>::from_raw(ptr); |
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
/*!normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}html,body,main,div,span,a,li,ul,hr,h1,h2,h3,h4{padding:0;margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]:: |
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 rumqtt::{MqttClient, MqttOptions, QoS, Notification}; | |
use std::{thread, time::Duration}; | |
use std::collections::HashMap; | |
use std::sync::Arc; | |
fn foo(payload: Arc<Vec<u8>>) | |
{ | |
println!("Got foo message: {:?}", payload); | |
} | |
fn bar(payload: Arc<Vec<u8>>) |
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
{ | |
"atomKeymap.promptV3Features": true, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.formatOnPaste": true, | |
"[markdown]": { | |
}, | |
"workbench.startupEditor": "newUntitledFile", | |
"files.exclude": { | |
"node_modules": true |
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
# Download file and run `brew install qcl.rb` | |
class Qcl < Formula | |
desc "A command line tool to transfer files into Qconn-enabled remote device" | |
homepage "https://github.com/TheHipbot/weather" | |
url "https://github.com/thomasantony/qcl/archive/master.zip" | |
sha256 "db762174cd29e827007d97333853e64a8e39210ac4fad23f3083d9912a5ba3ce" | |
version "1.0.0" | |
depends_on "perl" |
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
import socket | |
HOST = 'localhost' | |
PORT = 9876 | |
ADDR = (HOST,PORT) | |
BUFSIZE = 4096 | |
videofile = "videos/royalty-free_footage_wien_18_640x360.mp4" | |
bytes = open(videofile).read() |
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
"""Batch convert images to greyscale [by Thomas Antony]. | |
Install dependencies: | |
pip install pillow docopt | |
Note: If you do not provide an output path, the generated files will be saved | |
in a folder named "Converted" | |
Usage: | |
greyscale.py <in_path> [<out_path>] |
NewerOlder