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
{ fetchFromGitHub | |
, python | |
, maturin | |
, arrow | |
, dataclasses | |
, numpy | |
, pendulum | |
, psutil | |
, pytest | |
, pytz |
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 | |
# Updated: 2018-10-17 | |
import re, sys, os | |
""" | |
Converts the Nix profile SH script to a Fish-compatible profile using a | |
simple line-by-line replace algorithm. | |
""" |
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
{ pkgs, lib, config, ... }: | |
{ | |
networking = { | |
firewall.allowedTCPPorts = [ | |
3000 # grafana | |
9090 # prometheus | |
9093 # alertmanager | |
]; | |
useDHCP = true; | |
}; |
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
// Client-side parser for .npy files | |
// See the specification: http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html | |
var NumpyLoader = (function () { | |
function asciiDecode(buf) { | |
return String.fromCharCode.apply(null, new Uint8Array(buf)); | |
} | |
function readUint16LE(buffer) { | |
var view = new DataView(buffer); | |
var val = view.getUint8(0); |
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
# https://pytest.org/latest/tmpdir.html | |
# http://py.readthedocs.org/en/latest/path.html | |
# Using in conftest.py | |
@pytest.fixture(autouse=True) | |
def a_tmp_filename(tmpdir): | |
p = tmpdir.join("filename") | |
p.write("some stuff\n") | |
return str(p) # str(p) returns the full pathname you can use with normal modules |