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
// the HTML Video element | |
const bgVideo = document.getElementById('bgVideo'); | |
// The canvas element on which we display the animation | |
const canvas = document.getElementById('spaceCanvas'); | |
const ctx = canvas.getContext('2d'); | |
canvas.width = window.innerWidth; | |
canvas.height = window.innerHeight; | |
// I create a second canvas for performance reasons (explained later) |
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
import os | |
import queue | |
import re | |
import time | |
import mido | |
import requests | |
# I don't even remember why it's there. Permission issue I worked | |
# around? Maybe I replaced that with an udev rules? |
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
import sys | |
import tempfile | |
import heapq | |
from array import array | |
def int_array_from_file(int_file, buffer_size=4000): | |
int_array = array("i") |
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
py311.json | |
========== | |
Performance version: 1.0.9 | |
Report on Linux-5.15.0-84-generic-x86_64-with-glibc2.31 | |
Number of logical CPUs: 8 | |
Start date: 2023-10-03 15:46:40.037527 | |
End date: 2023-10-03 16:30:51.189955 |
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
import atexit | |
# First, a lot of imports. I don't use all of them all the time, | |
# but I like to have them available. | |
import csv | |
import datetime as dt | |
import hashlib | |
import json | |
import math |
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
""" | |
usage: download_bookmarks.py [-h] [--concurrency [CONCURRENCY]] [--directory DIRECTORY] bookmarks | |
positional arguments: | |
bookmarks The path to the sqlite db file containing | |
the bookmarks. It's the places.sqlite file | |
in your default profile dir. | |
optional arguments: | |
-h, --help show this help message and exit |
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
print('test') |
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
[tool.poetry] | |
name = "fdsq" | |
version = "0.1.0" | |
description = "fdsq" | |
authors = ["fdsqfsq"] | |
license = "MIT" | |
[tool.poetry.dependencies] | |
python = "^3.10" |
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 bash | |
set -o errtrace # err traps works in functions | |
set -E -o errexit # exit on error | |
#set -o pipefail # don't hide errors in pipes => can't use this one, it fails on grep -q | |
set -o nounset # exit on undeclared variable | |
set -o xtrace # trace everything | |
IFS=$'\n' # Field separator is a new line |
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
""" | |
usage: download_bookmarks.py [-h] [--concurrency [CONCURRENCY]] [--directory DIRECTORY] bookmarks | |
positional arguments: | |
bookmarks The path to the sqlite db file containing | |
the bookmarks. It's the places.sqlite file | |
in your default profile dir. | |
optional arguments: | |
-h, --help show this help message and exit |
NewerOlder