Skip to content

Instantly share code, notes, and snippets.

View bjelline's full-sized avatar

Brigitte Jellinek bjelline

View GitHub Profile
@bjelline
bjelline / gist:d8066de66e305887b714
Created November 2, 2014 16:42
Pandas, groupby and finding maximum in groups
#!/usr/local/bin/python2.7
import numpy as np
import pandas as pd
df_logfile = pd.DataFrame({ 'host' : ['this.com', 'this.com', 'this.com', 'that.com', 'other.net', 'other.net', 'other.net'],
'service' : ['mail', 'mail', 'web', 'mail', 'mail', 'web', 'web' ] })
print "Input"
print df_logfile
@bjelline
bjelline / _.md
Created May 6, 2015 13:23
anim test
@bjelline
bjelline / README.md
Last active August 29, 2015 14:21
re:publica 2015 podcast feed
@bjelline
bjelline / test_with_chrome.py
Created May 16, 2015 13:05
simplest selenium test with python and chrome
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome()
driver.get("http://localhost:5000/mood")
assert "Test App" in driver.title
el = driver.find_element_by_id('save')
@bjelline
bjelline / gameoflife.js
Last active September 6, 2015 20:19
TDD: Game of Life
// functions for plain coordinate vectors:
// n-dimentional coordinate range from min to max
function min_max_coordinates( min_coords, max_coords ){
let results = [ [] ];
for(var i=0 ; i<min_coords.length; i++ ) {
let next_results = [];
results.forEach( left_end => {
for( let v=min_coords[i]; v<=max_coords[i]; v++ ){
let new_array = left_end.slice(); // copy array
@bjelline
bjelline / index.html
Created August 23, 2012 05:40
Build a better form with HTML5 and CSS3 .... the starting point for the exercise
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Better Forms with HTML5 and CSS3</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
@bjelline
bjelline / index.html
Created August 23, 2012 06:59
Responsive Webdesign .... the starting point for the exercise
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Responsive Web Design - originally from Wikipedia, the free encyclopedia</title>
<link href="style.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
</head>
<body>
@bjelline
bjelline / icons.gif
Created August 23, 2012 13:28
jquery to show and hide stuff - starting point for exercise
icons.gif
@bjelline
bjelline / and_vs_ampersand_and.rb
Created August 25, 2012 07:25
Ruby Syntax - tiny examples
# encoding: utf-8
puts true ? "terärer operator funktioniert" : "ternärer operator funktioniert nicht"
# ohne klammern:
puts true || false ? "oder mit || funktioniert hier" : "oder mit || funktioniert hier nicht"
puts true && false ? "und mit && funktioniert hier nicht" : "und mit && funktioniert hier"
# mit klammern:
@bjelline
bjelline / README.txt
Created August 29, 2012 06:17
Seed Data about TV Shows and Episodes
this is how you load the data into a sqlite3 database.
$ cat tvshows-and-episodes.sql | sqlite3 db/development.sqlite3
The database used here (db/development.sqlite3) is the
database normally used in development in a rails projects.