This file has been truncated, but you can view the full file.
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
0000.fi | |
000.fi | |
00100.fi | |
001.fi | |
003.fi | |
005.fi | |
006.fi | |
007.fi | |
007services.fi | |
007travelers.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
# Code follows from ZIP specifications: https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.5.TXT | |
# Maybe I should have made this with zipfile and some caching BytesIO like interface instead :) | |
import requests | |
import struct | |
from collections import namedtuple | |
from dataclasses import dataclass | |
# Python 3.6: pip install dataclasses | |
''' |
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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
new_version=$( | |
curl -fsL https://updater.factorio.com/get-available-versions | | |
jq -r '."core-linux_headless64"[].to|select(.)' | | |
python -c'import sys;v=max(sys.stdin,key=lambda x:tuple(map(int,x.split("."))));print(v.strip())' | |
) | |
cur_version=$(cat $HOME/factorio/.cur-version || true) |
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
68026 fi.freelancer.com | |
21031 fi.hotels.com | |
13819 fi.pinterest.com | |
12616 geocaching.com | |
9991 dwensa.info | |
9991 pelaajalehti.com | |
9986 menot.info | |
9939 forums.offipalsta.com | |
9493 etuovi.com | |
9319 nettikone.com |
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
77110 yle.fi | |
58025 aalto.fi | |
54801 iltalehti.fi | |
52602 helsinki.fi | |
26634 tekniikanmaailma.fi | |
26594 tulospalvelu.fi | |
22594 aprs.fi | |
20667 oikotie.fi | |
20482 uusisuomi.fi | |
20445 ilmatieteenlaitos.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
import sys | |
import base64 | |
import json | |
def main(path): | |
with open(path, 'rt') as fh: | |
j = json.load(fh) | |
for entry in j['log']['entries']: | |
if not 200 <= entry['response']['status'] < 300: |
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 requests | |
headers = { | |
'Accept-Encoding': 'gzip, deflate, br', | |
'Accept-Language': 'fi', | |
'User-Agent': 'Mozilla/5.0', | |
'Accept': '*/*', | |
'Referer': 'https://www.verkkokauppa.com/fi/syyssiivous', | |
'Connection': 'keep-alive', | |
} |
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
#! /usr/bin/env python | |
# Prints the most recent timestamp for a file in a ZIP file (RFC-3339 format without timezone) | |
import datetime as dt | |
import sys | |
import zipfile | |
if not sys.argv[1:]: | |
print ('Usage: {} foo.zip'.format(sys.argv[0])) | |
exit(1) |
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/sh | |
# Usage: arff2json.sh < foo.arff > foo.json | |
# Requires arff: pip install liac-arff | |
# Why shell instead of python? Probably because I thought the default one-liner was neat:) | |
# Default format: .data = list of lists | |
python -c 'import json,sys,arff;json.dump(arff.load(sys.stdin),sys.stdout)' | |
exit 0 | |
# Or convert data to attribute maps: .data = list of JSON objects/dicts |
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
#! /usr/bin/env python3 | |
# Usage: dump_ryver_forum.py <PHPSESSID> <forum name, like "foo.ryver.com"> <forum ids, e.g. 1217356 ...> | |
# Requires Python 3.6 and the `requests` library: | |
# pip install requests | |
import requests | |
import sys | |
import time | |
session_id = sys.argv[1] | |
forum_name = sys.argv[2] |