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/python2 | |
# -*- coding: utf-8 -*- | |
# this was unfortunately written for Python 2 :( | |
# I'll rewrite it for generic JSONs, and not the ones | |
# that I was forced to work with. | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
import argparse |
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
#!python3 | |
import sys | |
import os | |
import numpy as np | |
import cv2 | |
import argparse | |
METHOD = "haarcascade_frontalface_default.xml" | |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + METHOD) |
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
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[green]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" | |
ZSH_THEME_GIT_PROMPT_DIRTY="$FG[130] ✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ±%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%} ▴%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%} ▾%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✓%{$reset_color%}" | |
#ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ♥%{$reset_color%}" | |
#ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ♡%{$reset_color%}" |
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 bash | |
# USER DEFINED | |
go_version=1.12.7 | |
go_platform=linux-amd64 | |
go_workspace=$HOME/go # keep the workspace relative to $HOME folder | |
# /USER DEFINED | |
versioned_tarball=go${go_version}.${go_platform}.tar.gz | |
tmp_dir=/tmp/go_install |
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 calculate_polish_hash(b_number): | |
polish_template = "PLkk bbbs sssx cccc cccc cccc cccc" | |
if b_number[:2] != "PL": | |
b_number = "PL" + b_number # prefix | |
assert len(b_number.replace(" ", "")) == len(polish_template.replace(" ", "")) | |
b_number = b_number.replace(" ", "") | |
rearranged = b_number[4:] + b_number[:2] + "00" | |
converted = "".join([str(int(x, 36)) for x in rearranged]) |
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 strict'; | |
var Foo = { | |
*[Symbol.iterator]() { | |
for (let [idx, val] of this.nums.entries()) { | |
yield label => `${label}: ${val} | |
(${idx+1} / ${this.nums.length})`; | |
} | |
}, | |
bar([x = 1, y = 2, ...nums] = []) { | |
this.nums = [x, y, ...nums]; |
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 Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput, onClick) | |
import Http | |
import Json.Encode as Encode | |
import Json.Decode as Decode | |
import Dict exposing (..) |