This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am wzyboy on github. | |
* I am wzyboy (https://keybase.io/wzyboy) on keybase. | |
* I have a public key whose fingerprint is 34C2 38A1 522D BD63 9B33 957B 8532 9745 B099 9CAB | |
To claim this, I am signing this object: |
This file contains 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
# Copyright (c) 2017 Cary Kempston | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all |
This file contains 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 | |
'''A quick-and-dirty script to fetch prices from IEX API.''' | |
import sys | |
import argparse | |
import requests | |
from dateutil.parser import parse as parse_datetime | |
from beancount.core import data |
This file contains 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 html.parser import HTMLParser | |
from lektor.pluginsystem import Plugin | |
class HTMLTagStripper(HTMLParser): | |
def __init__(self): | |
self.reset() |
This file contains 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 | |
import os | |
import argparse | |
import mimetypes | |
from datetime import datetime | |
from urllib.parse import quote | |
import boto3 |
This file contains 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 | |
import argparse | |
import collections | |
from datetime import datetime | |
from beancount.loader import load_file | |
from beancount.ops import holdings | |
from beancount.core import prices |
This file contains 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 | |
''' | |
A simple script to search thru Telegram history dumps. | |
(See also: telegram-history-dump) | |
Example usages: | |
# Print dialogs | |
./telegram.py print /path/to/files.jsonl |
This file contains 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 | |
''' | |
A Twitter archive includes only text data. This simple script parses all media | |
entities in the Twitter archive and extract all media URLs. One could feed the | |
output list to "aria2c -i" and download all the media files to disk. | |
Optionally, since the filenames of the media files are unique, they could be | |
uploaded to object storage buckets for backup purposes. | |
''' |
This file contains 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
{ | |
"mappings": { | |
"_default_": { | |
"_meta": { | |
"version": "5.6.2" | |
}, | |
"date_detection": false, | |
"dynamic_templates": [ | |
{ | |
"strings_as_keyword": { |
This file contains 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
- name: Download Borg binary | |
get_url: | |
url: "{{ borg_url }}" | |
checksum: "{{ borg_checksum }}" | |
dest: "{{ borg_path }}" | |
mode: 0755 | |
- name: Fix broken Python | |
apt: | |
name: python3-venv |
NewerOlder