Skip to content

Instantly share code, notes, and snippets.

View jerobado's full-sized avatar
🔍
Who to serve next?

Jero Bado jerobado

🔍
Who to serve next?
View GitHub Profile

Django Developer Guide

Setting up a database

  1. Create local database and role (ie. PostgreSQL)
  2. Set database credentials in settings.py
  3. Migrate the database
@jerobado
jerobado / cpython-internal-developer-guide.md
Created July 20, 2020 00:16
CPython developer common task

CPython Internal Developer Guide

How to Update Python Grammar

  1. Update Grammar/python.gram
  2. Create a Makefile
    ./configure
    
  3. Update keyword.py
@jerobado
jerobado / ada-setup.md
Created July 15, 2020 02:48
Ada cheat sheet

Installation

$ sudo apt install gnat
$ sudo apt install gprbuild

Compiling

$ gnatmake <filename.adb>
@jerobado
jerobado / special_character_remover.py
Last active April 27, 2019 11:14
Removes special characters in an alphanumeric text.
# Special Character Remover - removes special characters in an alphanumeric text
import string
ALPHANUMERIC = string.digits + string.ascii_letters
text = 'JI000 00-2391M/xxxx---------90234'
# output 'JI000002391Mxxxx90234'
print(''.join([char for char in text if char in ALPHANUMERIC]))
@jerobado
jerobado / sorting_qtableview.py
Created January 25, 2018 12:48
How to sort a QTableView?
# Applying a sort feature in a QTableView
import sys
from PyQt5.QtCore import (Qt,
QModelIndex,
QAbstractTableModel,
QSortFilterProxyModel)
from PyQt5.QtWidgets import (QApplication,
QTableView)