Skip to content

Instantly share code, notes, and snippets.

View matt-erhart's full-sized avatar

Matt Erhart matt-erhart

View GitHub Profile
@ultrafunkamsterdam
ultrafunkamsterdam / fastapi_react.py
Last active June 4, 2025 12:41
FastAPI support for React ( with working react-router )
"""
███████╗ █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗
██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║
█████╗ ███████║███████╗ ██║ ███████║██████╔╝██║
██╔══╝ ██╔══██║╚════██║ ██║ ██╔══██║██╔═══╝ ██║
██║ ██║ ██║███████║ ██║ ██║ ██║██║ ██║
╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝
██████╗ ███████╗ █████╗ ██████╗████████╗
██╔══██╗ ██╔════╝ ██╔══██╗ ██╔════╝╚══██╔══╝
██████╔╝ █████╗ ███████║ ██║ ██║
@xeniaqian94
xeniaqian94 / client.ts
Created April 27, 2019 03:39
A minimum-working-example to post PDF data using axios Javascript, and decode/save the PDF data in python Flask
import fs from "fs";
// fs.readFile("test.txt", function (err, data) {
// if (err) throw err;
// console.log(data);
// });
import axios from 'axios';
import FormData from 'form-data';
import console = require("console");
@daveluo
daveluo / cifar10-darknet-gist0509.ipynb
Last active May 13, 2019 16:35
Demo of CPU-only Predictions and Pytorch Model Saving/Loading, 5/9/2018
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rosskevin
rosskevin / hoc-template.tsx
Last active August 23, 2020 19:44
Typescript higher order component (hoc) template
/* variation on https://medium.com/@DanHomola/react-higher-order-components-in-typescript-made-simple-6f9b55691af1 */
import * as React from 'react'
import { wrapDisplayName } from 'recompose'
// Props you want the resulting component to take (besides the props of the wrapped component)
interface ExternalProps {}
// Props the HOC adds to the wrapped component
export interface InjectedProps {}
@Stektpotet
Stektpotet / core-manual.css
Last active November 1, 2015 15:05
Dark-theme documentation for viewing in Visual Studio 2015 dark-themed. Place core.css in `...\Unity\Editor\Data\Documentation\en\StaticFiles\css\`. Place core-manual.css in `...\Unity\Editor\Data\Documentation\en\StaticFilesManual\css\` and rename it to `core.css`.
/* ====================================================
* Company: Unity Technologies
* Author: Rickard Andersson, [email protected]
* ====================================================
* Modified by : Halvor Smedås, [email protected]
* ==================================================== */
/*Fix for bottom part of the page, as pointed out by /u/EristicEscalator. Thanks!*/
body { background-color: #1E1E1E; }
@nebw
nebw / arXiv popularity scoring.ipynb
Created September 6, 2015 12:07
Popularity scoring for arXiv publications
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
""" check single trial morphing + time series extraction
The Problem
-----------
establish equivalence across morphing + label extraction paths
mode : single trial, single trial averaged, evoked
morphing : sample, fsaverage
@Danik
Danik / capslock_remap_alt.ahk
Last active April 11, 2025 11:13
Autohotkey Capslock Remapping Script. Makes Capslock function as a modifier key to get cursor keys etc. on the left side of the keyboard, so you never have to move your hand to the right.
; Autohotkey Capslock Remapping Script
; Danik
; More info at http://danikgames.com/blog/?p=714
; danikgames.com
;
; Functionality:
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
; Cursor keys - J, K, L, I
#Uploaded in response to query on psychopy list: https://groups.google.com/group/psychopy-users/browse_thread/thread/c65e453edf530f8
#asking for code to input a string.
#Program flashes string on screen, and user tries to type it in. Supports backspace but no other editing special characters.
#Checks whether subject got it right
#Alex Holcombe [email protected] 21 August 2012
#licensing: CC-BY whch means do whatever you want with it, with an attribution to the author. If you want permission to use it without
#attribution, just contact me.
from psychopy import monitors, visual, event, data, logging, core, sound, gui
import psychopy.info