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
When you race against time, time races against you ™ August 10th, 2023 | |
# Pending trademark | |
# DISCLAIMER | |
# These quotes at the time of writing were not found in Google. So I'm claiming them as my own :) |
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
#!/bin/python3 | |
# https://www.reddit.com/r/london/comments/xup3yh/monday_maths_at_canada_water_tube_station/ | |
def allUnique(x): | |
seen = set() | |
return not any(i in seen or seen.add(i) for i in str(x)) | |
def allEqual(x): | |
return len(set(str(x))) == 1 | |
ABCDE = 9999 |
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/python3 | |
# Calculates stats for the entire test scene (all OBUs) | |
# WARNING: Must be adapted to your use case. | |
# Usage example: | |
# import ipfs.parseStats as ipfs | |
# downloads = ipfs.parse_data(fname) | |
# s,r,dup,dow,a,p = ipfs.detail_results(downloads) | |
import time | |
import datetime | |
import sys |
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/python3 | |
# Eg. command: ./ipfs_progress.py QmV5z4Wv7ENX5KoLuBHAbBVg8Yb9ibFM9xYMWb1gLWn93w | |
import subprocess as sp | |
import sys | |
import threading | |
import concurrent.futures as thr | |
import curses | |
import time | |
from datetime import datetime |
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 bpy | |
import mathutils | |
from random import randint | |
def my_handler(scene): | |
# I couldn't register a class as handler or use global variables | |
# so I'm using hidden empties as global variables to store the | |
# previous positions when required. | |
old_loc_name = "old_empty" | |
if old_loc_name not in bpy.data.objects: |