Skip to content

Instantly share code, notes, and snippets.

@lbxa
lbxa / remoteControl.py
Last active January 11, 2018 00:46
NCSS remote control driver
from microbit import *
import music
import random
DEF_CHANNEL = 22
RADIO_PROTOCOL = "robot:"
# left: 0, 16
# right: 12, 8
'''
Microbit Micropython | Binary Digit LED's
Mini project for NCSS challenge that involved some silly hardcoding
Lucas Barbosa | 8.01.2018 | NCSS Summer School | (C)
'''
from microbit import *
import random
import music
@lbxa
lbxa / linear_regression.py
Last active June 29, 2017 12:59
ML: Linear Regression with Gradient Descent
'''
Framework for Linear Regression with Gradient Descent
This micro-project contains code to transform the gradient descent
mathematical algorithm into a programatic example which can be applied to
in common Machine Learning practices to predict and input's corresponding
output once the model has been trainned.
25.06.2017 | Lucas Barbosa | TensorFlow | Open Source Software (C)
'''
@lbxa
lbxa / helloWorld.py
Created June 25, 2017 04:13
Tensorflow beginnings
import tensorflow as tf
'''
Test Driving TensorFlow: First Time
This is a basic program which basically plays around with Tensors
and what not.
23.06.2017 | Lucas Barbosa | Open Source Software (C)
'''
@lbxa
lbxa / snake.html
Created June 4, 2017 11:20
Snake
<div class="wrapper" style="display:flex;width: 100% !important; height:100% !important;">
<canvas id="gameCanvas" width="400" height="400" style="margin: auto;"></canvas>
</div>
<script>
window.onload = function() {
canvas = document.getElementById("gameCanvas");
canvasBuffer = canvas.getContext("2d");
document.addEventListener("keydown", keyPush);
var fithteenTimesPerSecond = 1000/15;
setInterval(game, fithteenTimesPerSecond);
@lbxa
lbxa / sqrtX.c
Last active January 8, 2018 04:26
Square root functions intended for use without <math.h> dependencies.
/*
* Square Root X
*
* Programatic attempt to solve square roots without <math.h> with
* brute force approach of either incrementing the square of 0.001
* until square value is reached (toggling iterators for accuracy)
* or translate Newton's method into working C code.
*
* 02.05.17 | Lucas Barbosa | Open source software
*/
@lbxa
lbxa / aux.py
Created March 4, 2017 15:15
PyJoinParadigm
# Auxilary file for random tests
available = "Banana Split; Hot Fudge; Cherry; Malted; Black and White"
sundaes = available.split(";")
'''
<str_sep>.join(<str_list>)
- string method
'''
@lbxa
lbxa / about.html
Created February 25, 2017 14:58
TheBox
<!DOCTYPE html> <!--doctype 5-->
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width"/>
<meta name="description" content="TheBox"/>
<meta name="keywords" content="Box,comment"/>
<meta name="robots" content="follow,index"/>