This file contains 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
/* rexx */ | |
/* LMP KEY Duplicates Summary*/ | |
/* August 2008, functional comparisons working */ | |
/* Input file has to be unnummed, use unnum on file before running */ | |
/******************************* | |
/* SAME PROD CODE AND xxx! */ | |
/******************************* | |
INDSN="PS0601.CACOMMON.ALL.PPOPTION(KEYS)" | |
CALL Initialize |
This file contains 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
""" | |
Write a function that given a list of non negative integers, arranges them such that they form the largest possible number. For example, given [50, 2, 1, 9], the largest formed number is 95021. | |
You application should be run from the command line using a single command. For example: | |
# $ python ./largest.py 100 3 67 9 | |
# $ sbt "run 100 3 67 9" | |
""" | |
#!/usr/bin/env python | |
This file contains 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
import base64 | |
import json | |
import requests | |
FRAUD_SCORES = ('not_fraud', 'suspected_fraud', 'known_fraud') | |
def minfraud_submit_chargeback(license_key, user_id, chargeback_code, fraud_score, ip_address, transaction_id, force_prod=False): | |
""" | |
Submit a chargeback request to minFrauds chargeback API |
This file contains 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
import re | |
from collections import OrderedDict | |
ONETHS = { | |
'first': '1ST', 'second': '2ND', 'third': '3RD', 'fourth': '4TH', 'fifth': '5TH', 'sixth': '6TH', 'seventh': '7TH', | |
'eighth': '8TH', 'ninth': '9TH' | |
} | |
TEENTHS = { | |
'tenth': '10TH', 'eleventh': '11TH', 'twelfth': '12TH', 'thirteenth': '13TH', |
This file contains 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
import json | |
import logging | |
import os | |
from argparse import ArgumentParser | |
import requests | |
import BeautifulSoup | |
# Local pypi index path | |
PYPI_PATH = '/centos/pypi/web' |
This file contains 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
""" | |
Job can be run on mirror instance(s) to update local PyPi index | |
To use with S3, create ~/.boto or set BOTO_CONFIG when running: | |
[sudo] BOTO_CONFIG=/etc/boto_pypi.cfg python update_pypi.py flask -b your-pypi-s3-bucket | |
""" | |
import json | |
import logging | |
import os | |
import uuid | |
import datetime |
This file contains 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
@your_app.route('/maxmind_alert', methods=['GET']) | |
def post_maxmind_alert(): | |
""" | |
Get maxmind alerts | |
https://www.maxmind.com/en/alert_url | |
CARDER_EMAIL Email on order was flagged as high-risk email, as it was associated with another high-risk order | |
HIGH_RISK_IP IP address has been marked as a high-risk IP | |
HOSTING_PROVIDER IP is from High Risk Hosting Provider | |
POSTAL_VELOCITY IP address had high velocity of orders (e.g. different zipcodes on same IP address) | |
UPDATED_INFORMATION The transaction would be rated as higher risk based on updated information or analysis |
This file contains 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
""" | |
Job can be run on mirror instance(s) to update local PyPi index | |
To use with S3, create ~/.boto or set BOTO_CONFIG when running: | |
[sudo] python update_pypi.py -r /tmp/requirements.txt | |
[sudo] BOTO_CONFIG=/etc/boto_pypi.cfg python update_pypi.py flask -b uat-pypi.bucket.name | |
""" | |
import json | |
import logging | |
import os | |
import uuid |
This file contains 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
#!/bin/bash | |
DBUSER=tempuser | |
DBPASS=tempuser | |
DB_OLD=nightly_test | |
DB_NEW=nightly_ttest | |
DBHOST=db2.int.fanxchange.com #localhost | |
while [[ $# > 0 ]] | |
do |
This file contains 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
def orbital_mocker_api(): | |
request_data = request.data | |
logging.debug("Orbital Mock API Request headers are: {}".format(request.headers)) | |
logging.info("Orbital Mock got {} Request: {}".format(request.method, request_data)) | |
data = '' # Response value | |
response_type = '' | |
if '<Request><Profile>' in request_data: |