Skip to content

Instantly share code, notes, and snippets.

View housamz's full-sized avatar

Housam Ziad housamz

View GitHub Profile
@housamz
housamz / Creating a simple example to authenticate a React UI with a Python Django backend.md
Created August 6, 2024 14:21
Creating a simple example to authenticate a React UI with a Python Django backend

Creating a simple example to authenticate a React UI with a Python Django backend.

Step 1: Set Up the Django Backend

  1. Install Django and Django Rest Framework:

    pip install django djangorestframework django-cors-headers
  2. Create a New Django Project:

@housamz
housamz / friends-info.json
Last active September 17, 2023 02:13
All Friends TV Show data in JSON format.
{
"Actors": [
"Jennifer Aniston",
"Courteney Cox",
"Lisa Kudrow",
"Matt LeBlanc",
"Matthew Perry",
"David Schwimmer"
],
"Awards": "Won 6 Primetime Emmys. 78 wins & 231 nominations total",
%(#(#%####(/%
(#%%%%%%%%%###
((###(((/////(#(
%((((((/(////(#(
%((###((((((((((
@housamz
housamz / markdown-cheatsheet.md
Last active July 1, 2021 15:46
Markdown Cheatsheet

H1 - Markdown Cheatsheet

H2 - Text

H3 Example

H4 Example

H5 Example
H6 Example

A line break can be done
by putting double space
at the end of the line

@housamz
housamz / knowledge-is-power
Last active May 11, 2021 10:53
Knowledge is power
Knowledge is power
------------------
A [Pen](https://codepen.io/housamz/pen/rggZJr) by [Housamz](https://codepen.io/housamz) on [CodePen](https://codepen.io).
[License](https://codepen.io/housamz/pen/rggZJr/license).
{
"emojis": [
{
"category": "smileys_people",
"shortcode": ":joy:",
"keywords": "happy silly funny smiley smileys cry crying weeping weep sob sobbing tear tears bawling laugh laughing lol rofl lmao lmfao hilarious ha haha laugh laughing lol rofl lmao lmfao hilarious ha haha emotion emotions emotional emotion emotions emotional sarcastic sarcasm sarcastic sarcasm",
"data-clipboard-text": "😂",
"data-emoji": "😂",
"title": "Face with Tears of Joy",
"#text": "😂"
@housamz
housamz / index.pug
Last active October 23, 2024 09:22
Raffle Draw Lucky wheel
.controls-container
h3#headline Insert Names Here
small#subheader (separated by commas or new lines)
span#counter
textarea#names(rows="10", cols="40").
Ben, David, Declan, Housam, Jeongtae, Kevin, Ming, Robin
small#counter
button#spin Spin The Wheel
button#remove Remove Winner
.container
@housamz
housamz / dumb_object.py
Created February 16, 2020 14:10
Python Dumb Object
def dump(obj):
for attr in dir(obj):
print("obj.%s = %r" % (attr, getattr(obj, attr)))
@housamz
housamz / palindrome.py
Created February 3, 2020 12:37
Python Palindrome
input = int(input("Enter your value: "))
final = ''
for i in range(1, input + 1):
for j in range(input, 0, -1):
final += ' ' if (j < i) else str(j)
for j in range(2, input + 1):
final += ' ' if (j < i) else str(j)
final += '\n'
@housamz
housamz / book_isbn_query.py
Last active January 23, 2020 10:41
Python requests script that queris Google books API for book info using ISBN
import urllib.request
import json
book_ISBN = "9780307277671"
google_api = "https://www.googleapis.com/books/v1/volumes?q=isbn:"
with urllib.request.urlopen(google_api + book_ISBN) as f:
text = f.read()