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
# | |
# A program that takes an array of numbers and returns the spelled-out cardinal and ordinal forms of those numbers. | |
# Includes framework to allow use as a Lambda function. | |
# | |
# Example usage: | |
# $ echo "{"numbers": [0, 1, 2, 3, 4, 5, 11, 65, 100, 101, 277, 23456, 8007006005004003]}" | python3 spell_number.py | |
# {"ordinals": ["zero", "one", "two", "three", "four", "five", "eleven", "sixty five", "one hundred", \ | |
# "one hundred and one", "two hundred seventy seven", "twenty three thousand four hundred fifty six", \ | |
# "eight quadrillion seven trillion six billion five million four thousand and three"], \ | |
# "cardinals": ["zeroth", "first", "second", "third", "fourth", "fifth", "eleventh", "sixty fifth", "one hundredth", \ |
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
# | |
# An a little over the top Bowling Score app. | |
# Copyright 2022 by Matthew Denson <mdenson@dayspringpartners.com> | |
# | |
# Example Usage: | |
# To score a set of bowls provided in JSON format in stdin. | |
# $ echo "[1,4,4,5,6,4,5,5,10,0,1,7,3,6,4,10,2,8,9]" | python3 bowling.py stdin | |
# +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ | |
# | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| | |
# +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ |
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/python3 | |
# -*- coding: utf-8 -*- | |
# Inspired by Hack-A-Day article http://hackaday.com/2012/01/25/very-accurate-clock-cant-be-read-accurately/. | |
# | |
# Author: Matthew Denson <mdenson AT dayspring-tech DOT com> | |
# Originally written for Processing: Feb 2, 2012 | |
# Rewritten in Python/Tk: Oct 24, 2014 | |
# | |
# Copyright (c) 2014 Dayspring Technologies, Inc. |
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
<?php | |
namespace MyApp\MyBundle\EventListener; | |
use DateTimeZone; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; | |
use Symfony\Component\HttpFoundation\Cookie; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
class ClientEnvironmentListener { |