Skip to content

Instantly share code, notes, and snippets.

<h1 class="title">Scrambled Eggs</h1><h2>Ingredients</h2><ul><li><p>2 Eggs</p></li><li><p>Salt and Pepper (to taste)</p></li><li><p>Butter</p></li></ul><h2>Instructions</h2><ol><li><p>Heat up a pan at medium heat</p></li><li><p>Melt butter</p></li><li><p>Crack and add eggs to pan</p></li><li><p>Use a spatula to scramble the eggs continuously while cooking</p></li><li><p>Remove from heat</p></li><li><p>Add salt and pepper</p></li><li><p>Serve</p></li></ol><p data-placeholder-text="Tell me a story" class="empty-node"><br></p><p data-placeholder-text="Tell me a story" class="empty-node"><br></p>
import requests
import json
url = 'https://gist.githubusercontent.com/umar-ahmed/9feac2a7b28b2843f880012c97e0c564/raw/e147f3476d02c658dbfdec4175f6c67398e55285/youtube'
response = requests.get(url)
print(response.status_code)
content = response.text
@umar-ahmed
umar-ahmed / youtube
Created August 18, 2019 19:28 — forked from jacksontong/youtube-api-response.json
youtube-api-response
[
{
"kind": "youtube#searchResult",
"etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/iecMlihzF4qEDkzXsB6TUt81Oqw\"",
"id": {
"kind": "youtube#video",
"videoId": "M4ZoCHID9GI"
},
"snippet": {
"publishedAt": "2018-04-12T16:00:04.000Z",
[
{
"id": 1,
"title": "Happy Birthday"
},
{
"id": 2,
"title": "Mother's Day"
},
{
@umar-ahmed
umar-ahmed / beautiful_idiomatic_python.md
Created August 15, 2017 15:51 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@umar-ahmed
umar-ahmed / watcher.py
Created January 4, 2017 00:17
File watcher for Adobe XD project files.
import sys
import time
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
import zipfile
def zip(src, dst):
zf = zipfile.ZipFile("%s.xd" % (dst), "w", zipfile.ZIP_DEFLATED)