Skip to content

Instantly share code, notes, and snippets.

View javierluraschi's full-sized avatar
👨‍💻
Coding @hal9ai

Javier Arturo Porras Luraschi javierluraschi

👨‍💻
Coding @hal9ai
View GitHub Profile
@javierluraschi
javierluraschi / FakeHTTPServer.py
Created January 24, 2020 00:13
Simple Proxy Variations
import SimpleHTTPServer
import BaseHTTPServer
def main():
request_handler = SimpleHTTPServer.SimpleHTTPRequestHandler
request_handler.server_version = "Jetty(8.y.z-SNAPSHOT)"
request_handler.sys_version = ""
BaseHTTPServer.test(HandlerClass = request_handler, ServerClass = BaseHTTPServer.HTTPServer)
if __name__ == "__main__":
@javierluraschi
javierluraschi / amazon-emr-tidymodels-tune.md
Last active March 7, 2020 20:36
Amazon EMR with tidymodels and tune

Create EMR cluster with support for R.

Fix Development Tools to fix gower package installation,

sudo yum remove gcc72-c++.x86_64 libgcc72.x86_64
sudo yum groupinstall 'Development Tools'
@javierluraschi
javierluraschi / recording-videos-with-obs.md
Created March 16, 2020 16:20
Recording videos with OBS

Why OBS? It's free and Twitch streamers have proven it is quite configurable and reliable.

Configuration

  1. Download OBS (Mac, Linux, Mac) from: https://obsproject.com/download
  2. Install and Launch OBS.
  3. Create an Scene
  4. Add Display Capture and Audio Capture
  5. Open the Settings window and select Output, then Recording, select mp4
  6. Still under Settings, Hotkeys tab, I recommend adding a hot key to start and stop recording.
  7. Close Settings window.
@javierluraschi
javierluraschi / covid19-daily-cases-world-use.md
Last active April 22, 2020 15:32
COVID-19:: Daily Confirmed Cases -- Worldwide and USA

COVID-19: Daily Confirmed Cases

Using data from RamiKrispin/coronavirus, first plot worldwide new cases for countries with more than a thousand cases:


title: "R Notebook" output: html_notebook

@javierluraschi
javierluraschi / distributed-dl-spark.md
Created May 5, 2020 18:54
Script to perform distributed deep learning in Spark from R
library(sparklyr)
sc <- spark_connect(master = "yarn", spark_home = "/usr/lib/spark/", config = list(spark.dynamicAllocation.enabled = FALSE, `sparklyr.shell.executor-cores` = 8, `sparklyr.shell.num-executors` = 3, sparklyr.apply.env.WORKON_HOME = "/tmp/.virtualenvs"))

sdf_len(sc, 3, repartition = 3) %>%
  spark_apply(function(df, barrier) {
    tryCatch({
      library(tensorflow)
      library(keras)
      
@javierluraschi
javierluraschi / index.html
Last active December 7, 2020 19:31
Create ETH Wallet
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/gh/ethereum/[email protected]/dist/web3.min.js"></script>
<script>
const create = () => {
const web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io'));
let account = web3.eth.accounts.create(web3.utils.randomHex(32));
document.getElementById('address').innerText = account.address;
document.getElementById('key').innerText = account.privateKey;
@javierluraschi
javierluraschi / posenet-elon.html
Created July 15, 2021 17:06
PoseNet with tensorflow.js and Elon image
<html>
<body>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/posenet"></script>
<img id='pose' src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/AAAAF5jcHJ0AAABXAAAAAt3dHB0AAABaAAAABRia3B0AAABfAAAABRyWFlaAAABkAAAABRnWFlaAAABpAAAABRiWFlaAAABuAAAABRyVFJDAAABzAAAAEBnVFJDAAABzAAAAEBiVFJDAAABzAAAAEBkZXNjAAAAAAAAAANjMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0ZXh0AAAAAEZCAABYWVogAAAAAAAA9tYAAQAAAADTLVhZWiAAAAAAAAADFgAAAzMAAAKkWFlaIAAAAAAAAG+iAAA49QAAA5BYWVogAAAAAAAAYpkAALeFAAAY2lhZWiAAAAAAAAAkoAAAD4QAALbPY3VydgAAAAAAAAAaAAAAywHJA2MFkghrC/YQPxVRGzQh8SmQMhg7kkYFUXdd7WtwegWJsZp8rGm/fdPD6TD////+ACVSZXNpemVkIG9uIGh0dHBzOi8vZXpnaWYuY29tL3Jlc2l6Zf
@javierluraschi
javierluraschi / 23andme-may-5-2025
Created May 14, 2025 03:11
23andme-may-5-2025
All right, let's call our 130 matter, please 23 and me holding co appearances in the courtroom first should afternoon your honor Tom Risky-Carbon-E McDonald on behalf of the death.
Good afternoon.
Good afternoon, Miranda Swift from Stinson on behalf of the official committee events.
Good afternoon, you. Good afternoon, your honor Josh Walsh on behalf of the Hambi.
Hello.
Good afternoon, your honor Carol Richett on behalf of the U.S. Trustee.
Noon. Good afternoon, your honor Joshua Jones, the United States of America.
Hello, Mr. Jones. Anyone else?
All right, appearances on the WebEx, please.
Good afternoon, your honor. You've got Eric Wilson of Kelly Drive proposed counsel to the creditors committee and with me online, making the plot one.
@javierluraschi
javierluraschi / 23andme-may-13-2025
Created May 14, 2025 14:57
23andme-may-13-2025
I should be in 23 and me holding co.
My parents was in the courtroom, please.
Morning, Your Honor, Tom Risky, Carmine McDonald.
On behalf of the death.
20.
200.
You're all good.
Check on behalf of U.S. Trustee.
Morning.
This is on the WebEx.