Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
pip install tensorflow
pip install keras
pip install elephas
pip install pydl4j
@wmeddie
wmeddie / Info.plist
Last active August 29, 2018 11:10
Running Spark in PyJnjius
<!-- $cat /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Info.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>libjli.dylib</string>
<key>CFBundleGetInfoString</key>
#!/bin/bash
# Oracle Java 8 downloader. Adapted(but heavily modified) from: https://github.com/metalcated/Scripts/blob/master/install_java.sh
#Args:
# 1. Java type; "jdk" or "jre"
# 2. Java version: 7, 8, 9 etc
if [ $# -eq 0 ]
then
echo "No arguments supplied"
@wmeddie
wmeddie / skil.log
Last active October 31, 2017 07:27
[Server@1a942c18]: Initiating startup sequence...
[Server@1a942c18]: Server socket opened successfully in 4 ms.
07:21:29,156 INFO ~ checkpointClose start
07:21:29,156 INFO ~ checkpointClose synched
07:21:29,191 INFO ~ checkpointClose script done
07:21:29,253 INFO ~ checkpointClose end
[Server@1a942c18]: Database [index=0, id=0, db=file:/tmp/skilauth, alias=xdb] opened successfully in 378 ms.
[Server@1a942c18]: Startup sequence completed in 385 ms.
[Server@1a942c18]: 2017-10-31 07:21:29.256 HSQLDB server 2.4.0 is online on port 9455
[Server@1a942c18]: To close normally, connect and execute SHUTDOWN SQL
@wmeddie
wmeddie / deeplearning4r.R
Last active July 7, 2017 11:41
Using DL4J with R
#install.packages("rJava")
require(rJava)
.jinit(classpath = "C:\\ikvm\\bin\\dl4j-assembly-assembly-0.8.0.jar")
MnistDataSetIterator <- J("org.deeplearning4j.datasets.iterator.impl.MnistDataSetIterator")
NeuralNetConfigurationBuilder <- J("org.deeplearning4j.nn.conf.NeuralNetConfiguration$Builder")
WeightInit <- J("org.deeplearning4j.nn.weights.WeightInit")
DenseLayerBuilder <- J("org.deeplearning4j.nn.conf.layers.DenseLayer$Builder")
OutputLayerBuilder <- J("org.deeplearning4j.nn.conf.layers.OutputLayer$Builder")
@wmeddie
wmeddie / gist:7923283
Created December 12, 2013 04:44
Enabling winrm for Chef
winrm quickconfig -q
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}
winrm set winrm/config @{MaxTimeoutms="1800000"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service/auth @{Basic="true"}
@wmeddie
wmeddie / gist:7133138
Created October 24, 2013 08:11
This page should update the title every second. Looks like the new Safari suspends the page after a few seconds. Chrome and Firefox don't.
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script>
var count = 0;
setInterval(function () {
count++;
document.title = "Test: " + count;
}, 1000);
@wmeddie
wmeddie / click.html
Created July 20, 2011 09:18
Works on Firefox, Chrome, Safari
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(function () {
$('#sample').click(function (e) {
var offset = $('#sample').offset();
@wmeddie
wmeddie / gist:1055610
Created June 30, 2011 04:04
My .emacs customizations for OS X.
; Mac Settings and hacks
(setq mac-option-key-is-meta nil)
(setq mac-command-key-is-meta t)
(setq mac-command-modifier 'meta)
(setq mac-option-modifier nil)
(setq ns-pop-up-frames nil)
(define-key global-map [ns-drag-file] 'my-ns-open-files)
(defun my-ns-open-files ()
"Open files in the list `ns-input-file'."
(interactive)