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 json | |
import os | |
import pickle | |
import random | |
import uuid | |
class PersistentClass: | |
reserved_keys = ["__dict__", "filename", "debug", "autosave", "file_ext"] |
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
|46281 |42655 |1794 |ultrabrite | |sewers of d'oh! | |
|nightride-0 |nightride |1794 |vladcom | |night ride | |
|toyrogue-0 |toyrogue |1794 |extar | |toyrogue 1.0 | |
|metrash-2 |metrash |1794 |st33d | |metrash | |
|pakpok-0 |pakpok |1794 |st33d | |pakpok | |
|cgprospector-0 |cgprospector |1794 |st33d | |cgprospector | |
|celeste_classic_2-5 |celeste_classic_2 |1794 |noel | |celeste classic 2 | |
|dollarone_nightatthemuseum-0 |dollarone_nightatthemuseum |1794 |dollarone | |dollarone_nightatthemuseum | |
|picpots-0 |picpots |1794 |enrohk | |picpots | |
|flipknight-0 |flipknight |1794 |
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 fitz # pip install pymupdf | |
pdffile = "file.pdf" | |
doc = fitz.open(pdffile) | |
for i in range(doc.pageCount): | |
page = doc.loadPage(i) | |
zoom = 5 | |
pix = page.getPixmap(matrix=fitz.Matrix(zoom, zoom)) | |
output = "file_%d.png" % i | |
pix.writePNG(output) |
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 hashlib | |
from glob import glob | |
import os | |
import cv2 | |
import subprocess | |
def md5_for_file(path): | |
with open(path, 'rb') as f: | |
md5 = hashlib.md5() |
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 threading import Thread | |
import cv2 | |
def connect(user, pwd, ip="192.168.0.1", port=88): | |
cap = cv2.VideoCapture('rtsp://%s:%s@%s:%d/videoMain' % (user, pwd, ip, port)) | |
while True: | |
ret, frame = cap.read() |
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
//@version=4 | |
study("Fibonacci MA rainbow", overlay=true) | |
period = input(title="MA period", type=input.integer, defval=100) | |
scale = input(title="Period Scale", type=input.integer, defval=1) | |
power = input(title="Fibonacci Scale", type=input.float, defval=1, step=0.1) | |
offset = input(title="Fibonacci Offset", type=input.float, defval=0, step=0.1) | |
smoothing = input(defval="WMA", options=["RMA", "SMA", "EMA", "WMA", "VWMA", "SMMA", "DEMA", "TEMA", "HullMA", "LSMA"]) | |
almaOffset = input(defval=0.85, minval=0, type=input.float, step=0.05) | |
almaSigma = input(defval=6, minval=0, type=input.float, step=0.5) |
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 | |
from Crypto.PublicKey import RSA | |
from Crypto.Cipher import PKCS1_OAEP | |
def save_file(path, bytes): | |
answ = "y" | |
if os.path.exists(path): | |
answ = input("File %s exists, replace? (y/n) " % path) | |
if "y" in answ.lower(): |
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 | |
srcs = ['grao_trigo_01_geo','Retopo_coentro1_low','Retopo_coentro2_low','Retopo_coentro3_low'] | |
selected_objects = bpy.context.selected_objects | |
bpy.ops.object.select_all(action='SELECT') | |
all_objects = bpy.context.selected_objects | |
bpy.ops.object.select_all(action='DESELECT') | |
src_objects = [bpy.data.objects[src] for src in srcs] |
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 | |
scene = bpy.context.scene | |
obs = set() | |
for ob in scene.objects: | |
for mod in ob.modifiers: | |
if mod.type == 'MIRROR': | |
obs.add(mod.mirror_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
#please donate BTC: 1BADjanox8xaNUYTQgHcXw6mmwuSsE9ZSg | |
import datetime | |
import locale | |
import matplotlib.pyplot as plt | |
locale.setlocale(locale.LC_ALL, 'en_CA.UTF-8') | |
reward = 50 | |
total_btc = 0 |