-
Add comments so that others can read your code more easily
-
Be sure to commit your change every now and then so that others can track changes/debug more easily
How to commit your change
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
<ion-header> | |
<ion-toolbar color="success"> | |
<ion-title> | |
{{ checklist?.title }} | |
</ion-title> | |
<ion-buttons slot="start"> | |
<ion-back-button defaultHref="/checklists"></ion-back-button> | |
</ion-buttons> | |
<ion-buttons slot="end"> | |
<ion-button (click)="addItem()"> |
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
var dataitems = []; | |
$(document).ready(function () { | |
loadData(); | |
wireButtonClickEvents() | |
filterData(); | |
}); | |
// Loads the CSV file | |
function loadData() { |
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
var dataitems = []; | |
var names = []; | |
$(document).ready(function () { | |
loadData(); | |
}); | |
// Loads the CSV file | |
function loadData() { |
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
var data = []; // the variable that holds the data from csv file | |
var category_colors = { | |
"clothing, beauty, & fashion": "#5B7BE9", | |
"computers & internet": "#E0D22E", | |
"education": "#2CCEF6", | |
"food & drink": "#FB7F23", | |
"grab bag": "#D63CA3", | |
"health & fitness": "#c38014", | |
"home & garden": "#E24062", | |
"human relations": "#5BB923", |
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
command_lst = command.lower().split() | |
command_dic = { | |
"specification":"", | |
"keyword":"", | |
"criteria":"ratings", | |
"sorting_order":"top", | |
"limit":"10", | |
"sellers_or_sources":"sellers" | |
} |
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
statement8 = "SELECT * " | |
statement8 += "FROM [Order]" | |
statement8 += "LIMIT 1;" | |
print("\n" + "=" * 30) | |
print("Columns in the Order Table\n") | |
columns_in_order_table = cur.execute(statement8) | |
for column in columns_in_order_table.description: | |
print(column[0]) |
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
from bs4 import BeautifulSoup | |
import requests | |
import json | |
# Caching | |
CACHE_FNAME = 'cache.json' | |
try: | |
cache_file = open(CACHE_FNAME, 'r') | |
cache_contents = cache_file.read() |
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
# prompt the user for input | |
user_question = input("Please enter your question:") | |
# check if quesion mark is included: | |
user_q_lst = list(user_question) | |
if user_q_lst[-1] != "?": | |
user_question += "?" # if not, add "?" to the string | |
# create the list of standard Magic 8 Ball answers | |
magic_ans = [ |
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
# step 3 | |
def get_from_itunes(search_name, search_type): | |
url_parameters = {} | |
url_parameters["format"] = "json" | |
url_parameters["term"] = search_name | |
url_parameters["entity"] = search_type | |
base_url = "https://itunes.apple.com/search" | |
itunes_result_data = requests.get(url = base_url, params = url_parameters).json() |
NewerOlder