Skip to content

Instantly share code, notes, and snippets.

View manzt's full-sized avatar
🥚
🐣🐥

Trevor Manz manzt

🥚
🐣🐥
View GitHub Profile
@manzt
manzt / rename-jsx.mjs
Last active August 9, 2022 13:37
rename .js -> .jsx for JS files containing JSX
// @ts-check
import * as fsp from "node:fs/promises";
import * as util from "node:util";
import glob from "glob";
const matchingReactString = "from 'react'";
const BLUE = "\u001b[34m";
const YELLOW = "\u001b[33m";
const RESET = "\u001b[0m";
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.
@manzt
manzt / index.html
Created May 2, 2022 16:22
Gos & Pyscript
<!DOCTYPE html>
<html>
<head>
<title>Gos & pyscript</title>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-env>
- gosling
</py-env>
</head>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pathlib
import google.colab
import nbformat
import nbconvert
def download_html(drive_path, mount_dir="/content/drive/"):
notebook_path = pathlib.Path(mount_dir) / "MyDrive" / drive_path
# open notebook
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.
@manzt
manzt / example.json
Created February 1, 2022 15:01
basic higlass config
{
"editable": true,
"zoomFixed": false,
"trackSourceServers": [
"//higlass.io/api/v1",
"https://resgen.io/api/v1/gt/paper-data"
],
"exportViewUrl": "/api/v1/viewconfs",
"views": [
{
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 13 columns, instead of 11 in line 9.
Week,Dates,India,Chile,Australia,Brazil,Canada,China,South Korea,Germany,Ireland,South Africa,United States
1,2020-03-08 to 2020-03-14,1.049,4.923,8.334,1.65,4.814,1.145,21.384,46.187,23.48,1.623,8.779
2,2020-03-15 to 2020-03-21,1.165,27.365,33.195,5.093,29.59,1.228,14.906,211.399,133.853,4.405,70.628
3,2020-03-22 to 2020-03-28,1.477,75.441,101.745,14.563,114.904,1.483,14.244,424.494,331.107,16.967,300.054
4,2020-03-29 to 2020-04-04,2.518,123.41,75.901,31.373,197.119,1.377,14.223,459.286,444.315,7.711,594.557
5,2020-04-05 to 2020-04-11,4.886,158.511,30.53,49.772,274.912,1.327,7.321,344.931,876.695,8.47,673.813
6,2020-04-12 to 2020-04-18,6.272,170.071,11.393,75.949,293.51,1.538,4.375,221.018,1181.688,17.961,603.421
7,2020-04-19 to 2020-04-25,8.654,207.057,5.942,107.634,319.345,1.084,2.464,158.202,771.182,23.374,626.351
8,2020-04-26 to 2020-05-02,10.721,350.232,5.119,178.719,307.156,1.034,2.269,101.903,530.589,34.301,583.216
9,2020-05-03 to 2020-05-09,17.745,576.167,6.49,278.386,292.239,1.02,2.58,76.873,321.791