Skip to content

Instantly share code, notes, and snippets.

View Agrover112's full-sized avatar
🎆
Thriving

Agrover112

🎆
Thriving
View GitHub Profile
@johnhw
johnhw / umap_sparse.py
Last active November 15, 2024 23:31
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@hiromu
hiromu / main.py
Created December 24, 2017 18:14
Speaker Identification using GMM on MFCC
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import glob
import librosa
import numpy as np
import os
import sklearn.mixture
import sys
@honzakral
honzakral / search.py
Last active March 11, 2021 09:47
Super simple inverted index in Python
import re
from collections import defaultdict, Counter
def bold(txt):
return '\x1b[1m%s\x1b[0m' % txt
DATA = [
{
'title': 'Django',
'description': 'Django is a high-level Python Web framework that '
@arose13
arose13 / install-conda.sh
Last active November 11, 2024 05:41
Install Miniconda in Ubuntu
# Setup Ubuntu
sudo apt update --yes
sudo apt upgrade --yes
# Get Miniconda and make it the main Python interpreter
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p ~/miniconda
rm ~/miniconda.sh
export PATH=~/miniconda/bin:$PATH
@stared
stared / live_loss_plot_keras.ipynb
Last active October 8, 2024 00:42
Live loss plot for training models in Keras (see: https://github.com/stared/livelossplot/ for a library)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pratos
pratos / condaenv.txt
Created November 30, 2016 07:01
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi