Skip to content

Instantly share code, notes, and snippets.

View liuyxpp's full-sized avatar

Yi-Xin Liu liuyxpp

View GitHub Profile
# Requires installation of [GLMakie](https://github.com/JuliaPlots/Makie.jl)
# Include this file as include("eigshow.jl"), then run eigshow()
using GLMakie, LinearAlgebra, Printf
# Toby Driscoll (driscoll@udel.edu), October 2021. Released under Creative Commons CC BY-NC 3.0 license.
# This function is inspired by EIGSHOW.M, which is held in copyright by The MathWorks, Inc and found at:
# Cleve Moler (2021). Cleve_Lab (https://www.mathworks.com/matlabcentral/fileexchange/59085-cleve_lab), MATLAB Central File Exchange. Retrieved October 25, 2021.
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@karpathy
karpathy / min-char-rnn.py
Last active June 26, 2024 18:07
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mauriciopoppe
mauriciopoppe / _README.md
Last active January 12, 2023 16:29
MathJax numbered equation equation ref tooltip
@kroger
kroger / gist:3856821
Created October 9, 2012 05:38
autoimage for Sphinx
import os
from docutils import nodes
from docutils.parsers.rst import directives
from docutils.parsers.rst.directives.images import Image
def find_image(path, filename):
fname = os.path.join(path, filename)
if os.path.exists(fname + '.pdf'):
return fname + '.pdf'
"""
Test if a request is XHR.
"""
import argparse
from flask import Flask, request, jsonify, make_response
app = Flask(__name__)