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
| def get_results(url): | |
| query = urllib.parse.quote_plus(url) | |
| response = get_source("https://www.google.co.uk/search?q=site%3A" + url) | |
| return response | |
| def parse_results(response): | |
| string = response.html.find("#result-stats", first=True).text | |
| indexed = int(string.split(' ')[1].replace(',','')) | |
| return indexed |
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": "with-styled-components", | |
| "version": "1.0.0", | |
| "scripts": { | |
| "dev": "next", | |
| "build": "next build", | |
| "start:development": "next start", | |
| "start:staging": "NODE_ENV=production ENV=staging next start", | |
| "start:production": "NODE_ENV=production ENV=production next start" | |
| }, |
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
| @app.route('/general') | |
| def general_stats(): | |
| # call API and convert response into Python dictionary | |
| url = f'https://corona-virus-stats.herokuapp.com/api/v1/cases/general-stats' | |
| response = requests.get(url) |
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
| stages: | |
| - test | |
| steps_for_testing: | |
| stage: test | |
| script: | |
| - echo "$PRIVATE_KEY" | |
| tags: | |
| - local_runner |
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
| before_script: # running on shared runner | |
| - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)" | |
| - export IMAGE=$CI_REGISTRY/$NAMESPACE/$CI_PROJECT_NAME | |
| - apk add --no-cache openssh-client bash | |
| - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY | |
| - chmod +x ./setup_env.sh | |
| - bash ./setup_env.sh |
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
| mix phx.new test | |
| ** (KeyError) key :Phoenix not found in: %Phx.New.Project{app: "test", app_mod: Test, app_path: "/Users/ardhi/Documents/Projects/Programming/Elixir:Phoenix/test", base_path: "/Users/ardhi/Documents/Projects/Programming/Elixir:Phoenix/test", binding: [app_name: "test", app_module: "Test", root_app_name: "test", root_app_module: "Test", lib_web_name: "test_web", web_app_name: "test", endpoint_module: "TestWeb.Endpoint", web_namespace: "TestWeb", phoenix_dep: "{:phoenix, \"~> 1.3.0\"}", phoenix_path: "deps/phoenix", phoenix_brunch_path: "../deps/phoenix", phoenix_html_brunch_path: "../deps/phoenix_html", phoenix_static_path: "deps/phoenix", pubsub_server: Test.PubSub, secret_key_base: "dTon8pyMynhRDQoTF/+vGCm4xgk5M8QXkvKmFVPA9U2hH7cVRY1AWj9zYTJwAVaU", prod_secret_key_base: "Od00p0NH2kD7tm1VPfqcR1BU4W9ObpxD1nzddr3rGhJuDIRMpjFACec8Y2KOzpo7", signing_salt: "jsvfIPNZ", in_umbrella: false, brunch: true, ecto: true, html: true, adapter_app: :postgrex, adapter_module: Ecto.Adapters.Postgres, adapter_co |