Skip to content

Instantly share code, notes, and snippets.

View f0nzie's full-sized avatar

Alfonso R. Reyes f0nzie

  • Oil Gains Analytics
  • Houston, Texas
View GitHub Profile
### A Pluto.jl notebook ###
# v0.19.9
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
@f0nzie
f0nzie / clickButton.jl
Last active August 11, 2024 15:45
Button events for Pluto.jl
### A Pluto.jl notebook ###
# v0.19.9
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
#!/home/msfz751/.pyenv/shims/python3
# #!/usr/bin/env python
# change to location of your preferred virtual environment
# Source:
# https://itectec.com/ubuntu/ubuntu-taking-screenshot-of-a-specific-area-from-the-command-line/
import subprocess
import os
import sys
@f0nzie
f0nzie / rmarch.ipynb
Created December 12, 2019 17:42
rmarch.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@f0nzie
f0nzie / backward-pytorch.ipynb
Created December 11, 2019 22:39
backward pytorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@f0nzie
f0nzie / mnist_digits_rstats.Rmd
Last active July 16, 2019 01:08
code in R for mnist_digits_rstats.Rmd
# Digits recognition on PNG images. R code
1. Added utility functions
2. Introspection on dim=2. Extra layers on tensor
3. Converting code from Python to R
## Objectives
1. Read PNG images instead of MNIST standard dataset.
2. Save the model
3. Read an unseen digit as PNG file using the saved model
@f0nzie
f0nzie / mnist_digits_python.Rmd
Last active July 16, 2019 00:50
code for mnist_digits_python.Rmd
# Digits recognition on PNG images. Python code
Source: https://www.deeplearningwizard.com/deep_learning/practical_pytorch/pytorch_logistic_regression/
> This is a modified version of the original article.
1. added utility functions
2. Introspection on dim=2
3. Converting code to R
4. Read PNG images instead of MNIST standard dataset
@f0nzie
f0nzie / .Rprofile
Created July 15, 2019 23:12
.Rprofile for master project
find_rsuite_root <- function(key = "PARAMETERS") rprojroot::find_root(key)
source(file.path(find_rsuite_root(), 'R', 'set_env.R'), chdir = TRUE)
options(rsuite.cache_path = "~/.rsuite/cache")
options(rsuite.user_templ_path = "~/.rsuite/templates")
@f0nzie
f0nzie / .Rprofile
Last active July 16, 2019 01:10
.Rprofile for notebooks under ./work/notebooks
find_rsuite_root <- function(key = "PARAMETERS") rprojroot::find_root(key)
source(file.path(find_rsuite_root(), 'R', 'set_env.R'), chdir = TRUE)
.libPaths(c(normalizePath(sbox_path), normalizePath(lib_path), .libPaths()))
@f0nzie
f0nzie / set_env.R
Created July 15, 2019 22:20
set_env script with rprojroot
# find_rsuite_root <- function(key = "PARAMETERS") rprojroot::find_root(key)
ace_rsuite <- find_rsuite_root()
lib_path <- file.path(ace_rsuite, "libs")
sbox_path <- file.path(ace_rsuite, "sbox")
if (!file.exists(lib_path)) {
lib_path <- file.path(find_rsuite_root(), "deployment", "libs")
sbox_path <- file.path(find_rsuite_root(), "deployment", "sbox")
}