Hate that work got so busy it broke my #100DaysOfCode streak =(
However, I got a good base in Python and React this time around, and my work agreed to dedicate some time this fall to a new Python project, as well as a React-based re-vamp of our website!
Next round will be π₯
#100DaysOfCode R2D71: Timestamps and dates in Python using the time and datetime modules
from datetime import datetime
import time
a = time.time()
for i in range(10000):
print(i)
b = time.time()
runtime = b = a
d = https://t.co/7NrPRRPBZs()
print(runtime, d)
#100DaysOfCode R2D70: Went over working with SQLite databases in Python using the sqlite3 module
I've used MongoDB several times, but have yet to give in and just learn this damned SQL language. It's so simple and popular, no idea why I've pushed off learning it for so long.. π
#100DaysOfCode R2D69: Python zipfile, csv, and json modules. Especially excited to start getting into the csv module, as the engineering world I live in still works out of Excel
Hoping to leverage all my VBA code over the years by stringing workbooks together with Python
#100DaysOfCode R2D68: Learned about reading and writing to files (as well as copying & moving files) using the Python standard library
Specifically learned how to use https://t.co/SDlrLPFOak_text() & .write_text() to replace using the open() method
shutil for copying / moving
#100DaysOfCode R2D67: Python, found this gemπ:
math.perm(n, k=None)
Return the number of ways to choose k items from n items without repetition and with order ..i.e: Evaluates to n! / (n - k)!
If k is not specified or is None, then k defaults to n and the function returns n!
#100DaysOfCode R2D66: Started learning about the Python Standard Library, specifically dove into pathlib and the Path class
One question I have is why anyone would use the path.iterdir() method instead of the path.glob() method?
Is it faster? Seems like less functionality
#100DaysOfCode R2D64/65: Had family visiting and didn't get a chance to post yesterday, but absolutely got in some Python
Covered modules, and found some cool tricks to run code only if a module is the root program:
if __name__ == "__main__":
print("This is the root")
#100DaysOfCode R2D63: Worked with Python Data Classes and using the namedtuple class from the collections library
Also learned how to extend Python's built-in types (which is just like extending any other class)
Excited to get into the next section: Python modules & Std. Lib!
#100DaysOfCode R2D62: Python inheritance, specifically abstract base methods, multiple inheritance, and multi-level inheritance.
I like the idea behind abstract base methods to mitigate too much overlapping complexity in Classes. Took some notes in Jupyter Notebook below:
#100DaysOfCode R2D61: Finally back into React after taking some time in Python
Fully grasping how Prisma / GraphQL-Yoga link together to establish a schema and implement logic. Made a little graphic to show these links, as outlined in @wesbos Advanced React Course
#100DaysOfCode R2D60: More Python inheritance, including how to make a call to a parent's __init__(self): method
Also learned about pitfalls with abusing inheritance, and creating too much complexity in code. This tutorial recommends keeping classes to 2 levels of inheritance
#100DaysOfCode R2D59: Dug into inheritance in Python... then started sneaking ahead in this tutorial to check out the part where they use Python to interface with Excel
Im trying not to skip ahead, but Iβm also getting impatient to use all this to build things π
#100DaysOfCode Learning about making "private members" in Python, which are technically not really private...
Can access all attributes of an Object by using the universal __dict__ property, including ones made "private" by adding double underscore to the front of it i.e: __tags
@black_lotus0000 Giving everyone in your org the least amount of access they need to get the job done...
Which is just about impossible to perfectly determine, keeps employees from being able to "learn how to fish" by getting their own information, and creates a bunch of bottlenecks π
#100DaysOfCode R2D57: Python custom containers, and more magic methods
Even though JS and Python are similar in that they are scripting languages, I feel a big difference in mastering Python is getting familiar with the large number of built-in functions and libraries.. so many!
#100DaysOfCode R2D56: Continued learning about Python "magic methods", specifically: __init__ , __eq__, and __gt__ / __lt__ methods.
Also learned about method decorators, specifically turning an instance-based method into a Class-based method with the @classmethod decorator
#100DaysOfCode R2D55: A massive work assignment the past two days kept me from posting, so got back into Python today learning some "magic methods"
My first time around learning Python I never got into these, finally starting to dig into some brand new material! π