Skip to content

Instantly share code, notes, and snippets.

@everling-prime
everling-prime / nerdy.ipynb
Created September 29, 2017 07:51
Nerdy Notebook (Machine Learning with NPAS)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SSARCandy
SSARCandy / gpu-occupy-status.sh
Last active August 26, 2021 17:18
Show GPU occupying status in dgx-1 (using nvidia-smi)
#!/bin/bash
function show_gpu_user {
pid=$(pstree -sg $1 | grep -Eo 'bash\([0-9]*\)' | head -1 | grep -Eo '[0-9]*');
docker ps -q | xargs docker inspect --format "{{.Name}} {{.State.Pid}}" | grep $pid | awk '{printf "%-24s", $1}';
ps aux | grep $1 | grep -v grep | awk '{ for(i=1;i<=NF;i++) {if ( i >= 11 ) printf $i" "}; printf "\n" }';
}
echo " ";
@stared
stared / live_loss_plot_keras.ipynb
Last active July 17, 2025 17:36
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.
@msell
msell / JS Cookbook.md
Last active May 20, 2020 00:47
Javascript Cookbook

Software Development Cookbook

I sometimes like to compare the tools a software developer prefers to the way a chef might have particular ingredients that he prefers to use when cooking a meal. Sure a chef may use a wide variety of ingredients depedning on what the meal calls for, but they have opinions and preferences towards certain ingredients over others. Software developers are not that different. They often prefer a set of tools and ingredients when building applications. Reusing the same tools and ingredients helps developers become more efficient in building applications.

For years I was a developer focused on .net development. However in recent times I've gravitated towards javascript. Once node was born and we could now use javascript on the server becoming a 'full stack' developer seemed much more palpable. Today we can write cross platform desktop applications using electron, native mobile applications with [react-native](https://facebook.github.io/react-nativ

@anamariakantar
anamariakantar / kml_to_csv.py
Last active October 31, 2021 13:34
Convert kml file to csv by picking up multiple xml labels
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 21 12:38:13 2017
@author: Ana-Maria.Mocanu
"""
from bs4 import BeautifulSoup
import csv
import os
@linwoodc3
linwoodc3 / keyholemarkup_converter.py
Last active March 19, 2025 11:53
Convert KML/KMZ to CSV or KML/KMZ to shapefile or KML/KMZ to Dataframe or KML/KMZ to GeoJSON. Full script with classes to convert a KML or KMZ to GeoJSON, ESRI Shapefile, Pandas Dataframe, GeoPandas GeoDataframe, or CSV. Can write the converted file directly to disk with no human intervention.
# Author:
# Linwood Creekmore III
# email: [email protected]
# Acknowledgements:
# http://programmingadvent.blogspot.com/2013/06/kmzkml-file-parsing-with-python.html
# http://gis.stackexchange.com/questions/159681/geopandas-cant-save-geojson
# https://gist.github.com/mciantyre/32ff2c2d5cd9515c1ee7
"""
Here is the python script to calculate the values you are interested in.
"""
from scipy.stats import ttest_ind_from_stats
import numpy as np
#We use Welch's t-Test as the sample sizes are different
def statistical_significance_welch_ttest(mean1,std1,count1,mean2,std2,count2):
t_statistic, p_value = ttest_ind_from_stats(mean1, std1, count1,
mean2, std2, count2,
@auremoser
auremoser / a_maps.md
Last active January 5, 2018 22:20
DSI - Maps Class
@manugarri
manugarri / nyc_tagger.ipynb
Created May 5, 2016 13:42
NYT ingredient tagger implementation with pyCRFSuite
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm