Skip to content

Instantly share code, notes, and snippets.

View bjelline's full-sized avatar

Brigitte Jellinek bjelline

View GitHub Profile
@bjelline
bjelline / copy into notebook.txt
Last active August 31, 2022 06:13
Pandas Wetter Beispiel
import pandas as pd
df = pd.read_csv('wetter-salzburg-2021.csv', index_col=0)
df
# ----------
import matplotlib.pyplot as plt
ax = df['tmax'].plot(color='tab:red', title="Temperatur Salzburg")
@bjelline
bjelline / klima_csv.py
Last active August 30, 2022 13:36
Listen mit Monaten und Daten
import csv
# Zwei Zeilen aus einer csv-Datei lesen:
with open('salzburg_daten.csv') as file:
reader = csv.reader(file, delimiter=';')
monate = next(reader)
temperaturen = next(reader)
$ wget -S https://barcamp-sbg.at --no-check-certificate
--2019-02-13 16:21:43-- https://barcamp-sbg.at/
Resolving barcamp-sbg.at (barcamp-sbg.at)... 138.201.31.98
Connecting to barcamp-sbg.at (barcamp-sbg.at)|138.201.31.98|:443... connected.
WARNING: no certificate subject alternative name matches
requested host name ‘barcamp-sbg.at’.
HTTP request sent, awaiting response...
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Wed, 13 Feb 2019 15:21:43 GMT
@bjelline
bjelline / capistrano_db_dump_and_clone_to_local.rb
Last active June 8, 2017 11:41 — forked from rrichards/capistrano_db_dump_and_clone_to_local.rb
Capistrano: Dump and clone to local database
# Directly copied from eycap-0.5.2 (thanks!)
#
# With these tasks you can:
# - dump your production database and save it in shared_path/db_backups
# - dump your production into your local database (clone_to_local)
#
# Tested and fixed by fjguzman
# migrated to capistrano 3 by bjelline
namespace :db do
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
// ==UserScript==
// @name FHSysUsability
// @namespace FHS
// @include https://fhsys.fh-salzburg.ac.at/*
// @version 1
// @grant none
// ==/UserScript==
function pick_sem_for_today(){
var today = new Date();
@bjelline
bjelline / chapter.js
Created May 10, 2016 13:44
my solution for code golf "chapter headings"
// my solution for code golf "chapter headings":
// https://codegolf.stackexchange.com/questions/79696/convert-header-levels-to-numbers
// created in https://ttdbin.com
function f(a){
var result = [];
for( var i in a ){
let r = [];
if(0 == i){
@bjelline
bjelline / parallel_in_the_commandline.sh
Created March 24, 2016 12:49
run stuff in parallel
ls | parallel 'cd {} && (bundle install; rake db:migrate)'
make -j 10
@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