Skip to content

Instantly share code, notes, and snippets.

🦄

Enzzo souenzzo

🦄
Block or report user

Report or block souenzzo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@souenzzo
souenzzo / gif.py
Created Oct 23, 2016
Desenhando gifs em python
View gif.py
#!/usr/bin/env python
"""
Antes de executar esse programa você deve instalar as dependencias:
[user@pc]~ $ pip install --user moviepy gizeh
Então execute
[user@pc]~ $ python gif.py
Irá gerar dois gifs: "a.git", "b.gif".
"""
View lambdahttp.py
import http.server
def bar(props):
return ["bar", {}, str(props)]
x = ["div", {},
["sp", {"onClick": "foobar()"}, ["code", {}, "foo"]],
[bar, 44, 666, 77],
["p", {}, "Olá mundo!"]]
View vetor.f
!! https://gcc.gnu.org/onlinedocs/gcc-4.4.4/gfortran/ALL.html#ALL
program hello
implicit none
integer i, j, A(3), B(3)
do i = 1, 3
A(i) = i + 5
B(i) = i * 5
end do
@souenzzo
souenzzo / hanoi.cljs
Last active Jan 3, 2018
simple hanoi tower game. Available at https://souenzzo.github.io/hanoi.html
View hanoi.cljs
(ns hanoi.core
(:require [reagent.core :as reagent :refer [atom]]))
(def init
{:tabuleiro {0 [4 3 2 1]
1 []
2 []}})
(defn atualizar-tabuleiro
[st from to]
@souenzzo
souenzzo / homoiconic-js.clj
Last active Jan 13, 2018
Trying to represent js code as EDN.
View homoiconic-js.clj
(defn parse-args
[args]
(string/join ", " (for [arg args]
(cond
(map? arg) (let [{:keys [keys]} arg]
(format "{ %s }" (parse-args keys)))
:else arg))))
(defn emit
[x]
View network.clj
(ns neural.network
(:require [clojure.core.matrix :as matrix]
[clojure.core.matrix.operators :as op])
(:import (java.util Random)))
(def sigmoid matrix/logistic)
(defn sigmoid'
[x]
(op/* x (op/- 1 x)))
View .eslintrc.js
module.exports = {
"env": {
"es6": true,
"jest": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
View graph.py
#!/usr/bin/env python3
from functools import reduce
def append_to_graph(graph, elms):
if len(elms) == 0:
return graph
el, *ms = elms
if type(el) is str:
return append_to_graph({**graph, **{el: set()}}, ms)
e, l = el
View atomic.js
#!/usr/bin/env node
var atom = {val: 0}
timeout = 1
const f = () => {
let state = atom.val
let dummmy = 0
for (let i = 0; i < 10000; i++) {
View main.ino
#include "I2Cdev.h"
#include <servo.h>
#include <spi.h>
#include "RF24.h"
#include "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
#include "printf.h"
Servo motor1;
You can’t perform that action at this time.