This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Requirements | |
1. Numpy | |
2. Pympler or a recursive sys.getsizeof() | |
3. PIL | |
""" | |
import numpy as np | |
from pympler.asizeof import asizeof | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'aW1wb3J0IHJhbmRvbSwgc3RyaW5nLCBmdW5jdG9vbHMsIG9wZXJhdG9yLCBiYXNlNjQNCmltcG9ydCBudW1weSBhcyBucA0KZGVjb2RlID0gbGFtYmRhIHg6IGJhc2U2NC5iNjRkZWNvZGUoeCkuZGVjb2RlKCd1dGYtOCcpDQpnZXRfc3RyID0gbGFtYmRhIHg6IFt0YWJsZV9jb2RlMnN0clt4XV0gaWYgaXNpbnN0YW5jZSh4LCBpbnQpIGVsc2UgW3RhYmxlX2NvZGUyc3RyW2ldIGZvciBpIGluIHhdDQpnZXRfY29kZSA9IGxhbWJkYSB4OiBbdGFibGVfc3RyMmNvZGVbeF1dIGlmIHggPT0gJycgZWxzZSBbdGFibGVfc3RyMmNvZGVbaV0gZm9yIGkgaW4geF0NCmdldF90cmFuc2Zvcm1fb25lX2hvdCA9IGxhbWJkYSB4OiBucC5leWUobGVuKGFscGhhYmV0cykpW3hdDQpnZXRfaW52ZXJzZV90cmFuc2Zvcm1fb25lX2hvdCA9IGxhbWJkYSB4OiBbaS5hcmdtYXgoKSBmb3IgaSBpbiB4XQ0KdW5pY29kZV9jaGFycyA9IGRlY29kZShiJ3hadkZvT0c1Z2VHNWdNT2h3NEhJa2NpU3hhWEZwQT09JykNCmFscGhhYmV0cyA9IFsnICcsICcnLCAnLSddICsgW2NocihpKSBmb3IgaSBpbiByYW5nZSg5NywgMTIzKV0gKyBbY2hyKGkpIGZvciBpIGluIHJhbmdlKDY1LCA5MSldICsgbGlzdCh1bmljb2RlX2NoYXJzKSBcDQogICAgICAgICAgICArIFtjaHIoaSkgZm9yIGkgaW4gcmFuZ2UoNDgsIDU4KV0NCmNvZGVzID0gbGlzdChyYW5nZShsZW4oYWxwaGFiZXRzKSkpDQp0YWJsZV9zdHIyY29kZSA9IHtpOiBqIGZvciBpLCBqIGluIHppcChhbHBoYWJldHMsIGxpc3QocmF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
| **@created on:** 11/05/17, | |
| **@author:** Prathyush SP, | |
| **@version:** v0.0.1 | |
| | |
| **Description:** | |
| DL Module Tests | |
| **Sphinx Documentation Status:** Complete | |
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import yaml | |
import logging.config | |
import logging | |
import coloredlogs | |
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'): | |
""" | |
| **@author:** Prathyush SP | |
| Logging Setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alabaster==0.7.9 | |
appnope==0.1.0 | |
audioread==2.1.4 | |
Babel==2.3.4 | |
beautifulsoup4==4.5.3 | |
CherryPy==8.1.2 | |
click==6.6 | |
coloredlogs==6.1 | |
configparser==3.5.0 | |
coverage==4.3.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<toolSet name="Code Checking"> | |
<tool name="Flake8" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="/usr/local/bin/flake8" /> | |
<option name="PARAMETERS" value="--max-complexity 10 $FilePath$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
<filter> | |
<option name="NAME" value="Filter 1" /> | |
<option name="DESCRIPTION" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@author: Prathyush SP | |
@created on: 7/11/16 | |
Prerequisites: | |
1. PhantomJS | |
2. CasperJS | |
Usage: casperjs dlink_router_config [Downstream Value] | |
*/ | |
var casper = require('casper').create({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h1>I feel lonely</h1> | |
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.3.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var socket = io.connect('http://' + document.domain + ':' + location.port); | |
socket.on('connect', function() { | |
socket.emit('connected'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setup Snippets |