diff --git a/_meta/ChatGPT_prompt.md b/_meta/ChatGPT_prompt.md deleted file mode 100644 index a9d4c42..0000000 --- a/_meta/ChatGPT_prompt.md +++ /dev/null @@ -1,8 +0,0 @@ -refactor the following methods. consider the following: - -- reduce repetition and use greater abstraction where possible -- do not use then clauses -- do not use for loops, use maps, filter, reduce instead -- break complex functionality up into smaller functions -- increase efficiency -- increase readability diff --git a/_meta/Mermaid_diagrams.md b/_meta/Mermaid_diagrams.md deleted file mode 100644 index 4366954..0000000 --- a/_meta/Mermaid_diagrams.md +++ /dev/null @@ -1,57 +0,0 @@ -```mermaid - -%%{init: {'theme':'dark'}}%% - graph TD; - A-->B; - A-->C; - B-->D; - C-->D; -``` - -```mermaid -%%{init: {'theme':'default'}}%% -flowchart TD - A[Christmas] -->|Get money| B(Go shopping) - B --> C{Let me think} - C -->|One| D[Laptop] - C -->|Two| E[iPhone] - C -->|Three| F[fa:fa-car Car] -``` - -```mermaid -%%{init: {'theme':'neutral'}}%% -erDiagram - CUSTOMER }|..|{ DELIVERY-ADDRESS : has - CUSTOMER ||--o{ ORDER : places - CUSTOMER ||--o{ INVOICE : "liable for" - DELIVERY-ADDRESS ||--o{ ORDER : receives - INVOICE ||--|{ ORDER : covers - ORDER ||--|{ ORDER-ITEM : includes - PRODUCT-CATEGORY ||--|{ PRODUCT : contains - PRODUCT ||--o{ ORDER-ITEM : "ordered in" -``` - -```mermaid -%%{init: {'theme':'default'}}%% -classDiagram - Animal <|-- Duck - Animal <|-- Fish - Animal <|-- Zebra - Animal : +int age - Animal : +String gender - Animal: +isMammal() - Animal: +mate() - class Duck{ - +String beakColor - +swim() - +quack() - } - class Fish{ - -int sizeInFeet - -canEat() - } - class Zebra{ - +bool is_wild - +run() - } -``` diff --git a/_meta/Resources.md b/_meta/Resources.md deleted file mode 100644 index 845092f..0000000 --- a/_meta/Resources.md +++ /dev/null @@ -1,125 +0,0 @@ -# Resources - -## Algorithms and Data Structures - -J.Wengrow. 2017. **A Common Sense Guide to Data Structures and Algorithms** - -S. Skienna. 2011. **The Algorithm Design Manual** - -A. Bhargava. 2016. **Grokking Algorithms: An Illustrated Guide** - -McDowell. 2009. **Cracking the Coding Interview** [for useful algorithm -exercises] - -## Artificial Intelligence - -P. Norvig, S. Russell. 2020. **Artificial Intelligence: A Modern Approach** - -N. Weiner. 1948. **Cybernetics** - -## Backend (general) - -[Backend Roadmap](https://roadmap.sh/backend) - -[DevOps Roadmap](https://roadmap.sh/devops) - -[Software Design Roadmap](https://roadmap.sh/software-design-architecture) - -## C - -[Everything I wish I knew when I started learning C](https://tmewett.com/c-tips/) - -## Computer Science (general) - -Abelson, Sussman. 1998. **Structure and Interpretation of Computer Programs** - -[Welcome to CS](https://runestone.academy/ns/books/published/welcomecs/index.html) - -[Open Source self-taught CS course](https://github.com/ossu/computer-science) - -[roadmap.sh/computer-science](https://roadmap.sh/computer-science) - -## Electronics, hardware, computer architecture - -M.Justice. 2020. **How Computers Really Work** - -J.C. Scott. 2009. **But How Do It Know? The Basics of Computers for Everyone** - -G. Walters. 2001. **The Essential Guide to Computing** - -C. Roberton. 1008. **Fundamental Electrical and Electronic Principles** - -Hennesy, Patterson. 2020. **Computer Organization and Design** -([BBC O'Reilly Link](https://learning.oreilly.com/library/view/computer-organization-and/9781483221182/)) - -Bryant, O'Halloran. 2016. **Computer Systems: A Programmer's Perspective** - -N.Nisan, S.Schoken. 2021. **The Elements of Computing Systems** (Second Edition) - -[How do transistors work, anyway?](https://lcamtuf.substack.com/p/how-do-transistors-work-anyway) - -[NAND latch](http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/nandlatch.html) - -[Lessons in Electric Circuits](https://www.allaboutcircuits.com/textbook/) [full -textbook] - -## General programming - -R.C.Martin. 2008. **Clean Code** - -Hunt, Thomas. 1999. **The Pragmatic Programmer** - -## Linux - -B.Ward. 2021. **How Linux Works** - -## Mathematics and Logic - -M. Bergmann, J. Moor, J.Nelson. 1990. **The Logic Book** - -J. Vince. 2015. **Foundation Mathematics for Computer Science** - -Gelfand, Shen. 2004. **Algebra** - -J.Kun. 2018. **A Programmer's Introduction to Mathematics** - -E. Lehman, F. Thomson Leighton, A.R. Meyer 2017. **Mathematics for Computer -Science** - -## Networks - -G. Caldarelli, M. Catanzaro. 2012. **Networks: A Very Short Introduction** - -[Course: NodeJS Essential Training (LinkedIn Learning)](https://www.linkedin.com/learning/node-js-essential-training-14888164) - -[Course: Building RESTful APIs with Node.js and Express](https://www.linkedin.com/learning/building-restful-apis-with-node-js-and-express-16069959) - -## Python - -A. Sweighart. 2020. **Beyond the Basic Stuff with Python** - -A. Sweighart. 2015. **Automate the Boring Stuff with Python** - -J. Hunt. 2019. **A Beginner's Guide to Python Programming** - -J. Hunt. 2019. **An Advanced Guide to Python Programming** - -[Tiny Python Projects (O'Reilly)](https://learning.oreilly.com/library/view/tiny-python-projects/9781617297519/) - -[Learning Arduino with Python](https://realpython.com/arduino-python/) - -[Python Programming Exercises](https://github.com/zhiwehu/Python-programming-exercises/blob/master/100%2B%20Python%20challenging%20programming%20exercises.txt) - -## Shell - -B. Perry, D. Taylor. 2015. **Wicked Cool Shell Scripts** - -[What is the difference between `${var}`, `"$var"`, and `"${var}"` in the Bash shell? (Stack Overflow)](https://stackoverflow.com/q/18135451/10484600) - -[AWK tutorial](https://zetcode.com/lang/awk/) - -## SQL - -[Course: MySQL Essential Training (LinkedIn Learning)](https://www.linkedin.com/learning/mysql-essential-training-2) - -[Course: MySQL Advanced Topics (LinkedIn Learning)](https://www.linkedin.com/learning/mysql-advanced-topics) diff --git a/_meta/Topic_Log.md b/_meta/Topic_Log.md deleted file mode 100644 index 42abd9f..0000000 --- a/_meta/Topic_Log.md +++ /dev/null @@ -1,78 +0,0 @@ -# Learning Topic Log - -## Python - -- Research: best practice for separating projects into `conda` environments like - npm - -- Read-up more on types: what does it mean for Python to be dynamically typed. - What is type-hinting really? - - - Use provided pdfs and John's books - -- Is `dictionary.values()`/ `dictionary.keys()` of type list? -- Is `dictionary.items()` a list of tuples for key, value? - -- How to run test suites via VSCode? - - BBC Course, remaining topics: - - - Error handling - - Testing - - I/O - -## Bash - -- Awk - - https://dane-bulat.medium.com/the-awk-programming-language-an-introduction-7035d343cd30 -- Why do we have to do `"$var"` instead of `$var` or `${var}` at times - -## Linux - -- `/dev/null` in greater depth - -## SQL - -- What is a _schema_ in MySQL/ SQL ? -- Proper definition of "migrating a database"? - -## GraphQL - -- What is a transformer? - -## AWS - -- Start reading more specifically about key services: Lambda, step functions, - CloudFormation, Elasticache, CloudFront, CloudWatch -- Do basic exercises from Amazon on aspects I am interested in to get a - practical feel for it -- Elastic Beanstalk and how it differs from using multiple different services at - once -- AWS Amplify -- Deploy my own website on AWS - -## NodeJS - -- Build examples of read stream and write stream -- Can you override parent class methods in JS subclass? - - If not in JS, can you do this in TS? - -## Git - -## JavaScript - -Look into these new features: - -- Proxy object -- `Object.hasOwn()` -- Top level `await` -- `Error.Prototype.cause()` -- Dynamic import -- Temporal -- `Promise.allSettled()`, `Promise.any()` - -## TypeScript - -- ~~Records~~ -- ~~Mapped types~~ -- SOLID principles OOP diff --git a/_meta/Unsorted_notes.md b/_meta/Unsorted_notes.md deleted file mode 100644 index 2700710..0000000 --- a/_meta/Unsorted_notes.md +++ /dev/null @@ -1,63 +0,0 @@ -### Difference in import types Python - -import x requires dot notation to individuate different components in the module - -from x import y - -import a component directly from the module removes the need to use dot notation -to indviduate - -### Complex filter function using lambdas - -```py -def update_entries(old, new): - """Merge old and new data, removing dupes""" - combined = old + new - seen = set() - - filter_func = lambda x: not (tuple(x) in seen or seen.add(tuple(x))) - - unique_combined = list(filter(filter_func, combined)) -``` - -#### ChatGpt explanation - -Certainly, the line - -```python -filter_func = lambda x: not (tuple(x) in seen or seen.add(tuple(x))) -``` - -creates a lambda function that takes a single argument `x`, where `x` is -expected to be a list. The function converts `x` to a tuple and checks for its -existence in the `seen` set. - -Here is a breakdown of the logic: - -1. `tuple(x)`: This converts the list `x` to a tuple because lists are - unhashable and cannot be stored in a set. Tuples, being immutable, can be - stored in a set. - -2. `tuple(x) in seen`: This checks whether the tuple form of `x` is already in - the `seen` set. - -3. `seen.add(tuple(x))`: This adds the tuple form of `x` to the `seen` set. The - `add` method of a set returns `None`. - -4. `tuple(x) in seen or seen.add(tuple(x))`: This combines the above two steps. - The `or` operator returns the first "truthy" value it encounters, or the last - value otherwise. Since `seen.add()` returns `None`, which is "falsy," this - part will return `True` if `tuple(x)` was already in `seen`, and `None` - otherwise. Importantly, if `tuple(x)` was not already in `seen`, it will be - added. - -5. `not (...)`: The `not` negates the result. So if `tuple(x) in seen` was - `True`, `not True` would be `False`, causing the filter to skip this item. If - `tuple(x) in seen` was `False`, `not None` would be `True`, causing the - filter to include this item and also adding it to `seen`. - -In summary, the lambda function acts as a filter that only returns `True` for -the first occurrence of each unique list `x`, after converting it to a tuple for -hashability and set membership tests. After a unique list has been seen once, -any subsequent occurrences will cause the lambda function to return `False`, -effectively filtering them out. diff --git a/_scripts/flatten_directories.sh b/_scripts/flatten_directories.sh deleted file mode 100755 index 9dcb165..0000000 --- a/_scripts/flatten_directories.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -directories_to_parse="../Computer_Architecture ../Databases ../Electronics_and_Hardware ../Operating_Systems ../Programming_Languages ../DevOps" - -directory="/home/thomas/repos/eolas-bak" - -mapfile -t directories < <(find "$directory" -type d) -file_matches=() - -# Return array of all files belonging to source dirs... -for ele in ${directories[@]}; do - file_matches+=( $(find $ele -name "*.md" -type f) ) -done - -echo ${file_matches[1]} - diff --git a/_scripts/auto_save.sh b/scripts/auto_save.sh similarity index 100% rename from _scripts/auto_save.sh rename to scripts/auto_save.sh diff --git a/_scripts/clean_image_directory.sh b/scripts/clean_image_directory.sh similarity index 100% rename from _scripts/clean_image_directory.sh rename to scripts/clean_image_directory.sh diff --git a/_scripts/query.sh b/scripts/query.sh similarity index 100% rename from _scripts/query.sh rename to scripts/query.sh diff --git a/_scripts/random_revision_topic.sh b/scripts/random_revision_topic.sh similarity index 100% rename from _scripts/random_revision_topic.sh rename to scripts/random_revision_topic.sh diff --git a/_scripts/rename_img_links.sh b/scripts/rename_img_links.sh similarity index 83% rename from _scripts/rename_img_links.sh rename to scripts/rename_img_links.sh index 834dcb1..dfb6229 100755 --- a/_scripts/rename_img_links.sh +++ b/scripts/rename_img_links.sh @@ -4,7 +4,7 @@ find /home/thomas/repos/eolas/ -type f -name "*.md" | while read file; do - sed -i 's/\/img\//\/_img\//g' $file + sed -i 's/\/_img\//\/img\//g' $file done diff --git a/_scripts/space_to_underscore_filename.sh b/scripts/space_to_underscore_filename.sh similarity index 100% rename from _scripts/space_to_underscore_filename.sh rename to scripts/space_to_underscore_filename.sh