Skip to content

Instantly share code, notes, and snippets.

View gully's full-sized avatar
😎
hello worlds

gully gully

😎
hello worlds
View GitHub Profile
@ogrisel
ogrisel / bench_blas_lapack.py
Created January 31, 2021 23:28
Running some benchmark of BLAS level 3 and LAPACK on Apple M1
import numpy as np
try:
import tensorflow as tf
except ImportError:
tf = None
from time import perf_counter
def timeit(func, *args, **kwargs):
durations = []
@isuruf
isuruf / gist:aaead06e2b1d801a20910bc44a9ffcdf
Last active September 24, 2024 22:12
Use conda-forge lapack with acelerate as blas backend
git clone https://github.com/isuruf/vecLibFort
cd vecLibFort
conda create -n numpy pytest hypothesis numpy "libblas=*=*netlib" --yes
conda activate numpy
clang -O3 -c -o vecLibFort.o vecLibFort.c
clang -shared -o libblas.3.dylib vecLibFort.o -Wl,-reexport_library,$(xcrun -show-sdk-path)/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.tbd
codesign -s - -f libblas.3.dylib
rm $CONDA_PREFIX/lib/libblas.3.dylib
rm $CONDA_PREFIX/lib/libcblas.3.dylib
@canavandl
canavandl / monokai_theme.yml
Created July 23, 2017 19:58
Monokai-inspired Theme for Bokeh
### Monokai-inspired Bokeh Theme
# written July 23, 2017 by Luke Canavan
### Here are some Monokai palette colors for Glyph styling
# @yellow: "#E6DB74"
# @blue: "#66D9EF"
# @pink: "#F92672"
# @purple: "#AE81FF"
# @brown: "#75715E"
# @orange: "#FD971F"
@mjuric
mjuric / installing-lsst-conda-binary-builds.md
Last active May 31, 2017 18:37
Installing the LSST stack with conda

Conda packaged binaries of the LSST software stack

Video tutorial?

Click here.

Installing and using

No root privileges are required to install or use this code.

@jiffyclub
jiffyclub / jdutil.py
Created October 18, 2011 02:03
Functions for converting dates to/from JD and MJD
"""
Functions for converting dates to/from JD and MJD. Assumes dates are historical
dates, including the transition from the Julian calendar to the Gregorian
calendar in 1582. No support for proleptic Gregorian/Julian calendars.
:Author: Matt Davis
:Website: http://github.com/jiffyclub
"""