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 uuid generates RFC4122-compliant UUIDs, and provides functions to marshal the UUIDs into their canonical form of 16 bytes and unmarshal them from a variety of formats. See https://tools.ietf.org/html/rfc4122. | |
package uuid | |
import ( | |
"bytes" | |
"crypto/md5" | |
"crypto/rand" | |
"crypto/sha1" | |
"encoding/binary" | |
"encoding/hex" |
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 locale | |
from dataclasses import dataclass | |
@dataclass | |
class ProfitCalculator(): | |
label: str | |
buy: float | |
sell: float | |
usd_amount: float | |
profit: float = 0.00 |
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> | |
<head> | |
<title>confetti test</title> | |
<style> | |
.container { | |
width: 100%; | |
height: 100%; | |
} |
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 main | |
import ( | |
"errors" | |
"fmt" | |
) | |
type BoolCompare struct { | |
left bool | |
right bool |
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 turtle as t | |
ARM_LENGTH = 30 | |
FOOT_LENGTH = 30 | |
RT_EYE_POS = [80, 0] | |
RT_PUPIL_POS = [78, 20] | |
# automatically calculate left eye | |
# and pupil positions based on right eye |
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 Hapi = require('@hapi/hapi'); | |
const MongoClient = require('mongodb').MongoClient; | |
const server = Hapi.server({ | |
port: 3000, | |
debug: { | |
request: ['*'] | |
} | |
}); |
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 prettytable import PrettyTable | |
data = [{ | |
'purchase_price': 26, | |
'amount_purchased': 20, | |
'amount_sold': 13, | |
'sold_for': 3000 | |
},{ | |
'purchase_price': 26, | |
'amount_purchased': 116, |
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
Congratulations! You just won millions of dollars in the lottery! That's great. | |
Now you're fucked. | |
No really. | |
You are. | |
You're fucked. |
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 sys, urllib, json, math, operator, datetime | |
today = datetime.datetime.now() | |
endSearchDate = str(today.month + 1 if today.month + 1 <= 12 else today.month) + '/' + str(today.year) | |
game = 'mega' if sys.argv[1] == 'mega' else 'lotto' | |
url = 'http://nylottery.ny.gov/wps/PA_NYSLNumberCruncher/NumbersServlet?game='+game+'&action=winningnumbers&startSearchDate=08/2000&endSearchDate='+endSearchDate+'&pageNo=1&last=0&perPage=10000&sort=0' | |
datas = json.loads((urllib.urlopen(url)).read()) | |
matrix = [] | |
for data in datas['draw']: |
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
# Buy price is the float value of the market price of the stock in question | |
buy_price = 0.623 | |
# Budget is your budget for this purchase | |
budget = 400 | |
# Per trade fee is any fee that you pay your brokerage house per transaction | |
per_trade_fee = 9.99 | |
# This is your minimum desired return |
NewerOlder