Skip to content

Instantly share code, notes, and snippets.

Dmitry Prokhorov dipspb

View GitHub Profile
dipspb /
Created Mar 7, 2018 — forked from epicserve/
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License:
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
View Mayavi 3D in Jupyter Notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
dipspb /
Created Oct 2, 2017 — forked from fchollet/
New stacked RNNs in Keras
import keras
import numpy as np
timesteps = 60
input_dim = 64
samples = 10000
batch_size = 128
output_dim = 64
# Test data.
dipspb /
Created Jan 17, 2017 — forked from Liryna/
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

dipspb / build-log.txt
Created Dec 7, 2016
ArduPilot waf build failure inside of vagrant vm
View build-log.txt
Dmitriys-MBP:ardupilot dipspb$ vagrant up
Dmitriys-MBP:ardupilot dipspb$ vagrant rsync
Dmitriys-MBP:ardupilot dipspb$ vagrant ssh
Welcome to Ubuntu 16.10 (GNU/Linux 4.8.0-26-generic i686)
* Documentation:
dipspb / x_domain_session_wrapper.rb
Created May 24, 2011
View x_domain_session_wrapper.rb
require "cgi"
class XDomainSessionWrapper
def initialize(app, opts={})
@app = app
@session_cookie = opts[:session_cookie] || 'rhosync_session'
yield self if block_given?
def is_sync_protocol(env)
dipspb / sencha-reverseAnimation-howto.js
Created Apr 12, 2011
How to produce reverse animation instance in SenchaTouch
View sencha-reverseAnimation-howto.js
function reverse(animation) {
var a = ('string' == typeof animation) ? Ext.anims[animation] : animation;
if (!a) return animation;
function BackAnimation(){}
BackAnimation.prototype = a;
var ba = new BackAnimation();
ba.config = Ext.apply({}, {reverse: true}, a.config);
return ba;
You can’t perform that action at this time.