Selenium Web Driver in Flask Testing 1
Selenium Web Driver in Flask Testing 2
| from __future__ import division | |
| from itertools import chain | |
| from pyknon.genmidi import Midi | |
| from pyknon.music import Note, NoteSeq | |
| def fib(n): | |
| a, b = 0, 1 | |
| fibo = [a, b] | |
| while b < n: |
| #include "stdio.h" | |
| void Zeta(int foo); | |
| int i = 0, j = 0, c = 0; | |
| int main(void) { | |
| // Disable stdout buffering | |
| setvbuf(stdout, NULL, _IONBF, 0); | |
| def distint(*args): | |
| copy = args | |
| for i in args: | |
| f = 0 | |
| for j in copy: | |
| if i is j and f is 0: | |
| f += 1 | |
| elif i is j and f is 1: | |
| return False | |
| return True |
| var first = '4'; | |
| var two = 'I want to buy Microsoft for $10000'; | |
| var three = 'this house costs $0 5 0 00 0 Just buy it'; | |
| var four = '$ 1 2 3 4 5 6 7 8 9 hello123'; | |
| var five = 'the cost is zero $ 0 0 0 0 0 0'; | |
| function main(input) { | |
| //Enter your code here | |
| var dollar = '$'; | |
| output = input.replace(/\D/g,''); |
| class Country_list(list): | |
| """'create choice for html form""" | |
| def __init__(self): | |
| self.lista_alpha = [] | |
| self.lista_name = [] | |
| self.choice = None | |
| def create_choices(self): | |
| t = list(pycountry.countries) | |
| for country in t: |
| //Before </body> tag | |
| <script> | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open("get", "cookbook.js", true); | |
| xhr.onreadystatechange = function () { | |
| if (xhr.readyState == 4) { | |
| if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) { | |
| var script = document.createElement("script"); | |
| script.type = "text/javascript"; | |
| script.text = xhr.responseText; |
| from urllib2 import urlopen | |
| from BeautifulSoup import BeautifulSoup | |
| url_target = 'https://es.wikipedia.org/wiki/Web_scraping' | |
| class_target = 'mw-parser-output' | |
| print BeautifulSoup(urlopen(url_target)).find("div", { "class" : class_target }).find("p").prettify() |
| import pycountry | |
| from geoip import geolite2 | |
| #I need test this code | |
| def get_country(request_ip): | |
| math = geolite2.lookup(request_ip) if geolite2.lookup(request_ip) is not None else geolite2.lookup_mine() | |
| this_alpha = math.country | |
| tz = str(math.timezone) | |
| citycapital = tz[tz.index('/')+1:] |
| <style> | |
| .block__book_pagination__wrapper { | |
| margin-top: 1em; | |
| margin-bottom: 1em; | |
| } | |
| .block__book_pagination__wrapper > div.row { | |
| margin-top: 2em; | |
| margin-bottom: 2em; | |
| } |