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
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
| import tensorflow as tf | |
| import numpy as np | |
| NUM_STATES = 10 | |
| NUM_ACTIONS = 2 | |
| GAMMA = 0.5 | |
| def hot_one_state(index): | |
| array = np.zeros(NUM_STATES) |
| // http://www.ietf.org/rfc/rfc1928.txt | |
| // Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar | |
| var States = { | |
| CONNECTED:0, | |
| VERIFYING:1, | |
| READY:2, | |
| PROXY: 3 | |
| }; |
| #!upstart | |
| description "GitLab (Sidekiq)" | |
| author "Jakub Jirutka" | |
| start on starting gitlab | |
| stop on stopping gitlab | |
| env sidekiq_logfile="/var/log/gitlab/sidekiq.log" | |
| env sidekiq_queues="-q post_receive -q mailer -q system_hook |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
Elasticsearch was created in 2010 by Shay Banon after forgoing work on another search solution, Compass, also built on Lucene and created in 2004.
| function [angles,projection] = solarPosition(datetime,latitude,longitude,time_zone,rotation,dst) | |
| %SOLARPOSITION Calculate solar position using most basic algorithm | |
| % This is the most basic algorithm. It is documented in Seinfeld & | |
| % Pandis, Duffie & Beckman and Wikipedia. | |
| % | |
| % [ANGLES,PROJECTION] = SOLARPOSITION(DATE,TIME,LATITUDE,LONGITUDE,TIME_ZONE) | |
| % returns ZENITH & AZIMUTH for all DATE & TIME pairs at LATITUDE, LONGITUDE. | |
| % ANGLES = [ZENITH,AZIMUTH] and PROJECTION = [PHI_X, PHI_Y] | |
| % PHI_X is projection on x-z plane & PHI_Y is projection on y-z plane. | |
| % DATETIME can be string, vector [YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS], |
| // http://www.ietf.org/rfc/rfc1928.txt | |
| // Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar | |
| var States = { | |
| CONNECTED:0, | |
| VERIFYING:1, | |
| READY:2, | |
| PROXY: 3 | |
| }; |