Skip to content

Instantly share code, notes, and snippets.

View gusreyes01's full-sized avatar
🏠
Working from home

Gustavo Reyes gusreyes01

🏠
Working from home
View GitHub Profile
@genio
genio / 01_setup_EL.md
Last active November 24, 2022 08:45
ODBC and MSSQL on Linux/Mac

Enterprise Linux installation of ODBC is easy.

yum install unixODBC unixODBC-devel freetds freetds-devel perl-DBD-ODBC perl-local-lib

Configuration isn't much harder. You'll need to edit UnixODBC's driver list to add FreeTDS as an available driver.

  • vim /etc/odbcinst.ini
@carymrobbins
carymrobbins / raw_as_qs.py
Last active March 25, 2022 12:21
Django - convert RawQuerySet to QuerySet
from django.db import connection, models
class MyManager(Manager):
def raw_as_qs(self, raw_query, params=()):
"""Execute a raw query and return a QuerySet. The first column in the
result set must be the id field for the model.
:type raw_query: str | unicode
:type params: tuple[T] | dict[str | unicode, T]
:rtype: django.db.models.query.QuerySet
"""
@sloria
sloria / bobp-python.md
Last active April 20, 2024 13:02
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens