As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
This gist assumes:
The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment. | |
Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules. | |
1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted) | |
2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need: | |
a. sudo apt-get install openssh-server | |
b. sudo apt-get install libssl-dev | |
c. sudo apt-get install git | |
d. sudo apt-get install g++ | |
e. sudo apt-get install make |
from __future__ import print_function | |
import imageio | |
from PIL import Image | |
import numpy as np | |
import keras | |
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, Concatenate, Reshape, Activation | |
from keras.models import Model | |
from keras.regularizers import l2 | |
from keras.optimizers import SGD |
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5
This is an Keras implementation of ResNet-152 with ImageNet pre-trained weights. I converted the weights from Caffe provided by the authors of the paper. The implementation supports both Theano and TensorFlow backends. Just in case you are curious about how the conversion is done, you can visit my blog post for more details.
ResNet Paper:
Deep Residual Learning for Image Recognition.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
arXiv:1512.03385
# add 7z tar and zip archivers | |
FROM nvidia/cuda:9.0-cudnn7-devel | |
# https://docs.docker.com/engine/examples/running_ssh_service/ | |
RUN apt-get update && apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:Ubuntu@41' | chpasswd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config | |
RUN mkdir ~/.ssh/ |
#include <useopencv.h> | |
#include <string> | |
#include <vector> | |
#include <iostream> | |
class InteractiveGrabcut { | |
cv::Mat src; | |
cv::Mat fgd, bgd; | |
bool ldrag, rdrag; | |
std::string name; |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Use PC Style Undo</name> | |
<appendix>(Control+Z to Command_L+Z)</appendix> | |
<appendix>(Except in Vi, Terminal, VM, RDC, Emacs, X11)</appendix> | |
<identifier>remap.undo_winstyle_no_term_vi_firefox</identifier> | |
<not>VI, EMACS, TERMINAL, VIRTUALMACHINE, REMOTEDESKTOPCONNECTION, TEAMVIEWER, X11</not> | |
<autogen>--KeyToKey-- KeyCode::Z, VK_CONTROL, KeyCode::Z, ModifierFlag::COMMAND_L</autogen> | |
</item> |
// Will build an dropdown element for the given option. | |
createOptionValue : function(element,groupId) { | |
if ($(element).is(':selected')) { | |
$(element).attr('selected', 'selected').prop('selected', true); | |
} | |
// Support the label attribute on options. | |
var label = $(element).attr('label') || $(element).text(); | |
var value = $(element).val(); | |
var inputType = this.options.multiple ? "checkbox" : "radio"; |