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
{ | |
"type": "update", | |
"msg": { | |
"env_id": "af44d7ff-c069-482b-aee8-82f0a562ca99", | |
"env_name": "HPi EMEA Prod", | |
"database": "HPiProd", | |
"sql_dns": "HPiProdSQL.traxtech.com", | |
"table": "EXCEPTIONS", | |
"updated_date": "2017-08-07T18:15:14Z", | |
"is_delete": false, |
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
{ | |
"type" : "source", | |
"data" :{ | |
"VendLabl": "TNT", | |
"FbId": "FBLL1000681002182280595", | |
"FbNId": 3.2013620087288801E18, | |
"BilledAmt": 2.52, | |
"BilledCurrency": "EUR", | |
"RatedAmt": 2.52, | |
"RatedCurrency": "EUR", |
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
import pandas as pd | |
import timeit | |
import numpy as np | |
import StringIO | |
import io | |
def generate_csv(width,height): | |
df = pd.DataFrame(np.random.randint(0, 1000000, size=(height, width))) |
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
def p(implicit i:Int) = print(i) | |
implicit val v=2 | |
p | |
p(1) | |
//legal | |
def pp(a:Int)(implicit i:Int) = println(a,i) | |
def pp(a:Int)(implicit i:Int, b:Long) = println(a,i,b) | |
def pp(implicit i:Int, b:Long) = println(i,b) |
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
/* | |
A pattern match includes a sequence of alternatives, each starting with the keyword case. | |
Each alternative includes a pattern and one or more expressions, which will be evaluated | |
if the pattern matches. An arrow symbol => separates the pattern from the expressions. | |
*/ | |
def matchTest(x: Int): String = x match { | |
case 1 => "one" | |
case 2 => "two" |
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
val optionHelloWorld = Option("Hello World") | |
val optionNil:Option[String] = None | |
Option(null) | |
if (optionHelloWorld.isDefined) optionHelloWorld.get | |
if (optionNil.isEmpty) "nothing here" | |
if (optionHelloWorld.isDefined) optionHelloWorld.get else "nothing here" |
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
{ | |
"RateDetails": { | |
"FbId": "FBLL1000691004813140001", | |
"LineNum": 3, | |
"RateScac": "KWEO_Onesource", | |
"TemplateId": "41228.40293", | |
"ICSNum": "663485", | |
"RatingCategory ": "RatedEqualsBilledUnvalidated", | |
"RatingDetails": "Rated at 12 USD Flat using AirOceanAccessorials in ICS 663485 for KWEO_Onesource for accessorial for this shipment EffectiveDate (10/25/2016 12:00:00 AM), ChargeCode (DFO), Qualifier (ORIGIN HANDLING AND DOCUM), OriginPort_Airport (THBKK), OriginCity (PHET BURI), OriginCountry (TH), OriginPostalCodeRange (10110), DestinationPort_Airport (CNSHA), DestinationCity (SHANGHAI), DestinationCountry (CN), DestinationPostalCodeRange (200131), ServiceLevel (LCL), ServiceScope (LCL), WeightRange (1000), QuantityRange (1). This is rated equals billed at 12 USD ..These are unknown missing LocationID, Subcarrier, OriginState, OriginZone, OriginRegion, DestinationState, DestinationZone, DestinationRegion, EquipmentType, FlowIndentifier, MileageBandRange.These are undefined Qualifier (ORIGIN HANDLI |
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
import requests | |
import json | |
def reimport(id): | |
r = requests.get("{}/config/{}".format(sheets_api, id)).json() | |
data = r['data'] | |
print str('loaded: ' + str(data)) | |
requests.delete("{}/config/{}".format(sheets_api, id)) | |
partitionkeys = data['partitionkeys'] | |
default = data['default'] |
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
{ | |
"concept" : "bill weight qualifier", | |
"description" : "normalize the FB_WT_QUAL field that is part of the FRGHT_BL ", | |
"rules" : [ | |
{ | |
"field" : "AL_CNTRY_CODE_ORIG", | |
"rules" : [ | |
{ | |
"type":"expr", | |
"expression" :"AL_CNTRY_CODE_ORIG IN ('US','USA','UNITED STATES')", |
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
/****** Object: StoredProcedure [DNorm].[usp_Data_ModeDerivation] Script Date: 12/21/2016 12:36:54 PM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
use NormLogic | |
Go |