Skip to content

Instantly share code, notes, and snippets.

View Curiouspaul1's full-sized avatar
1️⃣
Working from school

Curious Paul Curiouspaul1

1️⃣
Working from school
View GitHub Profile
@LordGhostX
LordGhostX / fauna-auth-demo.py
Last active April 1, 2022 18:41
Gist showing Fauna's user identity and session management capabilities
from faunadb import query as q
from faunadb.objects import Ref
from faunadb.client import FaunaClient
from faunadb.errors import BadRequest, Unauthorized
client = FaunaClient(secret="YOUR-SECRET-HERE")
def create_user(email, password):
result = False
@astrolox
astrolox / LICENSE
Last active April 5, 2024 03:08
Implementing Socket IO event handling via Blueprint in Flask-SocketIO - without using a single global socketio object.
Copyright 2020 Brian Wojtczak
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
@amitripshtos
amitripshtos / alternative-scheduler-for-celery.py
Created August 22, 2018 09:53
Alternative to celery beat for people who got burned hard
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.executors.pool import ThreadPoolExecutor
from apscheduler.jobstores.memory import MemoryJobStore
from apscheduler.job import Job
import json
import logging
from apscheduler.triggers.cron import CronTrigger
import time
from celery import Celery
from typing import List
@MWins
MWins / project-ideas01.md
Last active November 1, 2024 23:12
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@mivade
mivade / app.py
Last active May 4, 2023 16:51
Websockets with Flask via aiohttp
"""Simple demo of using Flask with aiohttp via aiohttp-wsgi's
WSGIHandler.
"""
import asyncio
from aiohttp import web
from aiohttp_wsgi import WSGIHandler
from flask import Flask, render_template
@pcdinh
pcdinh / decorators.py
Created April 29, 2012 18:05
Flask login_required decorator
from flask import request, g
from functools import wraps
def login_required(f=None, url="public.login", next=None):
"""
Check if user is logged or redirect to a certain page.
By default go to public login.
"""
def outer_decorator(decorated_fn):