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
const diff = require('deep-diff').diff; | |
async function main(groupId) { | |
let res = await fetch("https://www.duolingo.com/2017-06-30/sessions", { | |
"credentials": "include", | |
"headers": { | |
"Content-Type": "application/json; charset=UTF-8", | |
"Authorization": "Bearer Put your bearer ode here" | |
}, | |
body: JSON.stringify({ |
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
#include <iostream> | |
#include <string> | |
#if defined(_WIN32) || defined(_WIN64) | |
#include <windows.h> | |
#elif defined(__APPLE__) | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#elif defined(__linux__) | |
#include <unistd.h> |
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
# Scrapes duolingo for all users | |
import requests | |
from datetime import datetime, timezone | |
def date(epoch_time): | |
date_obj = datetime.fromtimestamp(epoch_time, timezone.utc) | |
# Format the datetime object to dd/mm/yy hh:mm:ss format | |
formatted_date = date_obj.strftime('%d/%m/%y %H:%M:%S') |
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 System.Process | |
import Control.Concurrent | |
import System.Directory | |
import System.FilePath ((</>)) | |
printFiles :: [String] -> IO() | |
printFiles (x:xs) = do | |
putStrLn x | |
printFiles xs |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
margin: 0; | |
overflow: hidden; | |
} |
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 network | |
import socket | |
import time | |
import struct | |
import urequests | |
import BlynkLib | |
import network | |
import machine | |
import gc |
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 machine import PWM, Pin | |
from utime import sleep, sleep_us, ticks_ms | |
class StepperMotor: | |
def __init__(self, ins): | |
self.ins = [Pin(ins[0], Pin.OUT), Pin(ins[1], Pin.OUT), Pin(ins[2], Pin.OUT), Pin(ins[3], Pin.OUT)] | |
def step(self, direction): | |
r = [3, 2, 1, 0] if (not direction) else [0, 1, 2, 3] | |
for i in r: |