Python relative imports in AWS Lambda fail with attempted relative import with no known parent package
In AWS Lambda if I attempt an explicit relative import like this
.
├── lambda_file.py
└── example.py
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
{ | |
"AWSEBDockerrunVersion": "1", | |
"Image": { | |
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
"Update": "true" | |
}, | |
"Ports": [ | |
{ | |
"ContainerPort": "443" | |
} |
Picking the right architecture = Picking the right battles + Managing trade-offs
# see also https://github.com/wrobstory/pgshift | |
import gzip | |
from io import StringIO, BytesIO | |
from functools import wraps | |
import boto | |
from sqlalchemy import MetaData | |
from pandas import DataFrame | |
from pandas.io.sql import SQLTable, pandasSQL_builder |
The aim is to develop a simple generic crossfilter interface for timeseries data. The tag line for crossfilter applies: we want fast multidimensional filtering with coordinated views.
We'd like a consistent ui for visualizing/querying/filtering all columns with visual summarizers/selectors appropriate to a column's type (e.g., brushable histograms for numeric types, selectable histograms for enumerated types, typeahead keyword search for text, etc.).
I'd like it to be useful primarily as a table filter and query tool, but provide simple summary visualizations and statistics of the current selection. As in the various crossfilter demos, any data visualization should also function as part of the query interface.
A warning occurred (42 apples) | |
An error occurred |
#look at steps in constructing a horizon plot version | |
#of http://www.mebanefaber.com/timing-model/ | |
#do horizon of percent above or below 10 month / 200 day moving average | |
require(lattice) | |
require(latticeExtra) | |
require(quantmod) | |
#since we are focused on the horizon plot, let's just look at one stock |
var Rx = require('./rx.node') | |
, twitter = require('ntwitter') | |
, credentials = require('./credentials') | |
, io = require('socket.io').listen(80); | |
var customBind = function (self, method) { | |
return function () { | |
return self[method].apply(self, arguments); | |
}; | |
}; |