Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import pygame
import serial
import time
from youtubechat import YoutubeLiveChat, get_live_chat_id_for_stream_now
import re
import os
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
import random
import numpy as np
import cv2
import pygame
import serial
import time
import threading
def mean(numbers):
return float(sum(numbers)) / max(len(numbers), 1)
frame = None
xp = 0
import numpy as np
import cv2
import serial
import time
import winsound
frequency = 2500
duration = 33
prim = None
cooldown=time.time()
try:
package xyz.spookle.httpstreamtesting;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.MimeType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import random
import statistics
import time
from typing import List, Optional
import matplotlib
import matplotlib.pyplot as plt
# [1, 2, 3, 4, 5], 0
# ^
import win32api
import win32con
import win32com.client
import time
import random
import win32gui
import pyscreenshot as ImageGrab
import cv2
import cv2.cv as cv
import numpy
from typing import List, Optional
def main():
items = [
"campbells soup",
"bonnie and kyled",
"the wonderful end of the world",
"my name is matthew"
]
import {Component} from '@angular/core';
import {filter} from 'rxjs/operators';
interface ItemType {
[key: string]: string | Array<string>;
}
type filterType = ({ filterValue: string | string[] | null; filterTarget: string });
@Component({
@jsettlem
jsettlem / chessbutgood.py
Last active January 13, 2020 05:16
it's like chess, but good
import random
import urllib.parse
from pprint import pprint
from typing import List, Iterator, Optional
import chess
import chess.svg
import chess.engine
import random
def simulate_deal_or_no_deal_simple(prizes, swap=False):
# setup
prizes = prizes.copy()
random.shuffle(prizes)
case_indices = list(range(len(prizes)))
# choose our case