Skip to content

Instantly share code, notes, and snippets.

View asaah18's full-sized avatar

abdurrahman asaah18

View GitHub Profile
@asaah18
asaah18 / python guide.md
Last active November 5, 2022 16:20
a python guide/cheat-sheet intended to those who already know python and want a mind refresh or looking for a specific syntax

Python Guide

This python guide is intended to those who already know python and want a mind refresh or looking for a specific syntax.
-as this guide doesn't elaborate in explaining thing that a programmer would already know -like: variable, function, csv, json-

additionally, this guide is not intended to be a replacement for reading official Python documentation.

guide version: 2.1.0 | python version: 3.10

| Part of Version | Explanation |

@anand2312
anand2312 / pymongo-to-motor.md
Last active May 24, 2024 09:15
pymongo vs Motor

pymongo vs Motor

Motor is an async Python driver for MongoDB.

When should I use Motor?

You should use Motor when you're trying to interact with a MongoDB database in an asynchronous context. When you're making something that needs to be asynchronous (like a web server, or most commonly from what I've seen here, Discord bots), you also want all the database calls to be done asynchronously. But pymongo is synchronous, i.e it is blocking, and will block the execution of your asynchronous program for the time that it is talking to the database.

Okay, How do I switch now?!

Thankfully for us, switching from pymongo to Motor isn't too hard, and won't need you to change much code. This process can be roughly summarized as:

Step 1: Install Motor, and import it

Installing can be done with pip - pip install motor

@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active July 27, 2024 06:17
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@sillygwailo
sillygwailo / extract-ios-wallpaper.md
Last active June 8, 2024 06:52
Extract your iOS wallpaper if the image is not in your Camera Roll
  1. Backup your iOS device to your computer (not iCloud) through iTunes
  2. Download iPhone / iPod Touch Backup Extractor from http://supercrazyawesome.com/
  3. Run the app, and click "Read Backups"
  4. Find the backup you just made
  5. Make an empty directory
  6. Scroll all the way down and highlight "iOS Files"
  7. Extract the iOS files to the directory you made
  8. Visit https://www.dcode.fr/cpbitmap-format
  9. Click "Choose File"
  10. Inside the directory you created, find the iOS Files/Library/Springboard directory.