Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
import time | |
import ctypes | |
from ctypes.util import find_library | |
# Instanciando a libc | |
libc = ctypes.CDLL(find_library('c')) | |
# Setando as flags para definir e retornar o | |
# o nome do processo | |
PR_SET_NAME = 15 |
IDENTIFICATION DIVISION. | |
PROGRAM-ID. CLIENTES. | |
ENVIRONMENT DIVISION. | |
INPUT-OUTPUT SECTION. | |
FILE-CONTROL. | |
SELECT FILE1 ASSIGN TO DISK | |
ORGANIZATION IS INDEXED | |
ACCESS MODE IS RANDOM | |
FILE STATUS IS FS-STAT |
identification division. | |
program-id. 99-bottles. | |
data division. | |
working-storage section. | |
77 max pic 9(02) value 99. | |
77 bottle-word pic x(07). | |
77 bottles pic 99. |
Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
from abc import ABCMeta | |
from abc import abstractmethod | |
class LowerMeta(type): | |
"""Metaclass thats change the attr and method to be used | |
with lowercase""" | |
def __new__(lowerattr_Metaclass, future_ClassName, |
byte PWM_PIN = 11; | |
int pwm_value; | |
void setup() { | |
pinMode(PWM_PIN, INPUT); | |
Serial.begin(115200); | |
} | |
void loop() { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
######################################## | |
##### USE THIS WITH AMAZON LINUX 2 ##### | |
######################################## | |
# get admin privileges | |
sudo su | |
# install httpd (Linux 2 version) |