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 Marked watched videos | |
// @namespace deKexx | |
// @description Mark watched videos on Youtube | |
// @include http://www.youtube.com/watch* | |
// @include https://www.youtube.com/watch* | |
// @connect popo.local | |
// @author Jan Zeiseweis | |
// @version 0.1 | |
// @grant GM_xmlhttpRequest |
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 | |
def clipboard_to_dataframe(): | |
""" | |
Parses tables in the format: | |
| Col1 | Col2 | | |
------------------- | |
| 1111 | abcdefgh | | |
| 2222 | abcdefgj | | |
------------------- |
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
create or replace function f_sk_date (ts timestamp ) | |
returns integer | |
stable as $$ | |
if not ts: | |
return None | |
return int(str(ts)[0:10].replace('-','')) | |
$$ language plpythonu; | |
create or replace function f_date (ts timestamp) | |
returns 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
#!/bin/bash | |
declare -A arr | |
for zip_file in *.zip; do | |
unzip -q $zip_file && rm $zip_file | |
file=${zip_file%.zip} | |
read cksm _ < <(md5sum "$file") | |
if ((arr[$cksm]++)); then | |
echo "rm $file" | |
rm $file | |
fi |
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
#!/bin/bash -e | |
# usage: bash ./split_and_gzip.sh file.txt | |
FILE=$1 | |
LINES_PER_FILE=10000000 #10m | |
$(split -l $LINES_PER_FILE -d $FILE ${FILE}.) | |
FILES=${FILE}.* |
NewerOlder