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 aiohttp | |
import asyncio | |
import json | |
import argparse | |
from pathlib import Path | |
import hashlib | |
import time | |
# Configuration |
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
LASTFM_API_KEY=XXXXXXXXXXXXX | |
LASTFM_API_SECRET=XXXXXXXXXXXXX | |
LASTFM_SESSION_KEY=XXXXXXXXXXXXX | |
LASTFM_USERNAME=USERNAME |
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 * as path from "path" | |
import fs from "fs/promises" | |
import { getLogger } from "../logging" | |
/** | |
* The default port number for PostgreSQL database connections. | |
*/ | |
const defaultPort = 5432 |
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
package sh | |
import ( | |
"errors" | |
"math/rand" | |
) | |
type Game struct{} | |
type GameState struct { |
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 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Initialize variables for multiple tests | |
num_tests = 10000 | |
differences = [] | |
# Loop for each test | |
for test in range(num_tests): |
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
// [dependencies] | |
// serialport = "3.3.0" | |
// dialoguer = "0.6.2" | |
use serialport::{available_ports, SerialPortType}; | |
use crate::serial; | |
use dialoguer::theme::ColorfulTheme; | |
use dialoguer::Select; | |
use std::io; |
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
int RXLED = 17; | |
int TXLED = 30; | |
// constants won't change. They're used here to set pin numbers: | |
const int buttonPin = 16; // the number of the pushbutton pin | |
const int ledPin = 10; // the number of the LED pin | |
// Variables will change: | |
int ledState = HIGH; // the current state of the output pin | |
int buttonState; // the current reading from the input pin |
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
SMALL = 1 | |
MED = 2 | |
LARGE = 3 | |
s = list(range(1, 31)) | |
m = list(range(31, 61)) | |
l = list(range(61, 91)) | |
print(s) | |
print(m) |
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 bs4 import BeautifulSoup | |
import requests | |
url = "https://www.azjobconnection.gov/ada/r/search/jobs?utf8=%E2%9C%93&per_page=50&keywords=Python&refiners=%7B%7D&is_subsequent_search=false&status=Active" | |
r = requests.get(url) | |
soup = BeautifulSoup(r.content, features="html.parser") | |
jobs_to_look_at = [] |
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 asyncpg | |
import asyncio | |
DATABASE_POOL = None | |
async def get_connection_pool(): | |
if DATABASE_POOL is None: | |
await asyncio.sleep(1) | |
return await get_connection_pool() |
NewerOlder