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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
33305365959 | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 5 18:07:08 2020
@author: MichaelSchwarz
Evaluate a portfolio's exposure after different categorizations
"""
def evaluate_portfolio_exposure(FilterCompanies="all", CategoryType="GICS", DrilldownLevel=1):
"""gets the chosen companies with its categorisations from m... | schwarz777/FinanceProjects | PortfolioConstruction/evaluate_portfolio_exposure.py | evaluate_portfolio_exposure.py | py | 3,397 | python | en | code | 0 | github-code | 90 |
43459758035 | import os
import psutil
import tracemalloc
from collections import defaultdict
import cProfile
import time
import pandas as pd
import matplotlib.pyplot as plt
class Bucket_Sort:
def insertionSort(self, b):
for i in range(1, len(b)):
up = b[i]
j = i - 1
while j >= 0 and ... | spoorthyg/System-and-User-level | bucketSort.py | bucketSort.py | py | 2,419 | python | en | code | 0 | github-code | 90 |
29206483838 | #Stuart- Nice start to your code, but incomplete. Where are the column names for the other two data sets?
# The code that you have for diamonds doesn't output a graph (it appears to be trying to make
# a grid of many, ~81, smaller graphs). Does your code know to skip columns that are non-numeric?
# You can get a bit ov... | Verroe/Ejiba_Verro_python | Ejiba_Verro_HW3_graded.py | Ejiba_Verro_HW3_graded.py | py | 3,267 | python | en | code | 0 | github-code | 90 |
13426898110 | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 14 07:53:07 2022
@author: jgalb
"""
#taken mostly from geeksforgeeks
from sys import stdin
class beep:
def __init__(self, cl):
self.cl = cl
self.n = len(self.cl)
self.dist = [[401] * self.n for x in range(self.n)]
for i in range... | jgalbers12/CompetitiveProgramming2022 | beep/beep.py | beep.py | py | 1,747 | python | en | code | 0 | github-code | 90 |
28437541955 | import re
from collections import namedtuple
from typing import Dict, List
Rule = namedtuple("Rule", "min1 max1 min2 max2")
RulesDict = Dict[str, Rule]
Ticket = List[int]
TicketList = List[Ticket]
def parse_input(filename: str) -> (RulesDict, Ticket, TicketList):
with open(filename, "r") as file:
conte... | aboutroots/AoC2020 | day16.py | day16.py | py | 3,106 | python | en | code | 0 | github-code | 90 |
19254261095 | from sys import stdin
from collections import deque
moving_monkey = [[1, 0], [-1, 0], [0, 1], [0, -1]]
moving_horse = [[-2, 1], [-1, 2], [1, 2], [2, 1], [2, -1], [1, -2], [-1, -2], [-2, -1]]
stdin = open("./input.txt", "r")
k = int(stdin.readline())
cols, rows = map(int, stdin.readline().split())
grid = []
for _ in ... | ag502/algorithm | Problem/BOJ_1600_๋ง์ด ๋๊ณ ํ ์์ญ์ด/main.py | main.py | py | 1,995 | python | en | code | 1 | github-code | 90 |
30876008126 | # BOJ_27211_gold5-๋๋ํ์ฑ
import sys
from collections import deque
input = sys.stdin.readline
dr = [-1, 1, 0, 0]
dc = [ 0, 0,-1, 1]
# ๋ฐ์ด๋๋ฆฌ ์ฐ๊ฒฐ
# def boundary(rc, num):
# if rc == 1: # rc ๊ฐ 1์ด๋ฉด row
# if num == -1:
# return num + N
# return num % N
# else: ... | Lee-hanbin/Algorithm | Python/BOJ/Gold/BOJ_27211_gold5-๋๋ํ์ฑ/BOJ_27211_gold5-๋๋ํ์ฑ.py | BOJ_27211_gold5-๋๋ํ์ฑ.py | py | 1,433 | python | en | code | 3 | github-code | 90 |
70332876778 | import os.path
import sys
import math
def get_tx_ax(tmp):
return [0, tmp - 273] if tmp > 273 else [273 - tmp, 0]
def mov_ptr(target, ptr, arr):
mov = 0
while target != arr[ptr]:
if target < arr[ptr]:
mov -= 1
ptr -= 1
else:
mov += 1
ptr += ... | Bobtron/SpaceStation13Tools | ChemiCompilerCompiler/Standard/Driver.py | Driver.py | py | 3,871 | python | en | code | 0 | github-code | 90 |
18565110149 |
def main():
N = int(input())
a = sorted(map(int, input().split()),reverse=True) #้้ ใฎใชในใ
alice = 0
bob = 0
for i in range(N):
if i % 2 == 0:
alice += a[i]
else:
bob += a[i]
print(alice - bob)
if __name__ == "__main__":
main()
| Aasthaengg/IBMdataset | Python_codes/p03434/s648589478.py | s648589478.py | py | 317 | python | en | code | 0 | github-code | 90 |
40808682485 | from transformers import AutoTokenizer
from tqdm import tqdm
import pandas as pd
import argparse
MAX_LENGTH=512
parser = argparse.ArgumentParser(description='Tokenize para')
parser.add_argument('--data-a', type=str, required=True, help='one of the parallel data')
parser.add_argument('--data-b', type=str, required=True... | jazzisfuture/FineTuningXLM-R | script/tokenize_para.py | tokenize_para.py | py | 1,284 | python | en | code | 0 | github-code | 90 |
19143610635 | # Given a binary number ,find out its decimal representation. For eg 000111 in binary is 7 in decimal. Input Format
# The first line contains N , the number of binary numbers. Next N lines contain N integers each representing binary represenation of number.
# Output Format
# N lines,each containing a decimal equivalent... | AasthaMehtaTech/DSA_Team12_Uplift_Project | Loops_Patterns_Print/InputOutput/RishabhVerma/Day2/P5.py | P5.py | py | 842 | python | en | code | 23 | github-code | 90 |
31722594168 | import math
import numpy as np
import torch
import torch.nn as nn
import torch.utils.model_zoo as model_zoo
import sys
sys.path.append("../")
from utils.pos_embed import get_2d_sincos_pos_embed
def conv3x3(in_planes, out_planes, stride=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_pla... | shaofeng-z/SimConvMIM | utils/resnet.py | resnet.py | py | 9,175 | python | en | code | 0 | github-code | 90 |
72571084778 | import numpy as np
from metodos_quantitativos import MetodosQuantitativos, Metodo2kr, UmFator
if __name__ == "__main__":
m = MetodosQuantitativos()
print("\n------ 6 a)")
a = [17, 12, 9, 11, 14, 12]
b = [20, 6, 10, 12, 15, 7, 9, 10]
confidence = 0.9
m.observacoes_nao_pareadas(a=a, b=b, con... | claudiocapanema/poi_gnn | foundation/util/lista1.py | lista1.py | py | 2,592 | python | en | code | 1 | github-code | 90 |
2503219521 | #!/usr/bin/env python3
# (c) Facebook, Inc. and its affiliates. Confidential and proprietary.
from __future__ import annotations
from typing import Any, Callable, Dict, List, Optional, Type, Union
import torch
from botorch.acquisition.acquisition import AcquisitionFunction
from botorch.acquisition.multi_step_lookahe... | RaulAstudillo06/BOSS | boss/acquisition_functions/budgeted_multi_step_ei.py | budgeted_multi_step_ei.py | py | 11,139 | python | en | code | 1 | github-code | 90 |
12570891610 | import docker
from datetime import datetime
import time
client = docker.from_env()
print("Let the killing begin :]")
while True:
# print("ein neuer zyklus beginnt")
# check all containers on the host
for container in client.containers.list():
# print("scanning...found:", contain... | LindezaGrey/docker-reaper | Reaper.py | Reaper.py | py | 1,308 | python | en | code | 0 | github-code | 90 |
74798874216 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.autograd as autograd
from .pytorchtools import EarlyStopping
import numpy as np
from sklearn.model_selection import train_test_split
# from .DiscreteCondEnt import subset
import os
from ..util import plot_util
#... | handasontam/MMI | model/mine.py | mine.py | py | 12,635 | python | en | code | 1 | github-code | 90 |
22678561230 | #Daniel Torres
#PSID:1447167
#HW 2: part b
#part b
def main(date):
month_of_number = {"January":1,"February":2,"March":3,"April":4,"May":5,"June":6,"July":7,
"August":8,"September":9,"October":10,"Novenber":11,"December":12}
try:
year = date.split(",")[-1].strip()
month = date.split("... | datorre5/CIS2348-FALL2020 | HW2partB.py | HW2partB.py | py | 654 | python | en | code | 0 | github-code | 90 |
18567805529 | import sys
input = sys.stdin.buffer.readline
def main():
N = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
if sum(a) > sum(b):
print("No")
else:
do = sum(b)-sum(a)
ca,cb = 0,0
for x,y in zip(a,b):
if x > y:
... | Aasthaengg/IBMdataset | Python_codes/p03438/s000749453.py | s000749453.py | py | 638 | python | en | code | 0 | github-code | 90 |
8402230971 | #!/usr/bin/env python3
""" LRUCache module
"""
from base_caching import BaseCaching
class LRUCache(BaseCaching):
""" Inherits from BaseCaching and is a LRU cache
"""
def __init__(self):
super().__init__()
self.lru_order = []
def put(self, key, item):
""" Add item to cache da... | Cyril-777/alx-backend | 0x01-caching/3-lru_cache.py | 3-lru_cache.py | py | 980 | python | en | code | 0 | github-code | 90 |
23271749193 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import xml.etree.cElementTree as ET
import pprint
import re
import codecs
import json
from audit_street import update_name
lower = re.compile(r'^([a-z]|_)*$')
lower_colon = re.compile(r'^([a-z]|_)*:([a-z]|_)*$')
problemchars = re.compile(r'[=\+/&<>;\'"\?%#$@\,\. \t\r\n]')
... | mouna199/project_udacity | create_json.py | create_json.py | py | 3,004 | python | en | code | 0 | github-code | 90 |
29134655454 | from msilib.schema import Error
from gym import Env
from stable_baselines3.common.callbacks import BaseCallback
from stable_baselines3.common.buffers import ReplayBuffer
from scipy.fft import fft, fftfreq, fftn
from typing import Tuple
import matplotlib.pyplot as plt
import numpy as np
class FFTEvalCallback(BaseCallba... | AlexanderKeijzer/experience-selection-drl | callback_fft_eval.py | callback_fft_eval.py | py | 2,152 | python | en | code | 0 | github-code | 90 |
35859386375 | """
stanCode Breakout Project
Adapted from Eric Roberts's Breakout by
Sonja Johnson-Yu, Kylie Jue, Nick Bowman,
and Jerry Liao.
"""
from campy.gui.events.timer import pause
from breakoutgraphics import BreakoutGraphics
FRAME_RATE = 2000 / 120 # 120 frames per second
NUM_LIVES = 3 # Number of attempts
def main()... | tungtunghung/mystanCodeproject | mystanCodeprojects/break_out_game/breakout.py | breakout.py | py | 1,380 | python | en | code | 0 | github-code | 90 |
18502823199 | import bisect
N, K = map(int,input().split())
X = list(map(int,input().split()))
s = bisect.bisect_left(X,0)
if 0 in X:
K -= 1
else:
bisect.insort_left(X,0)
N += 1
MIN = 2 * 10**9
for i in range(K+1):
if s - K + i >= 0 and s + i <N:
f = X[s -K+i]
l = X[s+i]
if abs(f) < abs(l):... | Aasthaengg/IBMdataset | Python_codes/p03274/s538877271.py | s538877271.py | py | 448 | python | en | code | 0 | github-code | 90 |
18135896439 | def chess(h,w):
if (h+w) % 2 == 0:
return '#'
return '.'
while True:
H, W = map(int, input().split())
if H == 0 and W == 0:
break
for i in range(H):
for j in range(W):
print(chess(i,j), end='')
print()
print()
| Aasthaengg/IBMdataset | Python_codes/p02405/s821293644.py | s821293644.py | py | 246 | python | en | code | 0 | github-code | 90 |
26256702311 | from typing import Any
lista = []
maior=0
menor=0
soma=0
print ("Tigite 20 nรบmeros: ")
while len(lista) < 20:
item = (int(input()))
lista.append(item)
for i in lista:
soma += i
print("A mรฉdia dos nรบmeros digitados รฉ: ", soma /20)
for i in range(len(lista)):
if i == 0:
maior = menor =... | LSFagundes/SENAI---Programacao-de-Aplicativos | EXERCICIO-3.py | EXERCICIO-3.py | py | 525 | python | pt | code | 0 | github-code | 90 |
17967914009 | import sys
from collections import defaultdict
from heapq import heappush, heappop
def input():
return sys.stdin.readline().strip()
def dijkstra(adj_list, start):
n = len(adj_list)
dist = [float("inf")] * n
dist[start] = 0
pq = []
heappush(pq, (0, start))
visited = set()
while pq:
... | Aasthaengg/IBMdataset | Python_codes/p03634/s800994110.py | s800994110.py | py | 988 | python | en | code | 0 | github-code | 90 |
71344776618 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import seaborn as sns
from sklearn import linear_model
# In[2]:
def read_data(file):
return pd.read_csv(file)
# In[5]:
miami = read_data('miami_full.csv')
# In[7]:
# setup linear regression for tangerine production
tang_reg = linear_m... | brandonzPB/economics_data_analysis | 187/ANALYSIS_miami_tangerines.py | ANALYSIS_miami_tangerines.py | py | 1,344 | python | en | code | 0 | github-code | 90 |
16795996520 | import logging
from fhir.resources.bundle import Bundle
from fhir.resources.reference import Reference
from fhir.resources.patient import Patient
from fhir.resources.practitionerrole import PractitionerRole
from fhir.resources.servicerequest import ServiceRequest
from collections import OrderedDict
logger = logging.ge... | BSeR-PoC/BSeR-Recipient-API | util/bundleparser.py | bundleparser.py | py | 3,039 | python | en | code | 0 | github-code | 90 |
18540792549 | from collections import Counter
n=int(input())
a=list(map(int,input().split()))
s=[0]*(n+1)
for i in range(n):
s[i+1] = s[i] + a[i]
c = Counter(s)
n = set(s)
ans = 0
for i in n:
ans += ((c[i]*(c[i]-1))//2)
print(ans) | Aasthaengg/IBMdataset | Python_codes/p03363/s496899257.py | s496899257.py | py | 224 | python | en | code | 0 | github-code | 90 |
18050010119 | N=int(input())
T=list(map(int,input().split()))
A=list(map(int,input().split()))
cand=[-1]*N
cand2=[-1]*N
flag=1
ans=1
p=10**9+7
for i in range(N):
if i==0:
cand[i]=T[i]
else:
if T[i]!=T[i-1]:
cand[i]=T[i]
for i in range(N-1,-1,-1):
if i==N-1:
cand2[i]=A[i]
else:
... | Aasthaengg/IBMdataset | Python_codes/p03959/s567131683.py | s567131683.py | py | 1,197 | python | en | code | 0 | github-code | 90 |
74775105895 | #!/usr/bin/env python3
from collections import deque
from copy import deepcopy
from utils import read_input
TEST_INPUT = [
"Player 1:",
"9",
"2",
"6",
"3",
"1",
"",
"Player 2:",
"5",
"8",
"4",
"7",
"10",
]
TEST_INPUT_2 = [
"Player 1:",
"43",
"19",
... | ericrochow/AoC_20 | solutions/day22.py | day22.py | py | 4,921 | python | en | code | 1 | github-code | 90 |
25663613806 | target = int(input())
arr = input("")
num = [int(n) for n in arr.split()]
n = len(num)
for i in range(n):
for j in range(i + 1, n):
a= num[i]
b= num[j]
if a + b == target:
print(i,j)
| lyj-zhanghong/lecode1 | main.py | main.py | py | 223 | python | en | code | 0 | github-code | 90 |
18583983189 | N,A,B=input().split()
sum=0
for i in range(int(N)+1):
nums = list(str(i))
tmp = 0
for j in nums:
tmp = tmp + int(j)
if int(A)<=tmp:
if tmp<=int(B):
sum = sum + i
print(sum)
| Aasthaengg/IBMdataset | Python_codes/p03478/s057299295.py | s057299295.py | py | 218 | python | en | code | 0 | github-code | 90 |
2026817985 | import FreeCAD
import FreeCADGui
from pivy import coin
import os
class AddTriangle:
def __init__(self):
self.Path = os.path.dirname(__file__)
self.resources = {
'Pixmap': self.Path + '/../Resources/Icons/EditSurface.svg',
'MenuText': "Add Triangle",
'ToolTip'... | GitHub-XK/FreeCAD-Geomatics-Workbench | Surfaces/EditSurface.py | EditSurface.py | py | 3,819 | python | en | code | 0 | github-code | 90 |
32420595365 | '''
Practice Project: Teaching an AI to Play Flappy Bird using an Evolutionary Algorithm
Watts Dietrich
Nov 9 2020
In this practice project, the evolutionary AI algorithm called NEAT (NeuroEvolution of Augmenting Topologies)
is used to teach an AI to play the game "Flappy Bird." See the readme for more info.
'''
im... | TerraWatts/AI-FlappyBird | FlappyBird.py | FlappyBird.py | py | 11,382 | python | en | code | 0 | github-code | 90 |
37431938854 | import pygame, os, random,pygame.font
pygame.init()
gameWidth = 840
gameHeight = 640
picSize = 128
gameColumns = 4
gameRows = 3
padding = 10
leftMargin = (gameWidth - ((picSize + padding) * gameColumns)) // 2
rightMargin = leftMargin
topMargin = (gameHeight - ((picSize + padding) * gameRows)) // 2
bottomMargin = topM... | XaviLami/python_learn | jeux.py | jeux.py | py | 2,935 | python | en | code | 0 | github-code | 90 |
18109695839 | n,q = [int(s) for s in input().split()]
queue = []
for i in range(n):
name,time = input().split()
queue.append([name,int(time)])
time = 0
while queue:
processing = queue.pop(0)
t = min(processing[1], q)
time += t
processing[1] -= t
if processing[1] == 0:
print(processing[0],time)
else:
queue.append(process... | Aasthaengg/IBMdataset | Python_codes/p02264/s368571736.py | s368571736.py | py | 324 | python | en | code | 0 | github-code | 90 |
35225767719 | # pylint: disable=missing-docstring,protected-access
from AnyQt.QtCore import Qt
from AnyQt.QtWidgets import QApplication
from Orange.data import Table
from Orange.widgets.tests.base import WidgetTest, WidgetOutputsTestMixin
from Orange.classification import CN2Learner
from Orange.widgets.visualize.owruleviewer import... | biolab/orange3 | Orange/widgets/visualize/tests/test_owruleviewer.py | test_owruleviewer.py | py | 6,069 | python | en | code | 4,360 | github-code | 90 |
43441834717 | import csv
import pathlib
root = pathlib.Path(__file__).parent
files_path = root.joinpath("files")
# citire fisier csv
try:
with open(files_path.joinpath("salarii.csv")) as fin:
reader = list(csv.reader(fin))
except OSError:
print("File error.")
else:
lista_salarii = []
for i in reader:
... | tohhhi/it_school_2022 | Sesiunea 22/practice.py | practice.py | py | 1,360 | python | en | code | 0 | github-code | 90 |
43033298957 | # Dynamic Programming minimum coin sum #
def minCoins(coins,sum):
sumArr = [sum+100] * (sum+1)
sumArr[0] = 0
for i in range(1,sum+1):
for v in coins:
if v<=i and (sumArr[i-v]+1 < sumArr[i]):
sumArr[i] = sumArr[i-v]+1
return sumArr[sum]
coins = list(map(int,input()... | kaustav1808/competitive-programming | TopCoder/DPMinCoinSum.py | DPMinCoinSum.py | py | 383 | python | en | code | 0 | github-code | 90 |
34385422327 | import numpy as np
import math
#The Modell for the 2D Jensen shannonn data
class Model_2D:
def __init__(
self,
is_data: bool,
size: int,
sample_size: int = 2000,
):
# Constant parameters
self.num_syst = 1
self.sample_size = sample_size
# Histog... | CMSMUSiC/HDiv | Build_gc11/data_models_2D.py | data_models_2D.py | py | 5,632 | python | en | code | 0 | github-code | 90 |
28758383637 | '''Crie um programa que leia o ano de nascimento de sete pessoas. No final, mostre quantas pessoas ainda nรฃo atingiram a maioridade e quantas jรก sรฃo maiores.
'''
from datetime import date
ano_atual = date.today().year
total_maior = 0
total_menor = 0
for pessoas in range(1, 8):
data_de_nascimento = int(input(f'E... | robsonlnx/exercicios | ex054.py | ex054.py | py | 606 | python | pt | code | 0 | github-code | 90 |
39711008999 | NS_SERVER_TIMEOUT = 120
STANDARD_BUCKET_PORT = 11217
COUCHBASE_SINGLE_DEFAULT_INI_PATH = "/opt/couchbase/etc/couchdb/default.ini"
MEMBASE_DATA_PATH = "/opt/membase/var/lib/membase/data/"
MEMBASE_VERSIONS = ["1.5.4", "1.6.5.4-win64", "1.7.0", "1.7.1", "1.7.1.1", "1.7.2"]
COUCHBASE_DATA_PATH = "/opt/couchbase/var/lib/cou... | DavidAlphaFox/couchbase | testrunner/lib/testconstants.py | testconstants.py | py | 5,156 | python | en | code | 0 | github-code | 90 |
4980857626 | import flask
from flask import Flask, render_template, request, Response
from Main.config import Config
from Main.project.forms import MessageForm
app = Flask(__name__)
app.config.from_object(Config)
@app.route("/", methods=['get', 'post'])
def index():
server_message = ''
client_message = ''
if request... | skirdapa/Stepic_Web_Framework_Flask_Introduction | Main/app.py | app.py | py | 1,998 | python | en | code | 0 | github-code | 90 |
3994698248 | import sys
input = sys.stdin.readline
def iq(N, arr):
if N > 2:
a0 = arr[0]
a1 = arr[1]
a2 = arr[2]
if a1 == a0:
x = 0
else:
x = (a2 - a1) // (a1 - a0)
y = a1 - a0 * x
for i in range(0, N - 1):
if arr[i] * x + y != arr... | WonyJeong/algorithm-study | WonyJeong/Soma/1111.py | 1111.py | py | 669 | python | en | code | 2 | github-code | 90 |
18380554629 | import math
A, B, C, D = map(int, input().split())
cd = (C * D) // math.gcd(C, D)
pac, qac = divmod(A, C)
pad, qad = divmod(A, D)
pacd, qacd = divmod(A, cd)
pbc, qbc = divmod(B, C)
pbd, qbd = divmod(B, D)
pbcd, qbcd = divmod(B, cd)
pac = pac - 1 if qac == 0 else pac
pad = pad - 1 if qad != 0 else pad
pacd = pacd -... | Aasthaengg/IBMdataset | Python_codes/p02995/s978500214.py | s978500214.py | py | 417 | python | en | code | 0 | github-code | 90 |
39090762329 | import csv
from telegram import Update
from telegram.ext import CallbackContext
import os.path
db = []
id = 0
def init_db(file_name='DB.csv'):
global db
db_file_name = file_name
db.clear()
if os.path.exists(db_file_name):
with open(db_file_name, 'r', newline='') as csv_file:
re... | Dimonchik39/home_work_10 | function.py | function.py | py | 2,265 | python | en | code | 0 | github-code | 90 |
23097673989 | import paho.mqtt.client as mqtt
import tkinter as tk
mqttBroker = "broker.emqx.io"
subsTopic = "StudyClub/Restu/Publis"
# Fungsi callback ketika koneksi ke broker MQTT berhasil
def on_connect(client, userdata, flags, rc):
status_label.config(text='Terhubung ke broker MQTT dengan kode: ' + str(rc))
client.subs... | Nuur-R/MyLab-EmbeddedProgram | python_client/MqttSubs_GUI.py | MqttSubs_GUI.py | py | 1,657 | python | id | code | 0 | github-code | 90 |
23061862097 | import get_psql_table
import pandas as pd
import matplotlib.pyplot as plt
def plot_queue_length_table(system_name,agreggate_by):
indate_table = get_psql_table.get_table('tasks.indate as time',system_name+'.tasks')
indate_table = add_queue_column(indate_table,1)
rundate_table = get_psql_table.get_table(... | SergeiShumilin/pyJSCC | JSCC_data_base_analisis/queue_length_improved.py | queue_length_improved.py | py | 1,696 | python | en | code | 0 | github-code | 90 |
12830586822 | import torch
from torch import nn
import torch.nn.functional as F
class Feedforward(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super(Feedforward, self).__init__()
self.input_size = input_size
self.hidden_size = hidden_size
self.output_size = output_size
... | Baidicoot/rl-test | goofy.py | goofy.py | py | 4,556 | python | en | code | 0 | github-code | 90 |
16771423376 | import random as rd
import csv
# Dicionรกrio com as informaรงรตes a serem selecionadas
dic = {
"idade": ['18-24 anos', '25-35 anos', '36-49 anos', 'Mais de 50 anos'],
"genero": ["Masculino", "Feminino", "Outros", "Prefiro nรฃo dizer"],
"estado": ['Acre', 'Alagoas', 'Amapa', 'Amazonas', 'Bahia', 'Ceara... | ViniVin1/projeto-ipiranga | gerar-respostas.py | gerar-respostas.py | py | 3,794 | python | pt | code | 0 | github-code | 90 |
23695297922 | import pandas as pd
import pandas_datareader.data as web
import numpy as np
import matplotlib.pyplot as plt
# NIKKEI225ใฎใใผใฟใๅๅพ
df = web.DataReader("NIKKEI225", 'fred', '1990-01-01', '2023-06-08')
# ๅฏพๆฐๅคๆใ่กใ
df['LogReturn'] = np.log(df['NIKKEI225']).diff()
# ใใญใใ
plt.figure(figsize=(10, 5))
plt.plot(df.index, df['LogR... | Kouhei-Takagi/PythonAlmostEveryday | N225LogTrend/main.py | main.py | py | 514 | python | en | code | 1 | github-code | 90 |
18221398089 | n=int(input())
y=list(map(int,input().split()))
from collections import Counter
lhs=Counter([j+y[j] for j in range(n)])
rhs=Counter([j-y[j] for j in range(n)])
count=0
for i in lhs:
if i in rhs:
count+=lhs[i]*rhs[i]
print(count)
| Aasthaengg/IBMdataset | Python_codes/p02691/s742005940.py | s742005940.py | py | 239 | python | en | code | 0 | github-code | 90 |
14079723371 | # -*- coding: utf-8 -*-
from base import PollingModule
import urllib2
import json
class BitcoinPriceModule(PollingModule):
bars = u' โโโโโ
โโโ'
def __init__(self, cfg):
PollingModule.__init__(self, 'bitcoin')
self.buy_price = "?"
self.sell_price = "?"
self.config(cfg)
se... | soupytwist/i3pandabar | module_bitcoin.py | module_bitcoin.py | py | 3,227 | python | en | code | 0 | github-code | 90 |
29528950120 | import math
from matplotlib import pyplot as plt
def CalcExp(x):
return math.e ** x
def DistributionF(firstChi2, secondChi2):
randomVariables = []
length = len(firstChi2)
for i in range(0, length):
randomVariable = firstChi2[i] / secondChi2[i]
randomVariables.append(randomVar... | yaitox/RandomGenerator | src/Variables/randomVariable.py | randomVariable.py | py | 1,706 | python | en | code | 0 | github-code | 90 |
15296609506 | from pwn import *
# init
os.environ['LD_PRELOAD'] = '/home/dumbass/Desktop/Problem/zerostorage/libc-2.19.so'
r = process('./zerostorage')
e = ELF('./zerostorage')
libc = e.libc
context.arch = 'amd64'
#context.log_level = 'debug'
def insert(content):
r.sendlineafter('Your choice: ', '1')
r.sendlineafter('Leng... | Kyle-Kyle/Pwn | heap_overflow/zerostorage_4.0/writeup/solve.py | solve.py | py | 2,204 | python | en | code | 16 | github-code | 90 |
28063249981 | # Joseph's problem
'''
in a closed circle of people, starting from an index, we kill people k places from them, then so on in a loop. Last man standing wins
TC.: O(n)
'''
def solve(index, arr, k):
if len(arr) == 1:
return arr
to_die = (index + k - 1) % len(arr)
print("to die", to_di... | gowthamkishorem/DSA_GeeksforGeeks-Self-Placed- | DSA/001_Recursion/GFG/josephs.py | josephs.py | py | 547 | python | en | code | 0 | github-code | 90 |
6499580439 | n = int(input("Enter number of processes : "))
#p = [{"id":0, "arr":0, "burst":0}]
arrival = []
burst = []
finish = []
tat = []
wt = []
print()
print("Kindly enter the arrival time in ascending order\n")
for i in range(n):
val = int(input(f"Enter arrival time for P{i} : "))
arrival.append(val)
print()
for i i... | Nayan-das08/CPU-Scheduling | fcfs.py | fcfs.py | py | 939 | python | en | code | 0 | github-code | 90 |
20379727659 | import numpy as np
import matplotlib.pyplot as plt
def datagen(n, fun=None):
if fun == 'sin':
x = np.linspace(-10, 10, n)
else:
x = np.linspace(0, 5, n)
X_train = np.empty(0)
X_test = np.empty(0)
Y_train = np.empty(0)
Y_test = np.empty(0)
for i in range(n):
if fun ==... | iver62/A2DI | tp3/tp3_ex2.py | tp3_ex2.py | py | 3,132 | python | en | code | 0 | github-code | 90 |
18115667639 | import sys
input = sys.stdin.readline
if __name__ == '__main__':
n = int(input())
A = list(map(int, input().split()))
cnt = 0
def merge(A, left, mid, right):
global cnt
n1 = mid - left
n2 = right - mid
L=[10**9+1]*(n1+1) # ๅ
ใซๅ
ฅใใใฃใๆนใฎ้
ๅใใใซใใซใใชใใใ
R=[10**9+1]*(n2+1)
for i in range(n1):
... | Aasthaengg/IBMdataset | Python_codes/p02272/s731883096.py | s731883096.py | py | 840 | python | en | code | 0 | github-code | 90 |
1518682291 | from __future__ import unicode_literals, print_function
import sys
import json
import re
import bugsnag
import requests
import yaml
from flask import request, render_template, make_response, url_for
from flask_dance.contrib.github import github
from flask_dance.contrib.jira import jira
from openedx_webhooks import ap... | lduarte1991/openedx-webhooks | openedx_webhooks/views/github.py | github.py | py | 16,291 | python | en | code | null | github-code | 90 |
1263342108 | """Tests execution of all module examples.
Tests should run as fast as possible to enable fast feedback during code
development. This test script aims to only test the execution of examples
e.g. to check for runtime errors if the module's api was changed,
but the exmaple has not yet been updated accordingly.
The dire... | PrasadBabarendaGamage/parameter-estimation | tests/example_execution/execute_all_examples.py | execute_all_examples.py | py | 4,000 | python | en | code | 1 | github-code | 90 |
18236486296 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
diego/study.py was created on 2019/03/21.
file in :relativeFile
Author: Charles_Lai
Email: lai.bluejay@gmail.com
"""
from typing import Union
from typing import Type
from typing import Tuple
from typing import Set
from typing import Optional
from typing import List
from... | lai-bluejay/diego | diego/study.py | study.py | py | 34,931 | python | en | code | 8 | github-code | 90 |
17409216990 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Compare piControl and abrupt-4xCO2 timeseries of tas.
"""
from cmiputil import esgfsearch
from cmiputil.timer import timer
from pprint import pprint
from os.path import basename
from pathlib import Path
import argparse
import json
import xarray as xr
from cftime impor... | RIST-tinoue/cmiputil | samples/pc-ab4co2-ts.py | pc-ab4co2-ts.py | py | 6,877 | python | en | code | 0 | github-code | 90 |
72668696936 | class DTMF:
@classmethod
def _dtmf(cls, keypad_strokes):
text = ""
_keys = {"1336-941": "0",
"1209-697": "1",
"1336-697": "2",
"1477-697": "3",
"1209-770": "4",
"1336-770": "5",
"1477-770": "6"... | bhavyakh/decrypto | decrypto/cipher/dtmf.py | dtmf.py | py | 1,031 | python | en | code | 12 | github-code | 90 |
44086358640 |
file = open("Greek.txt", mode='r', encoding='UTF-8')
edits = []
for i in range(0,24):
line = file.readline()
if not line: break
temp = line.split()
edit = [" //"+temp[0],"\n const std::string", temp[1]+"(\""+temp[2]+"\");"]
edits.append(edit)
for i in range(0,24):
line = file.readline()... | Markgraf-Oh/Greek-Alphabet-for-Cpp | Greek.py | Greek.py | py | 694 | python | en | code | 0 | github-code | 90 |
70589936618 | from bson.objectid import ObjectId
from naff import Scale, Permissions
from dataclasses import dataclass
"""
This is for your main DB objects.
"""
@dataclass(slots=True)
class User:
_id: ObjectId
id: int
@dataclass(slots=True)
class Guild:
_id: ObjectId
id: int
class AdminScale(Scale):
def __i... | KAJdev/bot-starter | models.py | models.py | py | 578 | python | en | code | 0 | github-code | 90 |
41901016084 | import struct
from .core import encode_block, derive_keys
class DesKey():
def __init__(self, key: bytes):
self.__key = key
def encrypt(self, message: bytes, padding=True):
return handle_cipher(message, self.__key, padding, True)
def decrypt(self, message: bytes, padding=True):
re... | SingularityUrBrain/network-security | Kerberos_des/des/base.py | base.py | py | 1,559 | python | en | code | 0 | github-code | 90 |
5838023357 | from __future__ import print_function
import subprocess
import configparser
import copy
import datetime as dt
import math
import numpy as np
import pandas as pd
from pandas.tseries.offsets import *
from sklearn.tree import DecisionTreeClassifier, export_graphviz
from scipy.stats.stats import spearmanr
config = configp... | salomeow/fyp_server_py | 3_predict_sed.py | 3_predict_sed.py | py | 4,314 | python | en | code | 0 | github-code | 90 |
36293447394 | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 9 13:08:47 2022
@author: qomon
"""
def consumer_info(name,surname,birth,place,email='',number=None):
consumer={'name':name,
'surname':surname,
'birth':birth,
'place':place,
'email':email,
'number'... | Farrukh-Maruf/python-works-from-anvarnarz | 20thlessson.def.asking..py | 20thlessson.def.asking..py | py | 1,167 | python | en | code | 4 | github-code | 90 |
24008790433 | from make_prediction import make_prediction, data_merge, preprocess_headlines, preprocess_posts, classify_news, calc_change_sentiment, get_news,get_stock,get_tweets
import flask
from flask import request
from markupsafe import escape
from flask import render_template,Flask, redirect, url_for, request
app = flask.Flask... | keatonmaruyali/LighthouseLabs_DS_Final | app.py | app.py | py | 1,686 | python | en | code | 8 | github-code | 90 |
37118933073 | # ### Ex.4: Find the Duplicate Number
# Given an array nums containing n + 1 integers
# where each integer is between 1 and n (inclusive),
# prove that at least one duplicate number must exist.
# Assume that there is only one duplicate number, find the duplicate one.
# Note:
# You must not modify the array (assume the ... | nanw01/python-algrothm | Python Algrothm Advanced/practice/050204findDuplicate.py | 050204findDuplicate.py | py | 905 | python | en | code | 1 | github-code | 90 |
18473908389 | N, X = map(int, input().split())
ans = 0
for i in range(N, -1, -1):
if X < 2**(i + 1) - 1:
X -= 1
elif X > 2 ** (i + 1) - 1:
X -= 2 ** (i + 1) - 1
ans += 2 ** i
else:
ans += 2 ** i
break
if X == 0:
break
#print(X, ans)
print(ans) | Aasthaengg/IBMdataset | Python_codes/p03209/s610695881.py | s610695881.py | py | 300 | python | en | code | 0 | github-code | 90 |
18420027689 | # abc124_c.py
# https://atcoder.jp/contests/abc124/tasks/abc124_c
# C - Coloring Colorfully /
# ๅฎ่กๆ้ๅถ้: 2 sec / ใกใขใชๅถ้: 1024 MB
# ้
็น : 300็น
# ๅ้กๆ
# ๅทฆๅณไธๅใซ Nๆใฎใฟใคใซใไธฆใใงใใใๅใฟใคใซใฎๅใใฎ่ฒใฏ้ทใ N ใฎๆๅญๅ Sใง่กจใใใพใใ
# ๅทฆใใ i็ช็ฎใฎใฟใคใซใฏใS ใฎ i็ช็ฎใฎๆๅญใ 0 ใฎใจใ้ป่ฒใงใ1 ใฎใจใ็ฝ่ฒใงๅกใใใฆใใพใใ
# ใใชใใฏใใใใคใใฎใฟใคใซใ้ป่ฒใพใใฏ็ฝ่ฒใซๅกใๆฟใใใใจใงใใฉใฎ้ฃใๅใ 2ๆใฎใฟใคใซใ็ฐใชใ่ฒใงๅกใใใฆใใใใใซใใใใงใใ
# ... | Aasthaengg/IBMdataset | Python_codes/p03073/s890499377.py | s890499377.py | py | 4,180 | python | ja | code | 0 | github-code | 90 |
18333051919 | S = list(input())
K = int(input())
if len(set(S)) == 1:
print(len(S)*K //2)
else:
cnt = [1]
for i in range(len(S)-1):
if S[i] == S[i+1]:
cnt[-1] += 1
else:
cnt.append(1)
res = 0
for c in cnt:
res += c//2*K
if S[0] == S[-1]:
if (cnt[0... | Aasthaengg/IBMdataset | Python_codes/p02891/s110231061.py | s110231061.py | py | 381 | python | en | code | 0 | github-code | 90 |
30159940885 | def is_prime(num):
if num==2:
return True
for i in range(2,num):
if num%i==0:
return False
return True
def prime_range(num):
for i in range(2,num+1):
if is_prime(i):
yield i
def prime_factors(num):
lst = []
i = 2
while num>1:
if num%... | JakAsAlways/prime_package | funcs.py | funcs.py | py | 414 | python | en | code | 0 | github-code | 90 |
43057812930 | import os
import time
import torch
import numpy as np
import open3d as o3d
from PIL import Image
class AverageMeter(object):
"""Computes and stores the average and current value"""
def __init__(self):
self.reset()
def reset(self):
self.val = 0
self.avg = 0
self.sum = 0.0
self.sq_sum = 0.0
... | WHU-USI3DV/FreeReg | utils/utils.py | utils.py | py | 12,696 | python | en | code | 73 | github-code | 90 |
17984731889 | s = input()
se = set(list(s))
# print('se', se)
if len(se) == 1:
print(0)
exit()
def f(v):
s_list = s.split(v)
s_list = [len(i) for i in s_list if i]
return max(s_list)
ans = 1000
for i in se:
v = f(i)
ans = min(ans, v)
print(ans)
# serval 6,1
# srvvl 5,2
# 4,3
# โ svvv โ vvv
... | Aasthaengg/IBMdataset | Python_codes/p03687/s684323459.py | s684323459.py | py | 466 | python | en | code | 0 | github-code | 90 |
43855201560 | import PySimpleGUI as sg
class Widget:
"""ใฆใฃใธใงใใใๅฎ็พฉ"""
@staticmethod
def relief():
"""ใชใชใผใ"""
return sg.T(text='Trello GUI',
size=(30, 1),
justification='center',
font=("Helvetica", 20),
relief=sg.RELIEF_RIDG... | qlitre/pysimplegui-trello | frontend.py | frontend.py | py | 4,066 | python | en | code | 3 | github-code | 90 |
23561187884 | """
- Author: Sharif Ehsani
- Date: December 2020
- https://github.com/sharifehsani
In the Spotlight:
Set Operations
In this section you will look at Program 10-3, which demonstrates various set operations.
The program creates two sets: one that holds the names of students on the baseball team
and another that holds ... | sharifehsani/starting-out-with-python | chapter10/set_operation.py | set_operation.py | py | 5,617 | python | en | code | 0 | github-code | 90 |
34887661468 | from telethon import TelegramClient, events, sync
from tkinter import *
import tkinter
import time
import asyncio
import wckToolTips
from PIL import ImageTk, Image
# DEFINITIONS
HEIGHT = 300
WIDTH = 750
root = Tk()
root.title("M.E. Consultas")
# root.iconbitmap('ME.png')
canvas = Canvas(root, height=HEIGHT, width=WI... | moisesfelipee/Telegram | Local.py | Local.py | py | 10,113 | python | en | code | 1 | github-code | 90 |
18331491719 | import bisect
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
ans=0
for i in range(N-1):
for k in range(i+1,N-1):
a=L[i]+L[k]
b=bisect.bisect_left(L,a)
ans=ans+(b-k-1)
print(ans) | Aasthaengg/IBMdataset | Python_codes/p02888/s165675557.py | s165675557.py | py | 222 | python | en | code | 0 | github-code | 90 |
28398838159 | """
This module contains methods to make it easy to align pandas objects that have time series indexes.
"""
from typing import Callable, Optional, Union
import numpy as np
import pandas as pd
from aika.time.utilities import _get_index, _get_index_level
from aika.utilities.pandas_utils import IndexTensor, Level, Tenso... | phil20686/aika | libs/time/src/aika/time/alignment.py | alignment.py | py | 6,247 | python | en | code | 2 | github-code | 90 |
70491599337 | import numpy as np
from matplotlib import pyplot as plt
# %matplotlib inline
from dle.inference import load_image, rescale, crop_center, normalize
import matplotlib.patches as patches
import json
# img = load_image('http://images.cocodataset.org/val2017/000000397133.jpg')
# plt.imshow(img)
all_box = np.load('SS... | zejiangh/Filter-GaP | DET/detection_plot.py | detection_plot.py | py | 1,610 | python | en | code | 30 | github-code | 90 |
28793652227 |
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.14.4
# kernelspec:
# display_name: pytorch
# language: python
# name: python3
# ---
# ## Tensors Operations
#
# Tensors are the building b... | tsemach/ai-course | 01-tensors-introduction/01-tensors-introduction.py | 01-tensors-introduction.py | py | 5,407 | python | en | code | 0 | github-code | 90 |
27000293708 | # -*- coding:utf-8 -*-
'''
่ฏดๆ๏ผ
ๅจmatplotlibๅบ็กไธ็็ปๅพๆจกๅ
'''
import matplotlib.pyplot as plt;
#่ฎพ็ฝฎfigure็ไธญๆๆพ็คบ
#้ปไฝ SimHei
#ๅพฎ่ฝฏ้
้ป Microsoft YaHei
#ๅพฎ่ฝฏๆญฃ้ปไฝ Microsoft JhengHei
#ๆฐๅฎไฝ NSimSun
#ๆฐ็ปๆไฝ PMingLiU
#็ปๆไฝ MingLiU
#ๆ ๆฅทไฝ DFKai-SB
#ไปฟๅฎ FangSong
#ๆฅทไฝ KaiTi
#ไปฟๅฎ_GB2312 FangSong_GB2312
#ๆฅทไฝ_GB2312 KaiTi_GB2312
def set_ch():
... | hitosky/python_script | figure/drawfigure.py | drawfigure.py | py | 3,283 | python | en | code | 0 | github-code | 90 |
23650880553 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import multiprocessing
import wx
from proxy_server import (
ServerManager,
q,
IP,
PORT
)
import time
from wx.adv import TaskBarIcon
import images
import requests
from wx.lib.agw import infobar
import getpass
import threading
from wx.lib.delayedresult import ... | FuriousSlade/PS4DownloadHepler | ui.py | ui.py | py | 4,578 | python | en | code | 0 | github-code | 90 |
45203418798 | import gym
from random import randint
import numpy as np
# Crear el entorno MountainCar-v0
env = gym.make('MountainCar-v0')
def discretizar(valor):
estado=np.array(valor[0][:2])
low=env.observation_space.low
high=env.observation_space.high
aux=((estado-low)/(high-low))*20
return tuple(aux.astype(np... | edwinscastrob/IA | Algoritmos/Qlearning.py | Qlearning.py | py | 1,425 | python | es | code | 0 | github-code | 90 |
16516293012 | #!/usr/bin/env python3
# dataset: https://www.kaggle.com/lehaknarnauli/spotify-datasets
import json
import time
import numpy
import numpy as np
from regtree.tree import RandomForest
from utils import load_data_from_csv
def check(
train,
test,
feedback: bool,
trees: int,
sampl... | RouNNdeL/uma-projekt | spotify.py | spotify.py | py | 2,802 | python | en | code | 0 | github-code | 90 |
20163500081 | #-*-coding: UTF-8 -*-
'''
Created on 2019ๅนด12ๆ9ๆฅ
@author: LIJY
'''
from selenium.webdriver.remote.webdriver import WebDriver
import time
from futurn_loan.common.mylogging import mylogging
from futurn_loan.common.basepath import screenshot_path
import os
from selenium.webdriver.support.wait import WebDriverWait
from sel... | 531612146/web_auto | common/basepage.py | basepage.py | py | 8,784 | python | en | code | 0 | github-code | 90 |
43344620656 | import torch
import torch.nn as nn
from torch.autograd import Variable
class Encoder(nn.Module):
def __init__(self, nc, nef, nz, isize, device):
super(Encoder, self).__init__()
# Device
self.device = device
# Encoder: (nc, isize, isize) -> (nef*8, isize//16, isize//16)
sel... | szadedyurina/vae_serve | server/model.py | model.py | py | 4,930 | python | en | code | 0 | github-code | 90 |
8571526036 | # -*- coding: utf-8 -*-
'''
Site
A site import and analysis class built
with the pandas library
'''
import anemoi as an
import pandas as pd
import numpy as np
import itertools
class Site(object):
'''Subclass of the pandas dataframe built to import and quickly analyze
met mast data.'''
... | coryjog/anemoi | anemoi/site.py | site.py | py | 7,687 | python | en | code | 19 | github-code | 90 |
13328083563 | '''
app.py
The script that runs this bot
'''
import praw
from reddit.config import REDDIT
from reddit import wikipedia
def wiki_testing():
'''Practicing finding wikipedia links
in a string'''
comment = 'steins gate is pretty cool https://en.wikipedia.org/wiki/Steins;Gate_(TV_series)'
# prints a list containing... | JJDProjects/wiki_search_bot | app.py | app.py | py | 968 | python | en | code | 1 | github-code | 90 |
35402739976 | # coding: utf-8
#ๅ่ชใใฎๆฐใใซใฆใณใใใ
#ๅ
ฅๅใใใๆๅญๅใในใใผในใงๅๅฒใใ
strlist = input().split(" ")
# ้่คใใๆๅญๅใ้คๅคใใ
N = []
for x in strlist:
if x not in N:
N.append(x)
# ๅ่ชใฎๆฐใใซใฆใณใใใฆๅบๅ
for i in range(len(N)):
print(N[i],strlist.count(N[i]))
| Automa237/Python_training | str_counter.py | str_counter.py | py | 345 | python | ja | code | 1 | github-code | 90 |
18546707859 | n = int(input())
x = list(map(int,input().split()))
y = sorted(x)
for i in x:
if y[(n+1)//2-1] >= i:
print(y[(n+1)//2])
else:
print(y[(n+1)//2-1]) | Aasthaengg/IBMdataset | Python_codes/p03379/s884976672.py | s884976672.py | py | 173 | python | en | code | 0 | github-code | 90 |
17984153539 | n,m = map(int,input().split())
mod = 10**9+7
def mod_f(i):
ans = 1
for i in range(1,i+1):
ans *= i
ans %= mod
return ans
if abs(n-m) > 1:
print(0)
elif n == m:
print((mod_f(n)*mod_f(m)*2)%mod)
else:
print((mod_f(n)*mod_f(m))%mod) | Aasthaengg/IBMdataset | Python_codes/p03681/s907212145.py | s907212145.py | py | 270 | python | en | code | 0 | github-code | 90 |
10735515445 | import matplotlib.pyplot as plt
import os.path
import csv
from matplotlib import style
style.use('bmh')
def busca_1(ano,mod,gen):#--------------------------BUSCA 1 ------------------------------------------------------
arq = open('vgsales.csv', 'r')
lista=[] ... | michloliveira/Projeto-IP_2018--Python | P-version 3.8.1/P-version 3.8.1.py | P-version 3.8.1.py | py | 47,013 | python | pt | code | 0 | github-code | 90 |
44355280626 | #adding next 3 friends due to input func
def main():
print('Adding next 3 friends due to function input.')
name4 = input('Name #4:')
name5 = input('Name #5:')
name6= input('Name #6:')
file = open('names.txt', 'a')
file.write(name4 + '\n')
file.write(name5 + '\n')
file.write(name6 + '\n'... | PythonProfessional83/operations_on_files_exceptions | adding_names_tofile.py | adding_names_tofile.py | py | 588 | python | en | code | 0 | github-code | 90 |
17952691299 | import sys
readline = sys.stdin.readline
# A + Bใฎ็ตใฟๅใใใฏใใใใ1๏ฝ30ใฎใใกไฝใใๆฐๅญใฎใฟใชใฎใงๅ
จๆข็ดข
A,B,C,D,E,F = map(int,readline().split())
ans = [0,0]
maxrate = 0.0
for a in range(0,F,100 * A):
for b in range(0,F,100 * B):
if a == 0 and b == 0:
continue
if a + b > F:
break
water = a + b
# waterใซๅฏพใใฆๆบถใใๆๅคง... | Aasthaengg/IBMdataset | Python_codes/p03599/s950595895.py | s950595895.py | py | 868 | python | en | code | 0 | github-code | 90 |
25901310278 | #!/usr/bin/env python3
import image1
import image2
import target_detector
import roslib
import sys
import rospy
import cv2
import numpy as np
import message_filters
from math import pi
from math import atan2
from std_msgs.msg import String
from sensor_msgs.msg import Image
from std_msgs.msg import Float64MultiArray, F... | TheCopperMind/IVR_CW1 | src/joint_state_estimation.py | joint_state_estimation.py | py | 15,311 | python | en | code | 1 | github-code | 90 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.