Skip to content

Instantly share code, notes, and snippets.

View asford's full-sized avatar

Alex Ford asford

View GitHub Profile
@orbingol
orbingol / copy_deepcopy.py
Last active April 27, 2022 21:50
Python copy & deepcopy with dicts and slots
import copy
from itertools import chain
class CopyTestClass(object):
def __init__(self, q, w):
self._a = q
self._b = w
self._cache = {}
@oblitum
oblitum / .tmux.conf
Last active April 13, 2024 21:07
Configuration for 24bit true colors terminal with italic
set -g default-terminal 'tmux-256color'
# Enable 24 bit true colors
set -ga terminal-overrides ',*:Tc'
@jtpio
jtpio / app.py
Created January 24, 2018 23:17
Dash URL State example
import dash
import dash_core_components as dcc
import dash_html_components as html
from urllib.parse import urlparse, parse_qsl, urlencode
from dash.dependencies import Input, Output
app = dash.Dash()
app.config.suppress_callback_exceptions = True
from timeit import default_timer as time
import numpy as np
from numba import cuda
import os
os.environ['NUMBAPRO_LIBDEVICE']='/usr/lib/nvidia-cuda-toolkit/libdevice/'
os.environ['NUMBAPRO_NVVM']='/usr/lib/x86_64-linux-gnu/libnvvm.so.3.1.0'
import numpy
import torch
import ctypes
@j-min
j-min / tensorboard_inline.py
Created May 16, 2017 04:16
tensorboard inline
from IPython.display import clear_output, Image, display, HTML
import numpy as np
def strip_consts(graph_def, max_const_size=32):
"""Strip large constant values from graph_def."""
strip_def = tf.GraphDef()
for n0 in graph_def.node:
n = strip_def.node.add()
n.MergeFrom(n0)
if n.op == 'Const':
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 8, 2024 18:53
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andreasprlic
andreasprlic / webgl_protein_viewers.md
Last active December 30, 2017 02:30
WebGL based protein Viewers

A collection of WebGL based protein viewers on the Web.

=======================================================

An increasing number of WebGL based protein viewers are becoming available. Here a collection of all the viewers that I could find so far (sorted alphabetically).

3Dmol

http://3dmol.csb.pitt.edu/

pdf