Skip to content

Instantly share code, notes, and snippets.

View Arsey's full-sized avatar

Alexander Lazarev Arsey

  • Ukraine, Poltava
View GitHub Profile
@snakers4
snakers4 / Dockerfile
Created July 3, 2018 07:13
My PyTorch 0.4 Dockerfile
# 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/
@flyyufelix
flyyufelix / readme.md
Last active August 5, 2022 15:20
Resnet-152 pre-trained model in Keras

ResNet-152 in Keras

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
@joelouismarino
joelouismarino / googlenet.py
Last active October 9, 2023 07:09
GoogLeNet in Keras
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
@mathisonian
mathisonian / index.md
Last active March 22, 2023 05:31
requiring npm modules in the browser console

demo gif

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

inspiration

@hylander0
hylander0 / gist:8607290
Created January 24, 2014 21:47
This is a Private.xml file for KeyRemap4MacBook. This custom key remapping definition remapps Windows key combinations (Ctrl-C Ctrl-V, etc) on a Mac.
<?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>
@Arsey
Arsey / gist:8157974
Created December 28, 2013 10:08
modified to support group choosing createOptionValue function from bootstrap-multiselects by David Stutz(https://github.com/davidstutz/bootstrap-multiselect)
// 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";
@natestarner
natestarner / Nodejs Instructions
Created March 8, 2012 05:50
Complete Nodejs Environment Setup
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

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@t-abe
t-abe / InteractiveGrabcut.cpp
Created June 30, 2011 04:08
interactive grabcut application using OpenCV
#include <useopencv.h>
#include <string>
#include <vector>
#include <iostream>
class InteractiveGrabcut {
cv::Mat src;
cv::Mat fgd, bgd;
bool ldrag, rdrag;
std::string name;