Skip to content

Instantly share code, notes, and snippets.

@compcon
compcon / pilot.txt
Last active Mar 23, 2021
Highlander - Jason Wallace (LL:0)
View pilot.txt
{"id":"559d7c5a-1953-4615-94ab-752cccd25fc9","group":"","sort_index":0,"isLocal":true,"gistCode":"fd72ea2bd19862b7be7eaa6655885f87","gistOwner":"abf96f43-16b7-4472-8001-2c4d14a79a14","lastSync":"2021-03-23T23:13:28.111Z","level":0,"callsign":"Highlander","name":"Jason Wallace","player_name":"","status":"Active","dead":false,"text_appearance":"","notes":"","history":"","portrait":"","cloud_portrait":"","quirks":[],"current_hp":6,"reserves":[],"orgs":[],"background":"SUPER SOLDIER","mechSkills":[1,0,1,0],"special_equipment":{"PilotArmor":[],"PilotWeapon":[],"PilotGear":[],"Frame":[],"Weapon":[],"WeaponMod":[],"System":[],"SystemMod":[]},"licenses":[],"skills":[{"id":"sk_assault","rank":1},{"id":"sk_survive","rank":1},{"id":"sk_get_somewhere_quickly","rank":1},{"id":"sk_take_control","rank":1}],"talents":[{"id":"t_siege_specialist","rank":1},{"id":"t_stormbringer","rank":1},{"id":"t_technophile","rank":1}],"core_bonuses":[],"loadout":{"id":"1b4f1b13-0c4f-4165-8b3b-a40854ec3408","name":"Primary","armor":[{"id":"p
@AnisahTiaraPratiwi
AnisahTiaraPratiwi / Strings_Lists_Dictionaries_7.py
Created Mar 23, 2021
Question 7 Use a dictionary to count the frequency of letters in the input string. Only letters should be counted, not blank spaces, numbers, or punctuation. Upper case should be considered the same as lower case. For example, count_letters("This is a sentence.") should return {'t': 2, 'h': 1, 'i': 2, 's': 3, 'a': 1, 'e': 3, 'n': 2, 'c': 1}.
View Strings_Lists_Dictionaries_7.py
def count_letters(text):
result = {}
text = text.lower()
# Go through each letter in the text
for letter in text:
# Check if the letter needs to be counted or not
if letter .isalpha() and letter not in result:
result[letter] = text.lower().count(letter)
# Add or increment the value in the dictionary
return result
@WinstonN
WinstonN / main.py
Created Mar 23, 2021
Simple Lotto number generator, with powerball
View main.py
# Try and guess the lotto numbers
# http://lottoresults.co.nz/tools/lotto/number-analysis
import random
numbers_count = 6
powerball_numbers_count = 1
numbers = [
19,
1,
View missed_answerlines.txt
Missed:
"Phillip Morin Freneau"
"Joel Barlow"
"double-stranded DNA"
"guanine"
"COPD"
"thoracic diaphragm"
"cAMP"
"sistrum"
"Goodbye, Columbus"
View data.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AnisahTiaraPratiwi
AnisahTiaraPratiwi / Strings_Lists_Dictionaries_6.py
Created Mar 23, 2021
Taylor and Rory are hosting a party. They sent out invitations, and each one collected responses into dictionaries, with names of their friends and how many guests each friend is bringing. Each dictionary is a partial list, but Rory's list has more current information about the number of guests. Fill in the blanks to combine both dictionaries in…
View Strings_Lists_Dictionaries_6.py
def combine_guests(guests1, guests2):
# Combine both dictionaries into one, with each key listed
# only once, and the value from guests1 taking precedence
guests2.update (guests1)
return guests2
Rorys_guests = { "Adam":2, "Brenda":3, "David":1, "Jose":3, "Charlotte":2, "Terry":1, "Robert":4}
Taylors_guests = { "David":4, "Nancy":1, "Robert":2, "Adam":1, "Samantha":3, "Chris":5}
print(combine_guests(Rorys_guests, Taylors_guests))
@bollain
bollain / WebViewer snapToNearest sample.js
Last active Mar 23, 2021
Demo of snapToNearest using WebViewer + WebViewer Server
View WebViewer snapToNearest sample.js
Webviewer({
initialDoc: 'https://pdftron.s3.amazonaws.com/downloads/pl/demo-annotated.pdf',
path: '/lib',
fullAPI: true,
pdftronServer: 'http://localhost:8090/',
}, document.getElementById('viewer')).then(instance => {
const { docViewer, Annotations } = instance;
let snapMode;
@AnisahTiaraPratiwi
AnisahTiaraPratiwi / Strings_Lists_Dictionaries_5.py
Created Mar 23, 2021
Complete the code to iterate through the keys and values of the car_prices dictionary, printing out some information about each one.
View Strings_Lists_Dictionaries_5.py
def car_listing(car_prices):
result = ""
for cars in car_prices:
result += "{} costs {} dollars".format(cars, car_prices[cars]) + "\n"
return result
print(car_listing({"Kia Soul":19000, "Lamborghini Diablo":55000, "Ford Fiesta":13000, "Toyota Prius":24000}))
View Potential Maintainers
Maintainers:
freezeboy: python38Packages.arabic-reshaper, python39Packages.arabic-reshaper, python39Packages.arabic-reshaper, python39Packages.arabic-reshaper, python38Packages.arabic-reshaper, python38Packages.arabic-reshaper, python38Packages.arabic-reshaper, python39Packages.arabic-reshaper