Skip to content

Instantly share code, notes, and snippets.

@stared
stared / live_loss_plot_keras.ipynb
Last active February 25, 2023 10:20
Live loss plot for training models in Keras (see: https://github.com/stared/livelossplot/ for a library)
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 May 25, 2024 13:12
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: valinvescap@gmail.com
# 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
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

@genekogan
genekogan / _Instructions.md
Last active March 5, 2021 13:10
instructions for generating a style transfer animation from a video

Instructions for making a Neural-Style movie

The following instructions are for creating your own animations using the style transfer technique described by Gatys, Ecker, and Bethge, and implemented by Justin Johnson. To see an example of such an animation, see this video of Alice in Wonderland re-styled by 17 paintings.

Setting up the environment

The easiest way to set up the environment is to simply load Samim's a pre-built Terminal.com snap or use another cloud service like Amazon EC2. Unfortunately the g2.2xlarge GPU instances cost $0.99 per hour, and depending on parameters selected, it may take 10-15 minutes to produce a 512px-wide image, so it can cost $2-3 to generate 1 sec of video at 12fps.

If you do load the

@kylemcdonald
kylemcdonald / _tsne.pdf
Last active February 22, 2024 22:13
Exploring antonyms with word2vec.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.