From | To | Expression |
---|
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 os | |
for dirpath, dirnames, filenames in os.walk('.'): | |
for f in filenames: | |
fp = os.path.join(dirpath, f) | |
size = os.path.getsize(fp) | |
if size < 1024: | |
print f |
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
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
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/perl | |
use strict; | |
use warnings; | |
if ($ARGV[0] =~ /^f+uu+$/) { | |
print qx{git reset --hard HEAD^}; | |
} | |
else { | |
my $args = join(' ', @ARGV); |
I hereby claim:
- I am lurst on github.
- I am lurst (https://keybase.io/lurst) on keybase.
- I have a public key ASDXWVXlJS3AZTrIuy8zkphJ5t7j8pAlYdHS_KGUq_DZOAo
To claim this, I am signing this object:
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 time | |
for x in range(10): | |
time.sleep(1) | |
print("Progress {:2.1%}".format(x / 10), end="\r") |
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
from json import loads as json_decode | |
from json import dumps as json_encode |
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
# Why list comprehensions? | |
fruits = ['orange', 'apple', 'pineapple'] | |
things = ['potato', 'orange', 'car', 'apple'] | |
# This will filter things and will create a new list with only fruits from | |
# things | |
new_list_of_things = [] | |
for thing in things: | |
if thing in fruits: |
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
syntax on | |
colorscheme desert | |
filetype plugin indent on | |
" 256 colors | |
set t_Co=256 | |
set backspace=indent,eol,start | |
set cmdheight=2 | |
set fileencodings=ucs-bom,utf-8,default,latin1 |
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 | |
from PIL import Image, ImageFont, ImageDraw | |
from bs4 import BeautifulSoup | |
from font_hanken_grotesk import HankenGroteskMedium | |
from inky import InkyWHAT | |
import requests | |
def main(): |