Skip to content

Instantly share code, notes, and snippets.

View kpassapk's full-sized avatar

Kyle Passarelli kpassapk

View GitHub Profile
#!/usr/bin/env python3
import argparse
import csv
import os
def partfile(fn, num):
f = os.path.split(fn)[1]
(root, ext) = os.path.splitext(f)
return "parts/" + root + "_" + str(num) + ext
import argparse
import os
import requests
import json
def create_execution(host, object):
url = host + "/executions"
payload = json.dumps({
{
"id": "645a9b4ac3a897ae72aac7bd",
"version": "v1",
"storefrontName": "bepensa-mx-b2b-1",
"extractor": {
"uses": "NoOpExtractor",
"with": {}
},
"frequency": {
"min": "",
{
"type": "FETCH_FINISHED",
"location": "http://emulator/b/integrations-source/o/robson_input.csv",
"flow": {
"transformers": [
{
"uses": "InsertTransformer",
"with": {
"insert": [
{
package main
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
type lang string
-- arguments: a table of arguments passed into the functions
-- method: the name of the method which is called
local inputs = OG.inputs or {}
local brain = OG.brain or {}
local transitions = OG.transitions or {}
local body = {
ng = true,
inputs = inputs,
lmb := createLambda(&cfg, role.arn, secret.arn, "out/lambda_function.zip", []string{secondLayer.arn, smArn})
defer lmb.destroyFn()
output := invokeLambda(&cfg, lmb.name)
assert.Equal(t, int32(200), output.StatusCode)
fmt.Println(string(output.Payload))
type Response struct {
statusCode int
layer map[string]string
-- set an execution quota
local function set_quota(secs)
local st=os.clock()
function check()
if os.clock()-st > secs then
debug.sethook() -- disable hooks
error("quota exceeded")
end
end
debug.sethook(check,"",100000);