Skip to content

Instantly share code, notes, and snippets.

@nova77
nova77 / clip_magic.py
Last active October 24, 2023 18:50
copy to clipboard ipython magic
View clip_magic.py
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%clip hello world
# will store "hello world"
@nova77
nova77 / settings.json
Created October 28, 2021 19:22
windows terminal settings
View settings.json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command":
View gist:f0fd57565b903ef53fd23d7b8aac04da
Sequence: (8, 16)
[[ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]
[22 3 17 17 17 13 13 13 18 13 13 19 12 11 11 13]
[12 3 18 18 18 13 13 3 17 13 18 13 17 10 10 6]
[13 15 12 12 12 10 13 18 13 18 13 18 3 22 22 13]
[18 17 22 22 22 3 10 18 22 10 12 3 22 10 10 3]
[10 22 10 10 10 22 10 17 18 14 10 12 12 16 16 10]
[14 13 4 4 4 4 4 4 14 13 14 14 14 14 14 4]
[ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2]]
Inferred: (8, 16)
View gist:652480
import glom
import sys
from itertools import izip
def taketwo(arr):
i = (i for i in arr)
return izip(i, i)
def preload(ta_path):
"preload glom with tagged articles from tagged clusters"
@nova77
nova77 / gist:95c874267b126ed18693
Last active August 29, 2015 14:23
Getting theano to work on Win7 x64
View gist:95c874267b126ed18693

Base stuff

First follow what's in here:

http://pavel.surmenok.com/2014/05/31/installing-theano-with-gpu-on-windows-64-bit/

64-bit bitching stuff

First get the MS python tools. This is particularly useful when you have issues such as Unable to find vcvarsall.bat during compilation:

View gist:b781772fc982955f442f
### Keybase proof
I hereby claim:
* I am nova77 on github.
* I am normanc (https://keybase.io/normanc) on keybase.
* I have a public key whose fingerprint is CF30 BFF2 CB99 2FE3 FA60 A965 27D0 9161 ABB5 1580
To claim this, I am signing this object:
View gist:8a4a86b2ce2f1a8dfc04
In [1]: import numpy
In [2]: numpy.__config__.show()
lapack_opt_info:
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd', 'mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
blas_opt_info:
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']