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 org.scalatest.flatspec.AnyFlatSpec | |
import org.scalatest.matchers.should | |
import scala.annotation.tailrec | |
import scala.concurrent.{Await, Future} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ | |
import math.{pow, sqrt} | |
trait FibTest extends AnyFlatSpec with should.Matchers { |
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 yaml | |
import os | |
from pprint import pprint | |
config = yaml.safe_load(open("config.yml")) | |
def path_to_env(path): | |
return path.upper()\ | |
.replace('.','_') |
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 rx | |
from rx import operators as ops | |
from collections.abc import Iterable | |
import logging | |
identity = lambda x: x | |
def throw(e): | |
print(e) | |
logging.exception(e) |
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
# -*- coding: utf-8 -*- | |
from uuid import uuid4 | |
from telegram.utils.helpers import escape_markdown | |
from telegram import InlineQueryResultArticle, ParseMode, \ | |
InputTextMessageContent | |
from telegram.ext import Updater, InlineQueryHandler, CommandHandler | |
import logging |
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 telegram | |
from telegram.ext import Updater, CommandHandler, \ | |
MessageHandler, Filters | |
import logging | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
import requests as req | |
def get_crypto_coin(name, coin="usd"): |
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 os import system | |
import shutil | |
import telegram | |
def get_disk_free_space(path): | |
usage = shutil.disk_usage(path) | |
free = usage.free/1024/1024/1024 | |
percentage = 100*usage.free/usage.total | |
return (free,percentage) |
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 os import system | |
from pprint import pprint | |
from telegram import Bot, ParseMode | |
class Process(dict): | |
__getattr__ = dict.get | |
__delattr__ = dict.__delitem__ | |
__setattr__ = dict.__setitem__ | |
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.
NewerOlder