This file contains hidden or 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/ruby1.9.3 | |
| # -*- coding: utf-8 -*- | |
| class Humeur | |
| attr_accessor :depression | |
| attr_accessor :anxiete | |
| attr_accessor :irritabilite | |
| attr_accessor :excitation | |
| attr_reader :moment | |
| attr_reader :id |
This file contains hidden or 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 -w | |
| use strict; | |
| use warnings; | |
| use feature 'say'; | |
| use XML::LibXML; | |
| use Excel::Writer::XLSX; | |
| my $path = "C:/genie/perl-5.20/scripts/input_files"; |
This file contains hidden or 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
| use strict; | |
| use warnings; | |
| while (<DATA>) { | |
| next unless s/\bcei\b/iec/i; | |
| tr/a-z/A-Z/; | |
| print; | |
| } | |
| __DATA__ |
This file contains hidden or 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 -w | |
| use strict; | |
| use warnings; | |
| use feature 'say'; | |
| use experimental 'postderef'; | |
| use Data::Dumper; | |
| my $ref = [ { 'az' => 'er', 'ty' => 'uiop', }, | |
| [ 1..12 ], |
This file contains hidden or 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
| package pieChart { | |
| use Moose; | |
| has 'label', is => 'ro', isa => 'Str'; | |
| has 'data', is => 'ro', isa => 'ArrayRef'; | |
| has 'pcsuccess', is => 'ro', isa => 'Int'; | |
| has 'pcerror', is => 'ro', isa => 'Int'; | |
| sub png { | |
| use GD::Graph::pie; |
This file contains hidden or 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 -w | |
| use strict; | |
| use warnings; | |
| use feature 'say'; | |
| use LWP::UserAgent; | |
| use XML::RSS; | |
| use HTML::ResolveLink qw/extract_main_html/; | |
| use experimental 'signatures'; | |
| use RSS::DB; |
This file contains hidden or 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 -w | |
| use strict; | |
| use warnings; | |
| use feature 'say'; | |
| use File::Slurp; | |
| use File::Find::Rule; | |
| use Digest::SHA1; | |
This file contains hidden or 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
| (defun classic21-currently-playing () | |
| (interactive) | |
| (url-copy-file "http://www.rtbf.be/classic21/conducteur" "/tmp/classic21.html") | |
| (find-file "/tmp/classic21.html") | |
| (goto-char 1) | |
| (setq song-start (search-forward "<h4>Titre: <strong>") | |
| song-end (- (search-forward "</") 2) | |
| singer-start (search-forward "<p>Artiste: <strong>") | |
| singer-end (- (search-forward "</") 2)) |
This file contains hidden or 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 -w | |
| use strict; | |
| use warnings; | |
| use feature 'say'; | |
| use LWP::Simple; | |
| my @page = get('http://www.rtbf.be/classic21/conducteur'); | |
| my ( $song, $singer ); |
This file contains hidden or 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
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; Adding shortcuts for text formatting ;; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| (defun org-set-bold () | |
| "Mark current region as bold or open new bold mark ups" | |
| (interactive) | |
| (let (rstart rend) | |
| (if (region-active-p) |