Skip to content

Instantly share code, notes, and snippets.

View pablete's full-sized avatar

Pablo A. Delgado pablete

View GitHub Profile
@pablete
pablete / gist:dffe1716564e0bc726229814b9fa6c55
Created October 20, 2021 20:58 — forked from Frozenfire92/gist:3627e38dc47ca581d6d024c14c1cf4a9
Install Scala and SBT using apt-get on Ubuntu 16.04 or any Debian derivative using apt-get
## Java
sudo apt-get update
sudo apt-get install default-jdk
## Scala
sudo apt-get remove scala-library scala
sudo wget http://scala-lang.org/files/archive/scala-2.12.1.deb
sudo dpkg -i scala-2.12.1.deb
sudo apt-get update
sudo apt-get install scala
@pablete
pablete / Gemfile
Created June 25, 2020 21:43 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@pablete
pablete / xgb_tb.py
Created October 31, 2018 23:03 — forked from tsu-nera/xgb_tb.py
xgboost visualization with tensorboard
from sklearn.datasets import load_boston
import pandas as pd
import xgboost as xgb
from tensorboard_logger import configure, log_value
from sklearn.cross_validation import train_test_split
def logspy(env):
log_value("train", env.evaluation_result_list[0][1], step=env.iteration)

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@pablete
pablete / akka-http-client.scala
Created September 8, 2017 07:26 — forked from dcaoyuan/akka-http-client.scala
akka-http-client-example
val uri = "http://www.yahoo.com"
val reqEntity = Array[Byte]()
val respEntity = for {
request <- Marshal(reqEntity).to[RequestEntity]
response <- Http().singleRequest(HttpRequest(method = HttpMethods.POST, uri = uri, entity = request))
entity <- Unmarshal(response.entity).to[ByteString]
} yield entity
val payload = respEntity.andThen {
@pablete
pablete / example.css
Last active December 24, 2016 15:23 — forked from dk8996/example.css
D3.js Gantt Chart, example 3
html,body,#wrapper {
width: 100%;
height: 100%;
margin: 0px;
}
.chart {
font-family: Arial, sans-serif;
font-size: 12px;
}
""" Poisson-loss Factorization Machines with Numba
Follows the vanilla FM model from:
Steffen Rendle (2012): Factorization Machines with libFM.
In: ACM Trans. Intell. Syst. Technol., 3(3), May.
http://doi.acm.org/10.1145/2168752.2168771
See also: https://github.com/coreylynch/pyFM
"""
@pablete
pablete / Inject VelocityJS
Last active August 29, 2015 14:27 — forked from painteddigital/Inject VelocityJS
Paste this into your console to play with velocity on a page that doesn't have it. It assumes jQuery exists already
(function() {
var url = ["cdn.jsdelivr.net/velocity/1.1.0/velocity.min.js","cdn.jsdelivr.net/velocity/1.1.0/velocity.ui.min.js"];
for(var i=0; i < url.length; i++){
var v = document.createElement('script'); v.type = 'text/javascript'; v.async = true;
v.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + url[i];
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(v, s);
}
})();
@pablete
pablete / README.md
Last active August 29, 2015 14:18 — forked from mbostock/.block
@pablete
pablete / index.html
Last active August 29, 2015 14:18 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var width = 960,
height = 500;
var colors = [