Skip to content

Instantly share code, notes, and snippets.

View danielpradilla's full-sized avatar

Daniel Pradilla danielpradilla

View GitHub Profile
@danielpradilla
danielpradilla / transpose.js
Created October 6, 2018 23:50
transpose-in-javascript
/**
* http://www.codesuck.com/2012/02/transpose-javascript-array-in-one-line.html
*/
function transpose(a) {
return Object.keys(a[0]).map(function (c) {
return a.map(function (r) {
return r[c];
});
});
}
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
if (!require(neuralnet)) {install.packages("neuralnet")}
library(neuralnet)
#nn for learning how to calculate a square root
set.seed(1)
train.x <- sample(1:100, 50, replace = T)
head(train.x)
@danielpradilla
danielpradilla / s3-upload-aws4.sh
Last active June 21, 2021 15:39 — forked from vszakats/s3-upload-aws4.sh
AWS S3 Upload using signature v4
#!/bin/sh -u
# To the extent possible under law, Viktor Szakats (vszakats.net)
# has waived all copyright and related or neighboring rights to this
# script.
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/
# Upload a file to Amazon AWS S3 using Signature Version 4
#
# docs:
#!/bin/sh -u
fileLocal="${1:-example-local-file.ext}"
bucket="${2:-example-bucket}"
remotePath="${3:-remote-path}"
region="${4:-}"
awsAccess="${5:-YOUR_AWS_ACCESS_KEY}"
awsSecret="${6:-YOUR_AWS_SECRET_KEY}"
m_openssl() {