Skip to content

Instantly share code, notes, and snippets.

import os
def convert_file_to_list(file_name):
file_path = os.path.join(os.path.dirname(__file__), file_name)
# read the file contents into memory
infile = open(file_path, 'r')
my_list = infile.readlines()
infile.close()
phone_input = input("Please enter a ten-digit phone number using numbers and/or capital letters (using quotation marks, e.g. '555-GET-FOOD'): ")
print("YOU ENTERED: " + phone_input)
def translate_character_to_number(char):
clean_char = str(char).upper()
if clean_char in ["A","B","C"]:
return "2"
elif clean_char in ["D","E","F"]:
return "3"
Jacob
Michael
Joshua
Matthew
Daniel
Christopher
Andrew
Ethan
Joseph
William
@s2t2
s2t2 / scantron.py
Last active October 23, 2016 21:30
import os
#
# PARSE STUDENT ANSWERS FROM FILE
#
# choose the right file (must be in the same directory as this script!)
filename = os.path.join(os.path.dirname(__file__), 'student_answers.csv')
print(filename)
#
# My awesome program! (basic version without integer input validation)
#
# ask the user how many cookies:
cookieCount = input("HOW MANY COOKIES DO YOU WANT TO MAKE? ")
# provide affirmative feedback to the user:

Reproduction Instructions

Testing React Native boilerplate

Initialize a new react-native application:

react-native init MyNativeApp
cd MyNativeApp/
@s2t2
s2t2 / alignItems.md
Last active July 23, 2016 14:18
valid native-base component style properties
Invalid prop `alignItems` of value `right` supplied to `StyleSheet footer`, expected one of [
 "flex-start",
 "flex-end",
 "center",
 "stretch"
]

Dear Pandora Visitor,

We are deeply, deeply sorry to say that due to licensing constraints, we can no longer allow access to Pandora for listeners located outside of the U.S., Australia and New Zealand. We will continue to work diligently to realize the vision of a truly global Pandora, but for the time being we are required to restrict its use. We are very sad to have to do this, but there is no other alternative.

We believe that you are in France (your IP address appears to be 90.63.223.236). If you believe we have made a mistake, we apologize and ask that you please email us.

If you have been using Pandora, we will keep a record of your existing stations and bookmarked artists and songs, so that when we are able to launch in your country, they will be waiting for you.

We will be notifying listeners as licensing agreements are established in individual countries. If you would like to be notified by email when Pandora is available in your country, please enter your email address below. The pace of global

Commands used to make this repo:

express react-robots --ejs
cd react-robots/
npm install --save webpack
npm install --save-dev webpack-dev-middleware webpack-hot-middleware
npm install --save babel-core babel-loader babel-preset-react babel-preset-es2015 style-loader css-loader
npm install --save react react-dom react-router
npm install --save jquery bootstrap file-loader url-loader

How does one configure a #nodejs app using #express, #react, #webpack with hot module replacement, and importantly #nodemon in development?