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 python:3.9-alpine | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| WORKDIR /app | |
| COPY main.py /app | |
| CMD uvicorn --host 0.0.0.0 --port $PORT --workers $WORKERS main:app |
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
| package com.example.app; | |
| import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; | |
| import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; | |
| import com.google.api.client.http.HttpRequest; | |
| import com.google.api.client.http.HttpTransport; | |
| import com.google.api.client.json.JsonFactory; | |
| import com.google.api.client.json.jackson2.JacksonFactory; | |
| import com.google.api.services.compute.Compute; | |
| import com.google.api.services.compute.model.Instance; | |
| import com.google.api.services.compute.model.InstanceList; |
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
| # Use the official lightweight Python image. | |
| # https://hub.docker.com/_/python | |
| FROM python:3.10-slim | |
| # Allow statements and log messages to immediately appear in the Knative logs | |
| ENV PYTHONUNBUFFERED True | |
| # Copy local code to the container image. | |
| ENV APP_HOME /app | |
| WORKDIR $APP_HOME |
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 django.utils.deconstruct import deconstructible | |
| @deconstructible | |
| class upload_to(object): | |
| def __init__(self, sub_path): | |
| self.path = sub_path | |
| def __call__(self, instance, filename): | |
| ext = filename.split('.')[-1] | |
| if instance.uuid is None: |
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
| git clone https://github.com/DKbyo/node-firestore-backup-restore.git | |
| cd node-firestore-backup-restore | |
| git checkout fix/install | |
| npm install | |
| npm pack | |
| npm install -g firestore-backup-restore-1.1.0.tgz |
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
| var GoPro = require('goproh4'); | |
| var express = require('express'); | |
| var bodyParser = require('body-parser') | |
| var WebSocket = require('ws'); | |
| var fs = require("fs"); | |
| var cam = new GoPro.Camera(); | |
| cam.mode(GoPro.Settings.Modes.Video, GoPro.Settings.Submodes.Video.Video) | |
| .then(function(){ | |
| return cam.set(GoPro.Settings.VIDEO_RESOLUTION, GoPro.Settings.VideoResolution.R720S)}) | |
| .then(function(){ |
This file has been truncated, but you can view the full file.
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
| ZIP,LAT,LNG | |
| 00601,18.180555, -66.749961 | |
| 00602,18.361945, -67.175597 | |
| 00603,18.455183, -67.119887 | |
| 00606,18.158345, -66.932911 | |
| 00610,18.295366, -67.125135 | |
| 00612,18.402253, -66.711397 | |
| 00616,18.420412, -66.671979 | |
| 00617,18.445147, -66.559696 | |
| 00622,17.991245, -67.153993 |
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
| # this is an example of the Uber API | |
| # as a demonstration of an API spec in YAML | |
| swagger: '2.0' | |
| info: | |
| title: Cool Climate User API | |
| description: API used by the Cool Climate Network in the Cool Climate Calculator | |
| version: "1.0.0" | |
| # the domain of the service | |
| host: calculator.coolclimatenetwork.net | |
| # array of all schemes that your API supports |
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
| # this is an example of the Uber API | |
| # as a demonstration of an API spec in YAML | |
| swagger: '2.0' | |
| info: | |
| title: Cool Climate User API | |
| description: API used by the Cool Climate Network in the Cool Climate Calculator | |
| version: "1.0.0" | |
| # the domain of the service | |
| host: calculator.coolclimatenetwork.net | |
| # array of all schemes that your API supports |