Skip to content

Instantly share code, notes, and snippets.

View Ac2zoom's full-sized avatar

Akshay Chalana Ac2zoom

View GitHub Profile
@ByteSizedMarius
ByteSizedMarius / ExtractSavedPlacesGMaps.md
Last active June 23, 2024 16:55
Google Maps: Extract places from shared list

Edit: This doesn't work for lists > 20 items, because pagination does not work. Please see here

This script allows extracting name and coordinates for gmaps shared lists. It is incredibly unstable and may break anytime. Good luck figuring out why, because the syntax is extremely confusing and basically makes no sense at all. Thanks to google for not providing an api for this after LITERALLY 12 YEARS

How to use this script:

  1. Share a list and open the link in a browser window. It will redirect. The new link will look like this: google.com/maps/@<your coords>/data=....
  2. Take the data-portion and paste it into the following link: https://google.com/maps/@/data=?ucbcb=1
@khanhnamle1994
khanhnamle1994 / main.py
Last active January 26, 2024 22:14
FCN - Full Code
#--------------------------
# USER-SPECIFIED DATA
#--------------------------
# Tune these parameters
num_classes = 2
image_shape = (160, 576)
EPOCHS = 40
BATCH_SIZE = 16
@terabyte
terabyte / amazon.md
Created December 6, 2017 02:27
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?

@omoindrot
omoindrot / tensorflow_finetune.py
Last active February 25, 2024 15:00
Example TensorFlow script for fine-tuning a VGG model (uses tf.contrib.data)
"""
Example TensorFlow script for finetuning a VGG model on your own data.
Uses tf.contrib.data module which is in release v1.2
Based on PyTorch example from Justin Johnson
(https://gist.github.com/jcjohnson/6e41e8512c17eae5da50aebef3378a4c)
Required packages: tensorflow (v1.2)
Download the weights trained on ImageNet for VGG:
```
wget http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz
@khacanh
khacanh / mdn.py
Last active February 11, 2019 23:20
Mixture density network with Tensorflow
# From http://blog.otoro.net/2015/11/24/mixture-density-networks-with-tensorflow/
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import math
NHIDDEN = 24
STDEV = 0.5
KMIX = 24 # number of mixtures
@ASvyatkovskiy
ASvyatkovskiy / TF_replica_test.py
Created April 17, 2017 04:40
Test distributed data parallel synchronous LSTM with Tensorflow
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import sys
import tempfile
import time
import os
@tomrunia
tomrunia / tf_queue.py
Created November 2, 2016 14:48
TensorFlow queue example
# Initialize placeholders for feeding in to the queue
pl_queue_screens = tf.placeholder(tf.float32, shape=[config.seq_length, config.image_size, config.image_size, config.input_channels], name="queue_inputs")
pl_queue_targets = tf.placeholder(tf.uint8, shape=[config.seq_length], name="queue_targets_cnt")
# ...
capacity = config.min_after_dequeue + 10 * (config.num_gpus*config.batch_size)
q = tf.RandomShuffleQueue(
@jaron
jaron / urban-sound-cnn-salamon.py
Last active July 12, 2019 15:07
A Keras/Tensorflow implementation of the 5-layer CNN described in Salamon and Bello's paper (https://arxiv.org/pdf/1608.04363.pdf). See http://aqibsaeed.github.io/2016-09-24-urban-sound-classification-part-2/ for a description on how to create the data this uses.
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.optimizers import SGD
from keras.regularizers import l2, activity_l2
from keras.utils import np_utils
from sklearn import metrics
# to run this code, you'll need to load the following data:
@jaron
jaron / urban-sound-cnn-1.py
Created October 4, 2016 15:10
A stacked convolutional neural network (CNN) to classify the Urban Sound 8K dataset. Uses Tensorflow, with Keras to provide some higher-level abstractions. Inspired by a blog post by Aaqib Saeed (http://aqibsaeed.github.io/2016-09-24-urban-sound-classification-part-2/)
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.optimizers import Adam
from keras.utils import np_utils
from sklearn import metrics
# to run this code, you'll need to load the following data:
# train_x, train_y
@tony-gutierrez
tony-gutierrez / AWS_Single_LetsEncrypt.yaml
Last active March 7, 2024 11:29
AWS Elastic Beanstalk .ebextensions config for single instance free SSL using letsencrypt certbot and nginx. http://bluefletch.com/blog/domain-agnostic-letsencrypt-ssl-config-for-elastic-beanstalk-single-instances/
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too.
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready!
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443