The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55
will be the first on the list, already selected:
🇧🇷 [pt-BR]
documents = [ dict( | |
email=open("conference/%d.txt" % n).read().strip(), | |
category='conference') for n in range(1,372) ] | |
documents.extend([ dict( | |
email=open("job/%d.txt" % n).read().strip(), | |
category='job') for n in range(1,275)]) | |
documents.extend([ dict( | |
email=open("spam/%d.txt" % n).read().strip(), | |
category='spam') for n in range(1,799) ]) |
from .user import User | |
def init_db(db): | |
"""Add a save() function to db.Model""" | |
def save(model): | |
db.session.add(model) | |
db.session.commit() | |
db.Model.save = save |
DateTime.ToString() Patterns | |
All the patterns: | |
0 MM/dd/yyyy 08/22/2006 | |
1 dddd, dd MMMM yyyy Tuesday, 22 August 2006 | |
2 dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30 | |
3 dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM | |
4 dddd, dd MMMM yyyy H:mm Tuesday, 22 August 2006 6:30 | |
5 dddd, dd MMMM yyyy h:mm tt Tuesday, 22 August 2006 6:30 AM |
The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55
will be the first on the list, already selected:
🇧🇷 [pt-BR]
sentry
SENTRY_SECRET_KEY
to random 32 char stringdocker-compose up -d
docker-compose exec sentry sentry upgrade
to setup database and create admin userdocker-compose exec sentry pip install sentry-slack
if you want slack plugin, it can be done laterdocker-compose restart sentry
9000
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |