Não use UUID
como PK nas tabelas do seu banco de dados.
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
class Student(): | |
def __init__(self, name, age): | |
self.name = name | |
self.age = age | |
def show(self): | |
print(self.name) | |
print(self.age) | |
def set_age(self, age): |
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
/******************************************************************************* | |
* Copyright 2022 Paulo Torrens * | |
* * | |
* Permission is hereby granted, free of charge, to any person obtaining a copy * | |
* of this software and associated documentation files (the "Software"), to * | |
* deal in the Software without restriction, including without limitation the * | |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * | |
* sell copies of the Software, and to permit persons to whom the Software is * | |
* furnished to do so, subject to the following conditions: * | |
* * |
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
__author__ = "Vycktor Stark" | |
""" | |
This is a simple project to run a bot on the telegram via polling (webscraping) without using a module or lib | |
to start the code, after the download, just first insert your bot key to it and run as follows: `python3 main.py` | |
Note: I am aware that it is much more practical to use the / lib module to create the code faster, | |
but the goal of this snippet is to demonstrate an alternative for you to create the code your way | |
""" | |
from threading import Thread | |
import json, requests, re, time |
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
__author__ = "Vycktor Stark" | |
""" | |
This is a simple project to run your bot on Telegram and receive requests for new events via webhook on your server | |
To be very practical, I am using the / lib flask module to create this project! | |
Where you just need to declare your bot's token and the code itself will import other things, like your host, Instructions: | |
- Declare your bot's token here; | |
- Run the script on your server; | |
- Access your host + webhookstart (example: https://mysite.com/webhookstart) |
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
//Check if the predicate (second argument) is truthy on all elements of a collection (first argument). | |
function truthCheck(collection, pre) { | |
// .every returns one value if EVERY object statifies the test. | |
// !! (double bang) typecasts the property value to a boolean value. | |
// It will return true if the property value is truthy & false if the property doesn't exist/has a falsy value. | |
return collection.every(obj => !!obj[pre]); | |
} | |
truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex"); |
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
# Based on ReachView code from Egor Fedorov ([email protected]) | |
# Updated for Python 3.6.8 on a Raspberry Pi | |
import time | |
import pexpect | |
import subprocess | |
import sys | |
import logging |
The initial source comes from sdcuike/issueBlog#4
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
Here we create the master key. We want only Certify
capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate
capabilities will be assigned to the subkeys.
Run the following command to start the master key generation process. Select the set your own capabilities
creation process (type 8
)
▶ gpg --full-generate-key --expert
gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.
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
Code Shadow | |
https://www.youtube.com/c/CodeShadow | |
DevDojo | |
https://www.youtube.com/channel/UCjF0OccBT05WxsJb2zNkL4g/playlists | |
Tutorial Python - Abel Separovich | |
https://www.youtube.com/user/Oseparovich/playlists |