Skip to content

Instantly share code, notes, and snippets.

🌯
I like burritos

Mridul Seth MridulS

🌯
I like burritos
Block or report user

Report or block MridulS

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View testscipy.cmd
echo on
docker run -p 8888:8888 jupyter/scipy-notebook:17aba6048f44
PAUSE
View test.java
import java.util.concurrent.*;
import java.io.IOException;
class JumbleNames implements Runnable
{
private String firstName, secondName;
private long delay;
public JumbleNames(String firstName, String secondName, long delay)
{
this.firstName = firstName;
View GSoC Submission
During GSoC 2016 we worked on implementing a GPML uploader and a notifications framework for GraphSpace.
GPML Upload PR: https://github.com/Murali-group/GraphSpace/pull/180
Notififcations PR: https://github.com/Murali-group/GraphSpace/pull/191
test script for GPML upload feature: https://gist.github.com/MridulS/2a406ed5c2a465531b5e924af41e3eca
View gist:669cfe5e3d4a832882544348bcf2437e
graphrefs_not_available = ['WP10', 'WP1002', 'WP1004', 'WP1007', 'WP1008', 'WP1009', 'WP101', 'WP1010', 'WP1011', 'WP1012', 'WP1014', 'WP1019', 'WP102', 'WP1022', 'WP1023', 'WP1025', 'WP1026', 'WP1027', 'WP1028', 'WP1029', 'WP1030', 'WP1031', 'WP1035', 'WP1036', 'WP1038', 'WP104', 'WP1043', 'WP1044', 'WP1045', 'WP1048', 'WP1049', 'WP105', 'WP1055', 'WP1056', 'WP106', 'WP1062', 'WP1064', 'WP1066', 'WP1067', 'WP1069', 'WP107', 'WP1075', 'WP1078', 'WP108', 'WP1084', 'WP1085', 'WP1087', 'WP1088', 'WP1089', 'WP109', 'WP1091', 'WP1092', 'WP1094', 'WP1095', 'WP1096', 'WP1097', 'WP1098', 'WP1099', 'WP110', 'WP1100', 'WP1103', 'WP1104', 'WP1106', 'WP111', 'WP1111', 'WP1113', 'WP1114', 'WP1115', 'WP1116', 'WP1118', 'WP1119', 'WP112', 'WP1121', 'WP1125', 'WP1128', 'WP1129', 'WP113', 'WP1130', 'WP1131', 'WP1133', 'WP1135', 'WP1136', 'WP1138', 'WP1139', 'WP114', 'WP1141', 'WP1142', 'WP1144', 'WP1146', 'WP1147', 'WP1148', 'WP1149', 'WP1150', 'WP1152', 'WP1153', 'WP1155', 'WP1156', 'WP1157', 'WP1159', 'WP116', 'WP1160', 'WP
View output
{'WP1': '{\n "Message": "Added WP1.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP100': '{\n "Message": "Added WP100.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1001': '{\n "Message": "Added WP1001.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1006': '{\n "Message": "Added WP1006.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1013': '{\n "Message": "Added WP1013.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1015': '{\n "Message": "Added WP1015.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1016': '{\n "Message": "Added WP1016.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1017': '{\n "Message": "Added WP1017.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1021': '{\n "Message": "Added WP1021.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1024': '{\n "Message": "Added WP1024.gpml for e@e.com.",\n "StatusCode": 201\n}',
View output
{0: {'WP1': '{\n "Message": "Added WP1.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP10': '{\n "Error": "GPML file must contain GraphRef for all interaction elements! Value for b2690 missing",\n "StatusCode": 400\n}',
'WP100': '{\n "Message": "Added WP100.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1001': '{\n "Message": "Added WP1001.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1002': '{\n "Error": "GPML file must contain GraphRef for all interaction elements! Value for f202e missing",\n "StatusCode": 400\n}',
'WP1004': '{\n "Error": "GPML file must contain GraphRef for all interaction elements! Value for b42d0 missing",\n "StatusCode": 400\n}',
'WP1006': '{\n "Message": "Added WP1006.gpml for e@e.com.",\n "StatusCode": 201\n}',
'WP1007': '{\n "Error": "GPML file must contain GraphRef for all interaction elements! Value for id7fdf5836 missing",\n "StatusCode": 400\n}',
'WP1008': '{\n "Error": "GPML file must contain GraphRef for all
View test.py
from urllib import urlopen
import subprocess
import pandas as pd
from xml.etree import ElementTree as ET
from time import sleep
import datetime
import base64
root = ET.parse(urlopen('http://webservice.wikipathways.org/listPathways')).getroot()
View test.cyjs
{
"format_version" : "1.0",
"generated_by" : "cytoscape-3.3.0",
"target_cytoscapejs_version" : "~2.1",
"data" : {
"shared_name" : "Merged Network (2016/03/21 6:02:18 PM, IST)",
"name" : "Merged Network (2016/03/21 6:02:18 PM, IST)",
"SUID" : 52,
"created_by" : "PSICQUIC Web Service",
"__Annotations" : [ ],
@MridulS
MridulS / graphviews.py
Last active Aug 29, 2015 — forked from dschult/graphview.py
NodeView and EdgesView classes for NetworkX Graphs
View graphviews.py
from __future__ import print_function
class NodeView(object):
def __init__(self, graph, data=False):
self.G = graph
self.data = data
def __iter__(self):
if data:
return iter(self.G.node.items())
return iter(self.G.node)
You can’t perform that action at this time.