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
This git got too large. I created a repo: https://github.com/adfinis-sygroup/adsy-python |
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
from IPython.core.display import HTML | |
def solarized(): | |
"""Solarized code mirror theme.""" | |
html = """ | |
<style type="text/css"> | |
.cm-s-ipython { background-color: #002b36; color: #839496; } | |
.cm-s-ipython span.cm-keyword {color: #859900; font-weight: bold;} | |
.cm-s-ipython span.cm-number {color: #b58900;} | |
.cm-s-ipython span.cm-operator {color: #268bd2; font-weight: bold;} |
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
git clone https://github.com/rkruppe/paver.git | |
cd paver/ | |
git checkout python3 | |
cd .. | |
pip-3.2 install inspyred | |
cd build/inspyred | |
cp ../../paver/paver-minilib.zip . | |
python3 setup.py install |
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 python | |
# -*- coding: utf-8 -*- | |
import sys | |
import sqlite3 | |
import re | |
import time | |
from dateutil import parser | |
c = sqlite3.connect("dbpedia.sqlite") | |
c.row_factory = sqlite3.Row |
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 | |
# -*- coding: utf-8 -*- | |
# _______ _______ _ _________ _ _______ | |
# |\ /|( ___ )( ____ )( ( /|\__ __/( ( /|( ____ \ | |
# | ) ( || ( ) || ( )|| \ ( | ) ( | \ ( || ( \/ | |
# | | _ | || (___) || (____)|| \ | | | | | \ | || | | |
# | |( )| || ___ || __)| (\ \) | | | | (\ \) || | ____ | |
# | || || || ( ) || (\ ( | | \ | | | | | \ || | \_ ) | |
# | () () || ) ( || ) \ \__| ) \ |___) (___| ) \ || (___) | |
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
In [8]: df = pandas.DataFrame(['tree', 'water']); df | |
Out[8]: | |
0 | |
0 tree | |
1 water | |
In [9]: df[0].str.match("(.*ree.*)") | |
Out[9]: | |
0 (tree) | |
1 [] |
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
ldapdb = collections.namedtuple("namespace", ['person', 'group', 'share', 'maillist']) | |
ldapdb.person = ldap_to_pandas(ldap.search(filter="(&(objectClass=univentionPerson))", base=common.ucs_access.base_dn())) | |
ldapdb.group = ldap_to_pandas(ldap.search(filter="(&(objectClass=univentionGroup))", base=common.ucs_access.base_dn())) | |
ldapdb.share = ldap_to_pandas(ldap.search(filter="(&(objectClass=univentionShare))", base=common.ucs_access.base_dn())) | |
ldapdb.maillist = ldap_to_pandas(ldap.search(filter="(&(objectClass=univentionMailList))", base=common.ucs_access.base_dn())) |
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
" Basic initialization for RMUX change if need, add your settings | |
set nocp | |
let &rtp .= expand(",$RMUXDIR/vim,$RMUXDIR/vim/after") | |
" let $PYTHONPATH .= expand(":$RMUXDIR/vim/jedi") | |
call pathogen#infect() | |
call pathogen#helptags() | |
syntax on | |
filetype plugin on |
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
const float rmin = 0.414213562373095; // sqrt(2) - 1 | |
const float rmax = 1.0; | |
const float pi = 3.14159265358979; | |
float circles_mask(vec2 uv, float phase){ | |
float r = mix(rmin, rmax, phase); | |
float l = length(mod(uv, 1.0)*2.0 - 1.0) - r; | |
float fw = fwidth(l)*0.5; | |
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
{ | |
"metadata": { | |
"name": "deparse - explore jedi parse" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |