Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Co tcco

View GitHub Profile
@diriver63
diriver63 / pyodbc-unixODBC-lambda-layer
Last active Aug 21, 2021
pyodbc and unixODBC for MSSQL as a lambda layer
View pyodbc-unixODBC-lambda-layer
# use https://github.com/lambci/docker-lambda to simulate a lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7
# download and install unixODBC
# http://www.unixodbc.org/download.html
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz -O
tar xzvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt
@chicagobuss
chicagobuss / BUILD-multiple-files
Last active Apr 9, 2018
Examples for using pants build to build a simple flask app
View BUILD-multiple-files
python_binary(
name='theapp',
dependencies=[
'3rdparty/python:Flask',
'3rdparty/python:gevent',
':theapp_lib'
],
resources=globs('static/*', 'templates/*'),
source='main.py'
)
@veselosky
veselosky / s3gzip.py
Last active Sep 15, 2021
How to store and retrieve gzip-compressed objects in AWS S3
View s3gzip.py
# vim: set fileencoding=utf-8 :
#
# How to store and retrieve gzip-compressed objects in AWS S3
###########################################################################
#
# Copyright 2015 Vince Veselosky and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@wickman
wickman / README.md
Created Apr 12, 2012
Python development in Pants (tutorial)
View README.md

Python development using Pants

brian wickman - @wickman

[TOC]

Why use Pants for Python development?

Pants makes the manipulation and distribution of hermetically sealed Python environments

@robbles
robbles / virtualenv-auto-activate.sh
Last active Sep 6, 2021 — forked from codysoyland/virtualenv-auto-activate.sh
virtualenv-auto-activate with support for zsh and virtualenvwrapper
View virtualenv-auto-activate.sh
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.