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
var scraper = require("google-play-scraper") | |
// get a list of apps | |
var apps = scraper.search({ | |
term: "foo", | |
num: 100, | |
}) | |
var meta = [] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Webs</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.14/p5.js"></script> | |
<style> | |
body { | |
margin: 0; | |
overflow-x: hidden; | |
overflow-y: hidden; |
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 os | |
def fix_massive(): | |
user = os.getlogin() | |
shit = rf'C:\Users\{user}\AppData\Local\Native Instruments\Massive\NIMassiveDataBase_ul' | |
if os.path.exists(shit): | |
os.remove(shit) | |
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 timeit | |
import math | |
def total_xp(level): | |
""" | |
Uses a loop to compute the total amount of xp | |
needed to reach a certain level. | |
""" | |
total = 0 |
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 os | |
def fibonnacci(num): | |
""" | |
Takes a number num and returns the num'th fibonnacci number. | |
""" | |
if num == 2 or num == 1: | |
return 1 | |
else: | |
fib = fibonnacci(num-1) + fibonnacci(num-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 os | |
def directory_walk(path): | |
for item in os.listdir(path): | |
if os.path.isdir(item): | |
directory_walk(item) | |
else: | |
print(item) |
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
# Using a lambda function | |
print(list(map(lambda i: "Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i), range(1,101)))) | |
# Using a for loop | |
for i in range(1, 101): print("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i)) |
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 | |
API_URL="http://finance.yahoo.com/d/quotes.csv" | |
symbol="AMZN" | |
params="sopc" | |
querystring = API_URL + "?s=" + symbol + "&f=" + params |
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 shutil | |
import mimetypes | |
from os import listdir | |
from os.path import isfile, join | |
ORIGIN = r"C:\Users\Konstantin\Downloads\\" # Change these. Unless your system | |
# happens to have the same configuration. | |
MUSIC_DESTINATION = r"C:\Users\Konstantin\Music\\" | |
PICTURE_DESTINATION = r"C:\Users\Konstantin\Pictures\\" | |
PDF_DESTINATION = r"C:\Users\Konstantin\Documents\\" |
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
// we're gonna try something new here. | |
int scannow=0,scandir=0; | |
int incoming = 0; | |
unsigned int table[][4]={ | |
{0x000, 0x000, 0x000, 0x0000}, | |
}; | |
void setup() { | |
Serial.begin(9600); |
NewerOlder