Skip to content

Instantly share code, notes, and snippets.

View bjelline's full-sized avatar

Brigitte Jellinek bjelline

View GitHub Profile
@bjelline
bjelline / README.md
Last active August 29, 2015 14:21
re:publica 2015 podcast feed
@bjelline
bjelline / _.md
Created May 6, 2015 13:23
anim test
@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 / bulk.rake
Created October 3, 2013 12:11
Rake Task for creating a bunch of repositories in gitlab
# Inspired by https://bitbucket.org/paulopatto/gitlab/src/cdd8b38d0117/lib/tasks/bulk_import.rake
# but updated for gitlab 6
desc "Bulk Create Repositories"
task :bulk_create => :environment do |t, args|
gitlab_group = "mmt-b2012"
project_name = "patterns"
teacher = User.find_by_name("Some Person")
gl = Gitlab.config
@bjelline
bjelline / README.md
Last active December 22, 2015 02:28
@bjelline
bjelline / gist:6048466
Last active December 20, 2015 01:19
what to do to the 4 example apps when learnery-engins changes
rake learnery:install:migrations
rake db:migrate
cp -a ../learnery-engine/test/factories/* test/factories
git diff
revision=`grep -A1 git://github.com/learnery/learnery.git Gemfile.lock |grep revision| sed -e 's/.*: //'`
git add db/migrate
git add test/factories
git commit -a -m "upgraded to learnery engine $revision"
git push github master; git push origin master
heroku run rake db:migrate
@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.
@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 / icons.gif
Created August 23, 2012 13:28
jquery to show and hide stuff - starting point for exercise
icons.gif
@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>