I hereby claim:
- I am microft on github.
- I am luisbraga (https://keybase.io/luisbraga) on keybase.
- I have a public key ASBF7WEt1jT8maY_cOou8Lm_cxv8y1N0ayQ6t00tQqQTfgo
To claim this, I am signing this object:
import json | |
import sys | |
import boto3 | |
def create_empty_file(bucket_name, key): | |
s3 = boto3.client('s3') | |
s3.put_object(Bucket=bucket_name, Key=key, Body=b'') | |
def revert_to_previous_version(bucket_name, key): |
alias webserver="python3 -m http.server" | |
alias tunnel="ssh -v -D 1337 -C -N" |
from .models import YourModel | |
from .serializers import YourModelSerializer | |
from rest_framework.renderers import JSONRenderer | |
# Assuming you have a YourModel instance | |
instance = YourModel.objects.get(pk=1) | |
# Serialize the instance using the serializer | |
serializer = YourModelSerializer(instance) |
from pydantic import Field | |
from pydantic import BaseSettings | |
class Config(BaseSettings): | |
x: int | |
y: str | None | |
z: str = 'Xpto' | |
_config = Config() |
WORKON_HOME=/home/microft/.virtualenvs | |
workon(){ | |
cd $1; | |
source $WORKON_HOME/${PWD##*/}/bin/activate | |
return 0; | |
} | |
mkvenv(){ | |
python3 -m venv $WORKON_HOME/$1 | |
} |
I hereby claim:
To claim this, I am signing this object:
function smileyface | |
{ | |
case $? in | |
0 ) | |
echo -ne "$fg[green] :)" | |
;; | |
1 ) | |
echo -ne "$fg[red] ;(" | |
;;* ) | |
echo -ne "$fg[yellow] %%(" |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from tabulate import tabulate | |
chrome_options = Options() | |
chrome_options.add_argument("--headless") | |
driver = webdriver.Chrome(options=chrome_options) | |
driver.get('https://www.worldometers.info/coronavirus/') | |
output_table = [] | |
table = driver.find_element_by_xpath('//*[@id="main_table_countries_today"]/thead[1]') | |
row = table.find_elements_by_tag_name("tr")[0] # get all of the rows in the table |
Section "InputClass" | |
Identifier "Logitech USB Trackbal" | |
MatchProduct "Logitech USB Trackball" | |
Driver "libinput" | |
Option "MiddleEmulation" "on" | |
Option "ScrollMethod" "button" | |
#Option "ButtonMapping" "1 2 3 4 5 6 7 8 9" # right handed | |
#Option "ScrollButton" "8" # right handed | |
Option "ScrollButton" "9" # left handed | |
Option "ButtonMapping" "3 9 1 4 5 6 7 2 8" #left handed |
from __future__ import division | |
import logging | |
from flask import Flask, request, jsonify | |
from gensim import corpora, models, similarities | |
SIMILARITY_THRESHOLD = 0.5 | |
INDUSTRIES = { | |
'funding': {}, | |
'txt50': {} |