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
/** | |
* @param word String to be turned into T9 code | |
* @return the T9 code of the input string | |
* | |
* Method returns the order of buttons of digipad buttons to be pressed to | |
* get the input String from a T9 predictive text dictionary. | |
* | |
* This method assumes the order of the buttons is as follows and ignores case: | |
* | |
* 2= a,b,c |
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
# -*- coding: utf-8 -*- | |
"horfunk.radiopirate models and events handlers" | |
import datetime | |
import os | |
import logging | |
from django.db import models | |
from django.contrib.auth.models import User |
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
import random | |
import copy | |
ALPHABET = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z", " "] | |
class Scrambler: | |
"""A single scrambler unit""" | |
def __init__(self, seed): | |
self.routes = range(len(ALPHABET)) | |
random.seed(seed) | |
random.shuffle(self.routes) |
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
import random | |
import copy | |
ALPHABET = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z", " "] | |
class Scrambler: | |
"""A single scrambler unit""" | |
def __init__(self, seed): | |
self.routes = range(len(ALPHABET)) | |
random.seed(seed) | |
random.shuffle(self.routes) |
NewerOlder