Skip to content

Instantly share code, notes, and snippets.

@pylover
pylover / a2dp.py
Last active March 11, 2024 03:06
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@bishboria
bishboria / springer-free-maths-books.md
Last active March 22, 2024 11:19
Springer made a bunch of books available for free, these were the direct links
@tuxmartin
tuxmartin / udp_ipv6_client.py
Last active April 8, 2024 15:01
Python UDP IPv6 client & server
import socket
UDP_IP = "::1" # localhost
UDP_PORT = 5005
MESSAGE = "Hello, World!"
print "UDP target IP:", UDP_IP
print "UDP target port:", UDP_PORT
print "message:", MESSAGE
@twatteyne
twatteyne / 4e_tsch_default_ch.py
Created November 9, 2014 23:25
IEEE802.15.4e-2012 TSCH default channel hopping sequence calculator
BANNER = r'''
This script calculates the default channel hopping sequence for the
IEEE802.15.4e-2012 TSCH mode.
\author Thomas Watteyne
\date November 2014
\license http://opensource.org/licenses/BSD-3-Clause
'''
class Lfsr(object):
@kazu69
kazu69 / log.md
Created November 3, 2014 01:17
Mac 10.9.5, Vagrant, Virtualbox4.3.18 mount folders in Linux guest

Vagrant failed to mount folders in Linux guest

  • Mac 10.9.5,
  • Virtualbox4.3.18
  • Vagrant 1.6.5
  • vagrant-vbguest (0.10.0) installed

上記の条件で以下のようにエラーになった

@agramfort
agramfort / ranking.py
Created March 18, 2012 13:10 — forked from fabianp/ranking.py
Pairwise ranking using scikit-learn LinearSVC
"""
Implementation of pairwise ranking using scikit-learn LinearSVC
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich,
T. Graepel, K. Obermayer.
Authors: Fabian Pedregosa <fabian@fseoane.net>
Alexandre Gramfort <alexandre.gramfort@inria.fr>
"""
@joergschiller
joergschiller / a2dp_sink_ubuntu_linux.md
Created January 24, 2012 23:05
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink: