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
""" | |
Write a function that given a list of non negative integers, arranges them such that they form the largest possible number. For example, given [50, 2, 1, 9], the largest formed number is 95021. | |
You application should be run from the command line using a single command. For example: | |
# $ python ./largest.py 100 3 67 9 | |
# $ sbt "run 100 3 67 9" | |
""" | |
#!/usr/bin/env python | |
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 re | |
from collections import OrderedDict | |
ONETHS = { | |
'first': '1ST', 'second': '2ND', 'third': '3RD', 'fourth': '4TH', 'fifth': '5TH', 'sixth': '6TH', 'seventh': '7TH', | |
'eighth': '8TH', 'ninth': '9TH' | |
} | |
TEENTHS = { | |
'tenth': '10TH', 'eleventh': '11TH', 'twelfth': '12TH', 'thirteenth': '13TH', |
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
"""Card utilities for use with Payment Gateway classes, transaction processing""" | |
from __future__ import unicode_literals | |
import re | |
import logging | |
import datetime | |
VISA_CC = 'Visa' # Visa | |
MASTERCARD_CC = 'MasterCard' # MasterCard |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>P2</title> | |
<style type="text/css"> | |
table.gridTable, table.gridTable td { border: 1px solid black; } | |
.u-paddedBottom { padding-bottom: 15px; } | |
</style> | |
</head> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>P1</title> | |
<style type="text/css"> | |
.grid-box { | |
width: 100px; | |
height: 100px; | |
border: 1px solid #000; |
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
# Nicely titled province and state names | |
STATES_PROVINCES = ( | |
('AL', u'Alabama'), | |
('AK', u'Alaska'), | |
('AS', u'American Samoa'), | |
('AZ', u'Arizona'), | |
('AR', u'Arkansas'), | |
('CA', u'California'), | |
('CO', u'Colorado'), | |
('CT', u'Connecticut'), |
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
# Nicely titled country names. | |
COUNTRIES = ( | |
('AF', u'Afghanistan'), | |
('AX', u'\xc5land Islands'), | |
('AL', u'Albania'), | |
('DZ', u'Algeria'), | |
('AS', u'American Samoa'), | |
('AD', u'Andorra'), | |
('AO', u'Angola'), | |
('AI', u'Anguilla'), |
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
"""single elevator shaft simulation, so queues are all in 1 elevator """ | |
import time | |
import random | |
AVAILABLE_FLOORS = [-1, 0, 1, 2, 3, 4, 5, 6, 7] # 0 = basement 1 (B1), -1 = B2 | |
FIRST_FLOOR = AVAILABLE_FLOORS[0] | |
LAST_FLOOR = AVAILABLE_FLOORS[-1] | |
AVAILABLE_DIRECTIONS = ['up', 'down'] |
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
/* REXX */ | |
/* To connect a certificate to keyrings same was as another */ | |
/* certificate, pretty much duplicate its keyring usage as */ | |
/* that of an existing Nov 2010 */ | |
/*outtrap racdcert site and ca output*/ | |
/* Your label will be located from the below query so make sure it */ | |
/* contains what you need!*/ | |
x = OUTTRAP('strRacfLs.') | |
Address TSO 'RACDCERT SITE LIST' |
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
/* rexx */ | |
/* LMP KEY Duplicates Summary*/ | |
/* August 2008, functional comparisons working */ | |
/* Input file has to be unnummed, use unnum on file before running */ | |
/******************************* | |
/* SAME PROD CODE AND xxx! */ | |
/******************************* | |
INDSN="PS0601.CACOMMON.ALL.PPOPTION(KEYS)" | |
CALL Initialize |