Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dokerfile-NodeJs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#LTS version boron of node available from the Docker Hub
FROM node:boron

#Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

#Install app dependencies
COPY package.json /usr/src/app/
RUN npm install

#Bundle app source
COPY . /usr/src/app

EXPOSE 8080


CMD [ "npm", "start" ]
3 changes: 3 additions & 0 deletions Untitled-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Procedure installation LeaderBoard


29 changes: 29 additions & 0 deletions echopen-leaderboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#Download base image leaderboard
FROM python:2.7


ADD ./requirements.txt /requirements.txt
ADD ./manage.py /manage.py
ADD ./bootcamp/settings.py /settings.py
ADD ./uploaded_custom.py /uploaded_custom.py
ADD ./bootcamp/urls.py /urls.py
ADD ./bootcamp/wsgi.py /wsgi.py
ADD ./bootcamp/demo.db /demo.db
ADD ./Procfile /Procfile
ADD ./bootcamp/decorators.py /decorators.py

ADD ./bootcamp /bootcamp
#ADD ./processor_node /processor

RUN pip install cython
RUN pip install numpy
RUN pip install scikit-image
RUN pip install -r requirements.txt
RUN pip install kombu
RUN pip install Unipath
RUN pip install callme
RUN pip install mongoengine
RUN pip install requests
RUN python django-admin runserver &
EXPOSE 8888

1 change: 1 addition & 0 deletions echopen-leaderboard/ENV/include/python2.7
1 change: 1 addition & 0 deletions echopen-leaderboard/ENV/local/bin
1 change: 1 addition & 0 deletions echopen-leaderboard/ENV/local/include
1 change: 1 addition & 0 deletions echopen-leaderboard/ENV/local/lib
1 change: 1 addition & 0 deletions echopen-leaderboard/ENV/pip-selfcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"last_check":"2017-02-23T15:34:09Z","pypi_version":"9.0.1"}
3 changes: 3 additions & 0 deletions echopen-leaderboard/ENV/share/doc/networkx-1.11/INSTALL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
See doc/source/install.rst
or
http://networkx.github.io/documentation/latest/install.html
40 changes: 40 additions & 0 deletions echopen-leaderboard/ENV/share/doc/networkx-1.11/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
License
=======
NetworkX is distributed with the BSD license.

::

Copyright (C) 2004-2016, NetworkX Developers
Aric Hagberg <hagberg@lanl.gov>
Dan Schult <dschult@colgate.edu>
Pieter Swart <swart@lanl.gov>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of the NetworkX Developers nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# needs mayavi2
# run with ipython -wthread
import networkx as nx
import numpy as np
from enthought.mayavi import mlab

# some graphs to try
#H=nx.krackhardt_kite_graph()
#H=nx.Graph();H.add_edge('a','b');H.add_edge('a','c');H.add_edge('a','d')
#H=nx.grid_2d_graph(4,5)
H=nx.cycle_graph(20)

# reorder nodes from 0,len(G)-1
G=nx.convert_node_labels_to_integers(H)
# 3d spring layout
pos=nx.spring_layout(G,dim=3)
# numpy array of x,y,z positions in sorted node order
xyz=np.array([pos[v] for v in sorted(G)])
# scalar colors
scalars=np.array(G.nodes())+5

mlab.figure(1, bgcolor=(0, 0, 0))
mlab.clf()

pts = mlab.points3d(xyz[:,0], xyz[:,1], xyz[:,2],
scalars,
scale_factor=0.1,
scale_mode='none',
colormap='Blues',
resolution=20)

pts.mlab_source.dataset.lines = np.array(G.edges())
tube = mlab.pipeline.tube(pts, tube_radius=0.01)
mlab.pipeline.surface(tube, color=(0.8, 0.8, 0.8))

mlab.savefig('mayavi2_spring.png')
# mlab.show() # interactive window
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python
"""
Create an G{n,m} random graph and compute the eigenvalues.
Requires numpy and matplotlib.
"""
import networkx as nx
import numpy.linalg
import matplotlib.pyplot as plt

n = 1000 # 1000 nodes
m = 5000 # 5000 edges
G = nx.gnm_random_graph(n,m)

L = nx.normalized_laplacian_matrix(G)
e = numpy.linalg.eigvals(L.A)
print("Largest eigenvalue:", max(e))
print("Smallest eigenvalue:", min(e))
plt.hist(e,bins=100) # histogram with 100 bins
plt.xlim(0,2) # eigenvalues between 0 and 2
plt.show()
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Example using unicode strings as graph labels.

Also shows creative use of the Heavy Metal Umlaut:
http://en.wikipedia.org/wiki/Heavy_metal_umlaut

"""
# Author: Aric Hagberg (hagberg@lanl.gov)

# Copyright (C) 2006-2016 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.

import networkx as NX
try:
import pylab as P
except ImportError:
pass

try:
hd='H' + unichr(252) + 'sker D' + unichr(252)
mh='Mot' + unichr(246) + 'rhead'
mc='M' + unichr(246) + 'tley Cr' + unichr(252) + 'e'
st='Sp' + unichr(305) + 'n' + unichr(776) + 'al Tap'
q='Queensr' + unichr(255) + 'che'
boc='Blue ' + unichr(214) +'yster Cult'
dt='Deatht' + unichr(246) + 'ngue'
except NameError:
hd='H' + chr(252) + 'sker D' + chr(252)
mh='Mot' + chr(246) + 'rhead'
mc='M' + chr(246) + 'tley Cr' + chr(252) + 'e'
st='Sp' + chr(305) + 'n' + chr(776) + 'al Tap'
q='Queensr' + chr(255) + 'che'
boc='Blue ' + chr(214) +'yster Cult'
dt='Deatht' + chr(246) + 'ngue'

G=NX.Graph()
G.add_edge(hd,mh)
G.add_edge(mc,st)
G.add_edge(boc,mc)
G.add_edge(boc,dt)
G.add_edge(st,dt)
G.add_edge(q,st)
G.add_edge(dt,mh)
G.add_edge(st,mh)

# write in UTF-8 encoding
fh=open('edgelist.utf-8','wb')
fh.write('# -*- coding: utf-8 -*-\n'.encode('utf-8')) # encoding hint for emacs
NX.write_multiline_adjlist(G,fh,delimiter='\t', encoding = 'utf-8')

# read and store in UTF-8
fh=open('edgelist.utf-8','rb')
H=NX.read_multiline_adjlist(fh,delimiter='\t', encoding = 'utf-8')

for n in G.nodes():
if n not in H:
print(False)

print(G.nodes())

try:
pos=NX.spring_layout(G)
NX.draw(G,pos,font_size=16,with_labels=False)
for p in pos: # raise text positions
pos[p][1]+=0.07
NX.draw_networkx_labels(G,pos)
P.show()
except:
pass


Loading