Skip to content

Instantly share code, notes, and snippets.

@ashleyg
ashleyg / raspbian-python3.8.rst
Last active March 18, 2024 18:01 — forked from dschep/raspbian-python3.6.rst
Installing Python 3.6 on Raspbian

Installing Python 3.8 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.8. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
@SeppPenner
SeppPenner / Installing Python 3.6.4 on Raspbian.rst
Last active June 29, 2019 15:57
Installing Python 3.6.4 on Raspbian

Installing Python 3.6.4 on Raspbian

As of March 2018, Raspbian does not yet include the latest Python release, Python 3.6.4 This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).
@florentbr
florentbr / #selenium-chrome-authentication-extension
Last active December 5, 2023 08:49
Chrome extension to automatically set the credentials.
To build the extension, update the username/password and zip `background.js` and `manifest.json` in a single archive.
@abelsonlive
abelsonlive / wait_browser.py
Last active June 18, 2019 16:12
Waiting For responses in selenium
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
class WaitBrowser(object):
def __init__(self, **kw):
self.browser = webdriver.PhantomJS()
def readystate_complete(self):
@svvitale
svvitale / singleton.py
Created April 16, 2014 02:51
Mixin enabling any python class to be a ZMQ inproc listener
class _Singleton(type):
"""Singleton class from Stack Overflow:
http://stackoverflow.com/a/6798042
"""
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs)
@JesseBuesking
JesseBuesking / logging.yaml
Created April 14, 2014 18:54
Testing MultiProcessingLog on both Windows 7 Enterprise and Ubuntu Developers Version 10.04_20121120.
---
version: 1
disable_existing_loggers: False
formatters:
simple:
format: "%(name)-20s%(levelname)-8s%(message)s"
handlers:
console:
class: logging.StreamHandler
level: DEBUG
@tahajahangir
tahajahangir / graceful_http_server.py
Last active June 1, 2016 03:34
Tool to stop a TCPServer (or HTTPServer) in a graceful manner (when the all currently running work is done). This script works either for forked servers or single-process servers.
"""
Graceful Stopper
===================
Tool to stop a TCPServer (or HTTPServer) in a graceful manner (when the all
currently running work is done). This script works either for forked servers or
single-process servers.
The graceful-stop process can be triggered by sending `SIGHUP` to server (in a
forked environment, sending SIGHUP to master server, propagates to all
children). Server immediately releases the listening socket (so another server
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)