Skip to content

Instantly share code, notes, and snippets.

Avatar

Tejas Shah tejasshah93

View GitHub Profile
@tejasshah93
tejasshah93 / pysparnn_outputs
Last active Mar 29, 2017
PySparNN custom distance different outputs
View pysparnn_outputs
# In[5]:
B = sparse.csr_matrix([[1, 1, 1],[1, 1, 1],[1, 1, 1]])
A = sparse.csr_matrix(
[
[2, 2, 1],
[1, 0, 1],
[1, 1, 1]
])
# In[6]:
@tejasshah93
tejasshah93 / pysparnn_custom.py
Last active Mar 23, 2017
PySparNN custom distance metric
View pysparnn_custom.py
import sklearn
class UserCustomDistance(MatrixMetricSearch):
def __init__(self, features, records_data):
super(UserCustomDistance, self).__init__(features, records_data)
self.matrix = self.matrix
self.max_overlap = self.matrix.shape[0] # for testing purpose
@staticmethod
@tejasshah93
tejasshah93 / README.md
Created Jul 13, 2016 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
View README.md
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@tejasshah93
tejasshah93 / CustomManifestSchema
Created Apr 22, 2015
Sample Manifest for a specific collection
View CustomManifestSchema
{
"_id": "7155b91bd41dc06b7b9289fac2ba33b1",
"collectionName": "TCGA-LUSC",
"countSeries": 221,
"countImages": 29136,
"totalSizeMB": 8192,
"countPatients": 31,
"countStudies": 60,
"seriesPath": "/download/TCGA-LUSC/",
"series": [