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
vertices = [ | |
( 0.23, -1.339, -0.626, ), | |
( 0.32, -1.346, -0.503, ), | |
( 0.38, -1.353, -0.334, ), | |
( 0.402, -1.358, -0.142, ), | |
( 0.384, -1.36, 0.053, ), | |
( 0.328, -1.359, 0.225, ), | |
( 0.24, -1.357, 0.354, ), | |
( 0.131, -1.355, 0.425, ), | |
( 0.12, -1.336, -0.69, ), |
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
#!/usr/bin/env python3 | |
'''2021-03-26: Reverse-engineer by searching for the following terms in features*.js: | |
- bracketMaintenanceMarginRate | |
- cumFastMaintenanceAmount | |
- bracketNotionalFloor | |
- bracketNotionalCap''' | |
# (max) position, maintenance margin, maintenance amount | |
maint_lookup_table = [ |
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
#!/usr/bin/env python | |
import pandas as pd | |
import sys | |
goodext = ('java') | |
removalfactor = 2.0 # Paraphrasing Tolstoy: "nothing can improve a piece of software as much as code removal". | |
commitfactor = 0.1 # A commit is only as good as it's content. |
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
#!/bin/env python | |
def printUsage(): | |
import sys | |
print("%s <regexp-search> <regexp-replace> <wildcard>" % sys.argv[0]) | |
print("Example: %s \"<td>[0-9]*</td>\\r\\n\" 0 *.html" % sys.argv[0]) | |
def doreplace(r, search, replace): |
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
#!/usr/bin/env python3 | |
import glob | |
import os | |
import re | |
import sys | |
def printUsage(): | |
print("%s <wildcard> <replacement wildcard>" % sys.argv[0]) |
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 std = @import("std"); | |
const print = std.debug.print; | |
fn mandelbrot(cReal: f64, cImag: f64, maxIter: u32) u32 { | |
var zReal: f64 = 0.0; | |
var zImag: f64 = 0.0; | |
var n: u32 = 0; | |
while (n < maxIter and zReal * zReal + zImag * zImag < 4.0) : (n += 1) { | |
var nextZReal: f64 = zReal * zReal - zImag * zImag + cReal; |
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 std = @import("std"); | |
const ArrayList = std.ArrayList; | |
const VEC_SIZE = 8; | |
const Vec = @Vector(VEC_SIZE, f64); | |
const global_allocator = std.heap.c_allocator; | |
pub fn main() !void { | |
const n = try get_n(); |
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
#!/usr/bin/env python3 | |
from datetime import datetime | |
import pandas as pd | |
def prt(*args): | |
print('\t'.join(args), file=wf) | |
global line_no | |
line_no += 1 |
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
#!/usr/bin/env python3 | |
import argparse | |
from math import ceil, floor | |
sign = lambda amt: -1 if amt<0 else (1 if amt>0 else 0) | |
class dobj: |
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
#!/usr/bin/env python3 | |
import pandas as pd | |
puzzle = ''' | |
+-----+-----+-----+ | |
|5 | 8 | 4 9| | |
| |5 | 3 | |
NewerOlder