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
void Main() | |
{ | |
DateTime StartDate = Convert.ToDateTime("15-08-2017"); | |
DateTime EndDate = Convert.ToDateTime("15-08-2017"); | |
foreach (DateTime day in EachCalendarDay(StartDate, EndDate)) | |
{ | |
Console.WriteLine("Date is : " + day.ToString("dd-MM-yyyy")); | |
} | |
} |
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
def ValidateTOTPAuth(code,token): | |
import pyotp | |
totp = pyotp.TOTP("EVVRU7CVMAGTOK6E") | |
print("Current OTP:", totp.now()) | |
def CreateTOTPAuth(code,token): | |
import pyotp | |
print("Token", pyotp.random_base32()) |
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
#pub | |
REDISIO_PASSWORD = os.environ.get("CRAWLER_REDISIO_KEY") | |
redisClient = redis.StrictRedis(host='188.166.1.146', port=6379, db=0, password=REDISIO_PASSWORD) | |
redisClient.publish('NetsuiteMonitoringAlarmsChannel', alarmData) | |
# subs | |
redisClient=mtutils.getRedisClient() | |
subs=redisClient.pubsub() | |
subs.subscribe("NetsuiteMonitoringAlarmsChannel") |
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
***MusicBot.service*** | |
[Unit] | |
Description=MusicBot | |
After=multi-user.target | |
[Service] | |
Type=simple | |
ExecStart=/home/pi/bot/MusicBot/run.py | |
User=pi | |
WorkingDirectory=/home/pi/bot/MusicBot |
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
void Main() | |
{ | |
for (int i = 0; i < 500; i++) | |
{ | |
try{ | |
Execute(); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine($"Hubo un error: {e.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
import os | |
import logging | |
from flask import Flask, jsonify, request | |
from flask_jwt_extended import ( | |
JWTManager, jwt_required, create_access_token, | |
get_jwt_identity | |
) | |
app = Flask(__name__) | |
app.config.from_object('config') |
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 pandas as pd | |
import numpy as np | |
from tabulate import tabulate | |
#chunksize = 10 ** 6 | |
#for chunk in pd.read_csv('', chunksize=chunksize): | |
import os | |
source = 'c:/borreme/isa2/' |
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 __future__ import print_function | |
import pickle | |
import os.path | |
from googleapiclient.discovery import build | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import Request | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
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
from __future__ import print_function | |
american_number_system = { | |
'zero': 0, | |
'one': 1, | |
'two': 2, | |
'three': 3, | |
'four': 4, | |
'five': 5, |
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 flask import Flask, request, redirect, Response | |
import requests | |
app = Flask(__name__) | |
@app.route('/') | |
@app.route('/<path:path>', methods=['GET', 'POST', 'DELETE']) |
OlderNewer