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 python | |
from argparse import ArgumentParser, FileType | |
import numpy as np | |
parser = ArgumentParser() | |
parser.add_argument("formula", | |
help = "expression to evaluate for each row; " | |
"use '%%i' to refer to the ith input " | |
"column; numpy functions are available; " |
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 node | |
const fs = require('fs'); | |
// takes a node from the original data structure and copies only the needed | |
// attributes into new node | |
function make_node(node) { | |
return { | |
id: node.id, | |
name: node.title, | |
children: [] |
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/sh | |
cat << EOF | |
diff --git a/source/history.c b/source/history~.c | |
index 25cfcb0..dfefc12 100644 | |
--- a/source/history.c | |
+++ b/source/history.c | |
@@ -37,7 +37,7 @@ | |
#include "history.h" | |
#include "settings.h" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import requests | |
import pandas as pd | |
from cachetools.func import ttl_cache | |
@ttl_cache(1000, 600) | |
def get_system_info(sysid): | |
return requests.get( | |
f'https://rest.fnar.net/systemstars/star/{sysid}' | |
).json() |