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
function f() { | |
local dirname | |
dirname=$(cat ~/fcd/fcd-dirs.txt | fzf) || return | |
cd "$dirname" | |
} | |
function _f_no_cache() { | |
local paths=( | |
~/my-corporate-dev-dir/ | |
~/dev |
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 python3 | |
from kittens.tui.handler import result_handler | |
def main(args): | |
pass | |
@result_handler(no_ui=True) |
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
import random | |
import time | |
from gtts import gTTS | |
import os | |
sleep_sec = 0.25 | |
natural_notes = ["A", "B", "C", "D", "E", "F", "G"] | |
prev = None | |
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
import random | |
import time | |
sleep_sec = 1 | |
natural_notes = ["A", "B", "C", "D", "E", "F", "G"] | |
prev = None | |
def print_randomly(): | |
global prev |
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
#include <ESP8266WiFi.h> | |
const char* ssid = "************"; | |
const char* password = "****************"; | |
WiFiServer server(80); | |
void setup() | |
{ | |
Serial.begin(115200); |
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
def searchForStraight(self, cards, length): | |
expected = cards[0].rank # initialize to first card | |
counter = 0 # keep track of length of# the current straight | |
for card in cards: | |
#print('rank: ', card.rank, ', expect: ', expected) | |
if card.rank == expected: # we are inside a "straight", | |
# potentially of length 1 | |
counter += 1 | |
elif card.rank == expected-1: # if this is another of the card we just saw |
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
### Keybase proof | |
I hereby claim: | |
* I am vsinha on github. | |
* I am vsinha (https://keybase.io/vsinha) on keybase. | |
* I have a public key whose fingerprint is 1F74 0BBE 8863 B0AA 1742 BBA5 3D92 77B3 53E7 8BE6 | |
To claim this, I am signing this object: |
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
<html> | |
<head> | |
<script type="text/javascript" src="dygraph-combined.js"></script> | |
<style> | |
body{ | |
font-family:"Helvetica"; | |
} | |
.graph { | |
height: 250px; |
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
import operator | |
# create a dict | |
d = dict() | |
d[0] = 10 | |
d[1] = 20 | |
d[2] = 20 | |
# find the max value | |
maxValue = max(d) |