This file contains hidden or 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
#!/usr/bin/env python3 | |
import base64 | |
import csv | |
import os | |
import re | |
import urllib.parse | |
from io import BytesIO | |
import bs4 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import sys | |
import re | |
palfile = [ x.strip() for x in open(sys.argv[1]).readlines() ] | |
part = palfile[0] | |
reference = palfile[1] | |
checksum = palfile[2] |
This file contains hidden or 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
// Asynchronous FIFO module | |
module async_fifo #( | |
// Parameters | |
parameter DATA_SIZE = 8, // Number of data bits | |
parameter ADDR_SIZE = 4 // Number of bits for address | |
) ( | |
// Inputs | |
input [DATA_SIZE-1:0] w_data, // Data to be written to FIFO |
This file contains hidden or 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
module bytegen(input clk, | |
input clkout, | |
input txe, | |
output reg [7:0] outdata, | |
output reg wrb, | |
output siwu, | |
output [7:0] led); | |
reg [19:0] counter = 20'b0; |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import ephem | |
from datetime import datetime, timedelta, timezone | |
# don't generate any invocations until | |
SKIP_UNTIL = datetime(2021, 10, 16, 12, 0, 0) | |
# times to run per day | |
FOODS = 8 | |
# thing to run |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
0.22188506458333335 0 | |
0.22195119791666668 504 | |
0.22201742291666668 511 | |
0.22208362291666667 510 | |
0.22214973125 511 | |
0.22221593958333333 0 | |
0.22228210625 511 | |
0.22234823958333333 511 | |
0.22241446875 504 | |
0.22248198125 511 |
This file contains hidden or 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
# I had a fancy custom type in PG, and wanted to use it in | |
# SQLAlchemy. I didn't care to jump through all of the custom | |
# type stuff, and the type had an reasonable representation | |
# to JSON, and PG could convert it to/from JSON very easily. | |
# So I added cast conversions to PG, and then this special | |
# type: | |
class CastToJSONB(sqlalchemy.types.TypeDecorator): | |
'''A JSON object where we force PostgreSQL to cast our | |
interactions with the value to JSON. Useful when we've | |
got a PG data type that is a pain in the ass, but has an |
This file contains hidden or 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
\version "2.18.2" | |
\language "english" | |
right = \relative c'' { | |
\key c \major | |
\numericTimeSignature | |
\time 4/4 | |
\tempo "Whatever" 4=60 | |
% ... | |
} |
This file contains hidden or 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
age record.layer.demo; | |
import com.apple.foundationdb.record.metadata.expressions.FunctionKeyExpression; | |
import com.apple.foundationdb.record.metadata.expressions.QueryableKeyExpression; | |
import com.apple.foundationdb.record.metadata.expressions.KeyExpression; | |
import com.apple.foundationdb.annotation.API; | |
import com.apple.foundationdb.record.metadata.Key; | |
import com.apple.foundationdb.record.metadata.MetaDataException; | |
import com.apple.foundationdb.record.provider.foundationdb.FDBRecord; | |
import com.google.protobuf.Message; |
This file contains hidden or 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
#lang racket/base | |
(require racket/tcp racket/async-channel racket/match racket/function) | |
(define-struct ami [input-port | |
output-port thread | |
request-channel | |
response-channel | |
event-channel | |
[dead? #:mutable]] |
NewerOlder