Skip to content

Instantly share code, notes, and snippets.

View sjs7007's full-sized avatar

S J Saravanan sjs7007

  • Student at University of Florida
  • Gainesville
View GitHub Profile
@sjs7007
sjs7007 / kmeans.R
Last active November 21, 2015 23:14
#https://stat.ethz.ch/R-manual/R-devel/library/cluster/html/silhouette.html
# install.packages("cluster") # for silhouette
# install.packages("Rmisc")
library(ggplot2)
library(cluster)
library(Rmisc)
#library(cluster)
library(fpc)
library(rgl)
import urllib2
def getTimings(stopName,stopUrl,waitUrl):
pageHtml = urllib2.urlopen(stopUrl).read()
startPos = pageHtml.find(waitUrl)+len(waitUrl)
endPos = pageHtml.find('<ab',startPos)
print(stopName,pageHtml[startPos:endPos]),
getTimings('Ra','http://ufl.transloc.com/t/stops/4093246','<td class="wait_time time_1" width="110px"><a href="/t/routes/4001170" title="View all of Butler Plaza">')
#getTimings('Re','http://ufl.transloc.com/t/stops/4091138','<td class="wait_time time_1" width="110px"><a href="/t/routes/4001170" title="View all of Butler Plaza">')
@sjs7007
sjs7007 / batteryTracker.sh
Created August 27, 2016 13:52
Get battery info.
b0="$(upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "percentage" | awk '{print $2}' | sed 's/.$//')"
b1="$(upower -i /org/freedesktop/UPower/devices/battery_BAT1| grep -E "percentage" | awk '{print $2}' | sed 's/.$//')"
d1="$(date)"
d0="$(date | awk '{print $4}')"
echo "$b0, $b1, $d0, $d1"
@sjs7007
sjs7007 / Install.md
Last active September 13, 2016 16:12
Installing and testing distributed tensor flow.

Instructions are based on this link as base source. I have given modified instructions for steps which didn't work for me.

Installing dependencies

tensorflow

 sudo apt-get install pkg-config zip g++ zlib1g-dev unzip swig git
@sjs7007
sjs7007 / newTrainer.py
Created September 22, 2016 00:02
Distributed tensorflow example : between graph and async replication. Credits to ischlag.github.io for the script.
'''
Distributed Tensorflow example of using data parallelism and share model parameters.
Trains a simple sigmoid neural network on mnist for 20 epochs on three machines using one parameter server.
Change the hardcoded host urls below with your own hosts.
Run like this:
pc-01$ python example.py --job-name="ps" --task_index=0
pc-02$ python example.py --job-name="worker" --task_index=0
pc-03$ python example.py --job-name="worker" --task_index=1
@sjs7007
sjs7007 / Dockerfile
Created December 16, 2016 15:32
S3 Lab ppt dockerfile
#Set the base image to Ubuntu
FROM rashmitiwari1990/uf:nvidia_caffe_s3lab_v1
#File Author / Mainetainer
MAINTAINER Maintainer S3LabUF
# Update the sources list
RUN apt-get update
#Install Python modules needed
@sjs7007
sjs7007 / MNISTTrainer.yaml
Created January 11, 2017 02:37
Swagger code for API description of MNIST trainer for Deep Cloud
/uploadCompleteScript:
post:
tags:
- MNIST
description: >-
Allows user to upload the [MNIST
dataset](https://drive.google.com/open?id=0B-HwpreJA3WzbnZodkJZVWNfUTg)
and get a trained model based on the parameters specified. Description
about the dataset can be found
[here](http://yann.lecun.com/exdb/mnist/).