Skip to content

Instantly share code, notes, and snippets.

View saliksyed's full-sized avatar

Salik Syed saliksyed

  • California
View GitHub Profile
@saliksyed
saliksyed / improved_api_interface.py
Last active November 1, 2018 14:19
Improving the API interface
class Pathway:
def __init__(self, api):
self.api = api
def datasets(self):
""" Returns the list of all pathway datasets available"""
pass
def getPathways(self, datasets=[Dataset.KEGG]):

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@saliksyed
saliksyed / CMakeLists.txt
Last active October 21, 2017 23:56
Add SWIG Wrapper for manipulating camera
cmake_minimum_required(VERSION 2.8.11)
project(Tungsten)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
include(CXX11)
check_for_cxx11_compiler(CXX11_COMPILER)
if(CXX11_COMPILER)
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 17 10:02:54 2017
@author: saliksyed
"""
from sklearn import datasets
from sklearn import preprocessing
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 17 10:02:54 2017
@author: saliksyed
"""
from sklearn import datasets
import numpy as np
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 16 11:14:06 2017
@author: saliksyed
"""
import random
import numpy as np
from sklearn.datasets import make_blobs
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import json
# create new figure, axes instances.
# we specify specific sizes for the figure to make it bigger
# DPI is "Dots per inch" -- it's used in the printing world
# The reason we specify the DPI instead of raw pixels is because
# we want the text to be consistently scaled.
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import json
# create new figure, axes instances.
# we specify specific sizes for the figure to make it bigger
# DPI is "Dots per inch" -- it's used in the printing world
# The reason we specify the DPI instead of raw pixels is because
# we want the text to be consistently scaled.
my_dpi = 75
fig = plt.figure(figsize=(3600/my_dpi, 1800/my_dpi), dpi=my_dpi)
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import json
# create new figure, axes instances.
# we specify specific sizes for the figure to make it bigger
# DPI is "Dots per inch" -- it's used in the printing world
# The reason we specify the DPI instead of raw pixels is because
# we want the text to be consistently scaled.
{
"216_237": {
"airport_id_2": "237",
"airport_id_1": "216",
"domestic": true,
"to_china": false
},
"797_820": {
"airport_id_2": "820",
"airport_id_1": "797",