Skip to content

Instantly share code, notes, and snippets.

View franklindyer's full-sized avatar
🤔
doing lots and lots of math

Franklin Pezzuti Dyer franklindyer

🤔
doing lots and lots of math
View GitHub Profile
@actuino
actuino / bt_speaker-raspberry_pi-zero_w.md
Last active June 29, 2024 03:14
Setting up a Bluetooth Speaker from the command line on a raspberry Pi Zero W

The setup of a bluetooth speaker on a Pi Zero W is pretty touchy.

Please get in touch via Twitter @actuino or http://www.actuino.fr/ if you've got comments or improvements to this quick draft.

First checks

  • Use a solid power source
  • check the speaker works on another hardware (android phone f.i.)
  • make sure you've updated your Raspbian, install and run rpi-update just in case.
@Borgaard
Borgaard / fizzbuzz.c
Created October 10, 2015 19:27 — forked from anonymous/fizzbuzz.c
A FizzBuzz program. Somehow. I don't know why it works.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gmp.h>
char * polynomial="-74101463560860539810482394216134472786413399/404009590666424903383979388988167534591844018460526499864038804741201731572423877094984692537474105135297393596654648304117684895744000000000000000000000*x^99 + 1786563401621773217421750502452955853226339781/1943688752347061390850759947022111850270039951356484879070977067483444756705819339975871373032521468004867185688372878439054154137600000000000000000000*x^98 - 27321291157050372775340569532625689973429185264741/12024094960310264981666053243695462339042976739896622019763059664916718201560234437350734896948634081407660523709959770955883479040000000000000000000000*x^97 + 4936870031754926645682423836151042176171669450909/1336493173680525187613977630110369004256312194947800263402124063124652591386915768177479078216982141485276408003996973457735680000000000000000000000*x^96 - 24473118674386691114350902920738421254018653211816783/55093218603941649400531744530105211175454647
@pluskid
pluskid / report-template.tex
Last active May 26, 2023 00:40
A LaTeX template that I use for writing notes and reports.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use the koma-script document style
\documentclass{scrbook}
\KOMAoptions{twoside=false} % disable two-side formatting for scrbook
% alternatively, for shorter essay, use the following
% \documentclass{scrartcl}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Useful packages
#!/usr/bin/env python
import asyncio
import logging
from queue import Queue, Empty
from sleekxmpp import ClientXMPP
from sleekxmpp.xmlstream import scheduler
from sleekxmpp.exceptions import IqError, IqTimeout
# logging
logging.basicConfig(level=logging.INFO,
@pklaus
pklaus / ddnsserver.py
Last active June 20, 2024 12:56 — forked from andreif/Simple DNS server (UDP and TCP) in Python using dnslib.py
Simple DNS server (UDP and TCP) in Python using dnslib.py
#!/usr/bin/env python
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import argparse
import datetime
import sys
import time
import threading
@alanpog
alanpog / gist:3316784
Created August 10, 2012 18:55
Monad and Functor laws in Idris
module verified
---------- Functor ----------
-- Need this to avoid "Incomplete term" error
fmapid : Functor f => f a -> f a
fmapid = fmap id
class Functor f => VerifiedFunctor (f : Set -> Set) where
identity : (fa : f a) -> fmapid fa = fa