Edmonton Python User Group

Jobs

Local

  • QuoteToMe is hiring Senior and Intermediate Python Developers, slack @Andrew Langstone
  • Blendable is hiring Intermediate Python Devs, slack @CodyHiar
  • Let us know if you'd like to us to share a position in our news!

Online

Looking for a job? Looking to hire great people?

Please visit #opportunities at devedmonton.slack.com

Events


PyCon Sweden, Nov. 12–13
http://www.pycon.se/

News

Articles

Python Projects

  • Calibre 5
    eBook library/reader, new release moves to Python 3
    and adds saved highlights
  • CadQuery
    Design 3D parts in Python

Python Tip: type & dir

 

t1 = ('Python', 'Coding', 'Tips')
t3 = r'a*'
print(type(t1))
print(dir(t1))
print(type(t3))
print(dir(t3))
>>> t1 = ('Python', 'Coding', 'Tips')
>>> t3 = r'a*'
>>> print(type(t1))
<class 'tuple'>
>>> print(dir(t1))
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', 
'__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '
__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__sub
classhook__', 'count', 'index']
>>> print(type(t3))
<class 'str'>
>>> print(dir(t3))
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', 
'__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '
__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeo
f__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'forma
t', 'format_map', 'index', 'isalnum', 'isalpha', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'iss
pace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'r
partition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']

Next Meetup

December 14

We are looking for presenters

Message one of
@data-get, @dgmouris, @abram
on Dev Edmonton Slack

Beginners are more than welcome!
Talks vary in topic, they just have to do with Python in some way. 🐍

Today's Talks!

Python Challenges

Hosted by Abram H. and Andrew C.

 

Solve the python challenges with your table!

Solutions should be at least 1 of the following:

* Unique

* Effecient

* Pythonic

* Creative

* Correct?

* tiny

Challenge 1

  • a function to insert a number into a list in order (maintain a sorted list)

  • A function
  • 2 inputs
    • a value
    • a list
  • 1 output
    • the list with the value inserted in order
  • e.g. insert(4,[1,2,3,5]) == [1,2,3,4,5]

Challenge 2

  • given 2 lists of words, return the most frequent word found in both sets (e.g. most occurring word shared by both lists). test data:

  • A function
  • 2 inputs
    • a list of words
    • a list of words
  • 1 output: the word which is shared and occurred the most
  • e.g., common_word(['dog','dog','dog', 'cat', 'hockey', 'stick'], ['dog','dog','cat','stick])=="dog"

Challenge 3

  • given a list of measurements of temperatures of size N calculate a list of size N-1 of differences in           temperatures (e.g. x[i + 1] - x[i])

  • A function
  • 1 input
    • a list of N numbers (temperatures)
  • 1 output: a list of N-1 numbers
  • e.g., temp_diff([1,2,3]) = [1,1]

Challenge 4

  • Given strings of html grab the href out of the anchor tags. E.g., '<a href="http://coolbears.com">' =>           http://coolbears.com

  • A function
  • 1 input
    • a string of HTML
    • a list of words
  • 1 output: 1 string of the first href attribute. Or 1 list of all href attributes.
  • e.g., href('<a href="http://coolbears.com">X</a>')=="http://coolbears.com"

Challenge 5

  • You need to convert queries to IDs or slugs and IDs must be lower case and spaces need to be replaced by - and - needs to be replaced by -- 'convert "I like cheese--a lot" to i-like-cheese----a-lot'

  • A function
  • 1 input
    • a string
  • 1 output: a string where space and dash are replaced and escaped by dashes.
  • e.g., dash_slug("I like CHEESE--a lot")=="i-like-cheese----a-lot"

Challenge 6

  •  Given 2 lists of values A and B make a function that returns the values in A that are not in B

  • A function
  • 2 inputs
    • a list of values
    • a list of values
  • 1 output: a list of values in A that are not in B
  • e.g., anotb(['a','b','c'],['b','c','d']) == ['a']

Social Game

https://skribbl.io/

A pictionary-like game.

Go to the site

Type in a name and click "CREATE PRIVATE ROOM"

share the URL with your REMO.CO table!

Use your table local txt chat :)

 

P.S. We need talks for December and January!

And volunteers for: AV, Slides, Speaker Wrangling, Org-Committee

If you're interested reach out (on the slack):
@dgmouris @abramhindle @data-get

Made with Slides.com