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
+/(#~(100000000)&>) (#~(=|.&.":)"0)x:(~.,(2+i.700)(+/@:*:)\>:i.7090) |
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
#brew install fswatch | |
#replace ~/shit with directory to watch, -r for recursively | |
fswatch -r0 ~/shit | while read -d "" event | |
do | |
regex='\.orig$' | |
if [[ ${event} =~ $regex && -e ${event} ]] | |
then | |
rm ${event} |
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
//https://en.wikipedia.org/wiki/Heap%27s_algorithm | |
fn main(){ | |
let mut array = vec![1,2,3,4]; | |
generate(4, &mut array); | |
} | |
fn generate(n : usize, a : &mut Vec<usize>) { | |
if n == 1 { | |
println!("{:?}", a); | |
} |
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
tf = require('@tensorflow/tfjs-node') | |
use = require('@tensorflow-models/universal-sentence-encoder') | |
use.load().then (model) -> | |
sentences = [ | |
'Hello.' | |
'Hi.' | |
'Greetings.' | |
'Sup?' | |
"It's nice to meet you." | |
'How are you?' |
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
//chaos game (https://en.wikipedia.org/wiki/Chaos_game) | |
//parameters: n = 5, r = 2 & cannot pick same vertex twice | |
//demo: https://editor.p5js.org/RichardJohnn/sketches/VxFo5o_Yv | |
//image: https://i.imgur.com/iBFEZDO.png | |
let w ; | |
let h ; | |
let x = 0; | |
let y = 0; | |
let anchors = []; |
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
const fs = require("fs"); | |
const cheerio = require("cheerio"); | |
const fetch = require("node-fetch"); | |
const path = require( 'path' ); | |
// Make an async function that gets executed immediately | |
(async ()=> { | |
const files = await fs.promises.readdir("./"); | |
const prettyUrls = new Set() |
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
{ | |
"id": "lFthoYgwXZzfpNWyr5FD", | |
"tags": [ | |
"react", | |
"reactjs", | |
"javascript", | |
"web-development", | |
"website-development", | |
"loading-screen", | |
"reactjs-loading", |
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
#!/usr/bin/env python | |
import argparse | |
import soundfile | |
import librosa | |
import numpy as np | |
import os | |
from progressbar import ProgressBar, Percentage, Bar | |
parser = argparse.ArgumentParser( |