Skip to content

Instantly share code, notes, and snippets.

View vsergeyev's full-sized avatar
🏠
Working from home

Vova Sergeyev vsergeyev

🏠
Working from home
View GitHub Profile
@gognjanovski
gognjanovski / buildCnn
Created February 18, 2019 16:04
Building CNN (Convolutional Neural Network) with Tensorflow.JS
const buildCnn = function (data) {
return new Promise(function (resolve, reject) {
// Linear (sequential) stack of layers
const model = tf.sequential();
// Define input layer
model.add(tf.layers.inputLayer({
inputShape: [7, 1],
}));
@tevino
tevino / fix_virtualenv
Last active March 24, 2024 09:41
Fix python virtualenv after python update
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
BAD_ENV_PATHS="/usr/local"
echo "Ensure the root of the broken virtualenv:"
echo " $ENV_PATH"
import re
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed