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: '2' | |
services: | |
example: | |
build: . | |
container_name: web-example | |
working_dir: /web_example | |
volumes: | |
- .:/web_example | |
command: sh -c "python manage.py runserver_plus 0.0.0.0:5000 --settings=web_example.settings.local" | |
expose: |
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 mio101/py3-mysqlclient-alpine | |
LABEL maintainer="Henrique Lopes" | |
ENV PYTHONUNBUFFERED 1 | |
ENV LANG en_US.UTF-8 | |
ENV LANGUAGE en_US:en | |
ENV LC_ALL en_US.UTF-8 | |
RUN mkdir /app | |
WORKDIR /app |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue May 26 15:00:46 2020 | |
@author: riquellopes | |
""" | |
import pandas as pd |
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
import os | |
import http | |
import requests | |
from math import ceil | |
from lxml import html | |
from urllib.parse import urlparse | |
from requests.auth import HTTPBasicAuth | |
from fake_useragent import UserAgent | |
AURORA_ENERGY = 'https://easyview.auroravision.net/easyview/services/gmi/summary/PlantEnergy.json?eids={}' |
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
dist: xenial | |
language: go | |
go: | |
- master | |
addons: | |
snaps: hugo | |
before_script: | |
- rm -rf public 2> /dev/null |
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
-- | |
SET @common_hash_secret=rand(); | |
SET FOREIGN_KEY_CHECKS=0; | |
TRUNCATE `addonlogs`; | |
TRUNCATE `api_auth_tokens`; | |
TRUNCATE `approvals`; | |
TRUNCATE `auth_group`; | |
TRUNCATE `auth_group_permissions`; | |
TRUNCATE `auth_message`; |
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
# This is a sample anonymize.yml file that's used for the Firefox Add-ons | |
# database. | |
database: | |
truncate: | |
- addonlogs | |
- api_auth_tokens | |
- approvals | |
- auth_group | |
- auth_group_permissions |
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 ( | |
"context" | |
"log" | |
"net" | |
"github.com/riquellopes/vacations/go/protons" | |
"google.golang.org/grpc" | |
"google.golang.org/grpc/reflection" |
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
#! .venv/bin/python | |
# Simple client to connect a gRPC service to get information about the employee vacation. | |
import grpc | |
from protons.vacations_pb2 import VacationRequest | |
from protons.vacations_pb2_grpc import VacationServiceStub | |
def client(): | |
with grpc.insecure_channel("localhost:50051") as dial: | |
client = VacationServiceStub(dial) |
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
syntax = "proto2"; | |
package protons; | |
service VacationService { | |
rpc WhenDoYouStartYourVacation(VacationRequest) returns (VacationResponse){} | |
} | |
message VacationRequest { | |
required string name = 1; |
NewerOlder