Tagged: programming

0

Extracting table and column names from SQL query

(Not original article) sql-metadata is a Python library that uses a tokenized query returned by python-sqlparse and generates query metadata. This metadata can return column and table names from your supplied SQL query. Here are a couple of example from the sql-metadata github readme:...

0

Hadoop streaming with Python

Want to write a Hadoop program in less than 5 minutes? Get in here for a quick check on how it’s done. We use Python and Hadoop streaming to complete the task.

0

Case insensitive string comparison in C++

(Not an original article) The standard library component std::basic_string<> (better known as std::string, which is a convenient typedef for std::basic_string<char>), is an important and widely used element of the standard C++ library. The declaration of basic_string<> in the standard library...

0

Connecting to msaccess database from Python

Connect to msaccess file from Python and tweak it to emit desired format. import pyodbc conn = pyodbc.connect(r’Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=path where you stored the Access file\file name.accdb;’) cursor = conn.cursor() cursor.execute(‘select * from table name’) for row in...

0

Java unsupported major minor version 52.0

If you are reading this then perhaps you are having java version mismatch. Several apps based on implementations may present you with errors such as class not found error (yes! That’s what R did to me) or class version error –...

0

python web scraping (stockfetcher.com pull)

Python code below, It fetches all contents from 5 urls, general discussion, filter exchange, public filters, stock picks and indicators. Destination dir: /tmp File type: csv   #!/usr/bin/env python from lxml import html import requests import csv import sys import...

0

Maintaining database of price file using R

Source: http://www.thertrader.com/2015/12/13/maintaining-a-database-of-price-files-in-r/ Steps Prepare a list of securities (onetime) Setup initial data file (onetime) Update data files (periodic)   1. Prepare a list of securities One time setup. If changed on demand then will have to call initial data setup. File: /Users/rdebnath/robin/ticker_data/r-input/listOfInstruments.R...