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
| # in xml: | |
| # Current day: | |
| domain="[('some_date_time', '>', (context_today()-datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d')),('start_time', '<', (context_today()+datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d'))] | |
| # Current week: | |
| domain="[('some_date_time', '>=', (context_today()-datetime.timedelta(days=context_today().weekday())).strftime('%%Y-%%m-%%d')),('start_time', '<=', (context_today()-datetime.timedelta(days=context_today().weekday())+ datetime.timedelta(days=6)).strftime('%%Y-%%m-%%d'))] | |
| # Current year: | |
| domain="[('some_date_time', '>=', (datetime.date(datetime.date.today().year, 1, 1)).strftime('%%Y-%%m-%%d')),('start_time', '<=', (datetime.date(datetime.date.today().year, 12, 31)).strftime('%%Y-%%m-%%d'))] | |
| #in python: | |
| yesterday = datetime.datetime.now() - datetime.timedelta(days = 2) |
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
| import xmlrpclib | |
| from datetime import datetime | |
| # url = "http://localhost:8069" | |
| # db = "RAJO" | |
| # username = 'a' | |
| # password = 'a' | |
| url = "https://erp.atlantis-kw.com" | |
| db = "RAJO_TEST" | |
| username = 'api' |
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
| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
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
| <html> | |
| <head> | |
| <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" /> | |
| <script defer src="https://pyscript.net/latest/pyscript.js"></script> | |
| </head> | |
| <body> | |
| <button id="cf">Let's plot random numbers</button> | |
| <form> | |
| <input type="text" name="name" value="" id="name" disabled> |
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
| """Scrapper IMDB Calendar Mexico""" | |
| import csv | |
| import json | |
| import requests | |
| from bs4 import BeautifulSoup | |
| URL = "https://www.imdb.com/calendar/?region=MX" | |
| """ | |
| 1.- Obtener el maqueto HTML |
OlderNewer