Skip to content

Instantly share code, notes, and snippets.

View GantMan's full-sized avatar
🤖
Being a Machine Learning beast

Gant Laborde GantMan

🤖
Being a Machine Learning beast
View GitHub Profile
@GantMan
GantMan / AppNavigation.js
Last active June 26, 2023 22:52
App navigation with drawer in react-navigation for login stacking
import React from 'react'
import { Text, Animated, Easing } from 'react-native'
import { StackNavigator, DrawerNavigator } from 'react-navigation'
import LoginScreen from '../Containers/LoginScreen'
import SignupScreen from '../Containers/SignupScreen'
import ForgottenPasswordScreen from '../Containers/ForgottenPasswordScreen'
import Screen1 from '../Containers/Screen1'
import Screen2 from '../Containers/Screen2'
import Screen3 from '../Containers/Screen3'
@GantMan
GantMan / config-overrides.js
Created January 6, 2020 21:33
Adding a WASM loader for react-app-rewired
const path = require('path')
module.exports = function override(config, env) {
config.module.rules.push({
test: /\.wasm$/i,
type: 'javascript/auto',
use: [{ loader: 'file-loader' }]
})
return config
@GantMan
GantMan / custom.html
Created June 3, 2020 21:09
teachable custom certificate code
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<style>
.cert, .cert * {
font-family: 'Open Sans', sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
@GantMan
GantMan / NEW_OPENSOURCE_TODO.md
Last active December 27, 2021 23:20
ALL the things to do when starting a new Github Project - IR JavaScript | TypeScript

Step 1 - Create nest on Github

  1. Click Plus
  2. New Repository
  3. IR/REPO_NAME
  4. PROJECT_DESCRIPTION
  5. Do not initialize with anything (easier to add after)
  6. Star your repo
  7. Pull your repo down locally and cd to it
@GantMan
GantMan / Code Combat.md
Last active August 6, 2021 01:09
Gist of code for CodeCombat - http://codecombat.com/

CodeCombat.com Solutions

Here's a simple gist of my Code Combat solutions. May it be useful to anyone who is teaching, playing, or learning Javascript.

Code Combat Site

@GantMan
GantMan / code.py
Created July 17, 2021 16:22
Neopixel Trinkie April Fools Code
import time
import board
import neopixel
# Mouse stuff
import usb_hid
from adafruit_hid.mouse import Mouse
mouse = Mouse(usb_hid.devices)
# Annoying config
jump_distance = 75 # jump 75 pixels
delay_time = 60 # every 60 seconds
@GantMan
GantMan / _README.md
Last active October 14, 2020 04:08
Gist of solutions to RubyWarrior by Gant Laborde
@GantMan
GantMan / bundlate.sh
Created August 10, 2020 22:27
create React Native bundles from yarn command
# Generate your Android production bundle (just code no assets)
$ yarn react-native bundle --platform android --dev false --entry-file index.js --bundle-output ./index.android.bundle
# Generate your iOS production bundle (just code no assets)
$ yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ./index.ios.bundle
@GantMan
GantMan / ElaborateExample.js
Last active March 23, 2020 14:45
AI Lab Specs
<AILabPhoto
// Provide TFJS Model and info
modelInfo={{
model: myModel,
objectDetection: true,
labels: ['dog', 'cat'],
threshold: 0.4,
max: 20,
IOU: 0.5
}}
// TensorFlow required
import * as tf from '@tensorflow/tfjs'
import { setWasmPath } from '@tensorflow/tfjs-backend-wasm'
// Default path without setWasmPath is /static/js/tfjs-backend-wasm.wasm
setWasmPath('/tfjs-backend-wasm.wasm')
// We can now force a WASM backend and print it for proof!
tf.setBackend('wasm').then(console.log('The Backend is', tf.getBackend()))