Skip to content

Instantly share code, notes, and snippets.

View mikf's full-sized avatar

Mike Fährmann mikf

  • Germany
View GitHub Profile
@mikf
mikf / useragent.py
Last active November 11, 2022 22:03
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Get User-Agent header from default browser"""
import webbrowser
import socket
def user_agent():
@mikf
mikf / clock_info.py
Created May 17, 2022 08:42
python clock info
#!/usr/bin/env python3
import time
import sys
def get_clock_info():
clock_info = []
for name in ("monotonic", "perf_counter", "process_time",
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Name
merge_gdl_archives - merge multiple download archives into one
Usage
merge_gdl_archives.py merged.sqlite old1.sqlite old2.sqlite ...
"""
https://www.flickr.com/photos/biodivlibrary/albums/72157719480387299
https://www.flickr.com/photos/biodivlibrary/albums/72157719491069662
https://www.flickr.com/photos/biodivlibrary/albums/72157719533382815
https://www.flickr.com/photos/biodivlibrary/albums/72157719533358620
https://www.flickr.com/photos/biodivlibrary/albums/72157719483762696
https://www.flickr.com/photos/biodivlibrary/albums/72157719490887917
https://www.flickr.com/photos/biodivlibrary/albums/72157719490571987
https://www.flickr.com/photos/biodivlibrary/albums/72157719479800229
https://www.flickr.com/photos/biodivlibrary/albums/72157719477805498
https://www.flickr.com/photos/biodivlibrary/albums/72157719479761644
@mikf
mikf / README.md
Created February 11, 2021 21:53 — forked from ZipFile/README.md
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@mikf
mikf / Pixiv App API.yaml
Created March 2, 2020 14:20 — forked from ZipFile/Pixiv App API.yaml
Unofficial API specification extracted from Pixiv Android App
swagger: '2.0'
info:
title: "Pixiv App API"
description: "Unofficial API specification extracted from Pixiv Android App v5.0.17"
version: "1.0"
host: app-api.pixiv.net
schemes:
- https
@mikf
mikf / Pixiv Public API.yaml
Created March 2, 2020 14:20 — forked from ZipFile/Pixiv Public API.yaml
Unofficial API specification extracted from Pixiv Android App
swagger: "2.0"
info:
title: "Pixiv Public API"
description: "Unofficial API specification extracted from Pixiv Android App v4.8.2"
version: "1.0"
host: public-api.secure.pixiv.net
schemes:
- https
basePath: /v1
produces:
@mikf
mikf / keenspot.txt
Last active June 1, 2019 19:27
list of keenspot comics
http://twenty-seven.keenspot.com/
http://avengelyne.keenspot.com
http://banzaigirl.keenspot.com/
http://barkercomic.keenspot.com/
http://brawlinthefamily.keenspot.com/
http://choppingblock.keenspot.com/
http://clicheflambe.keenspot.com/
http://countyoursheep.keenspot.com/
http://crowscare.keenspot.com/
http://dreamless.keenspot.com/
@mikf
mikf / benchmark.py
Last active May 1, 2019 20:57
urllib3 rfc3986 compile times
#!/usr/bin/env python3
import urllib3.packages.rfc3986.misc
import time
import re
re_type = type(re.compile(""))
results = []
for k, v in urllib3.packages.rfc3986.misc.__dict__.items():
from gallery_dl.job import Job, Message
class CacheJob(Job):
def __init__(self, url, parent=None):
Job.__init__(self, url, parent)
self.data = []
def run(self):
for msg in self.extractor: