Skip to content

Instantly share code, notes, and snippets.

View gglanzani's full-sized avatar

Giovanni Lanzani gglanzani

View GitHub Profile
@gglanzani
gglanzani / gsInstaller.properties
Created December 5, 2012 12:02
my gsInstaller.properties
#/**
#
#* Copyright 2011, Hortonworks Inc. All rights reserved.
#
#* Licensed under the Apache License, Version 2.0 (the "License");
#* you may not use this file except in compliance with the License.
#* You may obtain a copy of the License at
#
#* http://www.apache.org/licenses/LICENSE-2.0
#
@gglanzani
gglanzani / gsInstaller-9715.out
Created December 7, 2012 06:57
My gsInstaller log
===============================================================================
Grid Stack Installer
===============================================================================
===============================================================================
Installation Details
===============================================================================
===============================================================================
yum -y install pdsh
===============================================================================
Loaded plugins: priorities, security
(*
PapersToBibDesk: To transfer citations from Papers to formatlib and
auto-generate a citekey.
Place this in ~/Library/Scripts/Applications/Papers
Create this folder if necessary.
Select the references you wish to transfer in Papers first.
Then run the script.
@gglanzani
gglanzani / Heversine.ipynb
Created February 28, 2014 14:18
Haversine performance
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gglanzani
gglanzani / macvim
Last active August 29, 2015 13:59
brew install -v macvim 2>&1
~/C/scala-training ⮀ brew doctor
Your system is ready to brew.
~/C/scala-training ⮀ br
Updated Homebrew from 87500fdb to 120b1658.
==> New Formulae
sysdig
==> Updated Formulae
clens freerdp libdvdcss phantomjs
cloudfoundry-cli gforth midnight-commander sshguard
~/C/scala-training ⮀ brew --config

Keybase proof

I hereby claim:

  • I am gglanzani on github.
  • I am lanzani (https://keybase.io/lanzani) on keybase.
  • I have a public key whose fingerprint is D495 85D1 CBD3 BD0B BB17 C8B6 C2AA C094 1858 6A16

To claim this, I am signing this object:

from riak import RiakClient
from riak import RiakMapReduce
riak = RiakClient(protocol='pbc', host='172.17.12.22', http_port=8087)
bucket = riak.bucket("STATS")
mr = RiakMapReduce(riak)
keys = [d['_yz_rk'] for d in bucket.search(query="industry_id:[1 TO 22]", index="grid_stats", rows=1000)['docs']]
mr.add("STATS", keys[:40])
len(set(map(lambda x: x[:-5], keys[:40]))) # number of unique keys, 31 in this case
@gglanzani
gglanzani / erlang-shell
Created January 13, 2015 11:16
riak-python-client#396
riakc_pb_socket:mapred( Client, [
{<<"SCF">>,<<"satellite_00BCD806247A70C80E9780BBC274C42CB06F3047E03CABC0652F72FB0A2C55A0_False_2013-1">>},
{<<"SCF">>,<<"satellite_00BCD806247A70C80E9780BBC274C42CB06F3047E03CABC0652F72FB0A2C55A0_False_2013-3">>},
{<<"SCF">>,<<"satellite_00BCD806247A70C80E9780BBC274C42CB06F3047E03CABC0652F72FB0A2C55A0_False_2013-4">>},
{<<"SCF">>,<<"satellite_00BCD806247A70C80E9780BBC274C42CB06F3047E03CABC0652F72FB0A2C55A0_False_2013-5">>},
{<<"SCF">>,<<"satellite_00BCD806247A70C80E9780BBC274C42CB06F3047E03CABC0652F72FB0A2C55A0_False_2013-6">>},
{<<"SCF">>,<<"satellite_00BCD806247A70C80E9780BBC274C42CB06F3047E03CABC0652F72FB0A2C55A0_False_2013-7">>},
{<<"SCF">>,<<"satellite_00BCD806247A70C80E9780BBC274C42CB06F3047E03CABC0652F72FB0A2C55A0_False_2013-8">>},
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gglanzani
gglanzani / .theanorc
Created October 3, 2016 07:41
Theano + CUDA on Windows
[general]
device=gpu
floatX=float32
[cuda]
root=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0
[nvcc]
compiler_bindir=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin
[lib]
cnmem=0.2