seq_id stringlengths 4 11 | text stringlengths 113 2.92M | repo_name stringlengths 4 125 โ | sub_path stringlengths 3 214 | file_name stringlengths 3 160 | file_ext stringclasses 18
values | file_size_in_byte int64 113 2.92M | program_lang stringclasses 1
value | lang stringclasses 93
values | doc_type stringclasses 1
value | stars int64 0 179k โ | dataset stringclasses 3
values | pt stringclasses 78
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
71943943336 | # coding=utf-8
'''
this file shows transfer file through 3 machine.
A->B->C
B is our python script machine
'''
import os
import subprocess
from contextlib import contextmanager
def io_hash_fullpath(filename):
pass
def solution1():
'''
ไธไธช็คบ่ A B C ้ฝๆฏ linux ๆบๅจ
'''
scp_path_a = 'user@ip:/path'
... | fooofei/python.pieces | ssh_file_transfer.py | ssh_file_transfer.py | py | 5,455 | python | en | code | 1 | github-code | 90 |
5813641124 | num_hrs = input('Enter Hours: ')
num_rate = input('Enter Rate: ')
try:
hrs = float(num_hrs)
rate = float(num_rate)
except:
print(input('\nError, Please enter numeric input'))
quit() #to stop running another lines
bill = hrs*rate
print('Pay: ',bill)
input('Press ENTER to exit >>')
| bicc99/python_for_everybody_exercises | Exercise3.2 - try and except.py | Exercise3.2 - try and except.py | py | 314 | python | en | code | 0 | github-code | 90 |
72211435818 | # ๊ฐ์ฅ ๊ธด ์ฆ๊ฐํ๋ ๋ถ๋ถ ์์ด์ ์๊ฐ ๋ณต์ก๋๋ฅผ O(NlogN)์ผ๋ก ๋ง๋ค ์ ์๋ ์์ด๋์ด๋ ์๋์ ๊ฐ๋ค.
# ๋จผ์ ๋ถ๋ถ์์ด์ด ๋ค์ด๊ฐ ๋ฆฌ์คํธ๋ฅผ ํ๋ ์์ฑํ๋ค. ์ด ๋ฆฌ์คํธ์๋ ์ค๋ฆ์ฐจ์ ์์ผ๋ก ์
๋ ฅ๋ ์์ด์ ์์๊ฐ ๋ค์ด๊ฐ๋ค.
# ์
๋ ฅ๋ ์์ด์ ์์์๋ถํฐ ํ๋์ฉ ํ์ํ๊ณ , ํ์ฌ ์๊ฐ ๋ถ๋ถ์์ด์ ์ต๋๊ฐ๋ณด๋ค ํฌ๋ค๋ฉด ๋ถ๋ถ์์ด์ ๋งจ ๋์ ์ถ๊ฐํ๋ค.
# ํ์ฌ ์๊ฐ ๋ถ๋ถ์์ด์ ๋งจ ๋ ์๋ณด๋ค ์๋ค๋ฉด, ์ด์ง ํ์์ ํตํด ์ค๋ฆ์ฐจ์์ผ๋ก ๋ค์ด๊ฐ ์ ์๋ ์์น๋ฅผ ์ฐพ๊ณ ๊ทธ ์์น๊ฐ์ ๋์ ํ๋ค.
# ๋ถ๋ถ์์ด์ ์ค๋ฅธ์ชฝ ๋ ์ต๋๊ฐ๋ณด๋ค ์์ ์๋ฅผ ์ค๋ฆ์ฐจ์์ผ๋ก ๋ค์ด๊ฐ ๋ถ๋ถ์ ๋ฎ์ด์์์ผ๋ก์จ
# ๋ถ๋ถ... | khyup0629/Algorithm | ์ด์ง ํ์ (Binary search)/๊ฐ์ฅ ๊ธด ์ฆ๊ฐํ๋ ๋ถ๋ถ ์์ด 2.py | ๊ฐ์ฅ ๊ธด ์ฆ๊ฐํ๋ ๋ถ๋ถ ์์ด 2.py | py | 3,538 | python | ko | code | 3 | github-code | 90 |
2642478132 | import logging
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
import telegram
from telegram import InlineKeyboardButton, InlineKeyboardMarkup
import settings
from collections import defaultdict
from win_unicode_console import enable
enable()
dict_calc = defaultdict(str)
logging.basicConf... | farstas/Les1_Reposit | bot.py | bot.py | py | 4,082 | python | ru | code | 0 | github-code | 90 |
18502712909 | import sys
def input(): return sys.stdin.readline().rstrip()
def solve(l, m):
if l < m:
return l * 2 + m
else:
return l + m * 2
def main():
N, K = map(int, input().split())
x = tuple(map(int, input().split()))
right_x = [i for i in x if i >= 0][:K]
left_x = [-i for i in x if i ... | Aasthaengg/IBMdataset | Python_codes/p03274/s377118514.py | s377118514.py | py | 784 | python | en | code | 0 | github-code | 90 |
43416801419 | from argparse import ArgumentParser
import logging
import regex
import sys
try:
from .utils import setup_logging
except ImportError:
from utils import setup_logging
# Detect escaped characters
# allow one of the brackets missing
escaped_re = regex.compile(r"\[?\[[abcdef\d]+\]\]|\[\[[abcdef\d]+\]\]?")
def u... | ZJaume/escape-unk | src/escape_unk/unescape_unk.py | unescape_unk.py | py | 1,730 | python | en | code | 0 | github-code | 90 |
13563098038 | import streamlit as st
import pickle as pk
import pandas as pd
import requests
movie_list=pk.load(open("moviesdata.pkl","rb"))
movies=pd.DataFrame(movie_list)
simularity=pk.load(open("simularity.pkl","rb"))
simularitydf=pd.DataFrame(simularity)
st.header("Movie recommender")
movie=st.selectbox(label="Cho... | saitej-a/Movie-recommender | app.py | app.py | py | 1,909 | python | en | code | 0 | github-code | 90 |
18162137389 | import networkx as nx
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
G = nx.Graph()
n, m = map(int, readline().split())
if m == 0:
print(1)
sys.exit()
for i in range(m):
a, b = map(int, readline().split())
G.add_edge(a, b)
largest_... | Aasthaengg/IBMdataset | Python_codes/p02573/s330090347.py | s330090347.py | py | 390 | python | en | code | 0 | github-code | 90 |
19719870506 | import pygame
from constants import SQUARE_SIZE, STATUS_BAR_HEIGHT, STATUS_COLOR, WIDTH, HEIGHT, ROWS, COLS
from board import Board
from network import Network
from sys import argv
from time import sleep
def clicked_pos(position):
return int(position[0]/(WIDTH/ROWS)), int(position[1]/(HEIGHT/COLS))
def flip_coord... | AdithiKashain/Checkers-Game | client.py | client.py | py | 10,327 | python | en | code | 1 | github-code | 90 |
18040821079 | from sys import stdin
def main():
#ๅ
ฅๅ
readline=stdin.readline
a,b,x=map(int,readline().split())
if a==0:
print(b//x+1)
else:
print(b//x-(a-1)//x)
if __name__=="__main__":
main() | Aasthaengg/IBMdataset | Python_codes/p03861/s140063147.py | s140063147.py | py | 223 | python | en | code | 0 | github-code | 90 |
21490641087 | #!/usr/bin/env python3
import sys
import random
import sh
from visidata import *
from .git import *
from .merge import GitMerge
from .blame import GitBlame
from .diff import DifferSheet
__version__ = 'saul.pw/vgit v0.3pre'
option('vgit_show_ignored', False, '')
GitSheet.addCommand('x', 'git-exec', 'i = input("git ... | shalevy1/visidata | plugins/vgit/vgit.py | vgit.py | py | 18,112 | python | en | code | null | github-code | 90 |
18032135069 | import sys
def input(): return sys.stdin.readline().strip()
def resolve():
s1, s2, t1, t2 = map(int, input().split())
l = []
x = t1 - s1
y = t2 - s2
ans='R'*x+'U'*y+'L'*x+'D'*y
ans+='D'+'R'*(x+1)+'U'*(y+1)+'L'
ans+='U'+'L'*(x+1)+'D'*(y+1)+'R'
print(ans)
resolve() | Aasthaengg/IBMdataset | Python_codes/p03836/s357785816.py | s357785816.py | py | 299 | python | en | code | 0 | github-code | 90 |
35577633013 | #This code imports the necessary modules.
import random
import os
from PIL import Image, ImageOps, ExifTags, ImageFile
import time
import playsound
from RandFunct import random_number
from RandFunct2 import random_number2
snglst = ["F:\\OriginalAudio\\Songs\\SongsC\\Bonegenb\\BoneGen1.wav",
"F:\\OriginalAudio\\Songs\... | Mystified131/Rachel | ImageSlideShowByDreamb.py | ImageSlideShowByDreamb.py | py | 2,537 | python | en | code | 2 | github-code | 90 |
17299249796 | #coding=gbk
#===========================================
#ไฝ่
:่ฎธๅ
#ๆฅๆ: 13-7-31
#ๆถ้ด: ไธๅ8:32
#To change this template use File | Settings | File Templates.
#===========================================
import ui.core._core
from ui.control.Base import XObject, XDraw
from ui.core.Loader import RCLoader
import cStringIO
XImag... | xugangjava/PydUI | ui/darw/Canvas.py | Canvas.py | py | 1,573 | python | en | code | 2 | github-code | 90 |
23144052208 |
import pandas as pd
import requests
import numpy as np
import math
from datetime import timedelta
import re
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import pygsheets
data = requests.get('https://www.levels.fyi/js/salaryData.json').json()
df = pd.DataFrame(data)
# Remove colu... | browningtons/salaries | levels_fyi.py | levels_fyi.py | py | 3,894 | python | en | code | 0 | github-code | 90 |
42884100794 | import csv
with open ("rows.txt", "rt") as f:
reader = csv.reader(f, delimiter='\t', skipinitialspace=True)
lineDif = list()
for line in reader:
line = list(map(int, line))
# print(line)
diff = max(line) - min(line)
# print(diff)
lineDif.append(diff)
# prin... | tsmaga/python-prework | task_1.py | task_1.py | py | 403 | python | en | code | 0 | github-code | 90 |
18570893649 | import sys
a,b,c,x=map(int,sys.stdin.read().split())
cnt=0
for aa in range(a+1):
for bb in range(b+1):
for cc in range(c+1):
if (aa*500+bb*100+cc*50) == x:
cnt+=1
print(cnt) | Aasthaengg/IBMdataset | Python_codes/p03448/s824889976.py | s824889976.py | py | 195 | python | en | code | 0 | github-code | 90 |
18001148959 | N,W = map(int,input().split())
v1 = []
v2 = []
v3 = []
v4 = []
w1,v = map(int,input().split())
v1.append(v)
for i in range(N-1):
w,v = map(int,input().split())
if w == w1:
v1.append(v)
elif w == w1 + 1:
v2.append(v)
elif w == w1 + 2:
v3.append(v)
elif w == w1 + 3:
v4.... | Aasthaengg/IBMdataset | Python_codes/p03732/s971698548.py | s971698548.py | py | 786 | python | en | code | 0 | github-code | 90 |
74203175016 | import os
import subprocess
import time
"""
# ๆฆ่ฆ
Chromecast็จใซๅ็ปใใผใฟใใณใณใใผใใใ
# ไฝฟใๆน
1. src, dst ใใฉใซใใไฝใ
2. src ใใฉใซใใซๅคๆใใใๅ็ปใๅ
ฅใใ
3. ๆฌในใฏใชใใใๅฎ่ก(ๅผๆฐไธ่ฆ)
# ๆณจๆไบ้
srcใใฉใซใใซใใใใกใคใซใฏๅ็ญ็ก็จใงๅคๆใใใฎใงใ
ๅ็ปใใกใคใซไปฅๅคใใใใจใจใฉใผใซใชใใจๆใใ
โใฃใฆใใใใฎใใใใใงใใฏใใๆฉๆงใไฝใใใจใใโฆ
"""
const_src_dir = './src'
const_dst_dir = './dst'
const_enc_param = '-c:v libx264 -... | toru-ver4/kanri | script/encode_for_tv.py | encode_for_tv.py | py | 1,354 | python | ja | code | 0 | github-code | 90 |
18287980969 | n,m=map(int,input().split())
l=[0]*(n+1)
miss=[0]*(n+1)
for _ in range(m):
p,s=input().split()
p=int(p)
if l[p]==0:
if s=='AC':
l[p]+=1
else:
miss[p]+=1
for i in range(1,n+1):
if l[i]==0 and miss[i]!=0:
miss[i]=0
a=l.count(1)
b=sum(miss)
print(a,b) | Aasthaengg/IBMdataset | Python_codes/p02802/s205450227.py | s205450227.py | py | 312 | python | en | code | 0 | github-code | 90 |
72574209578 | from typing import List
class Memento:
"""ะะปะฐัั, ัะธะบัะธััััะธะน ัะตะบััะตะต ัะพััะพัะฝะธะต"""
def __init__(self, state: List[str]):
self.__state = state
def get_state(self) -> List[str]:
return self.__state[:]
class Backpack:
"""ะกะพะฑะธัะฐะตะผัะน ััะบะทะฐะบ"""
def __init__(self):
self.__state: ... | CrazyQWERTYlunch/software_architecture | Homework2/Memento.py | Memento.py | py | 2,388 | python | ru | code | 0 | github-code | 90 |
73820312937 | class Solution:
def findDiagonalOrder(self, matrix: List[List[int]]) -> List[int]:
if not matrix:
return []
# direction = [(-1, 1), (1, -1)]
row_size, col_size = len(matrix), len(matrix[0])
current = (0, 0)
result = []
direct = (-1, 1)
while curr... | HarrrrryLi/LeetCode | 498. Diagonal Traverse/Python 3/solution.py | solution.py | py | 1,023 | python | en | code | 0 | github-code | 90 |
36700323344 | #!/usr/bin/env python3
import rospy
from sensor_msgs.msg import Imu
if __name__ == '__main__':
rospy.init_node('dummy_imu')
pub = rospy.Publisher('/imu/data', Imu, queue_size=1)
msg = Imu()
msg.header.frame_id = 'imu'
msg.orientation.w = 1
r = rospy.Rate(100)
while not rospy.is_shutdown(... | MosHumanoid/bitbots_thmos_meta | bitbots_misc/bitbots_bringup/scripts/dummy_imu.py | dummy_imu.py | py | 410 | python | en | code | 3 | github-code | 90 |
5442361943 | """
Service class includes functionalities for implementing program features
"""
import copy
import random
from src.domain.entity import Book
class Service:
def __init__(self):
self.books = []
self.history = []
def add_book(self, book):
"""
Adds the bo... | vladceontea/Fundamentals-of-Programming | Lab5/src/services/service.py | service.py | py | 3,818 | python | en | code | 0 | github-code | 90 |
22207397048 | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def lowestCommonAncestor(self, root, p, q):
"""
:type root: TreeNode
:type p: TreeNode
:t... | Eurus-Holmes/LCED | Lowest Common Ancestor of a Binary Search Tree.py | Lowest Common Ancestor of a Binary Search Tree.py | py | 678 | python | en | code | 11 | github-code | 90 |
71105616297 | # coding=utf-8
'''
@Author : ericzhang
@Version : python3.7
@Date : 2018-08-10 08:05
@Soft : PyCharm
@Desc : pythonไธญไธๅ็ๅฏน่ฑก
@Docs :
'''
## 1ใ่ตๅผ็ปไธไธชๅ้
def myFunc(name='jiading'):
print(name)
my_fun = myFunc # ่ตๅผ
my_fun('pudong')
class Person:
def __init__(self):
print('changning')
my_clas... | zhagyilig/AdvancePy | 01-pythonไธญไธๅ็ๅฏน่ฑก/all_is_object.py | all_is_object.py | py | 800 | python | en | code | 0 | github-code | 90 |
30341279010 | import numpy as np
import pandas as pd
import math
from sklearn.ensemble import RandomForestClassifier
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.feature_selection import SelectFromModel
from sklearn.metrics import accuracy_score
from sklearn.utils import resample... | hyuan9310/Hospital_readmission | jupiter_notebook/RF.py | RF.py | py | 7,927 | python | en | code | 0 | github-code | 90 |
18061671269 | Z = list(map(int, input().split()))
ans = 10 ** 18
for i in range(3):
a, b, c = Z[i % 3], Z[(i + 1) % 3], Z[(i + 2) % 3]
# print(a, b, c)
left = c // 2
right = c - left
ans = min(ans, abs(left - right) * a * b)
print(ans)
| Aasthaengg/IBMdataset | Python_codes/p04005/s962574430.py | s962574430.py | py | 243 | python | en | code | 0 | github-code | 90 |
17956110289 | from itertools import permutations
N, M, R = map(int, input().split())
r = list(map(lambda x: int(x)-1, input().split()))
INF = 10**9
cost = [[INF]*N for _ in range(N)]
for _ in range(M):
A, B, C = map(int, input().split())
A -= 1
B -= 1
cost[A][B] = C
cost[B][A] = C
for k in range(N):
for i in range(N):... | Aasthaengg/IBMdataset | Python_codes/p03608/s123953375.py | s123953375.py | py | 551 | python | en | code | 0 | github-code | 90 |
18194484639 | K = int(input())
S = input()
s = len(S)
L = []
mod = 10 ** 9 + 7
N = 2 * 10**6
fac = [1, 1]
finv = [1, 1]
inv = [0, 1]
def cmb(n, r):
return fac[n] * ( finv[r] * finv[n-r] % mod ) % mod
for i in range(2, N + 1):
fac.append( ( fac[-1] * i ) % mod )
inv.append( mod - ( inv[mod % i] * (mod // i) % mod ) )
finv... | Aasthaengg/IBMdataset | Python_codes/p02632/s391524664.py | s391524664.py | py | 571 | python | en | code | 0 | github-code | 90 |
18488184219 | N, M = map(int, input().split())
def divisor(n): #nใฎ็ดๆฐใๅ
จใฆๆฑใใ
i = 1
table = []
while i * i <= n:
if n%i == 0:
table.append(i)
table.append(n//i)
i += 1
table = list(set(table))
return table
tab = divisor(M)
ans = []
for i in tab:
j = M // i
if j >= N:
... | Aasthaengg/IBMdataset | Python_codes/p03241/s322177968.py | s322177968.py | py | 372 | python | en | code | 0 | github-code | 90 |
18447460227 | import threading
import time
'''so much resource cpu need to frequently change them so ...
maybe turn into chaos'''
g_num=0
def test1(temp):
global g_num#define g_num as global
for i in range(temp):
g_num += 1
print('---1:{}---'.format(g_num))
def test2(temp):
global g_num
for i in rang... | theguyisnoone/daily | whyneedlock.py | whyneedlock.py | py | 807 | python | en | code | 0 | github-code | 90 |
41540077351 | #!/usr/bin/python3
import sys
from itertools import cycle, islice, product
# # Advent of Code 2021
# Day 21
def quantic_play(p1, s1, p2, s2, pool = {}):
key = (p1, s1, p2, s2)
if key in pool:
return pool[key]
sc = (0, 0)
for r in product((1, 2, 3), repeat = 3):
r = sum(r)
np =... | TomCarton/AdventOfCode | 2021/day21/day21.py | day21.py | py | 1,469 | python | en | code | 2 | github-code | 90 |
14754165470 | '''
Description from the course:
https://machinelearningmastery.com/machine-learning-in-python-step-by-step/
Data to used:
We are going to use the iris flowers dataset. This dataset is famous because it is used as the โhello worldโ
dataset in machine learning and statistics by pretty much everyone.
... | jrahman1988/PythonSandbox | myML_MLMasteryStepByStep_IRISClassification.py | myML_MLMasteryStepByStep_IRISClassification.py | py | 5,357 | python | en | code | 0 | github-code | 90 |
25532597353 | #!/usr/bin/env python
from PyQt4 import QtCore, QtGui
import admin_ui
import form_ui
import sys
import time
from datetime import datetime
import binascii
import PN532
from config import Db
class NasabahTread(QtCore.QThread):
def __init__(self):
super(self.__class__, self).__init__()
def __del__(self... | udibagas/atmb | admin.py | admin.py | py | 4,824 | python | en | code | 0 | github-code | 90 |
22708487478 | from PIL import Image
import numpy as np
five=[]
cover_pix=[]
cover_hide_pix=[]
get_secrt_message=[]
get_secrt=[]
secrt_five=[]
get_secrt_message_two=[]
x=[-1,-2,0,1,2]
def five_to_two(get_secrt_message_five):
lenth=int(len(get_secrt_message_five)/2)
for i in range(lenth):
message=int(str... | 18281765528/picture_handle | EMD_PRO/main.py | main.py | py | 4,696 | python | en | code | 0 | github-code | 90 |
34131341220 | import tkinter as tk
import tkinter.messagebox
import tkinter.simpledialog
from utils import keys, responses_path
from tkinter import ttk, filedialog, messagebox
def ask_confirmation():
result = tkinter.messagebox.askyesno("Confirmation", "Are you sure you would like to get this data?"
... | dli85/ArbFinder | GUI.py | GUI.py | py | 5,222 | python | en | code | 1 | github-code | 90 |
39721814888 | from constants import DEJAVUSANS_PATH
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django_filters.rest_framework import DjangoFilterBackend
from djoser.views import UserViewSet
from recipies.models import (Favorite, Ingredient, IngridientInRecipe, Recipe,
... | Soita-pa-well/foodgram-project-react | backend/api/views.py | views.py | py | 10,283 | python | en | code | 0 | github-code | 90 |
4040484737 | import sys
import csv
import random
import copy
import time
from RushClass import Gameboard, Vehicle, Dimensions
from RushHelpers import backtrace, backtraceV2
from Algorithms import randomSolver, breadth_First_Search, depth_First_Search
import os
# Get vehicles from csv file and return as vehicle class
def uploadBoar... | KaKariki02/rushHour | RushHour.py | RushHour.py | py | 3,435 | python | en | code | 0 | github-code | 90 |
20302077961 | import random
def is_prime(n):
i = 2
while i<n:
if(n%i==0):
return False
i+=1
return True
def gcd(a,b):
while a != 0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return a+b
def multiplicative_inverse(a,b):
if(a<b):
... | BorisBelovA/Python-Labs | rsa.py | rsa.py | py | 1,983 | python | en | code | 1 | github-code | 90 |
35615236677 | from __future__ import annotations
import dataclasses
import botocore.exceptions
from rich.style import Style
from rich.text import Text
import textual.binding
import textual.widgets
import textual.reactive
import textual.events
import rich.console
import rich.text
from textual.widgets._tree import TreeNode
from buck... | brennerm/bucketman | bucketman/widgets/s3tree.py | s3tree.py | py | 5,228 | python | en | code | 2 | github-code | 90 |
22937411854 | from __future__ import annotations
import base64
from asyncio import Queue
from aiohttp import web
from aiohttp.web_request import Request
from protos import GetRaidDetailsOutProto, GymGetInfoOutProto, METHOD_GET_RAID_DETAILS, METHOD_GYM_GET_INFO
from .log import log
from .config import config
MESSAGES = {
MET... | ccev/raidwatcher | raidwatcher/raw_input.py | raw_input.py | py | 1,899 | python | en | code | 1 | github-code | 90 |
75053576936 | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 29 23:33:15 2020
@author: Lung-Yi
"""
from __future__ import print_function
import sys
import os
import re
import copy
import math
import rdkit.Chem as Chem
import rdkit.Chem.AllChem as AllChem
from rdkit.Chem.rdchem import ChiralType, BondType, BondDir
... | Lung-Yi/AutoTemplate | autotemplate/module/rdchiral_main_modified.py | rdchiral_main_modified.py | py | 18,446 | python | en | code | 2 | github-code | 90 |
29855610275 | def log_values_step(cost, grad_norms, epoch, batch_id, step,
log_likelihood, reinforce_loss, bl_loss, tb_logger, opts):
avg_cost = cost.mean().item()
avg_loss = reinforce_loss.item()
avg_nll = -log_likelihood.mean().item()
grad_norms, grad_norms_clipped = grad_norms
# Log values to ... | ChanaRoss/Thesis | RL/utils/log_utils.py | log_utils.py | py | 2,077 | python | en | code | 0 | github-code | 90 |
41231862369 | from django.db import models
import uuid
# Create your models here.
class Informe(models.Model):
uniqueID=models.UUIDField(primary_key=True,default=uuid.uuid4, editable=False)
title=models.CharField( max_length=20)
resumen=models.CharField(max_length=50)
fecha=models.DateField(auto_now=True)
descri... | lukesd456/Agros-RETO | agrosCRUD/models.py | models.py | py | 561 | python | en | code | 0 | github-code | 90 |
72157866218 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Project: DevelopBasic
# Software: PyCharm
# DateTime : 2018-10-08 20:01
# File : 1-29 ็ๅนด้พๅ็บง็.py
# __author__: ๅคฉๆดๅคฉๆ
# Email : tqtl@tqtl.org
times = 0
age = 26 # ๆพๅจๅคไพง๏ผ้ฒๆญขๆฏๆฌกๅพช็ฏ่ฐ็จ๏ผ
while times < 3:
guess_age = int(input("GuessAge:"))
if guess_age > age:
... | cuixiaozhao/DevelopBasic | Chapter-01/1-29 ็ๅนด้พๅ็บง็.py | 1-29 ็ๅนด้พๅ็บง็.py | py | 831 | python | en | code | 0 | github-code | 90 |
73562796775 | import cv2
# img = cv2.imread('pic2.jpeg')
# cv2.imshow('Friends',img)
# cv2.waitKey(0)
frameWidth = 640
frameHeight = 320
cap = cv2.VideoCapture(0)
cap.set(3,frameWidth)
cap.set(4,frameHeight)
while True:
success,img = cap.read()
cv2.imshow('LiveCam',img)
if cv2.waitKey(1) & 0xFF == o... | dellucifer/OpenCV_tutorials | 1_image_n_video.py | 1_image_n_video.py | py | 343 | python | en | code | 2 | github-code | 90 |
18313780759 | from collections import deque
def main():
# ๅ
ฅๅ
n = int(input())
nodes_edges_data = {e: [] for e in range(1, n + 1)}
edges_data_to_number = {}
for i1 in range(n - 1):
a, b = tuple(map(int, input().split()))
nodes_edges_data[a].append(b)
nodes_edges_data[b].append(a)
ed... | Aasthaengg/IBMdataset | Python_codes/p02850/s221367112.py | s221367112.py | py | 1,586 | python | en | code | 0 | github-code | 90 |
16141250594 | import os
import sys
import pygame
pygame.init()
picture = pygame.image.load("Img.jpg")
pygame.display.set_mode(picture.get_size())
surface = pygame.display.get_surface()
while True:
os.system('./srv1')
picture = pygame.image.load("Img.jpg")
surface.blit(picture,(0,0))
pygame.display.... | sudeepgeorge/srv | display.py | display.py | py | 437 | python | en | code | 3 | github-code | 90 |
2207166190 | import csv
import codecs
import openpyxl
from pprint import pprint
from openpyxl.chart import (
Reference,
BarChart,
Series,
ScatterChart
)
csvFile = codecs.open("../crawl/data/meltop100.csv", "r", "utf-8")
reader = csv.reader(csvFile, delimiter=',', quotechar='"')
book = openpyxl.Workbook()
sheet1 = ... | pidokige02/Python_study | hello-master/crawl/meltopxl.py | meltopxl.py | py | 1,800 | python | en | code | 1 | github-code | 90 |
34050294125 | from tkinter import *
import tkinter as tk
import os
import glob
import StatTrackerAnalysis as STA
import StatTracker as ST
'''
def player_list(team):
if team == 'Joy AC':
playerlist = ['Opponent Player','#2 Vukota Mastilovic','#3 Marco Corona Duran','#4, Noah Kantorowicz','#6 Martin Browne Jr','#8 Philip ... | kjoh03/JOTP | StatTrackerInterface.py | StatTrackerInterface.py | py | 10,663 | python | en | code | 0 | github-code | 90 |
36925301493 | #https://leetcode.com/explore/challenge/card/may-leetcoding-challenge/534/week-1-may-1st-may-7th/3317/
#02May2020
class Solution:
def numJewelsInStones(self, J: str, S: str) -> int:
count=0
for stone in S:
if stone in J:
count=count+1
return count | NitishGadangi/Code-Jungle | JewelsandStones.py | JewelsandStones.py | py | 295 | python | en | code | 0 | github-code | 90 |
73670333096 | # coding=utf-8
from PyQt4.QtGui import QDialog, QDialogButtonBox, QGridLayout, QLabel, QComboBox, QPushButton
from PyQt4.QtCore import Qt, SIGNAL
from MaeMoneyProperties import MaeMoneyProperties
class AppLocaleSetupDialog(QDialog):
def __init__(self, parent):
QDialog.__init__(self, parent)
sel... | shinghei/MaeMoney | src/AppLocaleSetupDialog.py | AppLocaleSetupDialog.py | py | 2,702 | python | en | code | 2 | github-code | 90 |
3419014041 | vowels = ['a', 'e', 'i', 'o', 'u']
found = {}
word = input("Provide a word to search for vowels: ")
for letter in word:
if letter in vowels:
#if letter not in found:
# found[letter]=1
#else:
# found[letter] += 1
#handigere methode
found.setdefault(letter, 0)
... | kuphus/python_code | challenges/vowel.py | vowel.py | py | 496 | python | en | code | 0 | github-code | 90 |
13306932181 | """
Primary interface for handling recording session data.
"""
from functools import reduce
import operator as op
from scipy.interpolate import interp1d
import numpy as np
from roto import arrays
from roto.decorators import memoize, lazyprop
from pouty import debug
from . import time, motion, lfp, cluster
from .. i... | jdmonaco/skaggs | skaggs/session.py | session.py | py | 14,514 | python | en | code | 0 | github-code | 90 |
6675382699 | import pygame
import random
def get_highscore():
with open("BrickCatcherHighscores.txt", "r+") as f:
return f.read()
pygame.init()
screen_width = 800
screen_height = 600
screen = pygame.display.set_mode((screen_width, screen_height))
pygame.display.set_caption("Catcher game")
clock = pygame.time.Clock... | Chrisson543/brick-catcher-game | Brick Catcher Game.py | Brick Catcher Game.py | py | 3,215 | python | en | code | 0 | github-code | 90 |
3795221141 | from sqlflow_models import ARIMAWithSTLDecomposition
import unittest
import tensorflow as tf
from datetime import datetime, timedelta
import numpy as np
class TestARIMAWithSTLDecompose(unittest.TestCase):
def setUp(self):
self.order = [7, 0, 2]
self.period = [7, 30]
self.date_format = '%Y-%... | Kelang-Tian/models | tests/test_arima_with_stl_decomposition.py | test_arima_with_stl_decomposition.py | py | 2,245 | python | en | code | null | github-code | 90 |
14042281340 | import sys
sys.path.insert(0, './preprocessor')
sys.path.insert(0, './model')
# import preprocessor
from randomForestPreprocessor import RandomForestPreprocessor
from PCAPreprocessor import PCAPreprocessor
# import model
from sklearn.ensemble import RandomForestRegressor
from SVMR import SVMR
# required import
f... | tall15421542/Machine-Learning-2019 | solver/Main.py | Main.py | py | 3,333 | python | en | code | 0 | github-code | 90 |
36293506574 | # -*- coding: utf-8 -*-
# """
# Created on Sun Nov 6 14:41:52 2022
# @author: qomon
# filename='pi_txt.txt'
# with open('pi_txt.txt') as file:
# pi=file.read()
# birthday='20042001'
# if birthday in pi:
# print('yes there is ')
# else:
# print('there is no')
import pickle
# info="i love you mommy"
# in... | Farrukh-Maruf/python-works-from-anvarnarz | pi_spyder.py | pi_spyder.py | py | 589 | python | en | code | 4 | github-code | 90 |
24918680177 | import torch
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Reshaping, stacking-comnbine esnors, squeezing-removes 1D , unsqueezing adds 1D
y = torch.arange(1, 9)
z=torch.arange(10, 18)
print(y, y.shape)
y_res = y.reshape(2, 4)
print(y_res, y_res.shape)
y_stacked=torch.stack((y, z), dim=0)
pri... | dhakalmahima188/Labs-6th-sem | pytorch/2.py | 2.py | py | 672 | python | en | code | 0 | github-code | 90 |
37143874830 | import copy
import mock
from fuel_bootstrap import consts
from fuel_bootstrap.tests import base
PARSED_ARGS = {'extend_kopts': None,
'no_compress': False,
'output_dir': None,
'image_build_dir': None,
'post_script_file': None,
'root_ssh_author... | skdong/fuel-bootstrap | fuel_bootstrap/tests/test_build_command.py | test_build_command.py | py | 2,438 | python | en | code | 0 | github-code | 90 |
18168617599 | X, K, D = map(int, input().split())
X = abs(X)
a = K*D
if X >= a:
result = X-a
else:
b = X//D
c = (X-b*D)
d = abs(X-(b+1)*D)
if c < d:
if b%2==K%2:
result = c
else:
result = d
else:
if (b+1)%2==K%2:
result=d
else:
... | Aasthaengg/IBMdataset | Python_codes/p02584/s332803963.py | s332803963.py | py | 343 | python | en | code | 0 | github-code | 90 |
18163536189 | import sys
def resolve(in_):
N, X, T = map(int, next(in_).split())
minute = 0
tako = 0
while tako < N:
tako += X
minute += T
return minute
def main():
answer = resolve(sys.stdin)
print(answer)
if __name__ == '__main__':
main()
| Aasthaengg/IBMdataset | Python_codes/p02576/s050840186.py | s050840186.py | py | 282 | python | en | code | 0 | github-code | 90 |
18115759099 | inf=float("inf")
def merge(a,left,mid,right):
count=0
n1=mid-left
n2=right-mid
L=[0]*(n1+1)
R=[0]*(n2+1)
for i in range(n1):
L[i]=a[left+i]
for i in range(n2):
R[i]=a[mid+i]
L[n1]=inf
R[n2]=inf
i=0
j=0
for k in range(left,right):
count+=1
i... | Aasthaengg/IBMdataset | Python_codes/p02272/s860625532.py | s860625532.py | py | 706 | python | en | code | 0 | github-code | 90 |
15798364298 |
import os
import re
import random
import hashlib
from datetime import datetime
from flask import Flask, render_template, request, redirect, session
from flask_sqlalchemy import SQLAlchemy
from werkzeug.utils import secure_filename
import functional as fn
# App settings
app = Flask(__name__)
db = SQLAlchemy()
app.s... | UAcapitan/code | interesting_projects/ProtectMyFreedom/app.py | app.py | py | 18,662 | python | en | code | 0 | github-code | 90 |
34582308881 | from publish.agents.flow_functions import BaseFlowFunction
from publish.data import HypergridTrajectoryDataset
from publish.utils import get_device, get_grid_one_hot_int_encoder_mask
from torchtyping import TensorType
from typing import Dict
import torch
FORWARD = 'frwd'
BACKWARD = 'back'
class ExactFlowFunction(Bas... | WristTurn384/publish | publish/agents/flow_functions/exact_flow_function.py | exact_flow_function.py | py | 3,024 | python | en | code | 0 | github-code | 90 |
13622479788 | #! /usr/bin/python
from matplotlib import rcParams
from matplotlib.font_manager import FontProperties
from ..const import T_sun, d2r
from ..parfile import DerivePar
from .pkcorr import doppler
import matplotlib.pyplot as plt
import numpy as np
rcParams["mathtext.fontset"] = "cm"
def om1dot_m1m2(omd,omderr,a1,e,pb,om... | emmanuelfonseca/PSRpy | PSRpy/orbit/m1m2.py | m1m2.py | py | 12,535 | python | en | code | 2 | github-code | 90 |
18142290569 | def main():
r, c = [int(x) for x in input().split()]
matrix = []
totals = [0 for _ in range(c+1)]
for _ in range(r):
nums = [int(x) for x in input().split()]
total = sum(nums)
row = nums + [total]
matrix.append(row)
for i in range(c+1):
totals[i] +... | Aasthaengg/IBMdataset | Python_codes/p02413/s719960826.py | s719960826.py | py | 463 | python | en | code | 0 | github-code | 90 |
71987355178 | import sys
if sys.version_info[0] < 3:
input = raw_input
def MPF(total_income):
total_income = int(total_income)
if total_income < 7100 * 12:
return 0
return min(18000, total_income * 0.05)
def net_income(total_income):
""" Personal Net Income """
total_income = int(total_inco... | leoslf/302CEM | tax_assessment2/tax_assessment.py | tax_assessment.py | py | 3,583 | python | en | code | 0 | github-code | 90 |
7418618935 | from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name="home"),
path('login/', views.login, name="login"),
path('register/', views.register, name='register'),
path('logout', views.logout, name='logout'),
path('create/room/', views.create_room, name='create_room')... | Cristian1997Ion/Djanswer | game/urls.py | urls.py | py | 525 | python | en | code | 0 | github-code | 90 |
6980520086 | from collections import OrderedDict
def sort_sales(data):
temp_product=list(zip(*data))[0]
product=dict.fromkeys(temp_product,0)
for x in data:
product[x[0]]+=x[1]
return product
def sales_summary(data):
#===== write your code below ====
sorted_dict=OrderedDict(sorted(... | Yeongbi-Na/STUDY | Python/ex-08-sales-summary-main/practice.py | practice.py | py | 925 | python | zh | code | 0 | github-code | 90 |
31280124054 | x = 1
y = 0
r = 1
s = 0
processList = []
bufferX = []
bufferY = []
bufferR = []
bufferS = []
def p(_x, _process, _buffer):
_x -= 1
if _x < 0:
_buffer.append(_process)
return _x
def v(_x, _process, _buffer):
_x += 1
if _x <= 0:
_buffer.remove(_process)
return _x
# FIRST C
s =... | madescoces/python | matematicas_3/src/semaforos.py | semaforos.py | py | 905 | python | en | code | 0 | github-code | 90 |
74740413096 |
def minion_game(string):
Stuart = 0
Kevin = 0
dd = list(string)
#print(len(d))
for c in range (1,len(string)+1):
for i in range (0,len(s)-c):
h= string[i:i+(c+1)]
dd.append(h)
len(dd)
for i in dd:
first = str(i[0])
print(... | KingSlayer-KS/python_practice_hacker_rank | hacker-rank-minion-game.py | hacker-rank-minion-game.py | py | 732 | python | en | code | 0 | github-code | 90 |
18303268239 | import sys
sys.setrecursionlimit(10**9)
N, u, v = map(int, input().split())
u, v = u-1, v-1
edge = [[] for _ in range(N)]
for i in range(N-1):
a, b = map(int, input().split())
a, b = a-1, b-1
edge[a].append(b)
edge[b].append(a)
taka = [0] * N
aoki = [0] * N
def dfs(v, pre, cost, i):
for e in edge... | Aasthaengg/IBMdataset | Python_codes/p02834/s201665822.py | s201665822.py | py | 588 | python | en | code | 0 | github-code | 90 |
40090016551 | '''
@Author: Pavan Nakate
@Date: 2021-11-02 02:08
@Last Modified by: Pavan Nakate
@Last Modified time: None
@Title : WindChill : To find the wind chill using temperature and wind speed as a user input
'''
import math
def wind_chill():
"""
Description:
This function is used to find the wind chill.
... | Pavan699/Python_Concepts | Functional Programs/WindChill.py | WindChill.py | py | 1,244 | python | en | code | 0 | github-code | 90 |
4047693937 | # ะะฐะดะฐะนัะต ัะฟะธัะพะบ ะธะท ะฝะตัะบะพะปัะบะธั
ัะธัะตะป. ะะฐะฟะธัะธัะต ะฟัะพะณัะฐะผะผั, ะบะพัะพัะฐั ะฝะฐะนะดัั ััะผะผั ัะปะตะผะตะฝัะพะฒ ัะฟะธัะบะฐ, ััะพััะธั
ะฝะฐ ะฝะตัััะฝะพะน ะฟะพะทะธัะธะธ.
# ะัะธะผะตั:
# - [2, 3, 5, 9, 3] -> ะฝะฐ ะฝะตัััะฝัั
ะฟะพะทะธัะธัั
ัะปะตะผะตะฝัั 3 ะธ 9, ะพัะฒะตั: 12
import random
user_number_of_elements = int(input('ะะฒะตะดะธัะต ะถะตะปะฐะตะผะพะต ัะธัะปะพ ัะปะตะผะตะฝัะพะฒ: '))
list_for_treatment = []... | Kachinske/Python_seminar_3_homework | Python_seminar3_homework.py | Python_seminar3_homework.py | py | 3,778 | python | ru | code | 0 | github-code | 90 |
816845149 | import tav.proxy.database
import tav.bot
import os.path
import sys
PROXY_DATABASE = \
os.path.join(os.path.abspath(os.path.split(__file__)[0]), 'proxy.db')
def main():
import argparse
parser = argparse.ArgumentParser(
description='Twitch Artificial Viewers'
)
parser.add_argument(
... | Dav1dde/tav | vbot.py | vbot.py | py | 1,334 | python | en | code | 3 | github-code | 90 |
11850208329 | #!/usr/bin/env python
# a0.py : Solve the N-Rooks/N-queen/N-knight problem!
# Ranjana, 2018
# Updated the code given in class
import sys
from collections import deque
import time
# Count # of pieces in given row
def count_on_row(board, row):
return sum(board[row])
# Count # of pieces in given column
def count_o... | ranjanasinha89/N-Queen-Problem | a0.py | a0.py | py | 7,435 | python | en | code | 0 | github-code | 90 |
13997530348 |
import cv2
import numpy as np
from faceplusplus_sdk import Detect
from config import Config
import sys
import json
import os
import utils
def readPoints(path):
pointsArray = []
json_array = []
eliminated_index = []
listdir = os.listdir(path)
listdir.sort()
for txtFile in li... | Jeret-Ljt/average_face | pj.py | pj.py | py | 5,700 | python | en | code | 1 | github-code | 90 |
28170182779 | import numpy as np
import pandas as pd
import argparse
import math
import csv
from collections import OrderedDict
def get_args():
parser = argparse.ArgumentParser(description='Call peaks over CRISPRi screen windows.')
parser.add_argument('guide_data',help='Input flow-fish guide count data.')
parser.add... | sjgosai/casa | src/subset_guides.py | subset_guides.py | py | 6,741 | python | en | code | 2 | github-code | 90 |
23236739001 | def reversedDiff(num):
old = str(num)
new = ''
for i in range(len(old)-1, -1, -1):
new += old[i]
return abs(num-int(new))
# Complete the beautifulDays function below.
def beautifulDays(i, j, k):
days = 0
for num in range(i, j+1):
revDiff = reversedDiff(num)
if revDiff%k... | Anisha7/HackerRank | beautifulday.py | beautifulday.py | py | 364 | python | en | code | 0 | github-code | 90 |
18035798849 | quiznum=int(input())
timeline=input().split(" ")
timeline=[int(n) for n in timeline]
#print(timeline)
time_0=0
for i in range(quiznum):
time_0+=timeline[i]
#print(time_0)
medinum=int(input())
for i in range(medinum):
temp_line=input().split(" ")
a=int(temp_line[0])
b=int(temp_line[1])
time=time_0 -... | Aasthaengg/IBMdataset | Python_codes/p03845/s903287118.py | s903287118.py | py | 354 | python | en | code | 0 | github-code | 90 |
14444769816 | import collections, functools, time, itertools
import numpy as np, matplotlib.pyplot as plt
from matplotlib.colors import TABLEAU_COLORS
class BBox:
def __init__(self, base, sizes):
self.base = base
self.sizes = sizes
self.half_sizes = sizes / 2
self.diameter = np.linalg.norm(sizes)... | anna-jana/numerics-physics-stuff | barnes_hut.py | barnes_hut.py | py | 4,388 | python | en | code | 3 | github-code | 90 |
40374438401 | # coding:utf8
import re
import datetime
import requests
import io
def get_stock_type(stock_code):
"""ๅคๆญ่ก็ฅจIDๅฏนๅบ็่ฏๅธๅธๅบ
ๅน้
่งๅ
['50', '51', '60', '90', '110'] ไธบ sh
['00', '13', '18', '15', '16', '18', '20', '30', '39', '115'] ไธบ sz
['5', '6', '9'] ๅผๅคด็ไธบ sh๏ผ ๅ
ถไฝไธบ sz
:param stock_code:่ก็ฅจID, ่ฅไปฅ 'sz', 'sh'... | shidenggui/easyutils | easyutils/stock.py | stock.py | py | 2,620 | python | en | code | 86 | github-code | 90 |
36678332747 | import contextlib
import os
import time
import requests
import settings
def pytest_sessionstart(session):
""" Sleeps for up to 60 seconds before session.main() is called. """
for i in range(0, 120):
print(
"Waiting for schema-registry to start: {seconds} seconds waited"
.form... | Akino1976/kafka-python | kafka-python-cp/tests/system/conftest.py | conftest.py | py | 648 | python | en | code | 0 | github-code | 90 |
6250750142 | import functools
import json
import logging
import itertools
import bisect
from packageurl import PackageURL
from sbomnix.cpe import CPE
from sbomnix.utils import (
LOGGER_NAME,
LOG_SPAM,
)
###############################################################################
_LOG = logging.getLogger(LOGGER_NAME)
... | weisong-gmail/sbomnix | sbomnix/derivation.py | derivation.py | py | 5,970 | python | en | code | 0 | github-code | 90 |
18232445919 | from collections import defaultdict
N = int(input())
A = list(map(int, input().split()))
B = sorted([(A[i], i + 1) for i in range(N)], reverse=True)
dp = defaultdict(int)
for S in range(1, N + 1):
for x in range(S + 1):
y = S - x
candid = []
if x >= 1:
candid.append(dp[(x - 1,... | Aasthaengg/IBMdataset | Python_codes/p02709/s395557356.py | s395557356.py | py | 602 | python | en | code | 0 | github-code | 90 |
10302637874 | import sys
from collections import deque
n = int(sys.stdin.readline())
graph = list(map(int,sys.stdin.readline().split()))
start = int(sys.stdin.readline())
visit = [0 for _ in range(n)]
queue = deque()
queue.append(start-1)
visit[start-1] = 1
while queue:
current = queue.popleft()
back = current - graph[curr... | kjh9267/BOJ_Python | BFS/14248.py | 14248.py | py | 563 | python | en | code | 0 | github-code | 90 |
5543729212 | # ๊ณจ๋๋ฐํ์ ์ถ์ธก
import sys
# Prime_list ๋ง๋ค๊ธฐ 0.40 ์ด
a = [False,False] + [True] * (int(1e6)-1)
prime_list = []
for i in range(2, int(1e6)+1):
if a[i]:
prime_list.append(i)
for j in range(i*i, int(1e6)+1, i):
a[j] = False
while True:
flag = 0
val = int(sys.stdin.readline().rstrip())
... | SteadyKim/Algorism | language_PYTHON/BJ6588.py | BJ6588.py | py | 1,285 | python | en | code | 0 | github-code | 90 |
18549481249 | import sys
input = sys.stdin.readline
def main():
num = list(map(int, input().split()))
MAX = max(num)
CNT = 0
for i in range(3):
num[i] -= MAX
CNT -= num[i]
if CNT%2 == 0:
ans = CNT//2
print(ans)
else:
ans = CNT//2 + 2
print(ans)
if __name__ == '... | Aasthaengg/IBMdataset | Python_codes/p03387/s329263968.py | s329263968.py | py | 341 | python | en | code | 0 | github-code | 90 |
34769336430 | # -*- coding: utf-8 -*-
'''
Unit Tests for functions located in salt.utils.files.py.
'''
# Import python libs
from __future__ import absolute_import
import os
import shutil
import tempfile
# Import Salt libs
import salt.utils.files
# Import Salt Testing libs
from tests.support.paths import TMP
from tests.support.uni... | sacren/salt | tests/unit/utils/test_files.py | test_files.py | py | 2,400 | python | en | code | 0 | github-code | 90 |
37565739386 | # Chinese CCGbank conversion
# ==========================
# (c) 2008-2012 Daniel Tse <cncandc@gmail.com>
# University of Sydney
# Use of this software is governed by the attached "Chinese CCGbank converter Licence Agreement"
# supplied in the Chinese CCGbank conversion distribution. If the LICENCE file is missing, ple... | jogloran/cnccgbank | munge/tests/penn_parse_tests.py | penn_parse_tests.py | py | 1,843 | python | en | code | 12 | github-code | 90 |
22560739224 | import os
import re
from dataclasses import dataclass
from pathlib import Path
from typing import Final, Optional
import tomlkit
import typer
from rich.console import Console
DOCS_VERSION_REGEX: Final = re.compile(r'(version|release)\s=\s"(\d+\.\d+\.\d+)"')
@dataclass(frozen=True)
class CommonArgs:
pyproject_pa... | qiskit-community/qiskit-aqt-provider | scripts/package_version.py | package_version.py | py | 4,734 | python | en | code | 26 | github-code | 90 |
25974228256 | from django import forms
from apps.product.models import Products,ProductCategory,Banner
from apps.news.models import News
class AddProductForm(forms.ModelForm):
thumbnail=forms.URLField(label='ไบงๅๅพ็url',error_messages={"required": "ไบงๅๅพ็urlไธ่ฝไธบ็ฉบ"})
top_tag_id=forms.IntegerField(label='ไบงๅไธ็บงๅ็ฑป',error_messages={"r... | chaiyuming/GX | apps/cms/forms.py | forms.py | py | 1,830 | python | en | code | 0 | github-code | 90 |
74765301737 | instr="""
<x=0, y=4, z=0>
<x=-10, y=-6, z=-14>
<x=9, y=-16, z=-3>
<x=6, y=-1, z=2>
"""
# instr="""
# <x=-8, y=-10, z=0>
# <x=5, y=5, z=10>
# <x=2, y=-7, z=3>
# <x=9, y=-8, z=-3>
# """
# instr="""
# <x=-1, y=0, z=2>
# <x=2, y=-10, z=-7>
# <x=4, y=-8, z=8>
# <x=3, y=5, z=-1>
# """
import re
class Moon(object):
def __in... | harveyj/aoc | 2019/12/twelve-2.py | twelve-2.py | py | 1,734 | python | en | code | 0 | github-code | 90 |
18287792669 | n, m = map(int, input().split())
if m > 0:
p, s = zip(* [input().split() for _ in range(m)])
else:
p = []
s = []
ac_dict = {str(i): False for i in range(1, n + 1)}
wa_dict = {str(i): 0 for i in range(1, n + 1)}
ac_num = 0
wa_num = 0
for p_i, s_i in zip(p, s):
if ac_dict[p_i] == False:
if s_i ==... | Aasthaengg/IBMdataset | Python_codes/p02802/s017088594.py | s017088594.py | py | 512 | python | en | code | 0 | github-code | 90 |
28968631191 | import os
import sys
import errno
import pickle
import math
import torch
import torch.nn as nn
import torch.optim as optim
from sklearn import metrics as skmetrics
import numpy as np
from tqdm import tqdm
from tabulate import tabulate
import torch.nn.utils.prune as prune
torch.manual_seed(0)
np.random.seed(0)
def fed... | Donglin-Wang/LotteryEnsemble | util.py | util.py | py | 15,588 | python | en | code | 11 | github-code | 90 |
70297351018 | # -*- coding: utf-8 -*-
'''
Tulip routine libraries, based on lambda's lamlib
Author Bugatsinho
License summary below, for more details please read license.txt file
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licens... | bugatsinho/bugatsinho.github.io | plugin.video.freevl/resources/modules/client.py | client.py | py | 11,353 | python | en | code | 61 | github-code | 90 |
5531699535 | import sys
import gi
import os
import configparser
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Gio, Adw, Gst, GObject, GdkPixbuf, Gdk
from .window import JokosherWindow
from .project import Project
from .settings import Settings
from .globals import Globals
from .pla... | Pecisk/jokosher-ng | src/jokosherapplication.py | jokosherapplication.py | py | 19,279 | python | en | code | 2 | github-code | 90 |
10995936881 | # -*- coding: utf-8 -*-
# (c) Nano Nano Ltd 2019
from decimal import Decimal
from .config import config
class TransactionRecordBase(object):
TYPE_DEPOSIT = 'Deposit'
TYPE_MINING = 'Mining'
TYPE_INCOME = 'Income'
TYPE_GIFT_RECEIVED = 'Gift-Received'
TYPE_WITHDRAWAL = 'Withdrawal'
TYPE_SPEND = ... | 737147948/BittyTax | bittytax/record.py | record.py | py | 6,717 | python | en | code | null | github-code | 90 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.