Skip to content

Instantly share code, notes, and snippets.

View wzieba's full-sized avatar
🏎️

Wojciech Zięba wzieba

🏎️
View GitHub Profile
@zablotski
zablotski / sredniaWazonaPwr.js
Last active March 2, 2023 17:15
Skrypt obliczjący średnią ważoną w systemie https://jsos.pwr.edu.pl. Skrypt automatycznie usuwa wpisy z oceną 2.0. Aby obliczyć należy wcisnąć F12 w przeglądarce, otworzyć wkładkę Console i wstawić skrypt. Następnie wcisnąć Enter.
$('td:contains("2.0")').parent().remove(); //usunięcie wpisów z oceną 2
var sum=0; //suma ECTS
var mulSum=0; // suma ECTS * ocena
$('td[title="ocena"]').each(function(){
mulSum += parseFloat($(this).text()) * parseFloat($(this).next().next().text());
sum += parseFloat($(this).next().next().text());
console.log(parseFloat($(this).text()), parseFloat($(this).next().next().text()));
});
console.log(mulSum, sum, mulSum/sum);
@ktrysmt
ktrysmt / .zshrc
Created May 26, 2017 15:37
using zplug in zsh
if [[ ! -d ~/.zplug ]];then
git clone https://github.com/zplug/zplug ~/.zplug
fi
source ~/.zplug/init.zsh
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/sudo", from:oh-my-zsh
zplug "plugins/command-not-found", from:oh-my-zsh
zplug "zsh-users/zsh-syntax-highlighting"
zplug "zsh-users/zsh-history-substring-search"
@jasco
jasco / csv_upload.py
Last active March 20, 2024 17:41
Python3 Flask CSV parsing of uploaded file
# Python3 implementation for CSV parsing of uploaded file
# Test: curl -H "Content-Type: multipart/form-data" -F "[email protected]" http://localhost:5000/myroute
import csv
import codecs
from flask import (jsonify, request)
# ...
@app.route('/myroute', methods=['POST'])
@gabrielfeo
gabrielfeo / merge-gradle-profiler-results.py
Last active November 9, 2024 01:07
Compare separate gradle-profiler (last tested with v0.20.0) benchmark results by merging them into a single HTML
#!/usr/bin/env python3
from collections import namedtuple
import os
import shutil
import re
import json
import argparse
import sys