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 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 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
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
#!/usr/bin/env python3 | |
import pandas as pd | |
puzzle = ''' | |
+-----+-----+-----+ | |
|5 | 8 | 4 9| | |
| |5 | 3 | |
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 math import * | |
class Coord: | |
def __init__(self, x, y=None): | |
if y is None: | |
self.lat = x[1] | |
self.lng = x[0] | |
else: | |
self.lat = x |
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 "experimental" | |
import "math" | |
import "system" | |
/* Compares a value with 1w and 2w back. If the percentage diff is large | |
(positive or negative), it means that we have some outage or other anomaly. */ | |
subQuery = (start, stop, myField, label, timeShiftDuration) => | |
from(bucket: "my-bucket") |
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
''' | |
# AutoMap | |
A tool for plotting pretty much anything with geo-coordinates in it. | |
First install Python3 and Streamlit (https://docs.streamlit.io/). Start script by running | |
```bash | |
streamlit run automap.py | |
``` |
NewerOlder