python3 setup.py build
Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so
| --- | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners | |
| name : debug | |
| on : | |
| push : | |
| branches : [ "master" ] |
| """ | |
| All the methods were generated based on the list of nodes from the | |
| "Green Tree Snakes" guide: | |
| https://greentreesnakes.readthedocs.io/en/latest/index.html | |
| """ | |
| import ast | |
| class Visitor(ast.NodeVisitor): |
| from IPython.display import HTML | |
| from IPython.display import display | |
| # Taken from https://stackoverflow.com/questions/31517194/how-to-hide-one-specific-cell-input-or-output-in-ipython-notebook | |
| tag = HTML('''<script> | |
| code_show=true; | |
| function code_toggle() { | |
| if (code_show){ | |
| $('div.cell.code_cell.rendered.selected div.input').hide(); | |
| } else { |
| const express = require("express") | |
| const app = express() | |
| const { Pool } = require("pg") | |
| const SphericalMercator = require("sphericalmercator") | |
| const pool = new Pool({ | |
| host: "localhost", | |
| port: 15432, | |
| user: "postgres", | |
| database: "postgres" | |
| }) |
| FILES=*.rst | |
| for f in $FILES | |
| do | |
| filename="${f%.*}" | |
| echo "Converting $f to $filename.md" | |
| `pandoc $f -f rst -t markdown -o $filename.md` | |
| done |
| # setup a custom search http://www.google.com/cse/manage/all | |
| # you can set up wildcards like *.com, *.org, *.net etc to cast a broad net for your custom search | |
| # remmeber to flip the "images" switch if you want that service | |
| from googleapiclient.discovery import build | |
| def image_search (query): | |
| service = build("customsearch", "v1", | |
| developerKey="[YOUR API KEY - console.developers.google.com]") | |
| res = service.cse().list( |
| # KEEP UBUNTU OR DEBIAN UP TO DATE | |
| sudo apt-get -y update | |
| sudo apt-get -y upgrade | |
| sudo apt-get -y dist-upgrade | |
| sudo apt-get -y autoremove | |
| # INSTALL THE DEPENDENCIES |
| # How to determine if a bash variable is empty? | |
| # A variable in bash (and any POSIX-compatible shell) can be in one of three states: | |
| # | |
| # unset | |
| # set to the empty string | |
| # set to a non-empty string | |
| # Most of the time you only need to know if a variable is set to a non-empty string, but occasionally it's important to distinguish between unset and set # to the empty string. | |
| # |
| #!/bin/sh | |
| # Use AWS CLI to get the most recent version of an AMI that | |
| # matches certain criteria. Has obvious uses. Made possible via | |
| # --query, --output text, and the fact that RFC3339 datetime | |
| # fields are easily sortable. | |
| export AWS_DEFAULT_REGION=us-east-1 | |
| aws ec2 describe-images \ |