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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 json | |
import datetime | |
from flask import Flask, url_for, redirect, \ | |
render_template, session, request | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.login import LoginManager, login_required, login_user, \ | |
logout_user, current_user, UserMixin | |
from requests_oauthlib import OAuth2Session |
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
{"lastUpload":"2017-08-21T20:29:59.817Z","extensionVersion":"v2.8.3"} |
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
<form name="bk" action="#"> | |
<div class="g-literature_20 g-prose_magic"> | |
<p class="genre"> | |
<a href="/g/201" class="genre" name="literature_20">Классическая проза ХX века</a>, | |
<a href="/g/203" class="genre" name="prose_magic">Магический реализм</a> | |
</p> | |
<img src="/img/znak.gif" alt="файл не оценен" title="файл не оценен" width="15px" height="15px" border="0" /> | |
<input type="checkbox" id="201,203-" name="bchk513353"> - | |
<a href="/b/513353">Сто лет одиночества</a> [сборник] (пер. | |
<a href="/a/40884">Ростислав Леонидович Рыбкин</a>, |
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
<form name="bk" action="#"> | |
<div class="g-literature_20 g-prose_magic"> | |
<p class="genre"> | |
<a href="/g/201" class="genre" name="literature_20">Классическая проза ХX века</a>, | |
<a href="/g/203" class="genre" name="prose_magic">Магический реализм</a> | |
</p> | |
<img src="/img/znak.gif" alt="файл не оценен" title="файл не оценен" width="15px" height="15px" border="0"/> | |
<input type="checkbox" id="201,203-" name="bchk513353"/> - | |
<a href="/b/513353">Сто лет одиночества</a> [сборник] (пер. | |
<a href="/a/40884">Ростислав Леонидович Рыбкин</a>, |
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
import schedule | |
import time | |
import telebot | |
import requests | |
from bs4 import BeautifulSoup | |
from mongoengine import connect, Document, StringField | |
token = 'token' | |
bot = telebot.TeleBot(token) |
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 chalice import Chalice | |
from googletrans import Translator | |
app = Chalice(app_name='helloworld') | |
translator = Translator() | |
@app.route('/translate', methods=['POST'], cors=True) | |
def translate(): | |
user_as_json = app.current_request.json_body |
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
const puppeteer = require('puppeteer'); | |
const scrape = async() => { | |
const browser = await puppeteer.launch({ headless: false, args: ['--start-maximized'] }); | |
const page = await browser.newPage(); | |
await page.setViewport({ width: 0, height: 0 }); | |
await page.goto('https://www.bookdepository.com/'); | |
await page.click(".sidebar .block-wrap a[href='/bestbooksever']"); | |
await page.waitForSelector('.book-item'); |
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 "es6-shim"; | |
import "reflect-metadata"; | |
import {deserializeArray, Expose, plainToClass, Transform, Type} from "class-transformer"; | |
export function Default(defaultValue: any) { | |
return Transform((value: any) => (value !== null && value !== undefined ? value : defaultValue)); | |
} | |
export class Pet { | |
name: string; |
OlderNewer