blob_id
large_string
repo_name
large_string
path
large_string
src_encoding
large_string
length_bytes
int64
score
float64
int_score
int64
detected_licenses
large list
license_type
large_string
text
string
download_success
bool
9f49007248b0c7ded13d5509fb5ee26a7c5a243b
davecthomas/sort
/app/__init__.py
UTF-8
2,577
2.53125
3
[]
no_license
from flask import Flask from flask_bootstrap import Bootstrap import click from flask import Flask from flask.cli import AppGroup from flask import current_app, render_template from flask_restful import reqparse from flask import jsonify import json import random import requests from app import sort from app.inverted_i...
true
c8a8fe786f9e3e7261a534c914ef502f74c0a921
rsankaranarayanan/Python_Codes
/without_sort_function_sort_integer.py
UTF-8
245
3.484375
3
[]
no_license
sortlist = [3,10,4,6,8,9,9] slength = len(sortlist) for i in range(slength): for j in range(slength): if sortlist[i] < sortlist[j]: tempvar = sortlist[j] sortlist[j] = sortlist[i] sortlist[i] = tempvar print(sortlist)
true
101b31f7b36afb093f4988b94ba51b7e699bf669
druzi808/csce204
/assignments/assignment5/house.py
UTF-8
1,074
3.828125
4
[]
no_license
#Author: Drew Rafferty import turtle turtle.bgcolor("skyblue") turtle.setup(500,500) pen = turtle.Turtle() pen.pensize(2) pen.speed(.5) pen.color("black") #square squareSize = 100 pen.up() pen.setpos(-squareSize/2,-squareSize) pen.down() pen.fillcolor("orange") pen.begin_fill() for i in range(4): ...
true
b8ad063f2690c371555481b66896918f9a25b702
PhucNguyen12038/PythonLearning
/School-works/sessions/session17/quiz.py
UTF-8
1,294
3.375
3
[]
no_license
#def test(i,j): # if i == 0: # return j # else: # return test(i-1,i+j) #print(test(8,5)) #def a(n): # if n == 0: # return 0 # elif n == 1: # return 1 # else: # return a(n-1) + a(n-2) #for i in range(0,4): # print(a(i),end=" ") #def fun(n): # print(n) # if (n...
true
c0878952c79d21427556209cf1936465d45403dd
noifjalar/Verklegt_1
/Verklegt_1.root /Model/destination.py
UTF-8
200
3.15625
3
[]
no_license
class Destination: def __init__(self, id, destination) : self.id = id self.destination = destination def __str__(self) : return "id: {id} - destination: {destination}"
true
44726a3af7df7f6c83a10931c98d2099912aa067
colwilson/human-datetimedelta
/setup.py
UTF-8
1,388
2.78125
3
[]
no_license
#!/usr/bin/env python ''' Examples:: from datetime import datetime, timedelta now = datetime.now() an_hour_ago = now - timedelta(hours=1) yesterday = now - timedelta(days=1) tomorrow = now + timedelta(days=1) import human print human.date(now) # 'now' print human...
true
5ed54cdf294553234759c33ee28c8fdcd39cbe71
parthi82/python
/loop_lists.py
UTF-8
472
3.4375
3
[]
no_license
count = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] fruits = ['Apple', 'Orange', 'Mango', 'Pineapple', 'Banana'] change = [1, 'pennies', 2, 'dimes', 3, 'quaters'] for number in count: print 'This iscount %d' % number for fruit in fruits: print 'This is a %s' % fruit for i in change: print 'I got %r' % i elements = []...
true
ce5330cb1be50fed5c5f8ff84cd6766caa03bf88
ni/niveristand-python
/examples/basic_rt_sequence_examples.py
UTF-8
6,125
3.03125
3
[ "MIT", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-unknown-license-reference" ]
permissive
from niveristand import nivs_rt_sequence, NivsParam, realtimesequencetools from niveristand.clientapi import ( BooleanValue, ChannelReference, DoubleValue, DoubleValueArray, ErrorAction, I32Value, I64Value, ) from niveristand.errors import RunError from niveristand.library import ( array...
true
6c6d0ac8fd818d02275f059c59f7cc1329fb6d2c
wfelipe3/KnowBag
/python/bus-stop/read_data_to_datastructure.py
UTF-8
1,956
3.546875
4
[]
no_license
def openFile(file="data.csv", mode='r', error="warn"): if error not in {"warn", "silent", "raise"}: raise ValueError("Error must be warn, silent or raise") try: return open(file, mode) except FileNotFoundError as e: if error == "warn": print("the file was not found {}".fo...
true
3fe8b0959b672efadb69f0029facb32f141b5bcb
colinparker/Aerohydro
/lift.py
UTF-8
2,229
3.421875
3
[]
no_license
import numpy as np import matplotlib.pyplot as plt from math import * N = 50 # Number of points in each direction xStart,xEnd = -2.0,2.0 # x-direction boundaries yStart,yEnd = -1.0,1.0 # y-direction boundaries x = np.linspace(xStart,xEnd,N) # x 1D-array y = np.linspa...
true
e1d60e103e60f552ad3c4c945d429ad5443b0ff3
AustinScola/illud
/tests/modes/test_select.py
UTF-8
2,023
2.671875
3
[ "MIT" ]
permissive
"""Test illud.modes.select.""" from typing import Optional import pytest from illud.buffer import Buffer from illud.character import Character from illud.characters import CONTROL_C, ESCAPE from illud.exceptions.quit_exception import QuitException from illud.illud_state import IlludState from illud.mode import Mode f...
true
d9412baec333d4eeca3624fbff2282a1e7b47e26
karolinanikolova/SoftUni-Software-Engineering
/1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/03_Conditional-Statements-Advanced/00.Book-Exercise-4.1-04-Fruit-or-Vegetables.py
UTF-8
656
3.75
4
[ "MIT" ]
permissive
# плод или зеленчук # Нека проверим дали даден продукт е плод или зеленчук. Плодовете "fruit" са banana, apple, kiwi, cherry, lemon и grapes. # Зеленчуците "vegetable" са tomato, cucumber, pepper и carrot. Всички останали са "unknown" product = input() if product == 'banana' or product == 'apple' or product == 'kiwi'...
true
22b935118aea1f6064aed8ed1f656dded1d82d8f
kennyz/nullbox
/scripts/ser_upload.py
UTF-8
2,857
2.515625
3
[]
no_license
import time import serial import smtplib import xively import datetime import re import os TO = 'putyour@email.here' GMAIL_USER = 'putyour@email.here' GMAIL_PASS = 'putyourpasswordhere' SUBJECT = 'Intrusion!!' TEXT = 'Your PIR sensor detected movement' ser = serial.Serial('/dev/ttyACM0', 19200) XIVELY_APIKEY=os.ge...
true
4009d1355647cbd0a72a9a3cbea040df17810887
hemant6488/stepup-algos
/arrays/2019_14h_adding_two_numbers_formed_by_linked_list_using_strings.py
UTF-8
1,493
3.78125
4
[]
no_license
import time class ListNode: def __init__(self, val): self.val = val self.next = None def addTwoNumbers(l1, l2): numberStr1, numberStr2 = "", "" while l1 is not None: numberStr1 = str(l1.val) + numberStr1 l1 = l1.next while l2 is not None: numberStr2 = str(l2....
true
98ed906fdb525f0be2ca97d3ab5da48756921618
max-97/GoogleCodeJam
/CodeJam2017/QualificationRound/solution_B.py
UTF-8
796
2.921875
3
[ "MIT" ]
permissive
fileName = "B-large-practice.in" read = open("problems/" + fileName, "r") write = open("solutions/" + fileName, "w") size = int(read.readline()) # print(size) for k in range(size): number = read.readline().replace("\n", "") numberAsList = [int(x) for x in number] i = len(numberAsList) - 1 while i > 0:...
true
70307b02e0e01b5bfc0805bb36efe48c3140246a
geekman2/GutenTag
/lib/pre_processing/create_semantic_models.py
UTF-8
3,731
2.5625
3
[]
no_license
# coding = utf-8 # ------------------------------------------------------------------------------ # Name: Create semantic models # Purpose: Create semantic models#TODO improve this description # Author: Bharat Ramanathan, Devon Muraoka # Created: 9/6/2016 # Copyright: (c) Bharat Ramanathan, D...
true
335004b871d9bb39dc7165a3809a267b3daff3b5
sejje/sejje-euler
/20.py
UTF-8
214
3.875
4
[]
no_license
''' Project Euler Problem 20 Find the sum of the digits of 100! (factorial) ''' import math value = math.factorial(100) total = 0 for i in range(0,len(str(value))): total += int(str(value)[i:i+1]) print total
true
25195815c05a2b10c2f5343072170b1e94a125b0
Sharath-v87/Basic-ML-DL-codes
/cats vs dogs/test model.py
UTF-8
877
3.28125
3
[]
no_license
from keras.preprocessing.image import load_img from keras.preprocessing.image import img_to_array from keras.models import load_model def load_image(filename): # load the image img = load_img(filename, target_size=(200, 200)) # convert to array img = img_to_array(img) # reshape into a single sample with 3 channel...
true
e731c88dee729aa30044e6c33a9b937e5a74e41e
simpsus/factoriograph
/graphCreator.py
UTF-8
1,231
2.75
3
[]
no_license
import networkx as nx import re from slpp import slpp input_dump = 'res/recipe_dyworld_0.9.7_etc.txt' def read_dump(source=input_dump): with open(source,'r') as f: dump = f.read() # Add quotes around hyphenated strings dump = re.sub(r'\w+(?:-\w+)+', r'"\g<0>"', dump) # Parse the dump as LUA...
true
2f70c3520ad3266d0ebb6a7c61d7bf94b00dc636
eneskemalergin/Essential_Algorithms
/Finding Factors.py
UTF-8
284
3.4375
3
[]
no_license
def FindFactors(number): factors = [] i = 2 while (i < number): while(number % i == 0): factors.append(i) number = number / i i = i + 1 if(number > 1): factors.append(number) return factors print(FindFactors(1204))
true
a6abe31aac7b9b6b38cee1421e04b974e4d48c20
cjschneider2/EtherCATInfo-Parser
/src/gen_c.py
UTF-8
7,265
2.5625
3
[]
no_license
# -------------------------------------------------------------------------- # # C header generator Functions --------------------------------------------- # # -------------------------------------------------------------------------- # def gen_all_file(devices): import glob # find our files file_paths = g...
true
82b7bd9387c7a2b0fe632e233871f2289ccc8189
Sidharth37/StoutCaseStudy2
/CaseStudy2.py
UTF-8
8,876
3.1875
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # # Sidharth Jahagirdar - ssj180009@utdallas.edu / 6822834728 # # Case Study 2 # # Importing Libraries and dataset # In[1]: import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np # In[2]: df=pd.read_csv(r"C:\Users\sidha\Desktop\Stout ...
true
5840d6a578edd2ce894bb52700c14293c3a737e9
syurskyi/Algorithms_and_Data_Structure
/_algorithms_challenges/projecteuler/ProjectEuler-master(2)/ProjectEuler-master/401.py
UTF-8
620
3.390625
3
[]
no_license
import sys class Problem(): def __init__(self): self.modulo = 10**9 def SIGMA2(self, n): sigma2 = 0 i = 1 while i <= n: q = n // i min_i = n // (q+1) max_i = n // q sigma2 += self.square_sum(min_i, max_i) * q s...
true
46335013f819c58575fea7065de163a9674d0110
mukund7296/Python-basic-to-advanced
/ch01.py
UTF-8
279
3.625
4
[]
no_license
# Python Tutorial for beginner - Learn Python print("Python Tutorial at codescracker.com"); # Python Tutorial - Learn Python - Python Tutorial for Beginner str = input("Enter your name please: ") print("Hello,", str, "\nWelcome to Python Tutorial from codescracker.com");
true
e6add36cdc399a1ab7edcf91e36d5a9d631bf9ec
sonalgan/FrndRecommend
/test.py
UTF-8
4,395
2.640625
3
[]
no_license
#!C:/Python/Python38/python print("Content-Type: text/html") print() import cgi import sys sys.path.insert(0, 'C:\Python\Python38\Lib') import operator import networkx as nx import matplotlib.pyplot as plt import random global user_list,users,users_choice user_list=[] users=[] users_choice=[] print(...
true
d1e80c32adfbd28bd2bb7904468030aad8f3bb4e
yangchaoyi1/python-01
/windows/冒泡排序.py
UTF-8
324
2.921875
3
[]
no_license
def paixu(li): n = 0 while n < len(li): for i in range(len(li)): for two_index in range(i): if li[two_index+1] < li[two_index]: li[two_index+1],li[two_index]=li[two_index],li[two_index+1] n += 1 print(li) li = [5,-4,6,7,11,1,2] paixu...
true
19699081b8aae1865ec33833c1c2c3ab86b5ed36
miyagipipi/studying
/Link list/25.K个一组翻转链表.py
UTF-8
1,768
3.90625
4
[]
no_license
#K个一组翻转链表 25 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseKGroup(self, head: ListNode, k: int) -> ListNode: #创建一个函数reverse(head, a, b),能反正[a, b)之间的节点 def reverseNode(a...
true
c87c1259aabcc25aa98dfafb301bf961b8aeeb81
asherboy1/python-algorithm
/Sequential_Search/erfen_search.py
UTF-8
1,107
3.96875
4
[]
no_license
#二分法查找有序表 分而治之 解决小部分问题 缩小问题规模 O(log n) # def erfen_search(list1,item): # found = False # first = 0 # last = len(list1) - 1 # while last >= first and not found: # midpoint = (first + last) // 2 #每次查找前与中间项比较 # if list1[midpoint] == item: # found = True # el...
true
f7d2645a08dfb140cc50ac754bbf1a2c0a242af6
hhucn/dbas-search
/search_service/database/query_with_graphql.py
UTF-8
3,984
2.8125
3
[]
no_license
""" .. codeauthor:: Marc Feger <marc.feger@uni-duesseldorf.de> """ import json import logging import os import requests from search_service import DBAS_HOST, DBAS_PORT, DBAS_PROTOCOL def json_to_dict(col): """ Given a json object as bytes, convert it to a Python dictionary. :param col: :type col: b...
true
e1e1937536f8ba938312144c3e99a693d09a195b
flaviogpacheco/python-520
/classe/animal3
UTF-8
525
4.09375
4
[]
no_license
#!/usr/bin/python3 # Classe que define uma abstração de mamíferos class Animal(): def __init__(self, peso=0, idade=0, cor='', nome='', especie=''): self.peso = peso self.idade = idade self.cor = cor self.nome = nome self.especie = especie def __str__(self): ...
true
ae6269662102c9cda8d9f833bd45db6be6569b79
MaximeGoyette/breaking-aes-101
/challenges/ecb/ecb1/website/solve-ecb2.py
UTF-8
359
2.609375
3
[]
no_license
import base64 import requests url = 'http://localhost:5001/api/encrypt' def get_padding_len(): i = 0 l = None while True: r = requests.post(url, json={'data': base64.b64encode('a'*i)}) token_len = len(r.text) if l and token_len != l: return i else: ...
true
fde725b6f818ed0a9ef6dc898bac196a1b698262
aadhithya/pytunes_cli
/iTunesHandler.py
UTF-8
2,710
2.8125
3
[]
no_license
import applescript """ def __run_script(source): if source is not None: try: res = applescript.AppleScript(source).run() return res except Exception as ex: print(ex) return None else: return None """ class iTunes: def __init__(se...
true
b65863b1f9808f00a3e3250f0b0348e342b1ef92
Shusovan/Basic-Python-Programming
/Polymorphism.py
UTF-8
232
3.390625
3
[]
no_license
class Car: def Speed(self): pass class Ford(Car): def Speed(self): print('300 km/h') class Bugatti(Car): def Speed(self): print('400 km/h') f=Ford() f.Speed() b=Bugatti() b.Speed()
true
fce26783500e58144b4eecddc188a0e80755a2e5
ahtih/panorama
/lambda_function.py
UTF-8
3,282
2.59375
3
[]
no_license
#!/usr/bin/python # -*- encoding: latin-1 -*- #################### AWS Lambda design ################### # 1. upload image files (JPG/PNG/etc) to S3 # 2. invoke synchronous Lambda via AWS API Gateway # * spawn_extract_image_keypoints_tasks # * arguments: # * S3 filenames # * processing batch key (arbitrary strin...
true
0d573b3c245ffb648e1b4a326260644a996c82d8
AnthonyKNorman/ESP32_GPS
/nmea.py
UTF-8
3,586
2.953125
3
[]
no_license
class nmea(): def __init__(self, debug=0): self._sentence = '' self.time = '00:00:00' self.date = '01/01/2000' self.latitude = 0 self.longitude = 0 self.satcount = 0 self._debug = debug def dprint(self,mess): if self._debug: print(mess) def checksum(self): """ takes a sente...
true
acec6b4ccba23858bd73467c686ca8ea37583866
EdwardDunn/income-predictor
/App/TrainingData.py
UTF-8
3,989
2.953125
3
[ "MIT" ]
permissive
''' Created on 6 Jun 2018 @author: Edward Dunn ''' import pandas as pd import App.FeatureLabels CSV_COLUMN_NAMES = get_feature_labels() DATA_PATH = "dataset.csv" def get_dataset_num_rows(): return sum(1 for line in open(DATA_PATH)) def get_data(testing_rows): """ Creates the training and testing dataset...
true
2f381f52a858223cc7f506865978a3306349ec3d
minhluanlqd/AlgorithmProblem
/problem6.py
UTF-8
1,743
4.0625
4
[]
no_license
""" DAILY CODING PROBLEM (PROBLEM 119) This problem was asked by Google. Given a set of closed intervals, find the smallest set of numbers that covers all the intervals. If there are multiple smallest sets, return any of them. For example, given the intervals [0, 3], [2, 6], [3, 4], [6, 9], one set of numbers that c...
true
e18e110cdc19645aa8202f89aef94fe7298adc02
toscawidgets/tw2.jqplugins.fancytree
/tw2/jqplugins/fancytree/samples.py
UTF-8
3,907
2.578125
3
[]
no_license
"""""" try: import simplejson as json except: import json import uuid from collections import defaultdict import tw2.core as twc from widgets import FancyTreeWidget # see taxonomy_tree() docstring tree = lambda: defaultdict(tree) # provide a uuid as a (json-ifiable)_string key = lambda: str(uuid.uuid4()) ...
true
14086f1d06e967dde415f013ae5063178eea2b9c
lovehhf/LeetCode
/1074_元素和为目标值的子矩阵数量.py
UTF-8
1,150
3.796875
4
[]
no_license
# -*- coding:utf-8 -*- __author__ = 'huanghf' """ 给出矩阵 matrix 和目标值 target,返回元素总和等于目标值的非空子矩阵的数量。 子矩阵 x1, y1, x2, y2 是满足 x1 <= x <= x2 且 y1 <= y <= y2 的所有单元 matrix[x][y] 的集合。 如果 (x1, y1, x2, y2) 和 (x1', y1', x2', y2') 两个子矩阵中部分坐标不同(如:x1 != x1'),那么这两个子矩阵也不同。 示例 1: 输入:matrix = [[0,1,0],[1,1,1],[0,1,0]], target = 0 ...
true
714e7af18b1c3c78fb17c2eb42b0d9e6ef188f94
shoaibshakeel381/wk-vocab-finder
/util.py
UTF-8
975
3.46875
3
[]
no_license
def read_word_list(path): word_list = [] with open(path) as f: word_list = f.readlines() return [word.strip('\n') for word in word_list] # Strip all newlines. def read_level(level): lst = read_word_list('kanji/level' + str(level) + '.kanji') return set(lst) def read_all_levels(max_level): ...
true
99687bba242519307f44d31e8da1efefc3750016
adtak/data-infrastracture
/src/test/conftest.py
UTF-8
6,703
2.515625
3
[]
no_license
import pytest import os import sys import pathlib import pandas as pd # src/mainフォルダパスを追加し、src/mainフォルダ起点でインポートする(#402 Lint Error抑制と合わせて使用) sys.path.append(os.path.join( str(pathlib.Path(__file__).resolve().parent.parent), 'main')) from common.logger.common_logger import CommonLogger # noqa: #402 from common.db.b...
true
fae94a6765f915880540c149c373bac6638a3ffe
fhdiaze/pedestrian
/pedestrian/tracking/multiple/Tracker.py
UTF-8
1,591
2.8125
3
[]
no_license
class Tracker(object): __slots__ = ["frame_count", "idx", "trackers", "connector", "detector", "det_period", "max_unseen"] def __init__(self, connector, detector, det_period, max_unseen): self.frame_count = -1 self.idx = -1 self.trackers = dict() self.connector = connector ...
true
805bf65e660312339f7a94a91ce302d1f5b0e01e
Adelino347/matrices_calculator
/calculadoraDeMatrizes.py
UTF-8
25,415
2.71875
3
[]
no_license
from tkinter import * from tkinter import ttk import sys import winsound sys.path.append("funcoes") import funcoes_para_GUI as fg class Redimensionador(object): def __init__(self, conteiner, listaLabels_L, listaLabels_C, listaComFrames, matrizComEntries, conteinerParaFrames, conteinerParaLabelsC): ...
true
ab412373f8ba86a9a3f4f4fd253db38d35b7c28c
MiloVoorhout/hu_lingo_backend
/openapi_server/core/port/data/game/round_repository.py
UTF-8
3,293
3.296875
3
[]
no_license
""" This repository contains all functions connecting to the database table Round """ # pylint: disable=import-error import psycopg2 from flask import abort class RoundRepository: """ RoundRepository class contains every round function that talks to the database """ def __init__(self, database):...
true
9d94d9241d782c36b6c86c143e1f0317e43a7b2a
LucSan10/AlgLinComp-18.1
/List 1/Question2.py
UTF-8
4,267
3.390625
3
[]
no_license
import numpy as np import Subs as sub import Cholesky as ch import GaussJordan as gj import LU as lu print("\n\n# Question 2 a\n") A = np.array([[5,-4,1,0],[-4,6,-4,1],[1,-4,6,-4],[0,1,-4,5]], dtype = float) B = np.array([[-1],[0],[1],[0]], dtype = float) test = np.array([[2,1],[1,2]], dtype = float) ##############...
true
21cf508c6ab0622337fb597413774d53363822b3
cglusky/federa
/framework/client.py
UTF-8
1,080
2.546875
3
[ "MIT" ]
permissive
import requests from framework.constants import WEBFINGER def retrieve_actor(actor_string): print(f"str {actor_string}") parsed_finger = WEBFINGER.match(actor_string) if not parsed_finger["username"] or not parsed_finger["host"]: return None print(f"parsed {parsed_finger}") try: ...
true
f99fb048a9f00ea4af690c669ef7143d36230c01
BertDaNerd/IntroToPython
/lists.py
UTF-8
556
3.875
4
[]
no_license
myshopping_list = ["olive oil", "walnuts", "wine"] print(myshopping_list) myshopping_list.append("chips") print(myshopping_list) myshopping_list.remove("wine") print(myshopping_list) print (len(myshopping_list)) colors = ["blue", "red", "green", "purple", "indigo"] print(colors.index("green")) colors.insert(2, "yel...
true
3aa9ea76e783018b3cce16c026cabcd19e55f57b
ThuHienn/leThuHien-C4EP67
/Lessons/session2/place.py
UTF-8
601
4.09375
4
[]
no_license
# List/ array/ mảng ['value', 'value',...] đằng sau: index 0, 1 -> List có 3 phần tử # 4 thao tác với List: Create, Read, Update, Delete places = ['Đại sứ quán','Bệnh viện', 'Bãi biển'] #Initialize print(places) #Read new_place = input('enter new place plzzz') places.append(new_place) #Create replace_index = places....
true
9a9c6c0b6338f052f1a66231e5dfaebf6a27cc43
Florentin-liser/api_examples
/download_resources.py
UTF-8
811
2.6875
3
[]
no_license
import requests import argparse import json import shutil parser = argparse.ArgumentParser() parser.add_argument( '-a', '--api-key', dest='api_key', required=False, help="API key to use", type=str ) parser.add_argument('dataset_id', type=str) args = parser.parse_args() api_key = args.api_key d...
true
ef0b24881811a85c8fface59e5ef7711c3698f76
linhx13/arc-nlp
/arcnlp/tf/layers/token_embedders/token_chars_embedder.py
UTF-8
1,134
2.78125
3
[]
no_license
# -*- coding: utf-8 -*- import tensorflow as tf from .token_embedder import TokenEmbedder class TokenCharsEmbedder(TokenEmbedder): """A `TokenCharsEmbedder` takes a tensor of shape (batch_size, num_tokens, num_chars) as input, embeds the characters, runs a token-level encoder, and returns a tensor of sh...
true
5bc6fbc028a1c9054ff6346f5951409434a8b466
SlothKun/TwitterAccountBlocking
/Gettinguser.py
UTF-8
923
3.015625
3
[]
no_license
# All requirement from bs4 import BeautifulSoup import requests import pandas as pd from time import time ### Get all users from a blocklist start = time() account = [] max_page = 378 # Enter here the number of page there's in a list (divide len of list by account per page) for i in range(1, int(max_...
true
153f44de65a02acd1d8f3fbf8c3de64d8a17189f
muchirajunior/stockmodel
/stockmodel.py
UTF-8
3,630
3.515625
4
[]
no_license
#import the libraries import pandas as pd import numpy as np from sklearn.svm import SVR from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt from sklearn.tree import DecisionTreeClassifier import random #import csv data into a pandas dataframe df=pd.read_csv('data.csv') #declare the pr...
true
a839ca30f850e65f323ecbabba235bd5b663675f
VeronikaKusova/ukoly_Slovniky
/00_03.py
UTF-8
1,263
3.5625
4
[]
no_license
# ukol 00 -> fce, která vrací slovník, kde klíče jsou čísla od jedné do n a hodnoty jsou jejich druhé mocniny def vratSlovnik(n): slovnik = {} for prvek in range(n): slovnik[prvek+1]= (prvek+1)**2 return slovnik print(vratSlovnik(5)) # ukol 01 -> fce, která vrací sumu všech klíčů a sumu vše...
true
d5bd53c3d0f50f54db7cad0d94eaa9504bdd7c31
mjasnikovs/horus
/tensorFlow/network.py
UTF-8
3,716
3.140625
3
[ "MIT" ]
permissive
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_blobs class Operation(): def __init__(self, input_nodes=[]): self.input_nodes = input_nodes self.output_nodes = [] for node in input_nodes: node.output_nodes.append(self) _default_gr...
true
f675c844d72fecb4c5433ac15b6f2b21b87e731f
olegzinkevich/programming_books_notes_and_codes
/akshay_natural_language_processing/4_advanced/3_phonetic_match.py
UTF-8
775
3.875
4
[]
no_license
# Phonetic matching # The next version of similarity checking is phonetic matching, which roughly # matches the two words or sentences and also creates an alphanumeric # string as an encoded version of the text or word. It is very useful for searching # large text corpora, correcting spelling errors, and matching relev...
true
2ed3c66c6dea98382bd08690327afb096138f8ef
cloudhsiao/python-kalay-iot-course
/course-dht11-push-msg_bbb.py
UTF-8
820
2.828125
3
[ "BSD-3-Clause" ]
permissive
import Adafruit_DHT import time import requests import urllib sensor = Adafruit_DHT.DHT11 sensor_pin = 'P8_11' prevTime = time.time() TEMP_THRESHOLD = 27 TIME_LAPSE = 60 #Replace your own UID here UID = 'XXXXXXXXXXXXXXXXXXXX' MESG = 'Tempature over the Threshold' def push_msg(): link = 'http://push.iotcplatform...
true
a2f768e32219f6f4d0113f2f20aba0db3dbc008c
ecasiano/ComputationalPhysics
/A02/03archimidesPi.py
UTF-8
1,651
4.40625
4
[]
no_license
#Emanuel Casiano-Diaz #Use Archimides method to approximate the value of pi to at least 4 decimals. #Outputs a table showing the number of sides, lower and upper bound on pi. # % Operator is used to print a maximum of 10 rows from math import sqrt, tan, radians def archPi(doubling): #Start with hexagon, just as...
true
b91abbf19eb596de0f033ce2c7e521ec21e50bc4
katerinanil/repa
/chatbot/ChatBotState6/ChatBotState/chatter.py
UTF-8
1,737
3
3
[]
no_license
from protection import protections from DB import DB from dealer import Dealer class Chatter: def __init__(self): self.hello_flag = True def getAnswer(self, protect, msg): if protect != None: if protect == protections.BackToChatter: self.getAnswer(None, "") ...
true
2021208a4035e277a05378627ec6c87fffc98c58
joaocps/cd-mapreduce
/worker.py
UTF-8
4,794
2.6875
3
[ "MIT" ]
permissive
# coding: utf-8 import logging import argparse import os import socket import string import json logging.basicConfig(level=logging.DEBUG,format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M:%S') logger = logging.getLogger('worker') class Worker(object): def __in...
true
109dc9b60cfa8e46be3689269089ad763467fd11
HarshNarayanJha/Python
/pattern_hw/pattern_17.py
UTF-8
203
3.53125
4
[]
no_license
# 17 """ * *** ***** ******* ********* *********** """ num_levels = 6 for i in range(num_levels): print(' ' * (num_levels - i), end="*" * (i * 2 + 1)) print()
true
284c3dbb0d5b6c0e23500b7451ffd679159059dd
HariKumar09/python-sample-examples
/servers.py
UTF-8
487
2.8125
3
[]
no_license
import socket import sys host = 'localhost' port = 61473 address = (host, port) server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.bind(address) server_socket.listen(1) print "Listening for client . . ." conn, address = server_socket.accept() print "Connected to client at ",...
true
bafe305e51c8acaa16240c8330bcdb7cd869afbc
rajUwU/lazy-linker
/lazy-linker2.py
UTF-8
858
2.78125
3
[ "MIT" ]
permissive
import sys, win32com.client, datetime # Connect with MS Outlook - must be open. outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace ("MAPI") # connect to Sent Items s = outlook.GetDefaultFolder(5).Items # "5" refers to the sent item of a folder #s.Sort("s", true) # Get yesterdays date for the purp...
true
f10d56bb035c8166a3a06501d897bb27cd68effa
SpartArs/DSAlgorithms
/python/graph.py
UTF-8
5,486
3.59375
4
[ "Apache-2.0" ]
permissive
''' Created on May 16, 2015 @author: tekrei Graph implementation and algorithms Using adjacency list represantation for the graph Source: Introduction to Computation and Programming Using Python ''' from collections import defaultdict from queue import PriorityQueue import time from typing import Type class Node(): ...
true
3306a0b2bdeea455cdb3b8e22cdcae826859b573
MLGBand/MLGBand
/Python/GUI/DeviceConnect.py
UTF-8
2,631
2.53125
3
[]
no_license
#!/usr/bin/env python import socket from struct import * # TCP_IP = '127.0.0.1' # TCP_PORT = 80 # BUFFER_SIZE = 46 #MESSAGE = "Hello, World!" class DeviceConnection: #TCP_IP = '127.0.0.1' # TCP_PORT = 80 # BUFFER_SIZE = 46 # RECEIVE_BUFFER = [] def __init__(self, s=None): if s is Non...
true
d8aacaffc0d0cd40e8642918dcc95a9d287760a5
GisangLee/charBot
/chatbot.py
UTF-8
305
2.5625
3
[]
no_license
import telegram api_key = 'key' bot = telegram.Bot(token=api_key) # chat_id = bot.get_updates()[-1].message.chat_id # 위 코드는 chat_id를 찾는 방법 chat_id = 1000539293 bot.sendMessage(chat_id=chat_id, text="기상아 안녕?") # for i in bot.getUpdates(): # print(i) # print()
true
f9c2fc0fb9989478acff8c25caf8fa6d5df5cd64
SuperOxigen/CanDev-Finance-Canada
/gathernomics/downloader.py
UTF-8
6,056
2.84375
3
[ "MIT" ]
permissive
"""Gathernomics - Data Downloader. Copyright (c) 2018 Alex Dale See LICENSE for information """ import logging import os import os.path as path import sys from typing import Tuple import urllib.request import zipfile from gathernomics.defaults import DEFAULT_COMP_DIR from gathernomics.models.sourcetbl import SourceT...
true
2fe52aa6a4eff2c7ae58fcea7ba3f22a74bf0215
rajivanisetti/Maze-Solver
/maze_solver.py
UTF-8
2,565
3.21875
3
[]
no_license
import requests import json import time directions = ['UP', 'RIGHT', 'DOWN', 'LEFT'] directionToMove = {'UP': (0, -1), 'RIGHT': (1,0), 'DOWN': (0,1), 'LEFT': (-1, 0)} reverseDirections = {'UP': 'DOWN', 'RIGHT': 'LEFT', 'DOWN': 'UP', 'LEFT': 'RIGHT'} def isValidLocation(move, size): return move[0] >= 0 and move[0]...
true
e7b2d6f34b19ecb82cbb6637858ef1d73bb1c8c4
Hjax/Ene
/bot/raceinterface/buildingplacement.py
UTF-8
2,792
2.5625
3
[]
no_license
import sc2 import time import random class BuildingPlacement: def __init__(self, bot): self.bot = bot async def get_placement_for(self, unittype): if self.bot.game.is_command_structure(unittype): return self.bot.base_manager.next_base().position if self.bot.game.is_gas(...
true
df34e4ab88d94e7220b228485000e8328239a183
JinkaiGUAN/openCVLearning
/Chapter8_ObjectTracking/surveillance_demo/objectTracking_kalmanAndCAMShift.py
UTF-8
6,846
2.671875
3
[]
no_license
# -*- coding: UTF-8 -*- """ @Project :openCVLearning @File :objectTracking_kalmanAndCAMShift.py @IDE :PyCharm @Author :Peter @Date :01/05/2021 17:04 """ __version__ = "0.0.1" __status__ = "Development" import cv2 import configparser import numpy as np import argparse import os parser = argparse.Argument...
true
c186c79f65db7079e8aceae8bee806345f44baae
ismailsinansahin/PythonAssignments
/Assignment_11/Question_45.py
UTF-8
405
4.125
4
[]
no_license
""" Write a program that will print the shortest word in the given array str. Sample Output: input: java, cable, red, vivid, remedy, grace output: red """ words = ["java", "cable", "red", "vivid", "remedy", "grace"] print("\nwords -> ", words) shortest = words[0] for each in words: if len(each) <...
true
89a0b541fb12bbbabd899b143f9276ee5bd35c67
hamtamSP/JAV2
/Vincent_Adventure/Blog/Source_code/thonny file/Thonny files.py
UTF-8
657
2.8125
3
[]
no_license
from microbit import * import random scissors = Image("90090:" "90900:" "99900:" "99990:" "99990") paper = Image("09990:" "09990:" "09990:" "09990:" "09990") stone = Image("00000:" ...
true
5f72ae1b7765876560c7613217fc51b3450a7e24
GavinBupt/WeiboStockAnalysisCharts
/WeiboData/Gui/Graph.py
UTF-8
11,833
2.578125
3
[]
no_license
#-*- coding:utf-8 -*- from pyecharts import Kline, Line, Page,Overlap,Bar,Pie,Timeline from pandas import DataFrame as df import re import tushare as ts import time import pandas as pd try: xrange # Python 2 except NameError: xrange = range # Python 3 def calculate_month(data, Daycount): sum = ...
true
fce3af3fcf68bb47b88e50084fd1c18dac8c03e6
GrisWoldDiablo/Data-Structure-and-Algorithm
/Python/Stack/Stack/Stack.py
UTF-8
3,453
4.375
4
[ "MIT" ]
permissive
""" Author: Alexandre Lepage Date: May 2019 """ import time from TheStack import TheStack DATA_STRUCTURE_NAME = "Stack" # The name of the data structure STACK_SIZE = 10000000 # size of stack for speed testing def main(): print("---- Data structure :", DATA_STRUCTURE_NAME,"----") # Print the data structure name ...
true
4d8249216caea4524e64d25edfb20a263821d330
nhpquy/code_trainer
/restful/response.py
UTF-8
202
2.65625
3
[]
no_license
import json class ResponseBody(object): def __init__(self, error, data): self.error_code = error self.data = data def to_json(self): return json.dumps(self.__dict__)
true
1370a3d4b98b10920cd97728398ba7f379731554
chacham/learn-algorithm
/acmicpc.net/2805/2805.py
UTF-8
740
3
3
[]
no_license
if __name__ == "__main__": N, M = map(int, input().split()) trees = [int(x) for x in input().split()] trees = sorted(trees, reverse=True) count = 0 total = 0 for i in range(1, len(trees)): total += (trees[i-1] - trees[i]) * i if total >= M: count = i brea...
true
48b8b3ace6e888b7b1c3eebd848d5a13c907c51e
TesterCC/Python3Scripts
/fishc/ex50/calc3.py
UTF-8
342
2.765625
3
[]
no_license
#!/usr/bin/env python # -*- coding:utf-8 -*- # __author__ = 'TesterCC' # __time__ = '17/9/24 05:08' ''' 小甲鱼Python 050模块:模块就是程序 摄氏度和华氏度的转换 ''' from fishc.ex50 import TemperatureConversion as tc print("32摄氏度 = %.2f华氏度" % tc.c2f(32)) print("99华氏度 = %.2f摄氏度" % tc.f2c(99))
true
783067c944b27bc38a4541e62ae1c62ae16f7b35
ritzcr/AtCoder
/practice/abc135_b.py
UTF-8
238
2.90625
3
[]
no_license
N = int(input()) p = list(map(int, input().split())) check = [] for x in range(N): check.append(x + 1) count = 0 for y in range(N): if check[y] != p[y]: count += 1 if count <= 2: print("YES") else: print("NO")
true
23df88787b723b77e7a74f72867924d3565c992f
LKchemposer/german-language-games
/src/database.py
UTF-8
2,537
2.8125
3
[]
no_license
import json from dataclasses import dataclass, field from typing import List import os import duolingo import pandas as pd from pattern import de @dataclass class Database(): nouns: List[dict] = field(default_factory=list) verbs: List[str] = field(default_factory=list) adjectives: List[str] = field(defau...
true
8e9efe7e3480538028e18ed33f525be239de04ef
ksu-is/Chess-Game-GUI
/Chess/ChessMain.py
UTF-8
2,415
3.109375
3
[ "MIT" ]
permissive
import pygame as p from Engine import * from GUI import * p.init() clock = p.time.Clock() win = p.display.set_mode((500, 500)) p.display.set_caption('My-PyChess') # Initialize chess variables side = 0 board = ( [[1, 7, "p"], [2, 7, "p"], [3, 7, "p"], [4, 7, "p"], [5, 7, "p"], [6, 7, "p"], [7, 7, "p...
true
60728aa2984d52238ca452cc03e30e322c158620
jgosmann/spyke-metrics-extra
/spykeutils/profiling/profile_spike_train_metrics.py
UTF-8
3,862
2.5625
3
[]
no_license
#!/usr/bin/env python import argparse import cProfile import os import pickle import pstats import quantities as pq import spykeutils.signal_processing as sigproc import spykeutils.spike_train_generation as stg import spykeutils.spike_train_metrics as stm import sys import tempfile tau = 5.0 * pq.ms sampling_rate = ...
true
4d5774203dd80032844efc789580c69f93e902ed
victor17h/data20_notes
/Film.py
UTF-8
334
3.9375
4
[]
no_license
def films(): movie_list = [] cont = True while cont is True: film = input("What is your favorite film of yours? ") movie_list.append(film) carry = input("Any more? (Y/N) ") if carry.lower() == "y": continue else: break return movie_list pr...
true
02d73cd9003f1889fe4fda3826668b1fac2999e8
akshayjain3450/Hackerrank-30-days-of-code-in-python
/day22-binary search tree.py
UTF-8
320
3.078125
3
[]
no_license
def getHeight(self,root): if root: leftDepth = self.getHeight(root.left) rightDepth = self.getHeight(root.right) if leftDepth > rightDepth: return leftDepth + 1 else: return rightDepth + 1 else: return -1
true
221fecb2f546ea53be437abdabd22a1e94206b24
bhavikjadav/Python_Crash_Course_Eric_Matthes_Chapter_4
/4.2_Animals.py
UTF-8
948
5.125
5
[]
no_license
#!/usr/bin/env python # coding: utf-8 # # 4-2. Animals: Think of at least three different animals that have a common characteristic. Store the names of these animals in a list, and then use a for loop to print out the name of each animal. # # • Modify your program to print a statement about each animal, such as A dog ...
true
e53efaee3eaf79fb5fc46c48b1c6c1fc4618f418
sagardnshah/pandas_anomalies
/output/4_employee_post-exit_access.py
UTF-8
1,334
2.65625
3
[]
no_license
import pandas as pd from datetime import timedelta details = pd.read_csv('employee_details.csv') df = pd.DataFrame(details, columns = ['EmployeeID','Department','End Date']) df['End Date'] = pd.to_datetime(df['End Date']) data =pd.read_csv('datalog.csv') logdata =pd.DataFrame(data, columns = ['EmployeeID','Acti...
true
27847c45ea185743ba0b173dd7463254cd06045f
vpino/djando-angularjs
/authentication/models.py
UTF-8
3,843
3.171875
3
[]
no_license
# -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager class AccountManager(BaseUserManager): def create_user(self, email, password=None, **kwargs): """ Clase para crear un usuario Args: param1 (email): El email del u...
true
51797be6ae28fa27a5dce388d744f52c9aa0f985
clarkbulleit/flask_getting_started
/server.py
UTF-8
650
2.75
3
[]
no_license
from flask import Flask, jsonify, request import math app = Flask(__name__) @app.route("/name", methods=["GET"]) def name(): return "hello, Clark Bulleit" @app.route("/hello/<name>", methods=["GET"]) def hello(name): d = { "message": "Hello there, {}".format(name) } return jsonify(d) @app...
true
33b46b915f463bb0a8e26ee88707cd7e050735c7
lucasmbrute2/Blue_mod1
/Aula15/Exercicio5.POO.py
UTF-8
612
3.359375
3
[]
no_license
# Crie um programa que gerencie o aproveitamento de um jogador de futebol. O programa vai ler o nome do jogador e quantas partidas ele jogou.Depois # vai ler a quantidade de gols feito em cada partida. No final tudo isso será guardado em um dicionário incluindo o total de gols feitos durante o campeonato. # Misturar li...
true
050e5324f7adcb62cdf7839d22fa1a23e4b7bdce
nubela/unifide-plop
/ecommerce/inventory/model.py
UTF-8
386
2.53125
3
[]
no_license
from base.base_model import Base class Inventory(Base): def __init__(self, **kwargs): super(Inventory, self).__init__() self.container_id = None for k, v in kwargs.iteritems(): setattr(self, k, v) @staticmethod def unserialize(dic): return Inventory(**dic) ...
true
6f44ef9d6965212781c861ce16b593408f2b26b2
vrkrishn/Python_Math_Development
/ComputationalGeometry/contracts.py
UTF-8
685
3.40625
3
[]
no_license
import functools def condition(pre_condition=None, post_condition=None): def decorator(func): @functools.wraps(func) # presever name, docstring, etc def wrapper(*args, **kwargs): #NOTE: no self if pre_condition is not None: assert pre_condition(*args, **kwargs) ...
true
4ce18d1e204add0b5c38637414130a45b81de4aa
30mhz/resin-utils
/build.py
UTF-8
1,823
2.734375
3
[]
no_license
""" Part of update set for Resin used by 30MHz All functions related to view build settings. Builds are set with their build hashes, but are application specific thus get a buildnumber accordingly. A: Fokko E: fokko@30MHz.com D: 20 Dec 2017 """ from os import system # for screen clear # Loading Resin Python SDK fro...
true
e2af58ddc99c4c46085fb92f907a17b6499210c3
BradleyPelton/Leetcode-Solutions
/contests2019/unsorted/Leetcode1053/solution.py
UTF-8
365
3.671875
4
[]
no_license
import itertools """Given an array A of positive integers (not necessarily distinct), return the lexicographically largest permutation that is smaller than A, that can be made with one swap (A swap exchanges the positions of two numbers A[i] and A[j]). If it cannot be done, then return the same array.""" p...
true
b1c7fce6cb514d05dc2354225f23882f4d5a1834
jhodson123/procedural_generation
/main.py
UTF-8
4,106
2.953125
3
[]
no_license
import tcod SCREEN_WIDTH = 80 SCREEN_HEIGHT = 50 MAP_WIDTH = 80 MAP_HEIGHT = 45 FILL_PERCENT = 45 FPS_LIMIT = 20 class Tile: def __init__(self, blocked, block_sight = None): self.blocked = blocked if block_sight is None: block_sight = blocked self.block_sight = blocked class Actor: ...
true
90c6de7f308e6a1cfebdab94897025e17ad501b1
renatovianna/Curso_Topicos_Programacao_Python
/Aula2/Aula2.py
UTF-8
297
4.125
4
[]
no_license
operacao = input ('Se você deseja somar, digite (soma). Se você deseja multiplicar, digite (multiplica)') n1 = int(input('Digite um número inteiro: ')) n2 = int(input('Digite um número inteiro: ')) if operacao == 'soma': print(n1 + n2) elif operacao == 'multiplica': print(n1 * n2)
true
24a0d55e3df3a9b05bdb00d88d7b37d9d2bb0936
OpenSlides/openslides-datastore-service
/datastore/shared/services/environment_service.py
UTF-8
1,778
2.75
3
[ "MIT" ]
permissive
import os from typing import Dict, Optional, cast from datastore.shared.di import service_as_singleton DATASTORE_DEV_MODE_ENVIRONMENT_VAR = "OPENSLIDES_DEVELOPMENT" OTEL_ENABLED_ENVIRONMENT_VAR = "OPENTELEMETRY_ENABLED" DEV_SECRET = "openslides" def is_truthy(value: str) -> bool: truthy = ("1", "on", "true") ...
true
b1b275b1f65889368b1261cc30e7b584008114a8
dalejoroc11/holberton-system_engineering-devops
/0x16-api_advanced/0-subs.py
UTF-8
529
2.859375
3
[]
no_license
#!/usr/bin/python3 """ Number_of_subscribers() method """ import requests def number_of_subscribers(subreddit): """ Returns the number of subscribers for a given subreddit """ subr = requests.get('https://www.reddit.com/r/{}/about.json' .format(subreddit), heade...
true
40547ecf34f2a553a0743508f9dbd3e6ca198c11
bananajoe182/leaf-classifier
/detect_leaves.py
UTF-8
2,910
2.5625
3
[ "MIT" ]
permissive
import sys import logging import os import cv2 import csv import numpy as np from utils import write_image, key_action, init_cam from tensorflow import keras from tensorflow.keras.applications import mobilenet_v2 model = keras.models.load_model('models/mdl_wts.hdf5') def predict_frame(frame): frame = mobilenet_v...
true
0fc2a8b49ce180420cda8ba1c4d87ce1063a942c
noveljava/study_leetcode
/completed/543_diameter_of_binary_tree.py
UTF-8
758
3.609375
4
[]
no_license
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right from helper import make_tree_from_list, TreeNode class Solution: def diameterOfBinaryTree(self, root: TreeNode) -> int: ...
true
b90b54e8fa06adc1c69c39fd9048ec5c81e1192d
deepubansal/wp-autopost-adapters
/processor/insert_seo_content.py
UTF-8
1,275
2.71875
3
[]
no_license
from processor import ContentProcessor from bs4 import BeautifulSoup from random import randint class InsertSeoContentProcessor(ContentProcessor): def __init__(self, append_text_file="/Users/dbansal/Work/MyCode/auto-poster-adapter/seo_append_texts"): ContentProcessor.__init__(self) with open(appe...
true
5b40a5491a11bbf3400ea658916a941ed14a83f9
BoomerLives/RabitHole
/Trivial_Python_Practice/Trivial/mass_weight_Calderon.py
UTF-8
1,638
4.65625
5
[]
no_license
# Author: Nathan Calderon # File Name: mass_weight_Calderon.py # This program asks the user to enter an objects mass in kilograms, and # then calculates its weight in newtons. If the objects is more than # 1,000 newtons the program displays a message indicating it is too # heavy. If the object is less then 10 newtons ...
true
25c6d6f16ed75ab6d826266cf683d4d0638af80a
LianaKhazaliya/AT
/V2/pages.py
UTF-8
2,151
2.515625
3
[]
no_license
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains import time class Main_page: def __init__(self): self.URL = 'https://www.qantas.com' self.driver = webdriver.Firefox() self.driver.get(self.URL) ...
true