This file contains hidden or 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
| #!/usr/bin/env python | |
| # Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
| # Written by Nathan Hamiel (2010) | |
| from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
| from optparse import OptionParser | |
| class RequestHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): |
This file contains hidden or 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
| ### MATPLOTLIBRC FORMAT | |
| # This is a sample matplotlib configuration file - you can find a copy | |
| # of it on your system in | |
| # site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it | |
| # there, please note that it will be overridden in your next install. | |
| # If you want to keep a permanent local copy that will not be | |
| # over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux | |
| # like systems) and C:\Documents and Settings\yourname\.matplotlib | |
| # (win32 systems). |
This file contains hidden or 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
| a à ả ã á ạ ă ằ ẳ ẵ ắ ặ â ầ ẩ ẫ ấ ậ b c d đ e è ẻ ẽ é ẹ ê ề ể ễ ế ệ f g h i ì ỉ ĩ í ị j k l m n o ò ỏ õ ó ọ ô ồ ổ ỗ ố ộ ơ ờ ở ỡ ớ ợ p q r s t u ù ủ ũ ú ụ ư ừ ử ữ ứ ự v w x y ỳ ỷ ỹ ý ỵ z A À Ả Ã Á Ạ Ă Ằ Ẳ Ẵ Ắ Ặ Â Ầ Ẩ Ẫ Ấ Ậ B C D Đ E È Ẻ Ẽ É Ẹ Ê Ề Ể Ễ Ế Ệ F G H I Ì Ỉ Ĩ Í Ị J K L M N O Ò Ỏ Õ Ó Ọ Ô Ồ Ổ Ỗ Ố Ộ Ơ Ờ Ở Ỡ Ớ Ợ P Q R S T U Ù Ủ Ũ Ú Ụ Ư Ừ Ử Ữ Ứ Ự V W X Y Ỳ Ỷ Ỹ Ý Ỵ Z |
This file contains hidden or 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 sys | |
| import caffe | |
| from PIL import Image | |
| import numpy as np | |
| pimga = Image.open("a.jpg") | |
| pimgb = Image.open("b.jpg") | |
| nimga = np.array(pimga).reshape(1,256,256,3).transpose(0,3,1,2) | |
| nimgb = np.array(pimgb).reshape(1,256,256,3).transpose(0,3,1,2) |
This file contains hidden or 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
| # Place the following in your home directory at ~/.numpy-site.cfg | |
| # in order to install numpy with openblas support | |
| [openblas] | |
| libraries = openblas | |
| library_dirs = /usr/local/opt/openblas/lib | |
| include_dirs = /usr/local/opt/openblas/include |
This file contains hidden or 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
| enum Node { | |
| TVector(&'static str), | |
| TScalar(f32), | |
| Add(Box<Node>, Box<Node>), | |
| Sub(Box<Node>, Box<Node>), | |
| Mul(Box<Node>, Box<Node>), | |
| Div(Box<Node>, Box<Node>), | |
| Pow(Box<Node>, Box<Node>), | |
| } |
This file contains hidden or 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
| Line # Hits Time Per Hit % Time Line Contents | |
| ============================================================== | |
| 25 def load_bundle(bundle_dir): | |
| 26 """ | |
| 27 Load and return a bundle object from its path. | |
| 28 The class of the returned bundle will be introspected | |
| 29 from the bundle metadata. | |
| 30 | |
| 31 This is the preferred method of de-serializing bundles. |
This file contains hidden or 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
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| * { margin:0px; padding:0px;} | |
| html { | |
| background: linear-gradient(45deg, #000, #202024 ); | |
| min-height: 100%; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
| <title>D3 Hello World</title> | |
| <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script> | |
| <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.js"></script> | |
This file contains hidden or 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
| FROM ubuntu:12.04 | |
| RUN apt-get -y update | |
| RUN apt-get -y install wget git curl python-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev protobuf-compiler libatlas-dev libatlas-base-dev | |
| RUN wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz -O /tmp/glog-0.3.3.tar.gz && tar -C /tmp -xzvf /tmp/glog-0.3.3.tar.gz && rm /tmp/glog-0.3.3.tar.gz | |
| RUN cd /tmp/glog-0.3.3 && ./configure && make && make install && cd - | |
| RUN curl http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.0-37_amd64.deb -o /tmp/cuda_install.deb && dpkg -i /tmp/cuda_install.deb && rm /tmp/cuda_install.deb | |
| RUN apt-get -y update && apt-get -y install cuda | |
| RUN curl https://gitorious.org/mdb/mdb/archive/7f038d0f15bec57b4c07aa3f31cd5564c88a1897.tar.gz -o /tmp/mdb.tar.gz && tar -C /tmp -xzvf /tmp/mdb.tar.gz && rm /tmp/mdb.tar.gz | |
| RUN cd /tmp/mdb-mdb/libraries/liblmdb/ && make && make install |
NewerOlder