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 requests | |
# https://uinames.com/ | |
def random_name(amount=1, gender="", region="", minlen="", maxlen="", key="name"): | |
if gender != "": | |
gender = "?gender=" + gender | |
if region != "": |
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
$fn = 50; | |
union () { | |
difference() { | |
cube([8, 8, 9.6], center=true); | |
translate([0, 0, -3.2]) { | |
cube([4.8, 4.8, 3.2*3], center=true); | |
} | |
} | |
translate([0,0,9.6/2]) { |
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 math | |
def f(x): # change this to the function of your choice | |
squared = math.pow(x, 2) | |
return math.sqrt(squared+1) | |
a = 0 # start | |
b = 2 # end | |
n = 6 # increase for more accuracy | |
dx = (b-a)/n |
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 sys | |
def common_item(lista, listb, mode=0): | |
items = [] | |
for x in lista: | |
for y in listb: | |
if x==y: | |
if not mode: | |
return True | |
if mode: |
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
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf | |
# changes incompatibly | |
POKY_BBLAYERS_CONF_VERSION = "2" | |
BBPATH = "${TOPDIR}" | |
BBFILES ?= "" | |
BBLAYERS ?= " \ | |
/home/user/yoctox86/sources/poky/meta \ | |
/home/user/yoctox86/sources/poky/meta-poky \ |
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
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf | |
# changes incompatibly | |
POKY_BBLAYERS_CONF_VERSION = "2" | |
BBPATH = "${TOPDIR}" | |
BBFILES ?= "" | |
BBLAYERS ?= " \ | |
/home/user/rpi/sources/poky/meta \ | |
/home/user/rpi/sources/poky/meta-poky \ |
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
desktop:=1 | |
<^<!b:: | |
Run, cmd | |
return | |
<^<!t:: | |
run, git-bash.exe | |
return |
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
@echo off | |
title youtube-dl script | |
set /p url="Past url to download:" | |
youtube-dl %url% | |
pause |
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 tweepy | |
def login(key, secret): | |
auth = tweepy.OAuthHandler(key, secret) | |
auth_url = auth.get_authorization_url() | |
verify = input(f"Enter your verification code after authenticating here: {auth_url}\n~$: ") | |
auth.get_access_token(verify) | |
return tweepy.API(auth) |
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
//L293D | |
//Motor A | |
#define motorPin1 5 // Pin 14 of L293 | |
#define motorPin2 2 // Pin 10 of L293 | |
//Motor B | |
#define motorPin3 3 // Pin 7 of L293 | |
#define motorPin4 4 // Pin 2 of L293 | |
//ping sensor | |
#define echoPin 0 |