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 random | |
from PIL import ImageDraw, Image | |
from statistics import median | |
max_dist = pow(255, 2) + pow(255, 2) + pow(255, 2) | |
global_power = (2, 2, 2) | |
def avg(arr): | |
return sum(arr) / len(arr) |
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 math import floor | |
import random | |
from midiutil.MidiFile import MIDIFile | |
MyMIDI = MIDIFile(1) | |
track = 0 | |
time = 0 | |
tempo = 130 |
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 pygame | |
import time | |
import random | |
wants_to_quit = False | |
pause = False | |
delay = 1.0 | |
plus_pressed = False | |
minus_pressed = False | |
screen_size = (640, 360) |
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 math | |
from moviepy.editor import concatenate, ImageClip | |
import os | |
import platform | |
import subprocess | |
import random | |
import torch | |
# pip install pytorch-pretrained-biggan | |
from pytorch_pretrained_biggan import (BigGAN, truncated_noise_sample, convert_to_images) | |
import numpy as np |
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
// © Badjano 2019 | |
// please donate BTC: 1BADjanox8xaNUYTQgHcXw6mmwuSsE9ZSg | |
//@version=4 | |
study("BTC Bottom and Top", overlay=true) | |
float t = (time*0.001-1100000000) * 0.000000001 | |
t1 = plot(pow(t * 5 ,10.0), color=color.green) | |
t2 = plot(pow(t * 5.65 ,9.0), color=color.green) | |
t3 = plot(pow(t * 7.75 ,8), color=color.red) | |
t4 = plot(pow(t * 9 ,7.5), color=color.red) | |
fill(t1, t2, color=color.green, transp=90) |
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 |
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
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 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
//@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) |