(Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in the Wiki article )
Discover gists
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 sys | |
import os | |
def unwrap_and_bake_texture(obj, bake_resolution): | |
# Select the object | |
bpy.ops.object.select_all(action='DESELECT') | |
obj.select_set(True) | |
bpy.context.view_layer.objects.active = obj |
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 requests | |
import werkzeug | |
from tqdm import tqdm | |
def download_ckpt(url:str, filename:str="", overwrite:bool=False, chunk_size:int=1) -> None: | |
""" | |
try auto detect file name if left empty | |
option to overwrite if file already existed |
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
# Title: Conditioning on a Collider | |
# Description: Directed acyclic graphs (DAGs) are a great tool that can be | |
# used to guide variable selection. Colliders, a variable where two arrowheads meet, | |
# should not be adjusted for since they can induce bias. This code aims to prove | |
# and quantify the bias using a simple example. | |
# Setup ---- | |
#... Libraries ---- |
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
class Messaging(object): | |
def __init__(self, user, sender, receiver, message): | |
self.user = user | |
self.sender = sender | |
self.receiver = receiver | |
self.message = message | |
def send(self): | |
required_points = self.get_required_points() | |
if required_points > self.user.points: |
NewerOlder