blob_id
large_string
language
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
985fd1d0ded757e6967ad748f7c59900452457d9
Python
a-utkarsh/python-programs
/Calendar/month_name_local.py
UTF-8
153
3.3125
3
[]
no_license
import calendar for name in calendar.month_name: print(name, end= ' ') print("") print("") for name in calendar.day_name: print(name, end=' ')
true
c926ec39f93551df019a7eeee85dc3b5d1d7f59a
Python
owtaylor/flatpak-status
/flatpak_status/distgit.py
UTF-8
3,821
2.515625
3
[ "MIT" ]
permissive
import functools import logging import os import subprocess logger = logging.getLogger(__name__) class GitError(Exception): pass class OrderingError(Exception): pass class GitRepo: def __init__(self, repo_dir): self.repo_dir = repo_dir def do(self, *args): full_args = ['git'] ...
true
090435b9cf27a02233288045250d90f4181f4b9b
Python
Maciejklos71/PythonLearn
/Practice_python/palidrom.py
UTF-8
635
4.3125
4
[]
no_license
#Ask the user for a string and print out whether this string is a palindrome or not. # (A palindrome is a string that reads the same forwards and backwards.) def palidrom(string): string = string.lower().replace(" ","") for i in range(0,len(string)): if string[i]==string[-i-1]: if i ==...
true
c0dec205a7f57f9527d4030220eee845b493148d
Python
frankbozar/Competitive-Programming
/Solo Practice/Codeforces/AC/752B.py
UTF-8
300
2.828125
3
[]
no_license
def solve(s, t): n=len(s) M={} for i in range(n): if M.get(s[i], t[i])!=t[i] or M.get(t[i], s[i])!=s[i]: return -1 M[ s[i] ]=t[i] M[ t[i] ]=s[i] return M M=solve(input(), input()) if M==-1: print(-1) else: M=list((c, M[c]) for c in M if c<M[c]) print(len(M)) for x in M: print(*x)
true
4b4efcfdbf7171eca033d0b4b25f418071086444
Python
Shadowsx3/UCU-Informatic
/Manuel-Files/NumeroDeHeil.py
UTF-8
346
3.515625
4
[ "MIT" ]
permissive
from more_itertools import locate x = input("Ingrese los numeros separados por espacio\n").split() x = list(map(int, x)) x.sort() N = list(locate(x, lambda y: y < 0)) C = list(locate(x, lambda y: y == 0)) P = list(locate(x, lambda y: y > 0)) print(f'Las cantidades son \nPositivos: {len(P)}\n{P}\nCeros: {len(C)}\n{C}\nN...
true
813ac1f6ef9a04b5ee75ec19b9b5ccfa5a595e11
Python
alok1994/Python_Programs-
/list_remove.py
UTF-8
87
3
3
[]
no_license
ls=[1,2,3,4,5] #ls.remove(2) #print ls #del ls[0] #print ls print ls.pop(2) print ls
true
619f75327b64eb1631691293769dd21dcb3d8882
Python
nens/hydxlib
/hydxlib/scripts.py
UTF-8
4,095
2.78125
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ A library for the GWSW-hydx exchange format ============================================================================= Consists of a import and export functionality for currently hydx and threedi. Author: Arnold van 't Veld - Nelen & Schuurmans """ import logging import os import sys from...
true
1fc42231fe5d8a3a4afa6d62a2a069afd90cf7c0
Python
RobertCPhillips/EdxComputationalThinking
/week1/L1_P3.py
UTF-8
636
3.328125
3
[]
no_license
import pylab import numpy as np def getTemps(fileName): lines = [line.rstrip('\n').split()[1:] for line in open(fileName) if len(line) > 0 and line[0].isdigit()] low = [int(l[1]) for l in lines] high = [int(h[0]) for h in lines] return (low, high) def producePlot(lowTemps, highTemps): diffTemps = list(...
true
045e3bfad5defb2a6f3d8ab261480752fbfcc5b2
Python
yudh1232/python-for-coding-test
/๊ธฐํƒ€-4 ์†Œ์ˆ˜ ๊ตฌํ•˜๊ธฐ.py
UTF-8
482
3.703125
4
[]
no_license
import math # m, n์„ ์ž…๋ ฅ๋ฐ›์Œ m, n = map(int, input().split()) # 1๋ถ€ํ„ฐ 1000000๊นŒ์ง€ ์†Œ์ˆ˜์ธ์ง€ ์•„๋‹Œ์ง€ ๋‚˜ํƒ€๋‚ด๋Š” ๋ฆฌ์ŠคํŠธ ์ƒ์„ฑ array = [True] * 1000001 # 1์€ ์†Œ์ˆ˜๊ฐ€ ์•„๋‹˜ array[1] = False # ์—๋ผํ† ์Šคํ…Œ๋„ค์Šค์˜ ์ฒด for i in range(2, int(math.sqrt(n)) + 1): if array[i] == True: j = 2 while i * j <= n: array[i * j] = False j ...
true
a03847675979f23d7da72f017359a170268092c8
Python
araymundo/Big-Data
/grafos1.py
UTF-8
1,201
3.34375
3
[]
no_license
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import networkx as nx def explore_graph(G): for nA, nbrs in G.adjacency_iter(): for nB, att in nbrs.items(): rel = att['label'] def draw_graph(G): plt.figure() pos=nx.spring_layout(G) # positions for all nodes # nodes nx.draw...
true
e36845fd97a40d7a07eefbe5fb57267ca8097f75
Python
anammora/Tesis
/CorreoE.py
UTF-8
596
3.03125
3
[]
no_license
import smtplib #definir mensaje def run(): message = 'Hola, necesito tu ayuda por favor' subject ='ROSA ELENA RINCON' message='Subject: {}\n\n{}'.format(subject,message) server=smtplib.SMTP('smtp.gmail.com',587)#Definir objeto smtp, servidor que usaremos y el puerto server.starttls()#indica...
true
a1fc0456bd3e61a95aa0d312ed4d06513278a043
Python
jpltechlimited/Edukatronic
/0007/game.py
UTF-8
2,150
2.890625
3
[]
no_license
import threading import chess import chess.engine import os class Game(threading.Thread): def __init__(self, client, game_id, **kwargs): super().__init__(**kwargs) self.game_id = game_id self.client = client self.stream = client.bots.stream_game_state(game_id) self.current_...
true
15c9bd162ce0063f1e16437a7c46cf8b4a9af3c4
Python
tedra-ai/virtual-counsellor
/app.py
UTF-8
4,326
2.84375
3
[ "Apache-2.0" ]
permissive
from flask import Flask, render_template, request import random import requests import numpy as np from dictionary import * from bs4 import BeautifulSoup from NeuralNetwork import _model, gradient_bias app = Flask(__name__) #search google for answers to suspected user enquiry def search_google(query): r...
true
71ba101ecf942c478a4ef7ed5672dc3ba459f908
Python
nikclayton/edabit-downloader
/main.py
UTF-8
11,851
2.84375
3
[ "BSD-3-Clause" ]
permissive
import click import json from pathlib import Path import tomd from slugify import slugify from pyjsparser import PyJsParser from tqdm import tqdm @click.command() @click.option('--json_dir', default='apify_storage/datasets/default', help='Path to read JSON files from', type=click.Path(exis...
true
2baac35b6267232b0ffe1bed1e79018ef73b9eaa
Python
AlexandraFil/Geekbrains_2.0
/python_alg/lesson_3/lesson_3_9.py
UTF-8
1,278
3.984375
4
[]
no_license
'''9. ะะฐะนั‚ะธ ะผะฐะบัะธะผะฐะปัŒะฝั‹ะน ัะปะตะผะตะฝั‚ ัั€ะตะดะธ ะผะธะฝะธะผะฐะปัŒะฝั‹ั… ัะปะตะผะตะฝั‚ะพะฒ ัั‚ะพะปะฑั†ะพะฒ ะผะฐั‚ั€ะธั†ั‹.''' import random lines = int(input("ะ’ะฒะตะดะธั‚ะต ะบะพะปะธั‡ะตัั‚ะฒะพ ัั‚ั€ะพะบ ะผะฐั‚ั€ะธั†ั‹: ")) columns = int(input("ะ’ะฒะตะดะธั‚ะต ะบะพะปะธั‡ะตัั‚ะฒะพ ัั‚ะพะปะฑั†ะพะฒ ะผะฐั‚ั€ะธั†ั‹: ")) matrix = [[random.randint(1, 10) for _ in range(columns)] for _ in range(lines)] for line in matrix: ...
true
bb45f6af71952a7d71bd36a6d8c8a42f93304e27
Python
TonyRoomZ/mtg_ssm
/tests/serialization/test_interface.py
UTF-8
1,400
2.515625
3
[ "MIT" ]
permissive
"""Tests for mtg_ssm.serialization.interface.py""" from unittest import mock import pytest from mtg_ssm.serialization import interface # Subclass registration tests def test_all_dialects(): all_formats = interface.SerializationDialect.dialects() assert sorted(all_formats) == [ ("csv", "csv", mock.A...
true
4c9905101c3f944780c8270869a7264d961915de
Python
urbanisaziya/Python
/week4/103.py
UTF-8
236
3.671875
4
[]
no_license
def IsPrime(n): min = 2 while min ** 2 <= n and n % min != 0: min += 1 if min > n ** (1 / 2): return True else: return False n = int(input()) if IsPrime(n): print('YES') else: print('NO')
true
09a44093a364e01e3bb479551e924276d7be978d
Python
kaylezy/Batch-Three
/Ilupeju/Python/pythagoras theorem calculator.py
UTF-8
1,220
4.0625
4
[]
no_license
""" Olanrewaju Ojebisi Ojebisicuit1@yahoo.com """ from math import sqrt print ('welcome to pythagoras theorem calculator! Calculate your triangle sides here!') formula = input('which side do you wish to calculate? side _ _ _ _') if formula == 'c': sidea = input('what is the length of side a?') sideb ...
true
535fc955eb0996317b68c0a4ef382ee7bb77d642
Python
manjushachava1/PythonEndeavors
/OddOrEven.py
UTF-8
691
4.90625
5
[]
no_license
# Program 2 # Check if user input is even or odd # Extras: # 1. Check if user input is a multiple of 4 # 2. Check if two user inputs are divisible by each other number = int(input("Enter any number: ")) if number % 2 == 0: print(str(number) + " is an even number!") # Extra 1 if number % 4 == 0: print(str(numb...
true
217baa457db1d139bafe1c721fa79fd41d7540e7
Python
AbhishekAnand2/GUI_PROGRAMMING_WITH_PYTHON
/tkinter_tut1.py
UTF-8
506
2.765625
3
[]
no_license
from tkinter import * # instance of the Tk class root = Tk() # this creates a basic gui or interface. In that basic gui we can add things # like Widgets (button, label etc) # gui logic here root.mainloop() # mainloop puts you in the GUI and helps in making GUI interactive and also remembers the gui logi...
true
26bbe62a69d5383ae64e64adaad80a8ee32a2a9f
Python
EricRops/human-chess-engine
/app/flask_app.py
UTF-8
2,479
2.703125
3
[]
no_license
from flask import Flask, render_template, session, request, redirect, url_for, flash from chess_engine import * from cassandra.cluster import Cluster from cassandra.auth import PlainTextAuthProvider import pandas as pd import sys cassandra_seeds = ['10.0.0.11', '10.0.0.10'] cluster = Cluster(contact_points=cassandra_s...
true
a9cc0f16683bd1960484aa3bf7bb25d64f39bca4
Python
dr-dos-ok/Code_Jam_Webscraper
/solutions_python/Problem_118/2200.py
UTF-8
602
3.0625
3
[]
no_license
R=5000 fas=set() for i in xrange(R): if str(i)==(str(i)[::-1]): sq = i**2 if sq < 10000001 and str(sq)==(str(sq)[::-1]): fas.add(sq) sq1 = sq**2 if sq1 < 1000001 and str(sq1)==(str(sq1)[::-1]): fas.add(sq1) sq2 = sq1**2 if sq2 < 1000001 and str(sq2)==(str(sq2)[::-1]): fas.add(sq2) sq...
true
e70c9ef50ac193e955c0256025609a1e33e2d74d
Python
M10309105/pythonProject
/lesson/5/5.6.py
UTF-8
1,061
3.921875
4
[]
no_license
#/usr/bin/python3 # #dict loop tips print("=" * 100) print("5.6 dict") print("=" * 100) #use items to get key and value d1 = {'key1':'value1', 'key2':'value2','key3':'value3'} for k,v in d1.items(): print("{} : {} , {}".format(k,v,d1[k])) #enumerate to get list index for i,v in enumerate([5,6,7,8,9]): print(...
true
22dff5a42da81e8939a5974cbcacac50df629a66
Python
kleopatra999/pynaubino
/src/naubino/flyby.py
UTF-8
2,425
2.625
3
[]
no_license
from naubino_base import Timer from utils import * from random import random import pymunk, Config, math class FlybyMode(object): def __init__(self, naubino): spammer_interval = Config.spammer_interval() self.spammer = Timer(spammer_interval, self.spam_naub_bun...
true
2cd69984cbb47dc7d211ae398536363addf286a7
Python
hnoskcaj/WOrk
/20.py
UTF-8
315
3.765625
4
[]
no_license
a = [] a +=[2] a.append(4) a.append(7) a.append(1) a.append(3) a += [2,1,2,3,4,5] print(a) a[4] = 7 print(a) #remove 1 through 4 form the list del a[1:5] print(a) print(a.pop(2)) a.remove(a[3]) print(a) print(a[-2]) #swap a = 1 b = 2 temp = a a = b b = temp #or a,b = 1,5 print(a,b) a,b = b,a print(a,b)
true
ac2d9c8065cfb7a16d012c307c37ed130722a417
Python
sp-niemand/timetable-optimization
/algorithm/dependency.py
UTF-8
1,765
3.390625
3
[]
no_license
""" ะœะพะดัƒะปัŒ, ะพั‚ะฒะตั‡ะฐัŽั‰ะธะน ะทะฐ ั€ะฐะฑะพั‚ัƒ ั ะณั€ะฐั„ะพะผ ะทะฐะฒะธัะธะผะพัั‚ะตะน """ import networkx as nx from itertools import groupby from classes.exception import BaseException as BException import random class NotDirectedAcyclicGraph(BException): pass def get_node_levels(graph): """ Returns the level of each node in graph ...
true
4524b44b5de7fcd8703f30da5342eddbf045cc7a
Python
relap/leetcode
/349-Intersection-of-Two-Arrays/solution.py
UTF-8
291
2.671875
3
[]
no_license
class Solution(object): def intersection(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ num_set1 = set(nums1) num_set2 = set(nums2) return list(num_set1 & num_set2)
true
712eb212ea4d6d5884403306c7468e700abe762f
Python
dr-dos-ok/Code_Jam_Webscraper
/solutions_python/Problem_59/293.py
UTF-8
603
3.15625
3
[]
no_license
#!/usr/bin/python from sys import stdin import string from sets import Set def p(s): x = [] x.append(s) while True: t = string.rsplit(s,'/',1) if(t[0] == ''): break x.append(t[0]) s = t[0] return x cases = int(stdin.readline()) for i in range(cases): a = Set() t = stdin.readline().rstrip().split() ...
true
e1e5112925cb08ca680fdc146975a585b50412ca
Python
HuichuanLI/alogritme-interview
/Chapter07_dynamicProgramming/ๅๆ ‡็ณป/lc354.py
UTF-8
493
2.734375
3
[]
no_license
class Solution: def maxEnvelopes(self, envelopes: List[List[int]]) -> int: envelopes.sort(key=lambda x: x[0]) res = [0] * len(envelopes) n = len(envelopes) if n == 0: return 0 res[0] = 1 for i in range(n): res[i] = 1 for j in range(...
true
0149d53477e96d281300aab192327dd6ac6b3d47
Python
Aasthaengg/IBMdataset
/Python_codes/p02583/s313485489.py
UTF-8
236
2.875
3
[]
no_license
from itertools import combinations as comb N = int(input()) L = list(map(int,input().split())) count = 0 for a, b, c in comb(L, 3): if a != b and b != c and c != a and a + b > c and b + c > a and c + a > b: count += 1 print(count)
true
6b838d82f34dc1ca930a78a95f9f7d2ff899888e
Python
vbardarova/nanodegree
/algorithms-second project/problem-2.py
UTF-8
1,326
3.703125
4
[]
no_license
import os def find_files(suffix, path): """ Find all files beneath path with file name suffix. Note that a path may contain further subdirectories and those subdirectories may also contain further subdirectories. There are no limit to the depth of the subdirectories can be. Args: suffi...
true
cccc79ae9991f06016a7d291c947a029db546e42
Python
gleb099/graph
/Graph/aniTest.py
UTF-8
1,524
2.828125
3
[]
no_license
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib import rcParams import seaborn as sns rcParams['animation.convert_path'] = r'/usr/bin/convert' plt.style.use('seaborn-pastel') fig, ax = plt.subplots() n = int(input('Enter N ')) m = int(input('Ent...
true
512003163fd298acf1253b75da8ff72d1cbd53a0
Python
FishSpeakerJ/xomazegame
/XoMaze/Scheduler.py
UTF-8
1,283
2.78125
3
[]
no_license
import time class Scheduler: def __init__( self, xoMaze ): self.xoMaze = xoMaze self.lastTime = time.time() self.intervals = [] self.doLaters = [] def doInterval( self, duration, func, waitBefore=0.0 ): self.intervals.append( (duration, func, duration, waitBefore) ) def doLater( self, wa...
true
e799436d7ed93eb4507f35eac9b3e23398b0c220
Python
arjo129/ros_build_assistant
/tests/cmake/test_unquoted_args.py
UTF-8
1,212
2.71875
3
[ "MIT" ]
permissive
from ros_build_assistant.parser.cmake.grammar import UnQuotedArgument, CombinatorState import unittest def parse_item(inp): ba = UnQuotedArgument() for x in inp: res, data = ba.next_char(x) return res,data class TestUnquotedArguments(unittest.TestCase): def test_unquoted_argument_default...
true
25bb78c0b86e450e08a884907a870cabedb885b9
Python
loichiilek/Dialogflow_Webhook
/test.py
UTF-8
612
3.0625
3
[]
no_license
import json def run_nlu(): a_dict = eval(open('keyword.txt', 'r').read()) while True: try: for key, value in a_dict.items(): print(str(key) + ": " + str(value)) key = input("Enter keyword: ") value = input("Enter definition: ") a_dict[...
true
0e9bf5ece094d584ab1de606ca22c629d125e8c2
Python
J0HN-1/injectable
/tests/test_autowired.py
UTF-8
6,065
2.75
3
[ "MIT" ]
permissive
from lazy_object_proxy import Proxy import pytest from injectable import autowired from injectable import lazy class DummyClass(object): def dummy_method(self): return 42 class NoDefaultConstructorClass(object): def __init__(self, something): pass def bar(*args, x: DummyClass = None, f: c...
true
a8fe7d7df11e32c68cf4f7e2ad51a75661527bd1
Python
johanngerberding/adventofcode2020
/advent_python/day10.py
UTF-8
2,415
3.28125
3
[]
no_license
from itertools import compress, product def combinations(items): return ( set(compress(items,mask)) for mask in product(*[[0,1]]*len(items)) ) test_list = [1,2,3,4,5] print(len(list(combinations(test_list)))) TEST = """16 10 15 5 1 11 7 19 6 12 4 """ TEST_2 = """28 33 18 42 31 14 46 20 48 47 24 23 49 45 19 38 ...
true
f29a04848fa1ed1ed76539c9e7bdc5121d3f411b
Python
vicaranq/CrackingTheCodingInterview
/Array&Strings/1-7_RotateMatrix.py
UTF-8
2,100
4.53125
5
[]
no_license
''' Question: Given an image represented by a NxN matrix, where each pixel in the image is represented by an integer, write a method to rotate the image by 90 degrees. Can you do this in place? Solution 1: We can rotate the matrix 90d egrees by first swaping all elements over the diagonal and then swap the outer colum...
true
7fb65e0edc5bdfc54e0a52544a6137b1bd47fdc7
Python
manuelcano10/prueba
/app.py
UTF-8
489
3.953125
4
[]
no_license
class Persona: #constructor de la clase #atributos name = [] lastname = [] #metodos def addPerson(self, name, lastname): self.name.append(name) self.lastname.append(lastname) def showPeople(self): for i in range(0,len(self.name)): print("name:" + str...
true
ad26c226f40fc95f5e2823a6dca28f41fc3cde6f
Python
rajasoun/nlp
/nlp_framework/tests/web/infer_tagging_integration_test.py
UTF-8
4,224
2.5625
3
[]
no_license
import json import os import os.path as os_path import shutil import unittest from tagger.config import load, config from tagger.core import LDATagger from tagger.service.contracts import DocumentsResponse from tests.web import StubHTTPServer from tornado.testing import AsyncHTTPTestCase from trinity import Logger fro...
true
abed32acbf17c26d570c253561fc06eabf0775d5
Python
VisionnRP/courseraDb
/python-mapreduce/join.py
UTF-8
466
2.515625
3
[]
no_license
import MapReduce import sys mr = MapReduce.MapReduce() def mapper(record): mr.emit_intermediate(record[1], record) def initReducer(list): for order_records in list: if order_records[0] == 'order': for lines in list: if lines[0] == 'line_item': mr.emit...
true
cb39e311e187054e48634a64b92753c6c91b7dfa
Python
BW1ll/PythonCrashCourse
/python_work/Chapter 3/3-6.py
UTF-8
1,296
3.078125
3
[]
no_license
dinner_guests = ['Coby Bryant', 'Micheal Jordon', 'Mark Hamil', 'Harrison Ford'] print(f"{dinner_guests[0]}, your are invited to dinner") print(f"{dinner_guests[1]}, your are invited to dinner") print(f"{dinner_guests[2]}, your are invited to dinner") print(f"{dinner_guests[3]}, your are invited to dinner") cann...
true
7b35597a7600a84dde5cb6fa0e32a1c8f5e05bd9
Python
jidaoshan/The-situation-i-experenced-in-learning-python
/6.25.py
UTF-8
900
3.9375
4
[]
no_license
#็ป™ๅ‡บไธคไธชๆ•ฐ๏ผŒๆฑ‚ๅ‡บไป–ไปฌๆ˜ฏๅ“ชไธคไธชๆ•ฐ็š„ๆœ€ๅคงๅ…ฌ็บฆๆ•ฐๅ’Œๆœ€ๅฐๅ…ฌๅ€ๆ•ฐ๏ผŒ็„ถๅŽ่พ“ๅ‡บใ€‚ #ๅฐ็š„ๅœจๅ‰๏ผŒ่‹ฅๆœ‰ๅคš็ป„่งฃ๏ผŒ่พ“ๅ‡บๅ’Œๆœ€ๅฐ็š„ๅ“ชไธ€็ป„ def fun(a,b): "้ฆ–ๅ…ˆๆ‰พๅ‡บๆ‰€ๆœ‰็ฌฆๅˆๆกไปถ็š„ๆ•ฐ" l = {} result = [] for i in range(1, b): for j in range(1, b): if (i % a == 0) and (j % a == 0) and (i * j / a == b): key = i value = j l[key] = valu...
true
681c4912da6d33480003305a509f18d6b6ab0631
Python
huanhuan311/chainer_spiral
/chainer_spiral/dataset/emnist_dataset.py
UTF-8
2,593
2.875
3
[]
no_license
import gzip import chainer import cv2 import numpy as np class EMnistDataset(chainer.dataset.DatasetMixin): """ EMNIST dataset. get_exmaple() returns a batch which has a converted emnist image as chainer.Variable whose value range is [0, 1] Args: imsize (int): Size of converted image to mak...
true
ab81b3b23b3eb8a914bd88b8cac074a4706541e8
Python
shiyybua/ChatBot
/LanguangeModel/mynltk/tri_gram.py
UTF-8
1,810
2.9375
3
[]
no_license
# -*- coding: utf-8 -*- ''' ่ฏญ่จ€ๆจกๅž‹tri-gram + kneser_ney smoothing model้‡Œๅญ˜ๅ‚จutf8ๆ ผๅผใ€‚ ''' import jieba import nltk import cPickle data_path = [r'E:\note.txt'] dict_bi_gram_saver = open('./tri_gram_model', 'w') freq_dist = nltk.FreqDist() def as_text(v): ''' ไธบไบ†่งฃๅ†ณไธญๆ–‡็ผ–็ ้—ฎ้ข˜ใ€‚ :param v: :return: ่ฟ”ๅ›ž็š„ๆ˜ฏunicod...
true
84b741f0139897888c0a187f2e9cd22ef7de52cb
Python
SooDevv/Algorithm_Training
/DataStructure/InsertionSort.py
UTF-8
463
3.546875
4
[]
no_license
# list ์˜ index 1 ๋ถ€ํ„ฐ ๋น„๊ต ์‹œ์ž‘ # ์ฐพ๋Š” ์œ„์น˜ idx # ์ฐพ์•„์•ผํ•  ๊ฐ’ tmp # ๋น„๊ตํ•ด์•ผ๋  ์œ„์น˜ i def insertionSort(arr): for idx in range(1, len(arr)): tmp = arr[idx] i = idx while i>0 and arr[i-1] > tmp: arr[i] = arr[i-1] i -= 1 arr[i] = tmp return arr if __name__ == '__main__': ...
true
0cc965e3153b59e37321e0100229acc20b102c14
Python
nnao01294/mitaka_test
/mitaka_csv.py
UTF-8
602
2.671875
3
[]
no_license
import csv with open('rent_converted.tsv',encoding = 'utf-8') as f: reader = csv.reader(f,delimiter='\t') next(reader) for row in reader: prefecture = ['13'] ward = ['204'] station = ['242','4987','4986'] roomtype = ['10','20','25','30'] if (row[9] in prefecture)and...
true
1a350df39fcd505c408dd56be237878c35d2270d
Python
jeffreyong/GA_files
/nltk_tutorial2b.py
UTF-8
3,086
2.609375
3
[]
no_license
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Apr 20 12:06:22 2017 @author: Work """ import nltk from nltk.book import * from __future__ import print_function from __future__ import division def unusual_words(text): text_vocab = set(w.lower() for w in text if w.isalpha()) english_vocab = ...
true
b567c7a61014130760dc39cfeb6481ddae05e496
Python
marve/monikers
/src/keycard_validator.py
UTF-8
362
2.6875
3
[ "MIT" ]
permissive
from keycard_generator import BlueKeyGrid, RedKeyGrid, Tile, TileType, load_keygrid import functools def add_type_to_dict(type_dict, grid_type): type_dict[grid_type] += 1 return type_dict types = ['b' if type(load_keygrid(idx)) is BlueKeyGrid else 'r' for idx in range(40)] result = functools.reduce(add_type_to_di...
true
d50e5ea10255a11bb0711e03320c49734dc06da0
Python
saurontl/prog1ads
/ex02/ex0201.py
UTF-8
515
4.125
4
[]
no_license
#Josรฉ Everton da Silva Filho #AdS - P1 - Unifip - Patos/PB ##### #1. Faรงa um programa que solicite ao usuรกrio o valor do litro de combustรญvel (ex. 4,75) e quanto em dinheiro ele deseja # abastecer (ex. 50,00). Calcule quantos litros de combustรญvel o usuรกrio obterรก com esses valores. combustivel = float(input("Digite o...
true
a202f01249cb1038555b64bbb84d88d82e5a268d
Python
marquesarthur/programming_problems
/interviewbit/interviewbit/arrays/max_unsortted_sub_array.py
UTF-8
1,363
3.328125
3
[]
no_license
class Solution: # @param A : list of integers # @return a list of integers def subUnsort(self, A): if not A: return [-1] if len(A) == 1: return [-1] _sorted = True for i in range(1, len(A)): if A[i - 1] > A[i]: _sorted = F...
true
62d488e956aeadf3418d5e90d7c375abcd1e69ad
Python
cypreess/PyrateDice
/game_server/game_server/board/tests.py
UTF-8
775
2.984375
3
[ "MIT" ]
permissive
from django.test import TestCase # Create your tests here. from board.tasks import GameError, check_move class CheckMoveTestCase(TestCase): def test_check_move_1(self): self.assertRaises(GameError, check_move, 0, 0, [], 3) def test_check_move_2(self): self.assertRaises(GameError, check_move,...
true
3e4bf6d791b0ae9e223c23c04ce3f786ffb83042
Python
meghoshpritam/univ-sem2
/other/compare.py
UTF-8
982
2.953125
3
[]
no_license
import time from fp_growth import construct_tree, get_from_file from fp_tree import create_tree, get_from_file as get_from_file2 def fp_tree1(file_name, min_sup_ratio): item_set_list, frequency = get_from_file(file_name) min_sup = len(item_set_list) * min_sup_ratio fp_tree, _ = construct_tree(item_set_lis...
true
b91756bf6494fd5fc6005c0fcb84b9cc2593c163
Python
vladimir-grigoriev/onliner_test_allure
/pages/base_page.py
UTF-8
1,393
2.90625
3
[]
no_license
import time from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait class BasePage: def __init__(self, driver) -> None: self.driver = driver self.base_url = 'https://www.onliner.by/' def go_to_site(self): self.dri...
true
5e0a8d7e4f541f5420a82dba2c22d6501d907b7b
Python
JiliangLi/HW
/grades.py
UTF-8
994
4.53125
5
[]
no_license
#sep 16, 2018 #a program that accepts from the command line one and only one argument, a float between 0 and 5. #if the number is not in the range, the program tells the user that a number between 0 and 5 is expectd, and quits. #if the number the user enters is good, the program determines his/her grade in the class....
true
f90d11b5082e609cebbf25cda90c62ba0812b9a1
Python
Glovacky/test
/test.py
UTF-8
1,241
2.734375
3
[]
no_license
import subprocess import datetime numerals = open("roman","r") count = 0 report = open("report "+str(datetime.datetime.now()),"a") err_dec=[] err_oct=[] err_hex=[] for line in numerals: s = line.split("=") number = s[0] expected = s[1] octal = str(oct(int(s[0]))) octal = '0x'+octal[2:] h...
true
08d35b21181503003f2265052b6f3175dac65e25
Python
jh1777/mysql-api
/backend/base.py
UTF-8
3,210
2.515625
3
[]
no_license
import pymysql from pymysql import Connection import pymysql.cursors import connexion import pendulum import json from .endpoint import ApiEndpoint now = pendulum.now("Europe/Paris") app = connexion.App(__name__) app.app.config.from_object("config.DevelopmentConfig") def copyToMongo(items, apiType: ApiEndpoint): ...
true
e6cd89930e6036b9c693533ce2e9a0f46997c8e2
Python
careeria-sonckju/IoT-ratkaisuja
/PointCollegeSensorControl/Python/ProsessiEsimerkki0-pid.py
UTF-8
476
3
3
[]
no_license
import multiprocessing import time import os #pid:iรค varten! #tring formatting = https://www.learnpython.org/en/String_Formatting def ProsessiFunktio(num): print ('Kรคynnistetรครคn prosessi numero =', num) print ('Isรคntรคprosessin pid=%d ja aliprosessin pid=%d ' % (os.getppid(), os.getpid())) return if __name_...
true
2ffb9e9a1829edcd47767712f28e583a1eecfede
Python
ErikSolveson/python-practice
/Hang_man.py
UTF-8
1,551
3.71875
4
[]
no_license
import random def open_file(file): words = [] with open(file, 'r') as f: line = f.readline() while line: line.strip() words.append(line) line = f.readline() return words # returns a list of all the words in the file def pick_random(words): rand_in...
true
e05fb8890f4c43ead5e9ed9bce252298002b256b
Python
Kristianuruplarsen/tikzinpy
/tikzinpy/pgfplots/axisoptions.py
UTF-8
457
2.6875
3
[]
no_license
from ..tikzelement import pgfAxisOptionElement class Label(pgfAxisOptionElement): def __init__(self, label, variable): self.label = label self.var = variable @property def content(self): return f"{self.var}label={self.label}" class xlabel(Label): def __init__(self, label): ...
true
ebaf03939ac21831b4b7cffcc607b525eb8c905b
Python
RLejolivet/Larbot
/Larbot/self_module/message_queue.py
UTF-8
1,014
3.421875
3
[ "MIT" ]
permissive
""" Created on 2015-03-15 @author: Raphael """ import time import threading nb_of_messages = 0 nb_of_messages_lock = threading.Lock() def create_msg(channel, message): return "PRIVMSG #" + channel + " :" + message + "\r\n" def send_msg(socket, string_message): global nb_of_messages global nb_of_mess...
true
d9d6813155db3c1419ad3107c5e791e880708124
Python
jmurrayufo/InvoiceCLI
/code/Item.py
UTF-8
3,810
2.984375
3
[]
no_license
import uuid from . import SQL from .Helpers import prompt_text, prompt_float class Item: db = None def __init__(self,**kwargs): """ Keyword Arguments: name -- Simple name of item description -- Long description, and more details, of item amount -- C...
true
b347effc70fdaae4f4521b999096db0b4516c1f6
Python
dar-kin/hyperskill-simplebankingsystem
/Problems/Create/task.py
UTF-8
140
2.640625
3
[]
no_license
# create a dict here # and print it flowers = dict({"Alex": "field flowers"}, Kate="daffodil", Eva="artichoke flower", Daniel="tulip") print(flowers)
true
999ec5ed33e513a768db835a319351dc21b40ed2
Python
tberhanu/all_trainings
/10_training/heapq_merge.py
UTF-8
620
3.625
4
[]
no_license
import heapq def ordered_merge(lists): i = 1 lst = lists[0] while i < len(lists): lst = list(heapq.merge(lst, lists[i])) i += 1 return lst def flatten(lsts): from collections.abc import Iterable for lst in lsts: if isinstance(lst, Iterable): yield from fla...
true
23d844505a9e5f7ec1e592ef6f9c89516a5aad0f
Python
joaovillas/learningPython
/WebCrawler Kabum/Kabum.py
UTF-8
1,557
2.890625
3
[]
no_license
from bs4 import BeautifulSoup as soup from urllib.request import urlopen as uReq import xlwt my_url =input('URL:') my_url = my_url.replace(' ','')+'?ordem=5&limite=100&pagina=1&string=' file_name = input('File Name:') file_name = file_name.replace(' ','_')+'.csv' uClient = uReq(my_url) page_html = uClient.read() uCl...
true
4ac2713f8e270a2b2cedac49650ef166d5f83536
Python
saheedcp/Health_indicator
/clita_legacy/dataconnector/dbConnector.py
UTF-8
505
2.546875
3
[]
no_license
import mongoConnector #TODO: We should not expose MongoConnector object class dbConnector: db = None def setDatabaseClient(self, dbconfig=None): self.db = mongoConnector.MongoConnector() print "dbconfig", dbconfig['dbname'] if dbconfig is not None: self.db.setDatabase(dbconfig['dbname']) def getDatabaseC...
true
a07a498572bae864da787cecf012a3f4a439d5ab
Python
ccruz182/Python
/advanced_features/keywords_args.py
UTF-8
176
2.796875
3
[]
no_license
def critical_function(arg1, arg2, *, supressExceptions=False): pass def main(): critical_function(1, 5, supressExceptions=True) if __name__ == "__main__": main()
true
f0c97792215b7a32cb3a36dab3523020b9aa1b9f
Python
dchege711/Gateways_and_Sensors
/TriggerLambda.py
UTF-8
2,272
2.8125
3
[]
no_license
''' Checks whether the Gateways have finished their transmission. This is because computational latency may not match transmission latency. This scripts updates a DynamoDB table that triggers AWS Lambda @ Original Author : Edward Chang @ Modified by : Chege Gitau ''' #______________________________...
true
c1b5fe47b5585d81f23d8861745a75c813c20206
Python
OlehKSS/IMMAS
/immas/features/intensity.py
UTF-8
7,720
2.984375
3
[]
no_license
import cv2 import numpy as np from math import pi, sqrt from skimage import feature import scipy def get_itensity_features(img, contour): ''' Returns intensity features of the given contour (except NCPS -> geometric). Available features now are mean intensity, standard deviation, smoothness and skewne...
true
9615ab8c70205c3e3231378bd9c2500e755d48c0
Python
jjyock/home-credit-default-risk
/feature_explore.py
UTF-8
562
2.78125
3
[]
no_license
import pandas as pd import numpy as np import matplotlib.pyplot as plt class feature_explore: def __init__(self,label_col): self.data = self.get_data() self.data_p=self.data[self.data[label_col]==1] self.data_n=self.data[self.data[label_col]==0] def get_data(self): data = pd.read...
true
c80f3297ca5f0246c0f1d791a00ebf0f3f1ebf59
Python
erconui/mass
/vmtt-interface.py
UTF-8
1,284
2.578125
3
[]
no_license
#/usr/bin/python3 import numpy as np def cam2Inertial(P_b_i_i, P_c_b_b, R_b_c, R_b_i, epsilon): P_c_b_i = R_b_i@P_c_b_b P_c_i_i = P_c_b_i + P_b_i_i R_c_b = R_b_c.T R_c_i = R_b_i@R_c_b z_c = P_c_i_i[2] / (R_c_i@epsilon)[2] # print(z_c) P_t_c_i = -1*z_c * R_c_i@epsilon # print(P_t_c_i) ...
true
e8aea9034c130ab57c0a27160b0e0bc1de4a302a
Python
clicianaldoni/aprimeronpython
/chapter3/3.5-object_cml.py
UTF-8
832
4.6875
5
[]
no_license
""" Exercise 3.5. Read input from the command line. Let a program store the result of applying the eval function to the first command-line argument. Print out the resulting object and its type (use type from Chapter 1.5.2). Run the program with different input: an integer, a real number, a list, and a tuple. Then try t...
true
5e8ead56296d749b60e3ef265bd5f2ccc638d020
Python
aditinabar/SCD2015
/Eulerstep.py
UTF-8
5,444
3.234375
3
[]
no_license
from __future__ import division __author__ = 'naditi' #import packages import math import numpy as np import matplotlib.pyplot as plt # Collection of equations to test the functions below def f_1(x, y): return 7*y**2*x**3 def f_2(x, y): return math.cos(x) + math.sin(y) ## oregonator differential equatio...
true
4135362269c8b9fff5c6fa6b09dbc4a39e847225
Python
ywcmaike/OJ_Implement_Python
/leetcode/64_Minimum_Path_Sum.py
UTF-8
1,002
3.71875
4
[]
no_license
# author: weicai ye # email: yeweicai@zju.edu.cn # datetime: 2020/7/10 ไธ‹ๅˆ9:49 # Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. # # Note: You can only move either down or right at any point in time. # # Example: # ...
true
7487343910679327249287040faa936e69c7ee40
Python
q398211420/LaGouJobSpider
/LaGouJob/items.py
UTF-8
2,355
2.515625
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy from scrapy.loader import ItemLoader from scrapy.loader.processors import TakeFirst, MapCompose import re from w3lib.html import remove_tags # ่ฟ™ไธชๆจกๅ—ไธ“้—จ็”จๆฅๅŽป...
true
fb4f03485bbabe3407689b5ce0b9782831c5cb10
Python
ashlives/pythonproj
/src/firsttest.py
UTF-8
278
3.890625
4
[]
no_license
print ("Hello world") myint = 7 print(myint) one = 1 two = 2 three = one + two print(three) string = "hello" strin2 = "world" helloworld = string + " " +strin2 print(helloworld) list = [1,2,3,4,5,6] print(list[2]) for x in list: print(x) number = 1+2*3/4 print(number)
true
c9d8fe93b25feb824eae618935e2069ab96e63fa
Python
mod-isaac/baytSkills
/baytSkills/nlp/datacleaining.py
UTF-8
1,458
3.1875
3
[]
no_license
def termStemmer(term): from nltk.stem import PorterStemmer ps = PorterStemmer() return (ps.stem(term)) def removeSymboles(term): import re return (re.sub('\W+', ' ', term)) def isStopWord(term): from nltk.corpus import stopwords stopWord = False if term in stopwords.words('english'): ...
true
c93a4a69aa7904c1109124ad9d0467ebe2166e30
Python
jingmouren/etna-ts
/etna/clustering/base.py
UTF-8
686
2.703125
3
[ "Apache-2.0", "MIT" ]
permissive
from abc import ABC from abc import abstractmethod from typing import Dict import pandas as pd from etna.core import BaseMixin class Clustering(ABC, BaseMixin): """Base class for ETNA clustering algorithms.""" @abstractmethod def fit_predict(self) -> Dict[str, int]: """Fit clustering algo and p...
true
2aa66a5e7af5bbeb90a9ab80dcbc94fab5d0d0e4
Python
hksix/DigitalCrafts---Projects-Python
/Python Week2/testcode.py
UTF-8
1,190
3.828125
4
[]
no_license
# testlist = [] # testlist.append(raw_input("add ")) # print testlist # testlist.append(raw_input("add ")) # print testlist # testlist.append(raw_input("add ")) # print testlist # testlist.append(raw_input("add ")) # print testlist #notes # objects are "." things (.index .items .readlines .update) # class Person(ob...
true
d8d6a48b89d77376f54bf0c5af52adb809a5a30a
Python
jyori112/pytorch-word2vec
/data.py
UTF-8
3,642
2.59375
3
[ "MIT" ]
permissive
import numpy as np from collections import Counter import torch import torch.nn as nn import torch.nn.functional as F import logging, sys logger = logging.getLogger(__name__) logger.setLevel(10) ch = logging.StreamHandler(sys.stdout) ch.setFormatter(logging.Formatter("[%(asctime)s] %(levelname)s - %(message)s")) logge...
true
f4570cd169ecd442fd5b5d7fc5f97b2c9430ae11
Python
noararazzak/machinelearning
/Basic_Algorithms_Experiments/Classification_SVM_Experiment_1.py
UTF-8
4,706
2.859375
3
[]
no_license
import numpy as np import matplotlib.pyplot as plot import matplotlib.style as style from numpy.core.multiarray import ndarray from typing import Dict style.use('ggplot') data_dictionary: Dict[int, ndarray] = {-1: np.array([[1, 18], [2, 12], [3, 15], [4, 19]]), 1: np.array([[5,...
true
c28b1312d4f604f2ecbe513bc67774d35177153c
Python
mehra-deepak/Whats-That-Pet-
/source_code.py
UTF-8
1,915
3.015625
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Mar 19 16:44:11 2019 @author: Lenovo """ #importing the modules from keras.models import Sequential from keras.layers import Conv2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layers import Dense #initialising the neural network clas...
true
829154065f4cb4dd06ad673c9c41d21dc1ab8305
Python
hellokena/Programmers
/์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต/์™„์ „ํƒ์ƒ‰/PGR#Lv1_๋ชจ์˜๊ณ ์‚ฌ.py
UTF-8
598
3.0625
3
[]
no_license
def solution(answers): answer = [] score1 = 0 score2 = 0 score3 = 0 std1 = [1,2,3,4,5] std2 = [2,1,2,3,2,4,2,5] std3 = [3,3,1,1,2,2,4,4,5,5] for i in range(len(answers)): if std1[i%len(std1)] == answers[i]: score1 += 1 if std2[i%len(std2)] == a...
true
d41fc06f8e19d43a30f58e316e5aa6d62ca0f80f
Python
iresbaylor/codeDuplicationParser
/test/repos/chlorine/single/simple_test_3/source/main.py
UTF-8
104
2.828125
3
[ "MIT" ]
permissive
def up(): i = 10 for j in range(0, i): for k in range(0, j): print(i, j, k)
true
9312790f9d55bd72fe9ff73831945a74f231a275
Python
VictorTirado/Project1
/main.py
UTF-8
3,006
3.078125
3
[]
no_license
import numpy as np import cv2 def matchingimage(input_img, target, threshold): inputrows, inputcols = input_img.shape targetrows, targetcols = target.shape img_founded = False # Crear matching image matchingrows = inputrows - targetrows + 1 matchingcols = inputcols - targetcols + 1 matchi...
true
647bdc0b4bc95a2883945e225e14617782744872
Python
HBinhCT/Q-project
/hackerearth/Algorithms/Dhoom 4/solution.py
UTF-8
918
3.28125
3
[ "MIT" ]
permissive
""" # Sample code to perform I/O: name = input() # Reading input from STDIN print('Hi, %s.' % name) # Writing output to STDOUT # Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail """ # Write your code here from collections import deque, defaultdict ...
true
596bc8a644c773688891e3f6668704d6ad184d2c
Python
bilegole/FaceRecognition
/pytorch/common/Loss.py
UTF-8
4,165
2.53125
3
[]
no_license
import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transform import os import sys import pytorch.common.utils from pytorch.common.utils import build_targets Anchors = ( (10, 13), (16, 30), (33, 23), (30, 61), (62, 45), (59, 119), (116, ...
true
aa47f552d3d9b80fb4b18a031195a8e5c0da89c4
Python
davidmp/FundamentosProg2020II
/EstRepetitivas/EjerciciosP2.py
UTF-8
553
2.96875
3
[]
no_license
def sumaNumerosParesEntre2RangoN(): a=int(input("Ingrese el Primer Numero:")) b=int(input("Ingrese el Segundo Numero:")) contadorNumMenor=0 sumaPares=0 numMayor=0 if(a<b): contadorNumMenor=a numMayor=b else: contadorNumMenor=b numMayor=a while(contadorNumMen...
true
9961a38d72fd658a010820055060f49bdb9dee1d
Python
Catsuko/ConnectFour
/strategies/somewhat_beatable.py
UTF-8
996
2.8125
3
[]
no_license
from core.strategy import Strategy class SomewhatBeatable(Strategy): blocked = [0] * 7 priority = [2,3,6,1,4,5,0] c = 0 def place_token(self, token, board): #new game if board[-1].count(0) > 5 and board[-2].count(0) == 7: self.blocked = [0] * 7 self.fence=0 ...
true
19d1429f0f668265f2145f2f9b8e1697d04ed83d
Python
powerlanguage/flasktaskr
/project/users/forms.py
UTF-8
1,104
2.71875
3
[]
no_license
"""User blueprint forms.""" from flask_wtf import Form from wtforms import( StringField, PasswordField, ) from wtforms.validators import( InputRequired, Length, EqualTo ) class RegisterForm(Form): """User Registration.""" name = StringField( 'Username', validators=[ ...
true
9cabb23e4d424becf91889f8710261679d03769b
Python
jannelouisea/plm18
/src/python/machines/machine.py
UTF-8
2,192
2.875
3
[ "BSD-2-Clause" ]
permissive
# vim: set filetype=python ts=2 sw=2 sts=2 expandtab: import sys sys.dont_write_bytecode = True from lib import shuffle,Pretty,o,rseed,between # alt form: # from lib import * # ---------------------------------------------- def transistion(here,gaurd,there): "No methods inside T. just use 'o'" return o(here...
true
64fbd00eb8ca6623c0189682c2eee2d9f2e28874
Python
sschaefervmw/vshieldSyslog
/SyslogIP.py
UTF-8
3,369
2.59375
3
[ "Unlicense" ]
permissive
# coding=utf-8 import requests import getpass from requests.auth import HTTPBasicAuth import xml.etree.ElementTree as ET API_URL = "Place vCD URL Here" #Cloud API URL ending in /api/ EDGE_NAME = 'Place Edge Name Here' #Edge Gateway Name SYSLOG_IP = 'Place Syslog IP Here' #IP of syslog server USERNAME = 'Place Usernam...
true
2d2686f18a26aec982e7288469ae93e38b2a84d3
Python
fair77637/DC-Project-Master
/find_eyes_reshape.py
UTF-8
12,622
2.640625
3
[]
no_license
import numpy as np import script import matplotlib.pyplot as plt import cv2 import cv2.cv as cv import matplotlib.image def single_slice(axis_no, thresholded_np, slice_no): if axis_no == 0: matplotlib.image.imsave('img.png', thresholded_np[slice_no,:,:]) elif axis_no == 1: matplotlib.image.ims...
true
d4e5494c8230c1ac88f8ab9caa25403adf3e01f2
Python
bogdanpetcu/tag_cloud_backend
/tag_cloud.py
UTF-8
4,226
2.890625
3
[]
no_license
import tweepy import json import Queue import time import sys import string import redis from threading import Thread import setup #Used for parsing tweets stored in a given queue. class Parser(Thread) : def __init__(self, q, startT, runT, limSize=False, maxSize=0, clrDB=True) : Thread.__init__(self) self.limited...
true
8be2ef1fae8bebc3e0494e1b5faa674672d80c7e
Python
anand7071/python_tkinter_practise-
/tk_event.py
UTF-8
320
2.890625
3
[]
no_license
from tkinter import * root= Tk() def anand(event): print(f"you clicked on the button at {event.x},{event.y} ") m=200 t=300 root.geometry(f"{m}x{t}") root.title("my event") Widget = Button(root, text= "clck now") Widget.pack() Widget.bind('<Button-1>',anand) Widget.bind('<Double-1>',quit) root.mainloop()
true
c5e77265c4e6148502e1ddce951aa9e95ac0694f
Python
dmitry-r/binance-lob-recorder
/recorder/depth_cache.py
UTF-8
9,634
2.71875
3
[]
no_license
import asyncio import time from datetime import datetime from operator import itemgetter from typing import Callable, Dict, List, Union, Optional, Any import pandas as pd from binance.client_async import AsyncClient from binance.websockets_async import BinanceSocketManager from loguru import logger class DepthCache(...
true
c8633fc07af5af7d4aaa37bf310bc00da93b2a41
Python
jay-95/SW-Academy-Intermediate
/2์ผ์ฐจ/์‚ผ์„ฑ sw test 7 ์ด์ง„ํƒ์ƒ‰(๋‚ด ์ •๋‹ต).py
UTF-8
873
3.390625
3
[]
no_license
def binary_search(low, high, key, counter=0): #์ง„์งœ ์ •๋‹ต ์ƒ๊ฐ if low>high: return False else: middle = (low + high)//2 if key == middle: print(counter) return counter elif key < middle: counter += 1 return bin...
true
05fbc6cbfc21dd20c1665416536acfc732a57194
Python
GustavoHMFonseca/Desenvolimento-Web-full-Stack-com-Python-e-Django---Python-Orientado-a-Objetos
/tratamento_excecoes.py
UTF-8
422
3.203125
3
[]
no_license
lista = ['teste','teste2'] dicionario= {'nome': 'Rafaela'} try: # tentar print(lista[2]) # print(dicionario['teste']) except (IndexError, KeyError) as erro: # exceto print('Item selecionado fora da lista') except Exception as erro: # exceto print(f'Exception: {erro}') else: print('Executado com ...
true
ecb4b89ac693503b70520a286de263304ffaa203
Python
woocashh/Final-Exams-High-School-Matura
/2017/6_3.py
UTF-8
2,135
2.75
3
[]
no_license
f=open("/Users/Looky/Desktop/Dane_PR2/przyklad.txt","r") # Count cotrasitng pixels listy=[] for line in f: listy.append(line.split(" ")) for i in range(200): listy[i][319]= listy[i][319][0:-1] counter =0 for j in range(200): for k in range(320): if k==0 and j!=0 and j!=199: ...
true
e6e920eef2cea563d0bd96fd5a620c3b66b49b5c
Python
vyasakhilesh/file_parsers
/meta_map/cui_label_semantic_type.py
UTF-8
5,121
2.6875
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 import pandas as pd import json import os import multiprocessing as mp import time import argparse from collections import OrderedDict import re import string pattern_list = ["\s\s\sConcept Id:\s", "\sMap Score:\s", "\s\s\sScore:\s", "\s\s\sSemantic Types:\s"] # pattern_list =...
true