This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Usage: perl opml2org.pl "My OPML File.opml" | |
use XML::Parser; | |
binmode STDOUT, ":utf8"; | |
$xp = new XML::Parser(); | |
$xp->setHandlers(Start => \&start, End => \&end); | |
$xp->parsefile($ARGV[0]); | |
$indent = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This program will select at random a set of speakers and look at the gender breakdown given 20% women | |
total_speakers = 15 | |
percentage_of_women = 0.25 | |
hist, list, results = {}, [], [] | |
(1000 * (1 - percentage_of_women)).floor.times{list << 0} | |
(1000 * percentage_of_women).floor.times{list << 1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install bluetooth tools | |
sudo apt-get install --no-install-recommends bluetooth | |
# find MAC address (needs to be discoverable) | |
hcitool scan | |
# ping it | |
sudo l2ping -c 1 12:34:56:78:90 | |
# Connect by MAC |