This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -not -path '*/\.*' -type f -name "*.py" | # find non-hidden python files | |
| xargs egrep -o 'def [A-Za-z0-9_]{1,}' | # find function def lines | |
| egrep -v 'def __[a-z]{1,}__' | # ignore __init__, __repr__,... | |
| awk -F "def " '{print $NF}' | # take function names | |
| sort | # sort list of function names | |
| uniq -c | # count occurrences of each | |
| sort # sort again by count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: 2010-09-09 | |
| Transform: AWS::Serverless-2016-10-31 | |
| Parameters: | |
| DomainName: | |
| Type: String | |
| Description: Domain name of the website | |
| HostedZone: | |
| Type: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| STACK= # give the stack a name | |
| REGION= # choose your region | |
| DOMAIN= # a Route53 domain - wiki will be hosted at wiki.[DOMAIN] | |
| aws cloudformation deploy \ | |
| --template-file wiki.yaml \ | |
| --stack-name $STACK \ | |
| --region $REGION \ | |
| --parameter-overrides Domain=$DOMAIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # must set environment variable NLTK_DATA=/opt/python in the lambda function | |
| REGION=eu-west-1 | |
| RUNTIME=python3.7 | |
| BUCKET= | |
| VER=0.8.1 | |
| NUMPY_VER=1.17.4 | |
| OUT_DIR=/out/build/sumy/python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push] | |
| jobs: | |
| nonlinux-build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macOS-latest, windows-latest] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REGION=eu-west-1 | |
| VER=20181108 | |
| RUNTIME=python3.7 | |
| docker run -v $(pwd):/out -it lambci/lambda:build-$RUNTIME \ | |
| pip install pdfminer.six==$VER -t /out/build/pdfminer/python | |
| pushd build/pdfminer | |
| rm -rf python/Crypto/SelfTest/ | |
| zip -r ../../pdfminer.zip python/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium.webdriver import Chrome | |
| from selenium.webdriver.chrome.options import Options | |
| options = Options() | |
| options.binary_location = '/opt/headless-chromium' | |
| options.add_argument('--headless') | |
| options.add_argument('--no-sandbox') | |
| options.add_argument('--start-maximized') | |
| options.add_argument('--start-fullscreen') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REGION=eu-west-1 | |
| VER=2.1.8 | |
| LANG=en | |
| MODEL=en_core_web_sm-2.1.0 | |
| RUNTIME=python3.7 | |
| MODEL_URL=https://github.com/explosion/spacy-models/releases/download/$MODEL/$MODEL.tar.gz | |
| docker run -v $(pwd):/out -it lambci/lambda:build-$RUNTIME \ | |
| pip install spacy==$VER $MODEL_URL -t /out/build/spacy/python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REGION=eu-west-1 | |
| VER=1.7.3 | |
| RUNTIME=python3.7 | |
| docker run -v $(pwd):/out -it lambci/lambda:build-$RUNTIME \ | |
| pip install scrapy==$VER -t /out/build/scrapy/python | |
| cd build/scrapy | |
| zip -r ../../scrapy.zip python/ | |
| cd ../.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: 2010-09-09 | |
| Parameters: | |
| ApiId: | |
| Type: String | |
| UsagePlanName: | |
| Type: String | |
| Description: >- |
NewerOlder