Skip to content

Instantly share code, notes, and snippets.

@bahati2000
bahati2000 / pyodbc-unixODBC-lambda-layer
Created January 19, 2024 23:37 — forked from diriver63/pyodbc-unixODBC-lambda-layer
pyodbc and unixODBC for MSSQL as a 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
@bahati2000
bahati2000 / stats.py
Created November 21, 2021 13:38 — forked from countrymarmot/stats.py
caculate Cp and Cpk using python numpy
#!/usr/bin/env python
# encoding: utf-8
import numpy as np
def Cp(mylist, usl, lsl):
arr = np.array(mylist)
arr = arr.ravel()
sigma = np.std(arr)