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
# Based on simple-wireless.tcl | |
# ====================================================================== | |
# Options | |
# ====================================================================== | |
set val(chan) Channel/WirelessChannel ;# channel type | |
set val(prop) Propagation/TwoRayGround ;# radio-propagation model | |
set val(netif) Phy/WirelessPhy ;# network interface type | |
set val(mac) Mac/802_11 ;# MAC type | |
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type |
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/env python | |
# -*- encoding: utf-8 -*- | |
# | |
# containment.py | |
# use shingling technique to compute text containment | |
# | |
# {ikalantzis,vrachnis}@ceid.upatras.gr | |
# | |
import sys |
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/python | |
def euclidExtended(a, b): | |
if b == 0: | |
return a, 1, 0 | |
dd, xx, yy = euclidExtended(b, a % b) | |
d, x, y = dd, yy, xx - int(a / b) * yy | |
# print a, b, d, x, y | |
return d, x, y |
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
#!/bin/bash | |
# | |
# The script to sync a local mirror of the Arch Linux repositories and ISOs | |
# | |
# Copyright (C) 2007 Woody Gilk <woody@archlinux.org> | |
# Modifications by Dale Blount <dale@archlinux.org> | |
# and Roman Kyrylych <roman@archlinux.org> | |
# Licensed under the GNU GPL (version 2) | |
# Filesystem locations for the sync operations |
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
void my_barrier_wait() | |
{ | |
pthread_mutex_lock(mutex_var); | |
arrived++; | |
if (arrived == total) { | |
arrived = 0; | |
pthread_cond_broadcast(cond_var); | |
} else { | |
pthread_cond_wait(cond_var, mutex_var); | |
} |
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
class User: | |
def __init__(self, name, surname, age): | |
self.name = name | |
self.surname = surname | |
self.age = age | |
def __getitem__(self, key): | |
return getattr(self, key) |
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
#include <stdio.h> | |
#include <string.h> | |
int main (int argc, char const *argv[]) | |
{ | |
static char upcase[] = | |
"\0______________________________" | |
"_________________0123456789_____" | |
"__ABCDEFGHIJKLMNOPQRSTUVWXYZ____" | |
"__ABCDEFGHIJKLMNOPQRSTUVWXYZ____" |
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
# | |
# netgrowl-notify.py | |
# Weechat plugin for remote Growl notifications. | |
# | |
# Based on the gnotify plugin (http://www.weechat.org/scripts/source/stable/gnotify.py) | |
# and netgrowl (http://the.taoofmac.com/space/projects/netgrowl) | |
# | |
import weechat | |
from netgrowl import * |
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/python | |
""" | |
client.py | |
simple port knocking client | |
Usage: ./client.py <server address> <udp_port1> <udp_port2> ... <tcp_port> | |
{ikalantzis, vrachnis}@ceid.upatras.gr |
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/python | |
# -*- coding: utf-8 -*- | |
import sys | |
import eventlet | |
from eventlet.green import urllib2 | |
from BeautifulSoup import BeautifulSoup as bs | |
import urlparse | |
class Crawler(object): |
OlderNewer