Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
// -------------------------------------------------- | |
// Flexbox SASS mixins | |
// The spec: http://www.w3.org/TR/css3-flexbox | |
// -------------------------------------------------- | |
// Flexbox display | |
@mixin flexbox { | |
display: -webkit-box; | |
display: -moz-box; | |
display: -ms-flexbox; |
def directory(app_name): | |
"""Construct app_dir from os name""" | |
home = os.path.expanduser('~') | |
if platform.system() == 'Linux': | |
app_dir = os.path.join(home, '.' + app_name) | |
elif platform.system() == 'Darwin': | |
app_dir = os.path.join(home, 'Library', 'Application Support', | |
app_name) | |
elif platform.system() == 'Windows': | |
app_dir = os.path.join(os.environ['appdata'], app_name) |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
const GLib = imports.gi.GLib; | |
const Gio = imports.gi.Gio; | |
let [res, out, err, status] = GLib.spawn_command_line_sync('ls -la'); | |
print(out); | |
let [res, out] = GLib.spawn_command_line_sync('ls -la'); | |
print(out); | |
let [res, out] = GLib.spawn_sync(null, ['/bin/ls', '-la'], null, 0, null); |
<!DOCTYPE html> | |
<html> | |
<style type='text/css'> | |
object{ | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
html{ | |
background: #0E0E0E; |
[color] | |
ui = on | |
[core] | |
whitespace= fix,-indent-with-non-tab,-indent-with-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[alias] | |
df = !git diff --no-prefix && git diff --staged --no-prefix | |
clear = reset --hard | |
st = status | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
Timeline. Include what you plan to have accomplished by the end of:
Community bonding period (May 23) -
Buildbot stuff done (should take a week[end])
Hpkg-Build is in a good place with packages. (No work may need to be done, I haven't stayed on top of how well it works with the package manager implementation.)
Quarter-term (June 13) -
diff --git a/bin/brew b/bin/brew | |
index 4ec64f0..79a1fb4 100755 | |
--- a/bin/brew | |
+++ b/bin/brew | |
@@ -11,7 +11,11 @@ require 'pathname' | |
HOMEBREW_LIBRARY_PATH = (Pathname.new(__FILE__).realpath.dirname.parent+"Library/Homebrew").to_s | |
$:.unshift(HOMEBREW_LIBRARY_PATH) | |
require 'global' | |
- | |
+def path_clean |
import Image, ImageDraw | |
import time | |
im = Image.open("kilosec_round.PNG") | |
draw = ImageDraw.Draw(im) | |
def kiloseconds(): | |
tm = time.localtime() | |
return (tm.tm_hour*3600+tm.tm_min*60+tm.tm_sec)/1000.0 | |
#http://github.com/api/v2/json/blob/show/bavardage/kiloseconds/03fac33ed6be1f0a004319cf7b8449d6d5fb10f3 |
import gdata.youtube | |
import gdata.youtube.service | |
from BeautifulSoup import BeautifulSoup | |
yt_service = gdata.youtube.service.YouTubeService() | |
# The YouTube API does not currently support HTTPS/SSL access. | |
yt_service.ssl = False | |
yt_service.developer_key = "AI39si6sDAt4km6PVp3cw5U4MIoUAVKi-R0hVSALYdjz7EIH_Leik-7s_fxeHQZKpx6fXilSx5PvYqhk16Gg1APQFJDRncXh6g" | |
yt_service.client_id = "yt comments" | |
def get_comments(): |