Skip to content

Instantly share code, notes, and snippets.

View fpt's full-sized avatar

Youichi Fujimoto fpt

View GitHub Profile
@fpt
fpt / game.py
Last active December 31, 2017 23:36
pygame example
import pygame
from pygame.locals import *
import random
class App:
def __init__(self):
self._running = True
@fpt
fpt / adafruit_neopixel_cyclic_color.ino
Last active May 8, 2016 08:03
Adafruit NeoPixel cyclic color example
//
// For more detail, see tutorial below:
// https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library
//
#include <Adafruit_NeoPixel.h>
// Arduino Pin No.
#define PIN 6
@fpt
fpt / pykka_periodic.py
Created November 28, 2014 04:43
Pykka: periodic timer
#!/usr/bin/env python
# coding:utf-8
import pykka
import threading
import signal
import time
import sys
@fpt
fpt / gsuggest.py
Last active January 26, 2022 16:02
Google Suggest API example
#!/usr/bin/env python
# coding:utf-8
import pprint
import requests
from lxml import etree
from argparse import ArgumentParser
import sys
@fpt
fpt / print_double_binary.cpp
Created July 4, 2014 06:55
print double numbers in binary form
#include <iostream>
#include <bitset>
#include <limits>
//
// Print double numbers in binary form
//
typedef std::numeric_limits<double> dbl;