This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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". | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http.server | |
def bar(props): | |
return ["bar", {}, str(props)] | |
x = ["div", {}, | |
["sp", {"onClick": "foobar()"}, ["code", {}, "foo"]], | |
[bar, 44, 666, 77], | |
["p", {}, "Olá mundo!"]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!! 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
"env": { | |
"es6": true, | |
"jest": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
"sourceType": "module" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |