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
""" | |
Compare two Excel sheets | |
Inspired by https://pbpython.com/excel-diff-pandas-update.html | |
For the documentation, download this file and type: | |
python compare.py --help | |
""" | |
import argparse | |
import pandas as pd |
"""Provides methods around syncing and usage of AWS s3 buckets as local caches rather than individually | |
downloading every file""" | |
import os | |
import shutil | |
import boto3 as boto | |
import multiprocessing | |
import copy | |
import hashlib |
border: no | |
height: 600 | |
license: gpl-3.0 |
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
/* | |
First run npm install topojson --save and then link "node_modules/topojson/build/topojson.min.js" | |
above this snippet in your html. | |
Usage: http://leafletjs.com/reference.html#geojson | |
*/ | |
L.TopoJSON = L.GeoJSON.extend({ | |
addData: function (data) { | |
var geojson, key; |
#!/usr/bin/env python | |
class Vertex: | |
def __init__(self, value): | |
self.value = value | |
self.edges = {} | |
def degree(self): | |
return len(self.edges) | |
def __str__(self): | |
return str(self.value) |
# Repeat an operation n times, e.g. | |
# @dotimes 100 println("hi") | |
macro dotimes(n, body) | |
quote | |
for i = 1:$(esc(n)) | |
$(esc(body)) | |
end | |
end | |
end |
#Set up data partition | |
sudo mkdir /data | |
sudo chmod 777 /data | |
sudo "echo /dev/xvdb /data ext4 rw,user,exec,comment=cloudconfig 0 2 >> /etc/fstab" | |
sudo mount /data | |
#Install build environment | |
sudo sed -i "s/enabled=0/enabled=1" /etc/yum.repos.d/epel.epo | |
sudo yum -y update | |
sudo yum -y upgrade |
Last Update: May 13, 2019
Offline Version