(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| import numba | |
| @numba.jit(target='cpu', nopython=True) | |
| def fast_cosine(u, v): | |
| m = u.shape[0] | |
| udotv = 0 | |
| u_norm = 0 | |
| v_norm = 0 | |
| for i in range(m): | |
| if (np.isnan(u[i])) or (np.isnan(v[i])): |
These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.
$ uname -r
| import logging | |
| import os | |
| from multiprocessing.pool import Pool as OrigPool | |
| from coverage import Coverage | |
| from multiprocessing.context import Process, DefaultContext, _concrete_contexts | |
| logger = logging.getLogger(__name__) | |
A little recursive function that return the list of absolute path of all the file in a folder.
from os import listdir
from os.path import isfile
def get_file_in_folder(path="."):
if isfile(path):
return pathThere are 2 main Tex Distribution for windows The main difference is that TexLive has tlmgr that allows you to make a granular installation downloading only the package that you'll need. While MikTex has tons of packagee per installed but it works too.
TexLive for windows Click here to download it (Warning: The full installation of TexLive is big and it will take a while)
| import tensorflow as tf | |
| def mrr_metric(labels, predictions, weights=None, | |
| metrics_collections=None, | |
| updates_collections=None, | |
| name=None): | |
| with tf.name_scope(name, 'mrr_metric', [predictions, labels, weights]) as scope: | |
| #!/usr/bin/env python3.6.2 | |
| # -*- coding: utf-8 -*- | |
| # run script from command line via python3 keyword_search_github_repositories.py | |
| import click | |
| import datetime | |
| import time | |
| from github import Github |