Skip to content

Instantly share code, notes, and snippets.

View sourceperl's full-sized avatar

l.lefebvre sourceperl

  • Hauts-de-France
View GitHub Profile
@Nikkely
Nikkely / docker-compose.yml
Created May 13, 2019 09:12
redis replication on docker-compose
version: '3'
services:
redis:
image: redis:5.0.0
container_name: master
ports:
- "6379:6379"
networks:
- redis-replication
@akey7
akey7 / numpy_array_to_speakers.py
Created March 31, 2018 06:13
How to play a NumPy array with audio directly to a speaker.
# Use the sounddevice module
# http://python-sounddevice.readthedocs.io/en/0.3.10/
import numpy as np
import sounddevice as sd
import time
# Samples per second
sps = 44100
@DenisFromHR
DenisFromHR / RPi_I2C_driver.py
Last active December 1, 2023 21:05
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
@abythell
abythell / thingspeak-install.sh
Last active May 22, 2023 18:40
Bash script to install a Thingspeak server on Ubuntu Server 12.04. Raspbian (2014-01-07-wheezy-raspbian). and possibly Debian-based distros.
#!/bin/bash
# Automatic install of Thingspeak server on Ubuntu 12.04 / Raspbmc / Debian (?)
# Updated to use ruby 2.1.4
## Install required packages
sudo apt-get update
sudo apt-get -y install build-essential git mysql-server mysql-client libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libsqlite3-dev
## Install ruby
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz