I hereby claim:
- I am surye on github.
- I am surye (https://keybase.io/surye) on keybase.
- I have a public key whose fingerprint is 4BCD DA13 DD07 2A27 224A 256E E113 668F D5D4 9DC6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/* ---------------------------------------------------------------------------- | |
* This file was automatically generated by SWIG (http://www.swig.org). | |
* Version 3.0.5 | |
* | |
* This file is not intended to be easily readable and contains a number of | |
* coding conventions designed to improve portability and efficiency. Do not make | |
* changes to this file unless you know what you are doing--modify the SWIG | |
* interface file instead. | |
* ----------------------------------------------------------------------------- */ |
/* ---------------------------------------------------------------------------- | |
* This file was automatically generated by SWIG (http://www.swig.org). | |
* Version 3.0.5 | |
* | |
* This file is not intended to be easily readable and contains a number of | |
* coding conventions designed to improve portability and efficiency. Do not make | |
* changes to this file unless you know what you are doing--modify the SWIG | |
* interface file instead. | |
* ----------------------------------------------------------------------------- */ |
{"results":[{"serving_weight":85,"serving_qty":85,"ndb_no":11081,"serving_unit":"g","tier":1,"nutrients":[{"attr_id":255,"value":74.001,"unit":"g","name":"Water","usda_tag":"WATER"},{"attr_id":208,"value":37.4,"unit":"kcal","name":"Energy","usda_tag":"ENERC_KCAL"},{"attr_id":268,"value":156.4,"unit":"kJ","name":"Energy","usda_tag":"ENERC_KJ"},{"attr_id":203,"value":1.428,"unit":"g","name":"Protein","usda_tag":"PROCNT"},{"attr_id":204,"value":0.153,"unit":"g","name":"Total lipid (fat)","usda_tag":"FAT"},{"attr_id":207,"value":0.9520000000000001,"unit":"g","name":"Ash","usda_tag":"ASH"},{"attr_id":205,"value":8.466000000000001,"unit":"g","name":"Carbohydrate, by difference","usda_tag":"CHOCDF"},{"attr_id":291,"value":1.7,"unit":"g","name":"Fiber, total dietary","usda_tag":"FIBTG"},{"attr_id":269,"value":6.766,"unit":"g","name":"Sugars, total","usda_tag":"SUGAR"},{"attr_id":301,"value":13.6,"unit":"mg","name":"Calcium, Ca","usda_tag":"CA"},{"attr_id":303,"value":0.6715,"unit":"mg","name":"Iron, Fe","usda_tag":"F |
import sys | |
import os | |
sys.path.append(os.path.dirname(os.path.abspath(__file__))) # TODO Ugly Hack, find a better way | |
from telegrambot.plugin import TelegramPlugin | |
from py3owm import OpenWeatherMap | |
from py3wu import WeatherUnderground | |
class WeatherPlugin(TelegramPlugin): |
import tgl | |
def info(success, peer): | |
print(peer.user_list) | |
def on_msg_receive(msg): | |
peer = msg.dest | |
if peer.type is tgl.PEER_CHAT: | |
tgl.chat_info(peer, info) |
import tgl | |
def cinfo(success, chat): | |
for userid in chat.user_list: | |
user = tgl.Peer(type=tgl.PEER_USER, id=userid) | |
print(user) | |
def on_msg_receive(msg): | |
peer = msg.dest | |
if peer.type is tgl.PEER_CHAT: |
import tgl | |
def cinfo(success, chat): | |
for userid in chat.user_list: | |
user = tgl.Peer(type=tgl.PEER_USER, id=userid) | |
print(user) | |
def dlist(success, dialog_list): | |
for dialog in dialog_list: | |
if dialog['peer'].type is tgl.PEER_CHAT: |
import tgl | |
users = [] | |
def cinfo(success, chat): | |
for userid in chat.user_list: | |
user = tgl.Peer(type=tgl.PEER_USER, id=userid) | |
users.append(user) | |
if user.username == 'Surye': | |
tgl.create_group_chat(users, "Testing You Can leave") |