This file contains 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
group:q2 (imported from SQL) | |
Frequents = { | |
Customer:string, DrinkKiosk:string | |
'Alan' , 'All American' | |
'Joe' , 'The Califorian' | |
'John' , 'Bitter n Sour' | |
'Sue' , 'All American' | |
} |
This file contains 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
group:Test 1 (imported from SQL) | |
Customers = { | |
CustomerID:number, Name:string, Address:string, Country:string | |
1 , 'Marina' , 'Street A' , 'Belgium' | |
2 , 'Dave' , 'Street B' , 'Belgium' | |
3 , 'Mike' , 'Street C' , 'UK' | |
4 , 'Sylvie' , 'Street D' , 'France' | |
5 , 'Diane' , 'Street E' , 'France' | |
} |
This file contains 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 standard python base OS image | |
FROM python:3 | |
#Copy our files to the container | |
COPY . ./app | |
#Change the working directory to /app | |
WORKDIR /app | |
#Install the required python packages listed in the requirements file | |
RUN python -m pip install -r requirements.txt | |
#Expose port 5000 of the container to the outside | |
EXPOSE 5000 |
This file contains 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 flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
if __name__ == "__main__": | |
app.run(host='0.0.0.0') |
This file contains 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 main | |
import ( | |
"fmt" | |
"errors" | |
) | |
// User example Struct | |
type User struct { | |
ID int |
This file contains 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 main | |
import ( | |
"fmt" | |
"errors" | |
) | |
// User example Struct | |
type User struct { | |
ID int |
This file contains 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
version: '3.5' | |
services: | |
app: | |
restart: always | |
build: . | |
image: api | |
container_name: app | |
ports: |
This file contains 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
# my global config | |
global: | |
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. | |
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. | |
# scrape_timeout is set to the global default (10s). | |
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. | |
rule_files: | |
# - "first_rules.yml" |
This file contains 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
# HELP python_gc_objects_collected_total Objects collected during gc | |
# TYPE python_gc_objects_collected_total counter | |
python_gc_objects_collected_total{generation="0"} 15536.0 | |
python_gc_objects_collected_total{generation="1"} 1490.0 | |
python_gc_objects_collected_total{generation="2"} 20.0 | |
# Lots more stuff | |
# HELP my_counter_total Request Counter | |
# TYPE my_counter_total counter |
This file contains 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 rest_framework import generics, status | |
from rest_framework.response import Response | |
from utils.metrics_common import * | |
def post(self, request): | |
""" | |
Create an s3 bucket | |
""" | |
Metrics.upload_urls_created.inc() |
NewerOlder