Skip to content

Instantly share code, notes, and snippets.

View titimoby's full-sized avatar

Thierry Chantier titimoby

View GitHub Profile
package main
import (
"image/color"
"tinygo.org/x/drivers/microbitmatrix"
)
var (
display microbitmatrix.Device
import pdftotext
with open("data/2020 01 02.pdf") as f:
... pdf = pdftotext.PDF(f)
...
Traceback (most recent call last):
File "<input>", line 2, in <module>
File "/usr/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 10: invalid continuation byte
#include <Gamebuino-Meta.h>
#include <LedControl.h>
// Pin Definitions
#define PIN_DIN MISO
#define PIN_CLK MOSI
#define PIN_CS 4
/*
Now we need a LedControl to work with.
@titimoby
titimoby / python
Created December 14, 2015 16:38
le with ?
def run(self):
# Update the screen every second.
rate = Rate(2.0)
with self.model:
for y in range(self.nbstrips):
for x in range(self.nbleds):
self.model.set_pixel(x, y, self.PIXEL_COLOR)
rate.sleep()
@titimoby
titimoby / golo and static
Last active August 29, 2015 14:23
gimme this static please ;)
I need to access this static int:
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.Keys.html#LEFT
I tried:
import com.badlogic.gdx.Input
and/or
import com.badlogic.gdx.Input.Keys
then
@titimoby
titimoby / function, adapter and variable
Created June 23, 2015 14:29
je dois comprendre, c'est tout ;)
module goloid
import gololang.Adapters
function tryit = |adapter| {
var b = 1
adapter: interfaces(["java.lang.Runnable"])
: implements("run", |this| {
b = 2 # ceci résulte en une belle erreur :

Keybase proof

I hereby claim:

  • I am titimoby on github.
  • I am titimoby (https://keybase.io/titimoby) on keybase.
  • I have a public key whose fingerprint is 8DD1 61BF 3562 4017 B310 4D1E 282F CEB1 1C31 4775

To claim this, I am signing this object:

package main
import (
"fmt"
"encoding/json"
"log"
"io/ioutil"
"net/http"
)

#Quick Start

##First

  • Mettre à jour sa distribution m33ki (je n'ai plus que 2 templates, le générateur a sauté, je l'ai externalisé, j'ai revu la couche Mongodb)

##Créer le squelette M33ki

  • tapez m33ki
  • donner le nom de l'application (faudra que je pense à le mettre en paramètre ça fera gagner une étape)
@titimoby
titimoby / sleep.golo
Created April 17, 2013 19:56
Why ? titimoby@alarmpi PiG]$ gologolo sleep.golo first Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm…
module snippet.sleep
import java.lang.Thread
function main = |args| {
println("first")
Thread.sleep(500)