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 | |
# -*- coding: utf-8 -*- | |
# Basic dictionary script that parses results from tureng.com - EAO | |
import sys | |
import urllib2 | |
from BeautifulSoup import BeautifulSoup | |
try: |
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 | |
# This script prevents screen saver get activated by moving mouse periodically. | |
# EAO-09.2012 | |
import win32api, time | |
print "Die screensaver !" | |
dif=1 | |
exc=False | |
while True: | |
try: |
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/python3 | |
# Simple TicTacToe game in Python - EAO | |
import random | |
import sys | |
board=[i for i in range(0,9)] | |
player, computer = '','' | |
# Corners, Center and Others, respectively | |
moves=((1,7,3,9),(5,),(2,4,6,8)) |
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/python3 | |
# Caesar Cipher | |
LEN,UP_MIN,LOW_MIN = 26,65,97 | |
def getchar(ch, key, enc): | |
if not ch.isalpha(): | |
return ch | |
key = key if enc else -key | |
(min,max) = (UP_MIN, UP_MIN+LEN) if ch.isupper() else (LOW_MIN, LOW_MIN+LEN) |
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/python3 | |
# Hangman game | |
import random | |
class HangMan(object): | |
# Hangman game | |
hang = [] | |
hang.append(' +---+') |
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 us.elron.utils.cache; | |
import java.lang.reflect.Array; | |
import java.util.Arrays; | |
/* | |
RoundArray can hold a "window" of values, oldest values are removed from | |
the array when new ones are added. It also supports console based simple | |
visualization. | |
*/ |
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
/** | |
* Abstract generic info shortener that can be modified | |
* to generate short ids for desired classes. | |
* | |
* @author eaorak | |
*/ | |
public abstract class InfoShortener<T> { | |
private static int ALPCNT = 62; | |
private static String cstr = new String(); |
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
/** | |
* Useful for disk file size calculations. [eaorak] | |
*/ | |
public enum Size { | |
BY, // Bytes | |
KB, // Kilo | |
MB, // Mega | |
GB, // Giga | |
TB, // Tera |
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
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
OlderNewer