Skip to content

Instantly share code, notes, and snippets.

View mksenzov's full-sized avatar

Mikhail Ksenzov mksenzov

  • Ottawa, ON, Canada
View GitHub Profile
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@hsed
hsed / vastai.md
Last active December 11, 2023 22:08
Vast.ai VPN Setup Commands

Commands

Remote => Server/GPU Computer Client => You/Dumb Computer

SSH and tunnel a port

This allows you to later run jupyterlab at 8080 on remote pc and its tunneled so u can view stuff in client.

ssh -p <PORT> <REMOTE_USER>@<REMOTE_IP> -L 8080:localhost:8080
@puredanger
puredanger / dump.clj
Last active November 20, 2017 07:36
Dumping a var meta table
;; Prints a table of vars in an ns with name/line/added/macro flag/deprecated flag
(defn pr-vars [ns-sym]
(->> (ns-publics ns-sym) vals (map meta) (sort-by :name)
(map #(select-keys % [:name :line :added :macro :deprecated]))
(map #(merge {:added nil :macro false :deprecated false} %))
clojure.pprint/print-table))
(pr-vars 'clojure.string)
;; | :added | :macro | :deprecated | :name | :line |
@mjdietzx
mjdietzx / residual_network.py
Last active March 26, 2024 06:33
Clean and simple Keras implementation of residual networks (ResNeXt and ResNet) accompanying accompanying Deep Residual Learning: https://blog.waya.ai/deep-residual-learning-9610bb62c355.
"""
Clean and simple Keras implementation of network architectures described in:
- (ResNet-50) [Deep Residual Learning for Image Recognition](https://arxiv.org/pdf/1512.03385.pdf).
- (ResNeXt-50 32x4d) [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/pdf/1611.05431.pdf).
Python 3.
"""
from keras import layers
from keras import models
@junpenglao
junpenglao / [WIP] Bayesian GMM.ipynb
Last active October 18, 2019 11:11
Documents/Github/Human_Learning/Miscellaneous/[WIP] Bayesian GMM.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@djmadeira
djmadeira / index.js
Last active April 6, 2022 20:57
"An Introduction to WebGL" tutorial code in vanilla JS
// From http://robots.thoughtbot.com/an-introduction-to-webgl
var app = function () {
var canvas = document.getElementById('canvas'),
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
// Create elements on the page which contain your shaders.
// I like using script tags with a different type attribute, like:
// `<script id="vertex-shader" type="x-vertex/x-shader">`
// You could also just put the shaders inline, but I hate escaping line breaks.
var shaders = {
@Carreau
Carreau / kernel.js
Created December 13, 2012 20:09
A node.js kernel for IPython notebook. You can see the explanation of the ipynb rendered in http://nbviewer.ipython.org
zmq = require("zmq")
fs = require("fs")
var config = JSON.parse(fs.readFileSync(process.argv[2]))
var connexion = "tcp://"+config.ip+":"
var shell_conn = connexion+config.shell_port
var pub_conn = connexion+config.iopub_port
var hb_conn = connexion+config.hb_port
@lancejpollard
lancejpollard / node-folder-structure-options.md
Created November 28, 2011 01:50
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin