Tagged: programming

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...

0

WSJ Top Loser Gainer pull

Below code will pull losers and gainers from wsj.com for a given date range, #!/usr/bin/env python from lxml import html import requests import sys import os import humanize import pandas # from datetime import date, timedelta import datetime import re...

0

Parsing sqoop logs for stats analysis

Below python code will help you extract statistics from a set of Sqoop log files for transfer analysis,   #!/usr/bin/env python import fnmatch import os import datetime def find_files(directory, pattern): for root, dirs, files in os.walk(directory): for basename in files: if...

0

python web scraping (finviz pull)

Python code below, #!/usr/bin/env python from lxml import html import requests import csv import sys import os import humanize # Helper URL # http://python-docs.readthedocs.io/en/latest/scenarios/scrape.html curr_arg = 1 for arg in sys.argv: print “Argument ” + str(curr_arg) + “: ” +...

0

IntelliJ IDEA tips & tricks

Setting JAVA version Coming soon…   1. Setting JAVA version Method 1 press:CTRL + SHIFT + A (For Mac command + shift + A) type: java compiler press: ENTER In the setting window set the Target bytecode to 1.8 Method...

0

Developing A Custom Apache Nifi Processor (JSON)

Source: http://www.nifi.rocks/developing-a-custom-apache-nifi-processor-json/   Developing A Custom Apache Nifi Processor (JSON) Feb 7, 2015 • Phillip Grenier The list of available Apache Nifi processors is extensive, as documented in this post. There is still a need to develop your own; to pull...

0

Git .gitignore file sample

Source: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore Use the following .gitignore from Jetbrains. # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff: .idea/workspace.xml .idea/tasks.xml # Sensitive or high-churn files: .idea/dataSources/ .idea/dataSources.ids .idea/dataSources.xml .idea/dataSources.local.xml .idea/sqlDataSources.xml .idea/dynamic.xml .idea/uiDesigner.xml...

0

git scm references

References https://www.garron.me/en/articles/git-linux-mac-private-server.html https://coderwall.com/p/9lzkww/setting-up-a-git-daemon-on-mac-os-x Simple Git server – https://itunes.apple.com/us/app/simple-git-server/id1040403936?mt=12 https://github.com/bard/sameplace/wiki/Getting-started-with-git   Related posts: A nice .vimrc A Secure HDFS Client Example Hadoop Hive UDTF Tutorial – Extending Apache Hive with Table Functions Parsing XML using JAXB in Java

0

Parsing XML using JAXB in Java

Process Objective is to create Java class files that represent schema from the XML data. Create XSD from XML Generators: http://www.freeformatter.com/xsd-generator.html, http://xmlgrid.net/xml2xsd.html, https://devutilsonline.com/xsd-xml/generate-xsd-from-xml Use xjc on XSD to create JAXB Java classes $xjc sample.xsd Creates a generated/ folder in the same...