Skip to content

Instantly share code, notes, and snippets.

@WilliamD47
WilliamD47 / quiz.bf
Created October 7, 2022 18:54
BrainF*ck Quiz
>>>>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]++++++++++++++++++++++++++++++++.>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@WilliamD47
WilliamD47 / main.py
Created July 23, 2022 18:11
1D Connoway's Game of Life
import time
class GameOfLife:
def __init__(self):
self.length = 6
self.board = self.create_board()
self.generation = 0
self.segmentLength = 3
self.run()
@WilliamD47
WilliamD47 / App.css
Created February 16, 2022 18:33
Password Entry System in React and Mantine
.containerMain {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 80%;
}
.centered {
border: 1px solid #8080803f;
@WilliamD47
WilliamD47 / save.swift
Created August 30, 2021 20:54
Save NSImage to file macOS SwiftUI
func savePNG(image: NSImage, path:String) {
let imageRep = NSBitmapImageRep(data: image.tiffRepresentation!)
let pngData = imageRep?.representation(using: .png, properties: [:])
do {
try pngData!.write(to: URL(fileURLWithPath: path))
} catch {
print(error)
}
@WilliamD47
WilliamD47 / betaface.py
Last active March 2, 2023 13:32
How to use the BetaFaceApi in Python 3
import requests
class faceData:
def __init__(self):
pass
def getData(self, url, filename):
headers = {
'accept': 'application/json',
william@Williams-MBP bot47 % node .
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module 'Users/william/Documents/yes/bot47/config.json'
Require stack:
- /Users/william/Documents/yes/bot47/commands/ticket/ticket.js
- /Users/william/Documents/yes/bot47/node_modules/require-all/index.js
- /Users/william/Documents/yes/bot47/node_modules/discord.js-commando/src/registry.js
- /Users/william/Documents/yes/bot47/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/william/Documents/yes/bot47/commands/ticket/ticket.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)