Skip to content

Instantly share code, notes, and snippets.

@cuuupid
cuuupid / pget.py
Created August 31, 2024 14:35
PGet.py v0.3
import os
import subprocess
import time
import yaml
from tqdm import tqdm
from urllib.parse import urlparse
import fnmatch
SIZE_THRESHOLD = 50 # MB
CACHE_URI = "" # either s3://bucket/path/ or gs://bucket/path
@cuuupid
cuuupid / pget.py
Created August 31, 2024 00:04
PGet.py v0.2
import os
import subprocess
import time
import yaml
from tqdm import tqdm
from urllib.parse import urlparse
from docker import utils as docker_utils
SIZE_THRESHOLD = 100 # MB
CACHE_URI = "s3://..." # either s3://bucket/path/ or gs://bucket/path
@cuuupid
cuuupid / briefs.MD
Created August 31, 2022 20:23
Project Brief

Aiko Mail - Project Briefs

(copy paste aiko mail description from angellist)

More technical information: Aiko Mail's architecture is split into four distinct pieces:

  1. Client frontend - Vue.JS web app, what the user sees
  2. Client backend - the Electron application driving Aiko Mail
  3. Client engine - a TypeScript-based mail sync engine
  4. Server - TypeScript/JavaScript/Python based infrastructure to drive Aiko Mail's APIs
@cuuupid
cuuupid / promise-lock.js
Created December 17, 2020 02:20
Promise-based lock for Node.js/NW.js
const crypto = require('crypto')
const Lock = (() => {
let _lock = {
holder: null,
lock: (async () => null)()
}
//? generate a unique ID
//? puts it into waiting if the lock is owned
@cuuupid
cuuupid / champstats.js
Last active December 15, 2020 21:01
Get statistics of all League of Legends champions by running this in the console of u.gg's tier list after scrolling all the way down
(() => {
const champions = {}
const key = {
champion: 1,
win: 3,
pick: 4,
ban: 5
}
const https = require('https')
const webhook = "YOUR WEBHOOK HERE"
const log = message => new Promise((done, _) => {
const request = https.request(webhook, {
method: 'POST',
header: {
'Content-Type': 'application/json'
}
// click all the see more links to expand the post
new Array(...document.getElementsByClassName('see_more_link_inner')).forEach(el => el.click())
// scrape all the post content to an array called "posts"
const posts = new Array(...document.getElementsByClassName('userContent')).map(el => el.innerText)
// https://stackoverflow.com/questions/19721439/download-json-object-as-a-file-from-browser
function downloadObjectAsJson(exportObj, exportName){
var dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(exportObj));
var downloadAnchorNode = document.createElement('a');
use-nnet2: True
decoder:
use-threaded-decoder: True
model: /opt/models/english/tedlium_nnet_ms_sp_online/final.mdl
word-syms: /opt/models/english/tedlium_nnet_ms_sp_online/words.txt
fst: /opt/models/english/tedlium_nnet_ms_sp_online/HCLG.fst
mfcc-config: /opt/models/english/tedlium_nnet_ms_sp_online/conf/mfcc.conf
ivector-extraction-config: /opt/models/english/tedlium_nnet_ms_sp_online/conf/ivector_extractor.conf
max-active: 7000
beam: 8.0
use-nnet2: True
decoder:
use-threaded-decoder: True
model: /opt/models/english/tedlium_nnet_ms_sp_online/final.mdl
word-syms: /opt/models/english/tedlium_nnet_ms_sp_online/words.txt
fst: /opt/models/english/tedlium_nnet_ms_sp_online/HCLG.fst
mfcc-config: /opt/models/english/tedlium_nnet_ms_sp_online/conf/mfcc.conf
ivector-extraction-config: /opt/models/english/tedlium_nnet_ms_sp_online/conf/ivector_extractor.conf
max-active: 7000
beam: 8.0
@cuuupid
cuuupid / posts.json
Created December 5, 2018 18:23
scrape of SaD (271 posts)
["Where are all my Asian ricers at? And what do you drive? Pic for attention*\n\nedit: follow me on ig @kennyywen\nI dont have much on my ig just an fyi","VANCOUVER 🇨🇦 LADIES, ARE YOU TIRED 😴 OF GETTING PLAYED BY FUCKBOIS 🙅🏻‍♂️???? Looking for your perfect mans? Don’t look on Tinder. Don’t look on East meets East. Don’t look on Bumble. LOOK NO FURTHER. I present to you my bro Peter Pham. 😛\n\nThis 24 year old 5’10 Vietnamese man can be your nuoc papí with dat chả giò 🍆 NAW’M SAYIN 😏\n\nWith so many tingz to do in Vancouver this holiday season, Peter’s the perfect companion!\n\nPROS: \n* Will pick you up and drop you off to your door step like the gentleman he is 🚙💨\n* Laugh at all of your jokes & make you laugh just as much 🤪\n* VERY FAMILY ORIENTATED!!!! LOVES KIDS TOO!!!! 👨‍👩‍👧‍👦👶🏻\n* Is a down ass bitch and is willing to do whatever to make you smile 💪🏼😤\n* LOVES to nap so you best believe he’s a good cuddler ladies 😉\n* The most caring person ever! you’ll never shed a tear with this one 🙅🏻‍♂️😢\n* Can go f