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
#This script is independet of lib or python version (tested on python 2.7 and 3.5) | |
import telegram | |
#token that can be generated talking with @BotFather on telegram | |
my_token = '' | |
def send(msg, chat_id, token=my_token): | |
""" | |
Send a mensage to a telegram user specified on chatId | |
chat_id must be a number! |
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 decode(s): | |
return " ".join([chr(int(n)) for n in s.split(" ") if n!='32']) | |
def encode(s): | |
return " ".join([str(ord(c)) for c in s]) |
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
var mysql = require('mysql') | |
var connection = mysql.createConnection({ | |
host: "localhost", | |
user: process.env.USER_MYSQL, | |
password: process.env.PASS_MYSQL, | |
database: "test" | |
}) | |
connection.connect() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pymongo import MongoClient as mc | |
collection = mc().datavis.menus | |
found = 0 | |
not_found = 0 | |
with open("locations-2017-11-16 12:42:08.068035.txt") as f: | |
for line in f: | |
place,coords= line.split(" -> ") | |
if not collection.find_one({"place":place}): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer