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/python | |
########################################################################### | |
# IRCBot: A simple library for simple IRC bots | |
# Copyright (c) 2009 Whidou <[email protected]> | |
########################################################################### | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or |
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
class IRCBot: | |
"""Some freaking IRC bot""" | |
def __init__(self, network, chan, name, orders={}, init=None, timer=None, end=None, partmessage=""): | |
self.chan = chan | |
self.network = network | |
self.name = name | |
self.partmessage = partmessage | |
self.load_orders(orders) | |
self.load_methods(init, timer, end) |
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
########################################################################### | |
# IRCBot: A simple library for simple IRC bots | |
# Copyright (c) 2009 Whidou <[email protected]> | |
########################################################################### | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
(setq load-path (cons "C:/Program Files/erl/lib/tools-2.6.6.1/emacs" load-path)) | |
(setq erlang-root-dir "C:/Program Files/erl") | |
(setq exec-path (cons "C:/Program Files/erl/bin" exec-path)) | |
(require 'erlang-start) | |
(setq load-path (cons "C:/Go/misc/emacs" load-path)) | |
(setq erlang-root-dir "C:/Go") | |
(setq exec-path (cons "C:/Go/bin" exec-path)) | |
(require 'go-mode-load) |
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
-module(test). | |
-export([greet/2,head/1,second/1,same/2,right_age/1,oh_god/1,help_me/1,prepend/2,beach/1,beachf/1,convert/0]). | |
greet(male,Name)-> | |
io:format("Hello, Mr. ~s!",[Name]); | |
greet(female,Name) -> | |
io:format("Hello, Mrs. ~s!",[Name]); | |
greet(_,Name) -> | |
io:format("Hello, ~s!",[Name]). |
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
haruhi = ["ElKaizer","baka-saru","Nautawi"] | |
geekzone = ["AcidBen"," Beasty"] | |
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
import random | |
geekzone = ["AcidBen","Beasty","Mech","Azariel","BarracuddA","KaD","LordK","gabs431","Marmottas","Glasofruix","fabiouchka","Lukkant","Anaethelion","fuful","Drakulls","guts","Bussiere","ghigis"] | |
haruhi = [{"ElKaizer":"18"},{"baka-saru":"18"},{"Nautawi":"18"},{"Sedeto":"18"},{"Aryth":"Poste"},{"Grimm":"18"},{"Le Commandant":"18"},{"Fskng":"18"},{"toutoune134":"Poste"},{"nefka":"18"},{"ziassan":"18"},{"elfe":"18"},{"Bussiere":"18"}] | |
def sortliste(liste): | |
i = 0 | |
chaine = "" | |
while liste : |
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 Test; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Enumeration; | |
import java.util.HashMap; | |
import java.util.Dictionary; | |
import java.util.Hashtable; |
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
import os | |
import stat | |
def walktree (top = ".", depthfirst = True): | |
names = os.listdir(top) | |
if not depthfirst: | |
yield top, names | |
for name in names: | |
try: | |
st = os.lstat(os.path.join(top, name)) |
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
-module('schmilblick'). | |
-export([schmilblick/0]). | |
% Les regles : | |
% Le public doit deviner le scmilblick en ne posant que des questions fermés (qui ne se repondent que par oui | |
% ou par non). | |
schmilblick()-> | |
["Shinji"]. |