A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
# Derek M. Tishler | |
# nx plot example deap individual | |
# For post: https://groups.google.com/g/deap-users/c/nZFZpm5OPZA | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
from networkx.drawing.nx_agraph import graphviz_layout | |
## May need is resuming session | |
#from deap import creator |
### | |
### This is a batched LSTM forward and backward pass. Written by Andrej Karpathy (@karpathy) | |
### BSD License | |
### Re-written in R by @georgeblck | |
### | |
rm(list=ls(all=TRUE)) | |
LSTM.init <- function(input_size, hidden_size, fancy_forget_bias_init = 3){ | |
# Initialize parameters of the LSTM (both weights and biases in one matrix) |
from __future__ import print_function | |
import numpy as np | |
from keras.callbacks import Callback | |
from keras.layers import Dense | |
from keras.layers import LSTM | |
from keras.models import Sequential | |
from numpy.random import choice | |
from utils import prepare_sequences |
--[[ | |
-- Element-Research Torch RNN Tutorial for recurrent neural nets : let's predict time series with a laptop GPU | |
-- https://christopher5106.github.io/deep/learning/2016/07/14/element-research-torch-rnn-tutorial.html | |
--]] | |
--[[ | |
-- Part 1 | |
--]] | |
require 'rnn' |
:) CREATE TABLE test.nested (EventDate Date, UserID UInt64, Attrs Nested(Key String, Value String)) ENGINE = MergeTree(EventDate, UserID, 8192) | |
CREATE TABLE test.nested | |
( | |
EventDate Date, | |
UserID UInt64, | |
Attrs Nested( | |
Key String, | |
Value String) | |
) ENGINE = MergeTree(EventDate, UserID, 8192) |
<!-- place this in an %angular paragraph --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.css" /> | |
<div id="map" style="height: 800px; width: 100%"></div> | |
<script type="text/javascript"> | |
function initMap() { | |
var map = L.map('map').setView([30.00, -30.00], 3); | |
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
Installing GeoMesa on GeoServer | |
- Downloaded geoserver 2.5.2 war wget http://downloads.sourceforge.net/project/geoserver/GeoServer/2.5.2/geoserver-2.5.2-war.zip | |
- and the corresponding WPS plugin wget http://downloads.sourceforge.net/project/geoserver/GeoServer/2.5.2/extensions/geoserver-2.5.2-wps-plugin.zip | |
- Deployed war file to Tomcat_HOME/webapps folder and then copied WPS plugin jars over to WEB-INF/lib and checked to ensure permissions were good | |
- Download Accumulo 1.5.3 :: wget http://apache.go-parts.com/accumulo/1.5.3/accumulo-1.5.3-bin.tar.gz | |
- Download Scala 2.10 :: wget http://downloads.typesafe.com/scala/2.10.5/scala-2.10.5.tgz | |
- Download Kafka 2.10-0.8.2.1 (Kafka 0.8 install that corresponds to scala 2.10) http://ftp.wayne.edu/apache/kafka/0.8.2.1/kafka_2.10-0.8.2.1.tgz | |
- Download Hadoop wget http://apache.mirrors.tds.net/hadoop/common/hadoop-2.6.0/hadoop-2.6.0.tar.gz | |
Unzip each of the downloads |
--[[ | |
Efficient LSTM in Torch using nngraph library. This code was optimized | |
by Justin Johnson (@jcjohnson) based on the trick of batching up the | |
LSTM GEMMs, as also seen in my efficient Python LSTM gist. | |
--]] | |
function LSTM.fast_lstm(input_size, rnn_size) | |
local x = nn.Identity()() | |
local prev_c = nn.Identity()() | |
local prev_h = nn.Identity()() |
-- sudo luarocks install csvigo | |
-- でインストールしておく | |
require 'csvigo' | |
--[[ test.csv | |
a,b,c,d | |
1,2,3,4 | |
5,5,3,3 | |
--]] |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)