Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 16.04 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
package main | |
import ( | |
"os" | |
"time" | |
"syscall" | |
) | |
func main() { | |
daemonize() |
def is_development_install(package: str) -> bool: | |
"""Check if we're running a development installation""" | |
import pkg_resources | |
file = Path(dirname(pkg_resources.__file__)).parent | |
file = file.joinpath(package.replace('_', '-') + '.egg-link') | |
return file.exists() |
from sqlalchemy import Column | |
def column_to_type(column: Column): | |
""" | |
Helper to get the native Python type of a column | |
:param column: SqlAlchemy column | |
:return: Python type | |
""" | |
return column.property.columns[0].type.python_type |
def flatten_html(html, *remove_tags): | |
copy = html | |
for name in remove_tags: | |
while True: | |
soup = BeautifulSoup(copy, 'html.parser') | |
tag = soup.find(name) | |
if not tag: | |
break |
Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 16.04 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
from argparse import ArgumentParser | |
from subprocess import Popen, PIPE | |
from hashlib import sha1 | |
from os import path, walk | |
import re | |
import os | |
from sys import stderr | |
def extension_dir(): |
I hereby claim:
To claim this, I am signing this object:
function wsConnect(url) | |
{ | |
if (ws == null && "WebSocket" in window) { | |
ws = new WebSocket(url); | |
} | |
if (ws == null && "RestSocket" in window) { | |
ws = new RestSocket(url); | |
} | |