Start up a lambda-like docker container:
docker run -i -t -v /tmp:/var/task lambci/lambda:build /bin/bash
Install some dependencies inside the container:
yum install gperf freetype-devel libxml2-devel git libtool -y
easy_install pip
| def retryable(options = {}) | |
| opts = { :tries => 1, :on => Exception }.merge(options) | |
| retry_exception, retries = opts[:on], opts[:tries] | |
| begin | |
| return yield | |
| rescue retry_exception | |
| if (retries -= 1) > 0 | |
| sleep 2 |
| function findRoutesComponent(component){ | |
| if(component._isRoutesComponent && component._isRoutesComponent()){ | |
| return component; | |
| } | |
| if(component._owner){ | |
| return findRoutesComponent(component._owner); | |
| } | |
| return null; | |
| }; |
| var HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig'); | |
| HTMLDOMPropertyConfig.Properties['align'] = null; | |
| HTMLDOMPropertyConfig.Properties['valign'] = null; | |
| //do this prior first "require" of react |
| ;; You can use this as a drop in replacement for map | |
| ;; like pmap but with a bounded number of threads that is shared with child fmap invocations | |
| ;; making this safe to use in recusive algorithms like tree walking. Dead locks are avaoided | |
| ;; by continuing processing on the current thread if the pool is full. | |
| ;; | |
| ;; You can also specify the window size amouth that fmap looks ahead | |
| ;; this make fmap semi-lazy like pmap. | |
| ;; | |
| ;; You don't need to set options - it will default to the same thread count as pmap (2 + N-CPUs). | |
| ;; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Jigsaw puzzle</title> | |
| <script type="text/javascript"> | |
| function save(filename, data) | |
| { | |
| var blob = new Blob([data], {type: "text/csv"}); |
| import digestHeader from "digest-header"; | |
| import fetch from "node-fetch"; | |
| import http from "http"; | |
| import https from "https"; | |
| const froniusHost = ''; | |
| const froniusPassword = ''; | |
| const amberKey = ''; | |
| const teslaHost = ''; | |
| const teslaEmail = ''; |