Skip to content

Instantly share code, notes, and snippets.

View sejas's full-sized avatar
🐋
Set of synapses weights and biases

Antonio Sejas sejas

🐋
Set of synapses weights and biases
View GitHub Profile
@sejas
sejas / devconsole.js
Created September 16, 2022 10:35
Performance
// Modify the destination object and copy paste this script in the chrome dev tools.
// Very useful to track performance for API requests.
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function performanceURL(url, sampleSize, sleepMs = 1000) {
const performanceList = [];
for (let i = 0; i < sampleSize; i++) {
const t0 = performance.now();
@sejas
sejas / reactotron.ts
Created March 19, 2021 12:54
Tron Custom Command to Navigate to screen on React Native
// Navigation
Tron.onCustomCommand({
title: 'Choose your NAVIGATION',
description: 'Insert the screenName where you want to Navigate to.',
command: 'navigateTo',
args: [
{
name: 'screenName',
type: 'string',
},
sudo rm -rf LCD-show
git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
sudo ./LCD35-show
@sejas
sejas / configuracion.md
Last active February 28, 2019 10:37
Configuración Node NPM Git

Configuración antes del workshop

Antes de venir al taller, recomiendo tener las siguientes herramientas instaladas en su computadora:

  • Terminal
  • Git
  • Node
  • NPM

Instalación de un terminal

@sejas
sejas / imagenet1000_clsidx_to_labels.py
Created February 23, 2019 09:55 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@sejas
sejas / vgg.py
Created February 22, 2019 23:55
This script will demonstrate how to use a pretrained model, in PyTorch, to make predictions.
"""
This script will demonstrate how to use a pretrained model, in PyTorch,
to make predictions. Specifically, we will be using VGG16 with a cat
image.
References used to make this script:
PyTorch pretrained models doc:
http://pytorch.org/docs/master/torchvision/models.html
PyTorch image transforms example:
http://pytorch.org/tutorials/beginner/data_loading_tutorial.html#transforms
@sejas
sejas / preloading-screen.ts
Last active October 1, 2018 15:02
Loading React Native MST
import * as React from "react"
import { observer } from "mobx-react"
import {Register} from "../register"
import {Home} from "../home"
import { MSTUser } from "../../app/models/user"
import { NavigationScreenProps } from "react-navigation"
export interface PreLoadingScreenProps extends NavigationScreenProps<{}> {}
@sejas
sejas / index.html
Created August 2, 2018 23:54
Fast Bootstrap Boilerplate
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Boilerplate</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
@sejas
sejas / index.jsx
Created July 8, 2018 00:13
Introducción a React - 07 onClick interacciones con el usuario
'use strict'
// 0.- Nuestro primer componente
class Hola extends React.Component {
// 5.- Añadimos la propiedad state
state = {
emoticono: '😎'
}
// 6.- Método donde utilizamos la funcion `setState`
cambiarEmoticono = () => {
let emoticono = '🤩'
@sejas
sejas / index.jsx
Created July 7, 2018 23:41
Introducción a React - 06 setState para cambiar el valor del estado
'use strict'
// 0.- Nuestro primer componente
class Hola extends React.Component {
// 5.- Añadimos la propiedad state
state = {
emoticono: '😎'
}
// 6.- Método donde utilizamos la funcion `setState`
cambiarEmoticono() {
let emoticono = '🤩'