Skip to content

Instantly share code, notes, and snippets.

View manzt's full-sized avatar
🥚
🐣🐥

Trevor Manz manzt

🥚
🐣🐥
View GitHub Profile
@manzt
manzt / live-mpl.ipynb
Created February 28, 2023 19:24
live matplotlib views with jupyter-scatter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manzt
manzt / example.ipynb
Created February 28, 2023 17:20
jupyter-scatter derived state
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manzt
manzt / Counter.svelte
Last active July 21, 2023 20:55
anywidget svelte demo
<script>
import { onDestroy, onMount } from "svelte";
export let model;
export let name = "value";
let count = model.get(name);
let event = `change:${name}`
let callback = () => count = model.get(name);
from setuptools import setup
VERSION = "0.1"
setup(
name="tweakpane",
description="Python bindings for Tweakpane UI",
author="Trevor Manz",
license="Apache License, Version 2.0",
version=VERSION,
import { Command } from "https://deno.land/x/cliffy@v0.25.0/command/mod.ts";
import { open } from "https://deno.land/x/open@v0.0.5/index.ts";
let subcmds = [
"search",
"images",
"shopping",
"news",
"videos",
"maps",
@manzt
manzt / mod.ts
Created September 11, 2022 20:10
import * as oauth from "https://raw.githubusercontent.com/snsinfu/deno-oauth-1.0a/main/mod.ts";
class OAuthClient extends oauth.OAuthClient {
fetch(
input: RequestInfo | URL,
init: RequestInit & { token?: oauth.Token },
): Promise<Response> {
let href = typeof input === "string"
? input
: input instanceof URL
@manzt
manzt / gosling.js
Created August 16, 2022 15:47
patch of gosling v0.9.22 with API support for custom chromsizes
This file has been truncated, but you can view the full file.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('pixi.js'), require('react'), require('higlass'), require('react-dom')) :
typeof define === 'function' && define.amd ? define(['exports', 'pixi.js', 'react', 'higlass', 'react-dom'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.gosling = {}, global.PIXI, global.React, global.hglib, global.ReactDOM));
}(this, (function (exports, pixi_js, React, higlass, ReactDOM) { 'use strict';
var __mods = { 'pixi.js': pixi_js, 'react': React, 'react-dom': ReactDOM, 'higlass': higlass };
var require = name => __mods[name];
var __create = Object.create;
@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";
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.