Skip to content

Instantly share code, notes, and snippets.

View Abdur-rahmaanJ's full-sized avatar
🛰️
Python, for the love of it!

Abdur-Rahmaan Janhangeer Abdur-rahmaanJ

🛰️
Python, for the love of it!
View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@AkiraKito
AkiraKito / polymorphic_model.py
Created March 8, 2012 21:40
Polymorphic model with SQLAlchemy
# -*- coding: utf-8 -*-
from sqlalchemy import Column, String, Integer, ForeignKey, create_engine
from sqlalchemy.orm import sessionmaker, relation
from sqlalchemy.ext import declarative
engine = create_engine('sqlite:///:memory:')
Session = sessionmaker(bind=engine)
session = Session()
@paulmillr
paulmillr / active.md
Last active July 15, 2024 10:55
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@erh
erh / histogram.py
Last active July 31, 2021 06:46
This is a very simple python program that reads your email inbox and generates a histogram of how much email is unread in your inbox.
#/usr/bin/env python
###
### This generates a very simple histogram of unread e-mail in your INBOX.
### This is meant as a toy, and your are free to do whatever you want with the code.
###
# core python libraries
import datetime
@hankhan425
hankhan425 / jsbin.alener.css
Created August 7, 2013 10:51
Simple HTML5 Canvas Shooter
#canvas {
margin: auto;
display: block;
background-color: #070719;
}
@MarcDiethelm
MarcDiethelm / Contributing.md
Last active July 6, 2024 13:12
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@rxaviers
rxaviers / gist:7360908
Last active July 26, 2024 06:58
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@daryltucker
daryltucker / flask.py
Last active October 12, 2023 13:31
Really disable logger logging in Flask
# I have my own logging setup and had a hard time disabling console output in Flask.
app.logger.disabled = True
log = logging.getLogger('werkzeug')
log.disabled = True
# New, 2022 Method:
logging.getLogger('werkzeug').disabled = True
@SteveByerly
SteveByerly / gist:a3629148441e742e0b13
Created November 12, 2014 16:34
Reportlab basic doc with table example
import io
from reportlab.lib import colors
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Table
from reportlab.platypus.tables import TableStyle
def make_doc():
pdf = io.BytesIO()
@techtonik
techtonik / webview.py
Last active October 27, 2023 10:33
View HTML content in Python with PySide
"""
Placed into public domain by
anatoly techtonik <techtonik@gmail.com>
Show HTML in GUI window through PyQt4/PySide.
[ ] position window at the center of the screen
(right now it is middle bottom)
[ ] implement lazy loading for PyQt4/PySide
"""