dcuddihy@blackbox:~$ tree -shD q
q
├── [4.0K May 8 15:48] l32
│ └── [531K May 3 9:54] q
├── [ 18K May 3 9:54] q.k
├── [ 228 Apr 3 19:12] q.q
├── [3.0K Apr 1 17:01] README.txt
├── [5.3K Jan 15 3:17] s.k
├── [ 821 Jun 9 2013] sp.q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from retrying import retry | |
| counter = 0 | |
| isnone=lambda x:x==None | |
| @retry(retry_on_result=isnone, wait_fixed=2000, stop_max_delay=5000) #then try: stop_max_delay=5000 | |
| def thingy(): | |
| print("thingy()") | |
| global counter | |
| counter = (counter + 1) % 5 | |
| return "zero" if counter == 0 else None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| :Usage: ./test.py /var/tmp/python.log < ./data.csv > out.txt | |
| """ | |
| import sys | |
| import pandas as pd | |
| def main(src_file): | |
| df = pd.read_csv(sys.stdin) | |
| print df.shape, src_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| net use t: \\hostname\subfolder /persistent:yes |
The goal is to functional-test our B-Pipe installation for Reference Data requests and Subscriptions.
The first test is to ensure we get back reference data for the deals and indices we're currently fetching via Bloomberg Legacy ETL.
To prepare, I've cloned my local environment settings under /opt/etc/me.acr/pystack/nobody to a new fake environment called bpipe. I changed the [bloomberg] stanza to as follows:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +#!/usr/bin/env bash | |
| +while read line | |
| +do | |
| + curl -X DELETE http://localhost:8080/tx/deal-events/id/${line} | |
| +done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # sudo -u ubuntu -i google docs get ".*" . -u "dcuddihy.acr.test@gmail.com" | |
| # sudo pip install xlrd | |
| import xlrd | |
| wb = xlrd.open_workbook('acr-scorecard-forecast-input.xls') | |
| wb.sheets()[0].cell(1,0) |
I've started this feature fork.
- Add a daily deal EOD subscription via support-ticket;
- Add a daily index EOD subscription via support-ticket;
- Remove daily EOD subscription via support-ticket;
- Daily deal and index EOD updates run from cron;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| set -x | |
| echo "Starting: " $(date) | |
| BBCONFIG_REPO=bbconfig-1.10 | |
| BBCONFIG_TAG=1.10.0 | |
| # Deploys new version of bbconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: 1 | |
| disable_existing_loggers: False | |
| formatters: | |
| file: | |
| format: '%(asctime)s %(name)s %(filename)s %(lineno) -12s %(levelname)-8s %(message)s' | |
| datefmt: '%m-%d %H:%M' | |
| console: | |
| format: '%(asctime)s %(name)-12s: %(levelname)-8s %(message)s' | |
| datefmt: '%m-%d %H:%M' |
NewerOlder