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
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"codeintel_syntax_map": | |
{ | |
"JavaScript": "Node.js" | |
}, | |
"color_scheme": "Packages/User/SublimeLinter/Monokai - Spacegray (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": |
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 ( | |
"errors" | |
"io/ioutil" | |
"os" | |
"os/exec" | |
) | |
func UniqueFiles(files ...string) (err error) { | |
if len(files) == 0 { | |
return errors.New("no files provided") |
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
var encodeNP = function(s){ | |
var hex, c; | |
var result = ''; | |
for (var i = 0; i < s.length; i++) { | |
c = s.charCodeAt(i); | |
if (c >= 32 && c <= 126) { | |
result += String.fromCharCode(c); | |
} else { | |
hex = c.toString(16); | |
result += '\\x' + ('000'+hex).slice(-4); |
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
for i in `seq 2 30`; do | |
say --progress -r340 -vIoana $i' elefanți se legănau pe o pânză de păianjen, și pentru că, nu se rupea, au mai chemat un elefant'; | |
done |
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
for (var i = 0; i < 100; i++) { | |
setTimeout(function(i) { | |
var text = '/remind me invata python boss in ' + (2*i) + ' minutes'; | |
TS.client.ui.onSubmit(text); | |
console.log(text); | |
}.bind(this, i), i * 500); | |
} |
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 = video_id | |
task_name = "task_" + generateUUID() | |
task_status = { | |
"TaskUUID": task_name, | |
"State": "PENDING", | |
"Result": null, | |
"Error": "" | |
} | |
task = { | |
"UUID": task_name, |
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
def bin_sqrt(v): | |
lo, hi = 0, v | |
while (hi - lo) > 1: | |
mid = (hi + lo) // 2 | |
sqrmid = mid * mid | |
if sqrmid < v: | |
lo = mid | |
elif sqrmid > v: | |
hi = mid | |
else: |
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
# facebook has a weird format for naming images you download | |
# it should be timestamp first so you can sort them | |
# but no, they have a weird id first | |
# something like {rnd}_{timestamp}_{rnd}_o.jpg | |
ls *.jpg | awk -F_ '{print $2}' | xargs -I{} bash -c 'mv *{}*.jpg {}.jpg' |
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
{ | |
"editor.wordWrap": "on", | |
"editor.formatOnPaste": false, | |
"docker.showExplorer": false, | |
// JS specific | |
"eslint.enable": false, | |
// Python specific | |
"python.venvPath": "${workspaceRoot}/.venv", |
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://github.com/nytr0gen | |
import requests | |
import PIL | |
import marshal | |
import os | |
import time | |
from PIL import Image | |
from multiprocessing import Pool |
OlderNewer