Skip to content

Instantly share code, notes, and snippets.

@pgrandinetti
pgrandinetti / automatic_websocket_reconnect.py
Last active January 22, 2024 21:55
Automatic reconnect from websockets
import socket
import asyncio
import websockets
import time
import logging
import argparse
import threading
import sys
@henriquebastos
henriquebastos / python-guide.sh
Last active March 27, 2023 19:23
The definitive guide to setup my Python workspace
# The definitive guide to setup my Python workspace
# Author: Henrique Bastos <henrique@bastos.net>
# Updated: 2022-07-14 for reference.
PY3=3.10.4
PY3TOOLS="youtube-dl s3cmd fabric pytest poetry requests"
VENVS=~/.ve
PROJS=~/workspace
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@pchiusano
pchiusano / XMLEventParser.scala
Created February 11, 2011 15:26
Adapter to use scala's parser combinators for XML parsing
package xmlcombinators
import scala.util.parsing.combinator.Parsers
import scala.util.parsing.input.{NoPosition, Reader}
import javax.xml.stream.events.{Attribute, EndElement, XMLEvent}
import javax.xml.stream.{XMLEventReader, XMLInputFactory}
import collection.mutable.ArrayBuffer
import java.io.File
/**