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 | |
# 3.7.9 triggers the bug, 3.10.9 does not | |
MAJOR=3 | |
MINOR=7 | |
MAINTANANCE=9 | |
PYTHONARCH=amd64 # options: win32, amd64 | |
export WINEARCH=win64 # options: win32, win64 |
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
from bewegung import Video, FFmpegGifEncoder | |
from multiprocessing import cpu_count | |
from random import gauss | |
FRAMES = 300 | |
def data(length, *args, **kwargs): | |
state = 0 | |
for _ in range(length): |
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
# -*- coding: utf-8 -*- | |
# QGIS 3.x / Python 3.x | |
from math import sqrt, ceil | |
from multiprocessing import Pool, Process, Queue | |
from multiprocessing.pool import ThreadPool | |
WORKERS = 2 | |
def worker_task(number): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 cairo | |
import math | |
import os | |
class Image: | |
def __init__(self, width, height, background_color = (1.0, 1.0, 1.0)): | |
self._width, self._height = width, height | |
self._surface = cairo.ImageSurface(cairo.FORMAT_RGB24, self._width, self._height) | |
self._ctx = cairo.Context(self._surface) | |
self._set_background_color(background_color) |
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 | |
# Python 3 | |
import datetime | |
import gzip | |
import os | |
import stat | |
import pysftp # pip install pysftp==0.2.8 |
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 | |
# Python >= 3.6 | |
import datetime | |
import json | |
import os | |
import xmlrpc.client | |
import requests # pip install requests |
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 | |
# Python 3 | |
import datetime | |
import json | |
import os | |
from github import Github # pip install PyGithub | |
ORGANIZATIONS = ['my_organization', 'some_other_organization'] |
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
# Script for programmatically checking weather a daemonocle daemon is up or down | |
# -> see: https://github.com/jnrbsn/daemonocle | |
# -> works around the following issue: https://github.com/jnrbsn/daemonocle/issues/18 | |
# -> requires knowledge of the location of the daemon's pid file | |
# -> tested with CPython 3.6 | |
# Licenced under the MIT License (MIT) | |
# Copyright (c) 2017 @s-m-e | |
import os |
NewerOlder