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
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") |
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
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) |
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
$ 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 |
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
# 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 |
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
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 |
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
// ==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(); |
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
// 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){ |
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
ls | parallel 'cd {} && (bundle install; rake db:migrate)' | |
make -j 10 |
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
// 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 |
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 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') |
NewerOlder