Skip to content

Instantly share code, notes, and snippets.

View alper's full-sized avatar
Always coffee

Alper Cugun alper

Always coffee
View GitHub Profile
@alper
alper / gist:1601164
Created January 12, 2012 15:38
D3 onload
window.onload = function() {
console.log('Loaded..');
var w = 960;
var h = 2200;
var cluster = d3.layout.cluster()
.size([h, w - 160])
@alper
alper / import-tweets.txt
Created April 18, 2012 16:25
Thinkup Tweet importetr
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
// Generated on: 2012-04-13 23:44:46 GMT+00:00
// ************** Tweet 1 of 47455 **************
{
"in_reply_to_screen_name": null,
@alper
alper / gist:2824012
Created May 29, 2012 10:20
Prince of Networks notes

the engineer must /negotiate/ with the mountain at every stage of the project, testing to see where the rock resists and where it yields, and is quite often surprised by the behaviour of the rock.

(making stuff keeps you honest because nothing can ever be reduced to anything else. Latour irreducibility)

it is impossible to derive one thing instantly from another without the needed labour

Actors become more real by making larger parts of the cosmos vibrate in harmony with their goals, or by taking detours in their goals to capitalize on the force of nearby actants.

It is never the actant in naked purity that possesses force, but only the actant involved in its ramshackle associations with others, which collapse if these associations are not lovingly maintained.

@alper
alper / pullsink.py
Created August 10, 2012 11:23
Simplified zeromq PUSH/PULL example
import sys
import time
import zmq
context = zmq.Context()
# Socket to receive messages on
receiver = context.socket(zmq.PULL)
receiver.bind("tcp://*:5558")
@alper
alper / gist:3749030
Created September 19, 2012 10:57 — forked from gnunicorn/gist:3748738
Git for Beginners: Call for Coaches

The OpenTechSchool has set up and hosted a few tech workshops and meetups here in Berlin now. Aside from the monthly Beginners Meetup and hosting the Udacity Global Meetup we hosted workshops for program beginners in Python and Javascript on our own and on the premise of CampusParty.

One thing that was extraordinary popular on CampusParty was the Workshop on Git for beginners. And we decided to do it again, this time with a closer focus on version control as a major benefit in code sharing (by using git and github) for beginners - free of charge.

So if you are interested in

@alper
alper / lawnl.py
Created October 2, 2012 21:11
get law
#
from suds.client import Client
from suds.xsd.doctor import ImportDoctor, Import
wsdlURL = 'http://wetten.overheid.nl/BWBIdService/BWBIdService.wsdl'
imp = Import('http://schemas.xmlsoap.org/soap/encoding/')
doctor = ImportDoctor(imp)
@alper
alper / Example output.txt
Created November 29, 2012 22:58
A* routing for a connection graph of Yorckstraße
neighbors of S1NordS ['GG', 'S1NordN', 'U7S']
path from GG to U7S
['GG', 'S1NordS', 'U7S']
path from GG to S25
['GG', 'S1NordS', 'U7S', 'S25']
[Finished in 0.1s]
GG = Großgörchenstraße
S1NordS = S1 North Exit South of the road
S1NordN = S1 North Exit North of the road
@alper
alper / index.html
Last active December 14, 2015 14:39 — forked from ilyabo/index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery.tipsy.js"></script>
<link href="tipsy.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="chart"></div>

How to set up a fresh project (on OS X)

  1. Install homebrew, by getting the commandline tools: https://developer.apple.com/downloads and then do the install homebrew here: http://mxcl.github.com/homebrew/
  2. Open Terminal.app
  3. Check python is installed by typing python
  4. Install pip if you don't have it sudo easy_install pip
  5. Use pip to install virtualenv (don't ask me why): sudo pip install virtualenv
  6. Find a fresh place to checkout the project: git@github.com:whatsthehubbub/victoryboogiewoogie.git use the Mac client: http://mac.github.com/
  7. In the terminal cd to where you just checked out the project, for instance: cd ~/Documents/projects/sake/victorycheckout
  8. Create a virtual environment if you don't have one yet: virtualenv venv --distribute