This file contains hidden or 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
| # HG changeset patch | |
| # User Torbjorn Granlund <tg@gmplib.org> | |
| # Date 1606685500 -3600 | |
| # Node ID 5f32dbc41afc1f8cd77af1614f0caeb24deb7d7b | |
| # Parent 94c84d919f83ba963ed1809f8e80c7bef32db55c | |
| Avoid the x18 register since it is reserved on Darwin. | |
| diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/aors_n.asm | |
| --- a/mpn/arm64/aors_n.asm Sat Nov 28 23:38:32 2020 +0100 |
This file contains hidden or 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
| # https://stackoverflow.com/a/51164950/148668 | |
| # | |
| # python3 -m pip install gtts playsound pyobjc | |
| from gtts import gTTS | |
| import sys | |
| from io import BytesIO | |
| import objc | |
| import playsound | |
| import tempfile | |
| import argparse |
This file contains hidden or 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
| % Random L matrix | |
| rng(1); | |
| L = randn(3,3); | |
| % Initial guess of S | |
| S = diag(sqrt(diag(L*L'))); | |
| for iter = 1:100 | |
| [U,Z,V] = svd(S*L); | |
| % UZUᵀ = √ SLLᵀS |
This file contains hidden or 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
| // via https://stackoverflow.com/a/22885856/148668 | |
| #include <cereal/cereal.hpp> | |
| #include <cereal/archives/binary.hpp> | |
| #include <igl/writeDMAT.h> | |
| #include <Eigen/Dense> | |
| #include <fstream> | |
| namespace cereal | |
| { | |
| template <class Archive, class _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> inline |
This file contains hidden or 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
| // On mac, first install eigen and glfw | |
| // | |
| // brew install glfw eigen | |
| // | |
| // Compile with something like: | |
| // | |
| // clang++ -O3 -DNDEBUG -o mini-glfw main.cpp -std=c++11 \ | |
| // -I /opt/homebrew/include/eigen3 \ | |
| // -I /opt/homebrew/include/ -L/opt/homebrew/lib -lglfw -framework OpenGL | |
| // |
This file contains hidden or 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
| { | |
| "TGCs attended or watched": 0 | |
| } |
This file contains hidden or 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/bash | |
| # arch -x86_64 ./build-x86_64-gmp-mpfr-libigl.sh | |
| if [[ $(arch) == *arm64* ]]; then | |
| #echo "int main(){}" | clang++ -x c++ - -o test.o | |
| echo "Re-issue as `arch -x86_64 ./build-x86_64-gmp-mpfr-libigl.sh`" | |
| exit 1 | |
| fi |
This file contains hidden or 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/bash | |
| if [ "$#" -lt 2 ] ; then | |
| echo "mine [username] [file/folder]" | |
| echo "or" | |
| echo "mine [username] [file/folder] [action]" | |
| exit 1 | |
| fi | |
| if [ "$#" -ne 3 ] ; then | |
| action="list,add_file,search,delete,add_subdirectory,delete_child,file_inherit,directory_inherit,read,write,delete,append,execute" | |
| else |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # | |
| # Convert ascii text from standard input into fixed-width unicode characters. | |
| # | |
| # http://xahlee.info/comp/unicode_full-width_chars.html | |
| fixedWidth = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.:;!?"'`^~ ̄_&@#%+-*=<>()[]{}⦅⦆|¦/\¬$£¢₩¥ ' | |
| ascii = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.:;!?"\'`^~‾_&@#%+-*=<>()[]{}«»|¦/\\¬$£¢₩¥ ' | |
| input = STDIN.read | |
| output = input.split('').map do |c| | |
| i = ascii.index(c) |