Skip to content

Instantly share code, notes, and snippets.

View plq's full-sized avatar

Burak Arslan plq

View GitHub Profile
plq / .gitignore
Last active February 4, 2022 22:52


This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow 3G -l 600ms -p 10%   # slow network on eth0 and setup latency to 600ms packetloss to 10%
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency

slow dsl -b 1mbps # Simulate DSL with a slower speed than the default

plq / run.out
Last active June 8, 2017 06:34
Nuitka exception output
plq@babe ~/src/github/plq/neurons/examples/garage $ (master) virtualenv virt-2.7
New python executable in /home/plq/src/github/plq/neurons/examples/garage/virt-2.7/bin/python2.7
Also creating executable in /home/plq/src/github/plq/neurons/examples/garage/virt-2.7/bin/python
Installing setuptools, pip, wheel...done.
plq@babe ~/src/github/plq/neurons/examples/garage $ (master) source virt-2.7/bin/activate
(virt-2.7) plq@babe ~/src/github/plq/neurons/examples/garage $ (master) python develop
running develop
running egg_info
writing requirements to garage.egg-info/requires.txt
randcoll: randcoll.cpp
g++ -g randcoll.cpp -std=c++11 -o randcoll
<?xml version='1.0' encoding='utf-8'?>
<wsdl:definitions xmlns:plink="" xmlns:s0="" xmlns:soap11enc="" xmlns:soap11env="" xmlns:soap12enc="" xmlns:soap12env="" xmlns:tns="" xmlns:wsa="" xmlns:wsdl="" xmlns:wsdlsoap11="" xmlns:wsdlsoap12="" xmlns:xop="" xmlns:xs="" xmlns:xsi="" targetNamespace="" name="Application">
<xs:schema targetNamespace="" elementFormDefault="qualified">
<xs:import namespace=""
pap() {
python -c "import $1" || exit 1;
echo $(dirname "$(python -c "import $1; print $1.__file__")"); #"
prp() {
retval="$(pap "$retval")";
[ -z "$retval" ] && exit 1;
plq / metadata.xsd
Created January 27, 2016 20:31
Gentoo Schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="" elementFormDefault="qualified">
<xs:element name="packages">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="pkgmetadata"/>
<xs:element name="catmetadata">
plq / ben.out
Last active September 21, 2015 20:22
1000000 loops, best of 3: 0.237 usec per loop
# This example requires Spyne 2.12.2 or higher.
# Download from:
# This example throws a validation error. Remove double quotes
# around "567" to make it work.
data = b"""
"data" : {
"key_1" : [123, "567"],
plq /
Created June 29, 2015 17:32
relationship test
from sqlalchemy import *
class Parent(Base):
__tablename__ = 'parent'
id = Column(Integer, primary_key=True)
child = relationship("Child", uselist=False, backref="parent")
class Child(Base):
__tablename__ = 'child'
id = Column(Integer, primary_key=True)