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 -*- | |
# ----------------------------------------------------------------------------- | |
# Getting Things GNOME! - a personal organizer for the GNOME desktop | |
# Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau | |
# | |
# This program is free software: you can redistribute it and/or modify it under | |
# the terms of the GNU General Public License as published by the Free Software | |
# Foundation, either version 3 of the License, or (at your option) any later | |
# version. | |
# |
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
digraph { | |
label="Ideas for practice for 1 or 2 players." | |
labelloc="top" | |
node[shape="box", style="rounded"] | |
start; end; | |
node[shape="box", style="solid"] | |
wait2;condition;find_pole;kung_fu;yes_lying;usual; | |
node[shape="parallelogram", style=""] |
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 json | |
from os.path import exists | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.common.exceptions import TimeoutException | |
class GoogleGroupsScraper(object): | |
""" A simple class to scrape a google group. """ |
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
""" Imports the old links page as new posts pages. """ | |
import orgparse | |
DATE_FORMAT = '%Y-%m-%d' | |
BOOKMARK_FORMAT = """ | |
- [[%(link)s][%(heading)s]] | |
tags: %(tags)s |
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
""" A simple script to calculate average pore diameter. | |
Written for Ayush on 13th Oct 2013. | |
Usage: python avg_pore_dia.py </dir/containing/pore-files> | |
This script assumes that the pore files are .txt files. Point the | |
script to a directory containing all your pore files, and it should | |
print out the average pore diameter from all the files. |
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
;; Get tags used in the nikola site, using the tags plugin. | |
(defun nikola-tags-get () | |
"Get the current tags in the site, given the site path." | |
(let* ((nikola-command | |
"/home/punchagan/.virtualenvs/ultimatesport/bin/nikola") | |
(nikola-site (file-name-directory | |
(directory-file-name | |
(file-name-directory | |
(or (buffer-file-name (current-buffer)) "/"))))) | |
(tags (shell-command-to-string |
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 github | |
import codecs | |
from getpass import getpass | |
passwd = getpass() | |
gh = github.Github('punchagan', passwd) | |
o2b = gh.get_repo('punchagan/org2blog') | |
open_issues = list(o2b.get_issues(state='open')) |
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
// ==UserScript== | |
// @name GitHub IPynb rendering | |
// @namespace ghipynb | |
// @version 0.3.1 | |
// @description Renders raw IPython notebooks on GitHub using nbviewer and Frames! | |
// @license WTFPL | |
// @match *://*.github.com/* | |
// @match *://github.com/* | |
// @match *://gist.github.com/* | |
// @grant none |
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 | |
# Written for an import to Pivotal Tracker | |
from github import Github | |
FMT = 'Story,Labels,Story Type,Created at,Requested By,Owned By,Description,Comment' | |
PT_GH_map = { | |
'story': 'title', | |
'labels': 'labels', | |
'story type': 'type', |
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 github import Github | |
from datetime import datetime | |
from pylab import plot, show, figure, legend, title, ylabel | |
def set_repo_name(repo_name, username): | |
if '/' in repo_name: | |
return repo_name | |
else: | |
return "%s/%s" %(username, repo_name) |