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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
40122267120 | # Chenyue Hu u1275460
# Assignment 1 Animate shape
from graphics import *
def eyes(x, y, win):
c1 = Circle(Point(x, y), 20)
c1.setFill("white")
c1.draw(win)
def draw_a_line(x,y,win):
aline = Line(Point(x,y), Point(x + 20, y))
aline.draw(win)
def shape_body(x, y, win):
body1 = ... | HetonDH/PythonCodeAssignment | A1/AnimateShape.py | AnimateShape.py | py | 1,059 | python | en | code | 0 | github-code | 90 |
36600228448 | import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import pyautogui
i... | onulee/https---github.com-onulee-kdigital1 | 05.web/web0426/w0426_02_야놀자.py | w0426_02_야놀자.py | py | 4,304 | python | en | code | 0 | github-code | 90 |
35383452674 | # -*- coding: utf-8 -*-
from sqlalchemy import desc
from application import session_scope
from application.model.use_case import UseCase, UseCaseInterfaceRelation, UseCaseParameterRelation
from application.model.batch import BatchUseCaseRelation
def add_use_case(**kwargs):
with session_scope() as session:
... | cnboysliber/AutoTest | application/api/use_case.py | use_case.py | py | 9,261 | python | en | code | 4 | github-code | 90 |
23902072839 | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.shortcuts import redirect
from projeto.models import Projeto
from desenvolvedor.models import Trabalha_em
from django.contrib import messages
from django.contrib.auth.forms import UserCreationForm
class Desenvolvedor_helper:
@staticme... | mvsousa/university | database_systems/sgrs/desenvolvedor/helper.py | helper.py | py | 2,071 | python | pt | code | 0 | github-code | 90 |
30950488850 | class Solution(object):
def countMatches(self, items, ruleKey, ruleValue):
"""
:type items: List[List[str]]
:type ruleKey: str
:type ruleValue: str
:rtype: int
"""
c=0
for i in items:
if ruleKey=="type":
if i[0] == ruleValue... | AaroneGeorge/LEETCODE | string/1773/Solution.py | Solution.py | py | 697 | python | en | code | 0 | github-code | 90 |
23190145358 | from bed.apnmc import APNMC, IS_Proposal
from bed.vnmc import VNMC
from simulator.toy2 import Toy
import torch
import numpy as np
import pickle
import matplotlib.pyplot as plt
def compute_ground_truth_eig(args):
design1, design2, noise_std, n_out, n_in = args
init_design = torch.cat((design1,design2))
sim... | ziq-ao/GradEIG | scripts/experiments_toy_ground_truth.py | experiments_toy_ground_truth.py | py | 1,177 | python | en | code | 2 | github-code | 90 |
17959219774 | import random
# Gera um número aleatório entre 1 e 100
numero_secreto = random.randint(1, 100)
# Inicializa a variável de contagem de tentativas
tentativas = 0
print("Bem-vindo ao jogo Quente e Frio!")
print("Tente adivinhar o número secreto entre 1 e 100.")
while True:
# Solicita um palpite ao joga... | AnaMedlyn/Python | Desafios/brincadeira quente e frio.py | brincadeira quente e frio.py | py | 964 | python | pt | code | 0 | github-code | 90 |
30507055715 | '''
@auther: Samaneh
'''
from Bio import SeqIO
from pandas import ExcelWriter
import numpy as np
import pandas as pd
#sprot
SprotRef1 = "/home/samaneh/AHRD/data/reference/non_red_sprot_batch_3_references.fasta"
SprotRef2 = "/home/samaneh/AHRD/data/reference/non_red_sprot_batch_4_references.fasta"
#Tair
TairRef1 = "/... | samiscoding/blacklistsTest | Sprot_Tair_Blumeria_ReferenceFilteredByBlacklist.py | Sprot_Tair_Blumeria_ReferenceFilteredByBlacklist.py | py | 3,079 | python | en | code | 0 | github-code | 90 |
18561467889 | n = int(input())
s = list(input() for _ in range(n))
cnt = [0] * 5
for x in s:
if x[0] == 'M':
cnt[0] += 1
if x[0] == 'A':
cnt[1] += 1
if x[0] == 'R':
cnt[2] += 1
if x[0] == 'C':
cnt[3] += 1
if x[0] == 'H':
cnt[4] += 1
if cnt.count(0) > 2:
print(0)
... | Aasthaengg/IBMdataset | Python_codes/p03425/s203902911.py | s203902911.py | py | 497 | python | en | code | 0 | github-code | 90 |
35643357780 | # python3
class Process:
def __init__(self, number, processing, seconds):
self.number = number
self.processing = processing
self.seconds = seconds
class Data:
def __init__(self, number, taken):
self.number = number
self.taken = taken
def parallel_processing(n, m, dat... | DA-testa/parallel-processing-ElinaNorenberga | main.py | main.py | py | 1,682 | python | en | code | 0 | github-code | 90 |
3816692875 | #######################################################
### Fahimeh Baftizadeh: ###############################
#######################################################
# How to run this code from the command line:
# Make sure, you have a directory for output such as "new_keras_models/"
#python -m Keras_imbalanced_trai... | Fahimeh1983/NN_patchseq_FACs_mapping | Keras_imbalanced_trainer.py | Keras_imbalanced_trainer.py | py | 6,981 | python | en | code | 0 | github-code | 90 |
74305925415 | '''
BFS + DFS on graph
1. BFS from end to start, count each node's distance to end, saving a distance hashmap
2. DFS from start to end, ensure every step make the distance to end closer!
3. finding next_words: every ward has L char, each char has 25 changes, new word shall in dict
errors
1. how to import deque
2. wron... | fudigit/Basic_Algorithm | 7.Permutation-based&Graph-based_DFS/121.Word_Ladder_II.py | 121.Word_Ladder_II.py | py | 3,962 | python | en | code | 0 | github-code | 90 |
39819246607 | import os
import streamlit as st
from pymongo import MongoClient
import pandas as pd
from bson import ObjectId
class helper:
def __init__(_self):
"""
Constructor for the helper class.
Contains helper fuctions for this streamlit application.
"""
_self.gpt_api_key = st.se... | mattwibboweaver/CGPT4 | helper.py | helper.py | py | 1,462 | python | en | code | 0 | github-code | 90 |
18004000359 | import sys,copy
from itertools import accumulate
input=sys.stdin.readline
N=int(input())
A=list(map(int,input().split()))
A=list(accumulate(A))
B=copy.copy(A)
test1=0
s=0
for i in range(0,N):
A[i]+=s
if i%2==0:
if 0>=A[i]:
test1+=1-A[i]
s+=1-A[i]
else:
if A[i]>=0:
... | Aasthaengg/IBMdataset | Python_codes/p03739/s470455929.py | s470455929.py | py | 600 | python | en | code | 0 | github-code | 90 |
18378824959 | # A - Security
# https://atcoder.jp/contests/abc131/tasks/abc131_a
s = input()
result = 'Good'
i = 0
j = 1
while j < len(s):
if s[i] == s[j]:
result = 'Bad'
break
i += 1
j += 1
print(result)
| Aasthaengg/IBMdataset | Python_codes/p02993/s816511498.py | s816511498.py | py | 223 | python | en | code | 0 | github-code | 90 |
44140998001 | class Solution:
def leafSimilar(self, root1: Optional[TreeNode], root2: Optional[TreeNode]) -> bool:
"""
Time: O(n+m)
Space: O(max(log(n), log(m))) to O(max(n, m))
"""
seq = []
def dfs(node: TreeNode):
if not node.left and not node.right:
... | rajrkane/daileetcode | 872_leafSimilar.py | 872_leafSimilar.py | py | 572 | python | en | code | 0 | github-code | 90 |
30767350958 | import math
import random
import numpy as np
import pandas as pd
import folium
import os
import matplotlib.pyplot as plt
from matplotlib.pylab import mpl
mpl.rcParams['font.sans-serif'] = ['SimHei'] # 添加这条可以让图形显示中文
#####对一系列装卸货点进行适当的路径规划,在满足约束条件(客户需求、车辆载重和容积、车型、车辆行驶里程、配送时间窗、配送中心数量等限制)
# 和目标最优化(路程最短、成本最... | Mrk298/PSO_routes | my_cvrp.py | my_cvrp.py | py | 21,022 | python | en | code | 13 | github-code | 90 |
19790762841 | from collections import deque
def can_construct(original, seqs):
sorted_order = []
if len(original) <= 0:
return False
#1. initialize graph
in_degree = {}
graph = {}
for seq in seqs:
for num in seq:
in_degree[num] = 0
graph[num] = []
#2. build graph
for seq in seqs:
for i i... | willgorick/grokking-coding | topological_sort/reconstructing_a_sequence.py | reconstructing_a_sequence.py | py | 1,628 | python | en | code | 0 | github-code | 90 |
25599764034 | #!/usr/bin/env python
import math
import pylink
import matplotlib.pyplot as plt
import os
import pprint
import income as myMeager
import position as anAwkward
import taxes as deathAnd
import report as explosive
import private
if float(pylink.__version__) < 0.9:
s = """
===========================================... | harrison-caudill/ipo-sim | investigator.py | investigator.py | py | 18,030 | python | en | code | 4 | github-code | 90 |
22346779245 | """Unit tests for pysetl.utils module."""
import inspect
import logging
import time
from typing import Generic, TypeVar
import pytest
from pyspark.sql import SparkSession
from pysetl.utils import BenchmarkModifier, BenchmarkResult, pretty
from pysetl.utils.exceptions import PySparkException
from pysetl.utils.get_signat... | JhossePaul/pysetl | tests/test_utils.py | test_utils.py | py | 4,252 | python | en | code | 0 | github-code | 90 |
10425382579 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import time
import zlib
from lib.logger import logger
from models import Area, Device_log, User_log, User
class Feature(object):
def get_feature(self, area, devices_request, timestamp, mac_address, add_del_done=0, limit=50, ttl=0):
timestamp = int... | anstones/py-collection | RabbitMQ/rabbitmq_kafka/face_center_read_server/process-4010/core/feature.py | feature.py | py | 3,630 | python | en | code | 3 | github-code | 90 |
37359483711 | # Все 4-буквенные слова, составленные из букв А, И, О, У, записаны в алфавитном порядке и пронумерованы.
# Вот начало списка:
# АААА
# АААИ
# АААО
# АААУ
# ААИА
# Запишите слово, которое стоит под номером 250.
from itertools import product
a, cnt = 'АИОУ', 0
for w in product(a, repeat=4):
cnt += 1
if cnt == 2... | sosnovskiim/Informatics | school.sgu.ru/lap/10.29-11.04/22.py | 22.py | py | 540 | python | ru | code | 0 | github-code | 90 |
20388954359 | from research.grammatical_gender.bundle import GGTrainIndexBuilder
from tg.grammar_ru.corpus import CorpusBuilder
from tg.grammar_ru.features import PyMorphyFeaturizer, SlovnetFeaturizer, SyntaxTreeFeaturizer, SyntaxStatsFeaturizer
from tg.grammar_ru.common import Loc
from yo_fluq_ds import *
# VOCAB_FILE = Path(__fil... | okulovsky/grammar_ru | archive/SergeyPishchulov/from_research/build_bundle.py | build_bundle.py | py | 2,125 | python | en | code | 11 | github-code | 90 |
7260132210 | #encoding=utf-8
from django.test import TestCase, Client, SimpleTestCase
import json
from django.contrib.auth.models import User
# Create your tests here.
'''
class View_registTestCase(SimpleTestCase):
def setUp(self):
self.client=Client()
def test_regist(self):
request_data1 = {
'e... | Luxun0535/Forum | verification/tests.py | tests.py | py | 2,674 | python | en | code | 0 | github-code | 90 |
18279738809 | #!usr/bin/env python3
import math
import sys
import bisect
def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]
def I(): return int(sys.stdin.buffer.readline())
def LIR(n):
return [LI() for i in range(n)]
class SegmentTree:
def __init__(self, size, f=lambda x,y : x+y, default=0):
self... | Aasthaengg/IBMdataset | Python_codes/p02788/s085716639.py | s085716639.py | py | 1,513 | python | en | code | 0 | github-code | 90 |
42679034104 | #Concious life (version 2.0) (can input and edit to-do items)
from time import *
from openpyxl import Workbook, load_workbook
from openpyxl.utils import get_column_letter
def input_topic(): #2 uses /input items into a list
while True:
try:
hmi = int(input('how many item to add:'))
... | SYY-YYS/consciouslife | conscious life 2.0.py | conscious life 2.0.py | py | 3,993 | python | en | code | 0 | github-code | 90 |
73868774376 | import numpy as np
import cv2
import os
import detect_face
import shutil
import tensorflow as tf
from tqdm import tqdm
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
def get_boundingbox(bb, width, height, scale=1.3, minsize=None):
"""
Expects a dlib face to generate a quadratic bounding box.
:param fa... | beibuwandeluori/DeeperForensicsChallengeSolution | data/generate_face.py | generate_face.py | py | 9,120 | python | en | code | 27 | github-code | 90 |
7584807063 | #Libraries
import os
from bs4 import BeautifulSoup as BS
def HocrSplit(file, pattern):
#Load document
with open(file, "r", encoding = "ISO-8859-1") as f:
doc = BS(f.read(), "html.parser")
#Get pages
pages = doc.findAll("div", {"class": "ocr_page"})
#Divide them
for i, page in enumerate(pages, 1):
... | documenti-aperti/sw-offline | hocrsplit.py | hocrsplit.py | py | 492 | python | en | code | 0 | github-code | 90 |
38945671878 | import argparse
import io
from PIL import Image
import torch
from flask import Flask, request, jsonify, render_template
app = Flask(__name__)
DETECTION_URL = "/v1/object-detection/yolov5"
@app.route(DETECTION_URL, methods=["POST", "GET"])
def predict():
if request.method == "POST":
if request.files.get... | mohansharma077/object-detection-flaskapp | restapi.py | restapi.py | py | 1,971 | python | en | code | 0 | github-code | 90 |
18547243083 | import logging
from typing import Dict, List
from azure.core.exceptions import ResourceNotFoundError
from azure.identity import DefaultAzureCredential
from azure.storage.filedatalake import DataLakeServiceClient
from msgraph.core import GraphClient
from ..config import Configuration
from ..storage import StorageHelpe... | Azure-Samples/enterprise-data-sharing | 3-data-sharing-exploration/src/helpers/datasecurity/data_security_storage.py | data_security_storage.py | py | 10,250 | python | en | code | 2 | github-code | 90 |
70611694058 | class NerTagger():
"""命名实体识别包装类的基类,用于定义标准接口
"""
@classmethod
def load_model(cls, model_dir):
raise NotImplementedError
def predict(self, text):
return self.predict_batch([text])[0]
def predict_batch(self, texts):
raise NotImplementedError
def recognize_nes(sel... | lawRossi/ner | ner/base.py | base.py | py | 1,805 | python | en | code | 0 | github-code | 90 |
11029373583 | import os
import time
from test.fixtures import *
import pytest
from mock import patch
from app import export_action_logs_queue
from endpoints.api.logs import ExportOrgLogs, OrgLogs, _validate_logs_arguments
from endpoints.api.test.shared import conduct_api_call
from endpoints.test.shared import client_with_identity
... | quay/quay | endpoints/api/test/test_logs.py | test_logs.py | py | 1,658 | python | en | code | 2,281 | github-code | 90 |
14950350021 | from retdec.analysis import Analysis
from retdec.exceptions import MissingParameterError
from retdec.file import File
from retdec.service import Service
class Fileinfo(Service):
"""Access to the file-analyzing service."""
def start_analysis(self, **kwargs):
"""Starts an analysis with the given parame... | s3rvac/retdec-python | retdec/fileinfo.py | fileinfo.py | py | 1,941 | python | en | code | 92 | github-code | 90 |
18406026239 | from collections import defaultdict
import sys
sys.setrecursionlimit(1000000)
class edge:
def __init__(self, to, cost):
self.to, self.cost = to, cost
def main():
N = int(input())
g = defaultdict(list)
for i in range(N-1):
u, v, w = (int(_) for _ in input().split())
g[u].append(... | Aasthaengg/IBMdataset | Python_codes/p03044/s559113336.py | s559113336.py | py | 856 | python | en | code | 0 | github-code | 90 |
2938940419 | import asyncio
import threading
import time
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from datetime import timedelta
from temporalio import activity, workflow
from temporalio.client import Client
from temporalio.worker import Worker
@dataclass
class ComposeGreetingInput:
... | temporalio/samples-python | hello/hello_activity_threaded.py | hello_activity_threaded.py | py | 2,287 | python | en | code | 68 | github-code | 90 |
13117270959 | """This is my solution to Leetcode problem 1047: Remove All Adjacent Duplicates In String."""
class Solution:
def removeDuplicates(self, S: str) -> str:
stack = []
for char in S:
if stack and char == stack[-1]:
stack.pop()
else:
stack.append(... | EricMontague/Leetcode-Solutions | easy/problem_1047_remove_all_adjacent_duplicates_in_string.py | problem_1047_remove_all_adjacent_duplicates_in_string.py | py | 911 | python | en | code | 0 | github-code | 90 |
10416099314 | from django.http import HttpResponse
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.conf import settings
from .models import Order, OrderLineItem
from products.models import Product
from profiles.models import UserProfile
import json
import time
class StripeWH... | rebeccatraceyt/boutique_ado | checkout/webhook_handler.py | webhook_handler.py | py | 7,838 | python | en | code | 0 | github-code | 90 |
27647324864 | from itertools import combinations
from collections import OrderedDict
# Scikit Data Access imports
from .image_util import convertBinCentersToEdges
# 3rd part imports
import pandas as pd
import numpy as np
from netCDF4 import Dataset, num2date
def averageDates(dates, round_nearest_day = False):
'''
Comput... | MITHaystack/scikit-dataaccess | skdaccess/utilities/grace_util.py | grace_util.py | py | 9,215 | python | en | code | 44 | github-code | 90 |
24132355585 | import requests
import pandas as pd
from bs4 import BeautifulSoup
def rushing_dict():
link = 'https://www.pro-football-reference.com/years/2022/rushing.htm'
html_text = requests.get(link).text
soup = BeautifulSoup(html_text, 'lxml')
table = soup.find('table', class_="per_match_toggle")
rows = tab... | abealam/FFBot | rushing.py | rushing.py | py | 1,391 | python | en | code | 0 | github-code | 90 |
25676235281 | # Задайте список из нескольких чисел. Напишите программу, которая найдёт сумму элементов списка, стоящих на нечётной идексах.
# Пример:
# [2, 3, 5, 9, 3] -> на нечётных идексах элементы 3 и 9, ответ: 12
import random
list_size = int(input("Введите размерность списка который хотите создать - "))
list = []
for i in ran... | AntonSavchenko88/World-of-programming | PythonSeminar03/Task01.py | Task01.py | py | 768 | python | ru | code | 0 | github-code | 90 |
17872647581 | import requests
import csv
proxies = {
"http" : "http://pfrie-std.proxy.e2.rie.gouv.fr:8080",
"https": "http://pfrie-std.proxy.e2.rie.gouv.fr:8080",
}
#on souhaite avoir une réponse en json => on l'indique dans les entêtes
code_postaux_a_verifier = open("a_verifier.csv","r",encoding='utf-8')
a_verifier = ... | MANCodeClub/pythonfromscratch | musculation/011_Code_Postal/code_postal_nico_m.py | code_postal_nico_m.py | py | 3,840 | python | fr | code | 1 | github-code | 90 |
35180712831 | #IMPORT RANDOM
import random
dis = random.choice ([10, 20, 30])
#Discount is working so that is great
dis1 = dis/100
print ("Congratulations! As our 30000th customer, you get a discount of:", dis, "On today's purchase.")
def purchase_1(amount_1, discount):
total_1 = 0
for accumulation in range (am... | Amina-Yassin/Amina_Yassin_Cashier_Register.py | GSTPart.py | GSTPart.py | py | 752 | python | en | code | 0 | github-code | 90 |
2872933126 | # SJIP = "192.168.0.110:5555"
SJIP = "127.0.0.1:62001"
# oaX 微信每个公众号向下遍历oaX组信息
oaX = 200
# oaname = ["第一财经",
# "人民日报"
# ]
oaname = [
"吉林检察",
"通化检察",
"长春检察",
"长春林检",
"梨树检察",
"吉林市检察",
"延吉检声",
"敦化市检察院",
"延边林检",
... | ppzoe/Python-learn | c20220215/WeChat/settings.py | settings.py | py | 3,750 | python | en | code | 0 | github-code | 90 |
6541996285 | import math
from .point import Point
from .router import DEFAULT_ACCESS_POINTS, R1, R2
class Device(object):
"""docstring for Device"""
def __init__(self, unique_id):
self.id = unique_id
self.coordinate = Point(0, 0)
self.signal_strengths = {}
# lifted from wikipedia
# lin... | beesaferoot/wifi-tracker | web-interface/map/device.py | device.py | py | 1,067 | python | en | code | 0 | github-code | 90 |
24264808581 | import ray
import numpy as np
from ray.rllib.algorithms.dqn.dqn import DQN
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF
from sklearn.metrics import mean_squared_error
from Environment.IGEnvironments import InformationGatheringEnv
from Evaluation.Utils.... | derpberk/MultiAgentInformationGathering | Evaluation/evaluate_policy.py | evaluate_policy.py | py | 3,263 | python | en | code | 2 | github-code | 90 |
13648699370 | # -*- coding:utf-8 -*-
# 功能描述:使用BiLSTMCRF进行语义编码、维特比算法进行解码
import copy
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
START_TAG = "START"
STOP_TAG = "STOP"
# view用法:https://zhuanlan.zhihu.com/p/87856193?from_voters_page=true
# 计算整个损失函数loss的辅助函数
# 好像是用来帮助做矩阵加法用的
# 应该是用来计算发射矩阵和... | srx-2000/traditional_Chinese_medicine | medicine/BiLSTMCRF/model.py | model.py | py | 19,829 | python | zh | code | 69 | github-code | 90 |
69931192937 | import typing as ty
import PySimpleGUI as sg
import reapy_boost as rpr
from pprint import pprint
from .gui import (LayoutType, FADE_SHAPES, ValuesFilledType)
from .item_handler import (ItemsHandler, ItemHandler)
def NamedSlider(
name: str,
range: ty.Tuple[float, float],
key: str,
need_check: bool = F... | Levitanus/sample_editor | sample_editor/widgets.py | widgets.py | py | 5,282 | python | en | code | 3 | github-code | 90 |
36332745607 | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from .forms import QueryForm
from .models import USING_DATABASE, OperationTime, SaveData
# To show available files
import os
import json
from django.conf import settings
from django.http import JsonResponse
# Create your v... | hntvinh90/ReactorCenterWebsite | OperationTiming/views.py | views.py | py | 6,543 | python | en | code | 0 | github-code | 90 |
37199388441 | import numpy as np
from particleLocating import flatField, pyFiji
from scipy.interpolate import griddata
from joblib import Parallel,delayed
class arrayThreshold:
"""
A class for applying adpative local threshdoling to image arrays.
Most heavy lifting is done by import functions
"""
def __init__(se... | tlozsolt/TractionRheoscopy | particleLocating/threshold.py | threshold.py | py | 11,245 | python | en | code | 0 | github-code | 90 |
72975124456 | from airflow import DAG
from airflow.models.variable import Variable
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python import BranchPythonOperator
from airflow.providers.amazon.aws.operators.lambda_function import AwsLambdaInvokeFunctionOperator
from airflow.utils.task_group impor... | edgui-appolonicorreia/pyroduct | Airflow/dags/main_dag.py | main_dag.py | py | 5,613 | python | en | code | 1 | github-code | 90 |
44907777033 | #!/usr/local/bin/python3
import os
import argparse
import tempfile
import string
import shutil
from pathlib import Path
from typing import Generator, Any
from contextlib import contextmanager
from build_kernel_headers import copy_kernel_headers
from build_utils import run_and_check, run_and_capture_output_and_check, c... | codyd51/axle | scripts/build_os_image.py | build_os_image.py | py | 9,306 | python | en | code | 536 | github-code | 90 |
16085895776 | import torch
import torch.nn as nn
import os
class Encoder(nn.Module):
def __init__(self, feature_dim=256, encoder_size=[8192], z_dim=16, dropout=0.5, dropout_input=0.0, leak=0.2):
super(Encoder, self).__init__()
self.first_linear = nn.Linear(feature_dim*2, encoder_size[0])#全连接层(in_feature_size,o... | cmh1779/DEP-net | deltaencoder.py | deltaencoder.py | py | 4,399 | python | en | code | 0 | github-code | 90 |
30946999838 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 6 09:29:30 2018
@author: user
"""
import pandas as pd
import matplotlib.pyplot as plt
path = r"C:\Users\user\Desktop\Niranjana\1 aug\rent_dataset.xlsx"
file = pd.read_excel(path, header=[0])
print(file)
count = list()
sum = 0
count = {}
for i in file.ind... | ranjuinrush/excercise | 1 aug/rent.py | rent.py | py | 671 | python | en | code | 0 | github-code | 90 |
4239340148 | #
# @lc app=leetcode id=60 lang=python3
#
# [60] Permutation Sequence
#
# @lc code=start
class Solution:
def getPermutation(self, n: int, k: int) -> str:
def factorial(i : int):
prod_ = 1
while(i > 1):
prod_ *= i
i -= 1
return int(prod_)
... | wangyerdfz/python_lc | 60.permutation-sequence.py | 60.permutation-sequence.py | py | 743 | python | en | code | 0 | github-code | 90 |
18446150279 | city={1:0, 2:0, 3:0, 4:0}
for _ in range(3):
a,b=map(int, input().split())
city[a]+=1
city[b]+=1
if list(city.values()).count(2)==2:
print("YES")
else:
print("NO") | Aasthaengg/IBMdataset | Python_codes/p03130/s242330009.py | s242330009.py | py | 188 | python | en | code | 0 | github-code | 90 |
3691943974 | # -*- coding: utf-8 -*-
import numpy as np
import os
import keras
from keras import optimizers,initializers
from keras.models import Sequential
from keras.layers import Dense,Activation
from keras.layers.normalization import BatchNormalization
from keras.callbacks import ModelCheckpoint
from keras.utils.np_utils impor... | zhaoxuli/Play_Keras | train/train.py | train.py | py | 2,544 | python | en | code | 0 | github-code | 90 |
41157825506 | import requests
from bs4 import BeautifulSoup
import json
import re
query_url = "https://www.change.org/search?q=stop+asian+hate"
resp = requests.get(query_url)
soup = BeautifulSoup(resp.content, features="lxml")
items = soup.find_all("div", {"class": "search-result"})
details = soup.find_all("div", {"class": "type-el... | YuqiZ2020/LAHacks-StandWithAsians | scrap_resource/extract_funds_resource.py | extract_funds_resource.py | py | 1,246 | python | en | code | 0 | github-code | 90 |
38396231225 | """User state management."""
# Standard Library
import logging
from typing import Optional
# Pyramid
from transaction import TransactionManager
# Websauna
from websauna.system.model.retry import ensure_transactionless
from websauna.system.model.retry import retryable
from websauna.system.user.models import User
from... | websauna/websauna.newsletter | websauna/newsletter/importer.py | importer.py | py | 2,840 | python | en | code | 1 | github-code | 90 |
41364078640 | a = 'a'
print(ord(a))
print(chr(ord(a) - 32))
a = input()
b = []
c = []
b = a.split(' ')
for item in b:
if 64 < ord(item[0]) < 91 or 47 < ord(item[0]) < 58:
c.append(item)
else:
c.append(chr(ord(item[0]) - 32) + item[1:])
s = ' '.join(map(str,c))
print(s) | SalvadorGuido/Python | CodeWars/JadenCastingStrings.py | JadenCastingStrings.py | py | 283 | python | en | code | 0 | github-code | 90 |
34869038594 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0029_auto_20150615_1640'),
]
operations = [
migrations.AlterModelOptions(
name='sheet',
... | grodino/refiche | app/migrations/0030_auto_20150618_1651.py | 0030_auto_20150618_1651.py | py | 416 | python | en | code | 0 | github-code | 90 |
39818496096 | from core.apis import decorators
from flask import Blueprint, request
from core import db
from core.apis.responses import APIResponse
from core.models.assignments import Assignment
from .schema import AssignmentSchema, AssignmentSubmitSchema, GradeEnumSchema
teacher_assignments_resources = Blueprint('teacher_assignmen... | zuggernautt/Amit_fyle_be_assignment | core/apis/assignments/teacher.py | teacher.py | py | 1,492 | python | en | code | 0 | github-code | 90 |
7584435999 | # coding=gbk
import numpy as np
import pandas as pd
from pandas import DataFrame
from pandas import Series
import time
import h5py
from private_ipynb.lgb import lgb_model
from private_ipynb.xgb import xgb_method
'''
初步方案打算使用以下方式的模型进行加权融合:
几种预处理和特征构建的形式(注重数据来源):
1.初始特征
2.初始特征+补缺失+统计特征
... | isthegoal/XWBank_Top2_solution | private_ipynb/big_model_emsemble.py | big_model_emsemble.py | py | 14,043 | python | zh | code | 3 | github-code | 90 |
73845215016 | """
This program will allow the user to enter the name of an MLB baseball team and display the number of times the team has won the World Series in the years from 1903 through 2009.
Name: Justin Rivas
Date: 7/27/2021
Version: 1.0.0
"""
def main():
try:
# open the file and read the contents
file... | jdr1813/Programming-ACC-1 | rivas_lab7.py | rivas_lab7.py | py | 1,661 | python | en | code | 0 | github-code | 90 |
73121251816 | import numpy as np
from flask import Flask, request, jsonify, render_template
import pickle
app = Flask(__name__)
model = pickle.load(open('model.pkl', 'rb'))
@app.route('/')
def home():
return render_template('index.html')
@app.route('/predict',methods=['POST'])
def predict():
int_features = [int(x) for x ... | zanuarts/customer-behaviour | app.py | app.py | py | 1,091 | python | en | code | 0 | github-code | 90 |
20289424277 | #Project 5: Indefinite Iteration
#1: Number Guessing Game
import random
print ('Choose a number between 1 to 100 and the Number Genie will find it for you!'
'All you have to do is type Up for a higher number or down for a lower number.'
'If I get it correct just type in yes!')
high = 100
low = 0
answer... | sankumsek/assorted-python | While Loop.py | While Loop.py | py | 827 | python | en | code | 0 | github-code | 90 |
5682517150 | # -*- coding: utf-8 -*-
import tensorflow.contrib.slim as slim
from tensorpack import (ModelDesc, get_current_tower_context,
regularize_cost_from_collection, get_global_step_var)
import tensorflow as tf
from dataset import get_dataset
class OrdinaryCNNModel(ModelDesc):
"""CN... | xiaozhuka/face_landmark | tensorpack_implementaion/model.py | model.py | py | 3,743 | python | en | code | 0 | github-code | 90 |
25251215439 |
class Solution:
def lengthOfLIS(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
ln = len(nums)
dp = [1] * ln
maxl = 0
for i in range(0, ln):
for j in range(0, i):
if nums[j] < nums[i] and dp[i]<dp[j]+1:
... | sevenseablue/leetcode | src/leet/300-longest-increasing-subsequence.py | 300-longest-increasing-subsequence.py | py | 967 | python | en | code | 0 | github-code | 90 |
14073931801 | import sys
import scrap_package as sp
user_args = sys.argv
def description():
"""
Affiche un exemple des différentes utilisations du script.
:return:
Un print.
"""
print('\n> python llopis_scraper_books_online.py book http://book_url'
'\n> python llopis_scraper_books_onli... | geoffrey-ll/OC_P02_BookScrape | llopis_scraper_books_online.py | llopis_scraper_books_online.py | py | 2,728 | python | fr | code | 0 | github-code | 90 |
25530725271 | import numpy as np
from numpy import linalg
###################
# util functions
###################
def init_G():
return np.random.binomial(1, 0.3, size=[N,N])
# test
# return np.ones([N,N])
def init_A():
return np.random.uniform(0, 1, size=[N,N])
# test
# return np.ones([N,N])
def init_x()... | LihangLiu/CS395T-Numerical-Optimization | low-rank-matrix/gradient_descent.py | gradient_descent.py | py | 2,676 | python | en | code | 2 | github-code | 90 |
22494699810 | def read_files_v2(file_name):
"""Retourne un array de int sur 64 bits constitué des données du fichier"""
blocks = []
with open(file_name, mode='rb') as f:
data = f.read()
if len(data) % 8 != 0:
for i in range(8 - len(data) % 8):
data = b"".join([data, b"\x... | cuckool/GS15 | chiffrement/file_management.py | file_management.py | py | 1,359 | python | fr | code | 0 | github-code | 90 |
5099978898 | n=int(input())
c=[]
s=[]
f=[]
for i in range(n-1):
ci,si,fi=map(int,input().split())
c.append(ci)
s.append(si)
f.append(fi)
for h in range(n):
now=0
for i in range(h,n-1):
if(now <= s[i]):
now = s[i]+c[i]
else:
now = s[i] + (-(-(now-s[i])//f[i]))*f[i] + c... | WAT36/procon_work | procon_python/src/atcoder/abc/past/C_084_SpecialTrains.py | C_084_SpecialTrains.py | py | 383 | python | en | code | 1 | github-code | 90 |
72639153577 | import os
import pandas as pd
from imblearn.over_sampling import RandomOverSampler, SMOTE, ADASYN, BorderlineSMOTE, SVMSMOTE
from sklearn.svm import SVC
import sys
import warnings
import logging
# Configure logging
logging.basicConfig(filename='Project_log.log', level=logging.INFO, format='%(asctime)s - %(levelname)s ... | zubairashfaque/ML_Predicting_Income_Inequality | src/oversampler.py | oversampler.py | py | 4,377 | python | en | code | 0 | github-code | 90 |
12827116794 | #!/usr/bin/python3
import struct, matplotlib.colors as colors
from jaettu import kuvat
from matplotlib.pyplot import *
from matplotlib.cm import get_cmap
import numpy as np
import xarray as xr
#ensin tehdään kartat kaikista vuosista ohjelmilla pktied.c ja pitkart_kartoista.c
#näistä 10 50 90 prosenttiosuus ohjelmalla... | aerkkila/merianalyysi | pitkartta33.py | pitkartta33.py | py | 3,104 | python | fi | code | 0 | github-code | 90 |
41630560724 | """
Example file to download: https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2022-01.parquet
"""
import awswrangler as wr
from datetime import datetime
import pandas as pd
from prefect import task, get_run_logger
from typing import List
from urllib.error import HTTPError
from urllib.request import urlo... | anna-geller/prefect-dataplatform | dataplatform/tasks.py | tasks.py | py | 2,470 | python | en | code | 66 | github-code | 90 |
30154539215 | #!/usr/bin/env python
import os, shutil
def options(ctx):
ctx.add_option("--pdk-path", action="store", default="/opt/PalmPDK", dest="pdk_path")
def configure(ctx):
prefix = ctx.options.pdk_path + "/arm-gcc/bin/arm-none-linux-gnueabi-"
ctx.env.CXX = prefix + "gcc"
ctx.env.AR = prefix + "ar"
ctx.ch... | aduros/amity | webos/wscript | wscript | 1,714 | python | en | code | 3 | github-code | 90 | |
35024870297 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
AUTHOR = 'Michael Jurasovic'
SITENAME = 'Michael Jurasovic'
SITEURL = 'https://jurasofish.github.io'
PATH = 'content'
TIMEZONE = 'Australia/Melbourne'
DEFAULT_LANG = 'English'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = 'feeds/all.atom.xm... | jurasofish/jurasofish.github.io | pelicanconf.py | pelicanconf.py | py | 1,340 | python | en | code | 0 | github-code | 90 |
15082453226 | import cv2
import tensorflow as tf
import numpy as np
import time
# Load the saved model
model_path = 'C:/Users/ee20m/Documents/Advance_model'
loaded_model = tf.saved_model.load(model_path)
input_tensor_info = loaded_model.signatures['serving_default'].inputs[0]
# Set up video capture
cap = cv2.VideoCaptur... | SahinMjks/Monocular-Depth-Estimation-and-Object-Detection-for-Lower-End-Device | Depth_estimation_live_3.py | Depth_estimation_live_3.py | py | 1,806 | python | en | code | 0 | github-code | 90 |
20312647129 | # -*- coding:utf-8 -*-
import scrapy
from shiyanlou.items import SylgitItem
class SylgitSpider(scrapy.Spider):
name = 'shiyanlou-github'
start_urls = ['https://github.com/shiyanlou?tab=repositories']
def parse(self, response):
for repo in response.css('.public'):
item = SylgitItem()
... | gantrol/pySpider | shiyanlou/shiyanlou/spiders/sylgit.py | sylgit.py | py | 1,248 | python | en | code | 1 | github-code | 90 |
27925928171 | TYPE_NIL = 0
TYPE_NUMBER = 1
TYPE_STRING = 2
TYPE_TABLE = 3
TYPE_TORCH = 4
TYPE_BOOLEAN = 5
TYPE_FUNCTION = 6
TYPE_RECUR_FUNCTION = 8
LEGACY_TYPE_RECUR_FUNCTION = 7
import sys
import struct
from array import array
from collections import namedtuple
from functools import wraps
import torch
import torch.legacy.nn as n... | sibozhang/Text2Video | venv_vid2vid/lib/python3.7/site-packages/torch/utils/serialization/read_lua_file.py | read_lua_file.py | py | 17,997 | python | en | code | 381 | github-code | 90 |
25856198974 | def toNum(self):
try:
self = int(self)
return self
except ValueError:
self = float(self)
return self
n1, a, n2 = input("계산할 식을 입력하시오\n").split()
n1 = toNum(n1)
n2 = toNum(n2)
if a == '+':
op = n1 + n2
elif a == '-':
op = n1 - n2
elif a == '*':
op = n1 * n2
elif a =... | kjdrv9/First_Python | Done/calculator.py | calculator.py | py | 417 | python | en | code | 0 | github-code | 90 |
18113811539 | def allocation():
n, cars = map(int, input().split())
weight = [int(input()) for i in range(n)]
left = max(weight)
right = sum(weight)
while left < right:
mid = (left + right) // 2
if check(weight, cars, mid):
right = mid
else:
left = mid + 1
p... | Aasthaengg/IBMdataset | Python_codes/p02270/s474826128.py | s474826128.py | py | 599 | python | en | code | 0 | github-code | 90 |
17996678179 | N,M = map(int,input().split())
ABC = []
for i in range(M):
a,b,c=map(int,input().split())
c=-c
ABC.append([a,b,c])
def BellmanFord():
inf=float("Inf")
dist=[inf for i in range(N)]
dist[0]=0
for i in range(N):
for edge in ABC:
if dist[edge[1]-1] > dist[edge[0]-1] + edge[2]:
dist[edge[... | Aasthaengg/IBMdataset | Python_codes/p03722/s474464090.py | s474464090.py | py | 451 | python | en | code | 0 | github-code | 90 |
74819717737 | import glob
from PIL import Image
import cv2
import numpy as np
images = glob.glob('./images/*.jpg')
for index,image_path in enumerate(images):
image = cv2.imread(image_path)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
gray = cv2.GaussianBlur(gray, (25,25), 0)
thresh = cv2.adaptiveThreshold(gray,25... | anmolaithinker/Boundary-Detection | BulkImages.py | BulkImages.py | py | 919 | python | en | code | 1 | github-code | 90 |
9664045405 | class Worker:
employee_counter = 0
raise_amt = 1.04
def __init__(self, first, last, salary):
self.first = first
self.last = last
self.salary = salary
self.email = str.lower(first + "." + last + "@gmail.com")
Worker.employee_counter += 1
def fullname(self):
... | smiroshnikov/telegramBotforMiningControl | warmup/Worker.py | Worker.py | py | 1,391 | python | en | code | 0 | github-code | 90 |
34855994853 | #What is a clean, Pythonic way to have multiple constructors in Python
class Sample:
def __init__(self, ans):
self.ans = ans
@classmethod
def twoargument(cls, args):
op_two_args = (args[0] + args[1])
return cls(op_two_args)
@classmethod
def threearguments(cls, args):
... | mukulverma2408/PracticeGeeksforGeeks | PythonPracticeQuestion-Part2/OopsExercise-15.py | OopsExercise-15.py | py | 603 | python | en | code | 0 | github-code | 90 |
18263854359 | n = int(input())
s = input()
q = int(input())
class SegmentTree:
def __init__(self, a, func=max, one=-10 ** 18):
self.logn = (len(a) - 1).bit_length()
self.n = 1 << self.logn
self.func = func
self.one = one
self.b = [self.one] * (2 * self.n - 1)
for i, j in enumera... | Aasthaengg/IBMdataset | Python_codes/p02763/s391060691.py | s391060691.py | py | 2,017 | python | en | code | 0 | github-code | 90 |
26704221549 | from django.urls import path
from .views import (
IndexView,
UserLoginView, UserHomeView, UserLogoutView,
ContactFormView, PrivacyPolicyView
)
app_name = 'account'
urlpatterns = [
path('', IndexView.as_view(), name='index'),
path('login', UserLoginView.as_view(), name='login'),
path('home', Use... | takyam15/my-django | account/urls.py | urls.py | py | 561 | python | en | code | 0 | github-code | 90 |
18420802409 | import sys
import itertools
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
s_readline = sys.stdin.readline
N, K = map(int, readline().split())
S = list(map(int, s_readline().strip()))
def solve():
s_grp = itertools.groupby(S)
zl = []
ol = []
... | Aasthaengg/IBMdataset | Python_codes/p03074/s872207846.py | s872207846.py | py | 1,081 | python | en | code | 0 | github-code | 90 |
71026306217 | from copy import copy
import logging
import subprocess
from build_migrator.helpers import (
get_module_target,
ModuleTypes,
get_source_file_reference,
)
from build_migrator.common.argument_parser_ex import ArgumentParserEx
import build_migrator.common.os_ext as os_ext
from .base.compiler_parser import Compi... | KasperskyLab/BuildMigrator | build_migrator/parsers/yasm.py | yasm.py | py | 8,021 | python | en | code | 30 | github-code | 90 |
15049748129 | from math import sin, cos
from pylx16a.lx16a import *
import time
LX16A.initialize("/dev/ttyUSB0", 0.1)
try:
servo1 = LX16A(1)
servo2 = LX16A(2)
servo1.set_angle_limits(0, 240)
servo2.set_angle_limits(0, 240)
except ServoTimeoutError as e:
print(f"Servo {e.id_} is not responding. Exiting...")
... | ethanlipson/PyLX-16A | hello-world.py | hello-world.py | py | 449 | python | en | code | 30 | github-code | 90 |
2409158369 | from io import BytesIO
import docx
import requests
from docx.shared import Pt
year = 2023
month = 7
day = 28
bc = "白班"
dutier = "陈焕鑫 王胜保"
path = "./temple_raw.docx"
new_path = "./templer_real.docx"
data = {
"eng_room": [
{
"title": "1、各设备运行正常。",
"value": 1
},
{
... | ZainLiu/YXtest | 操作word文档/op.py | op.py | py | 4,426 | python | en | code | 0 | github-code | 90 |
14079900911 | from django.urls import path
from . import views
urlpatterns = [
path('register/', views.registerPage, name="register"),
path('login/', views.loginPage, name="login"),
path('logout/', views.logoutUser, name="logout"),
path('userSettings/', views.userPage, name="user-page"),
path('', views... | Soj2wal/ord-process-live | accounts/urls.py | urls.py | py | 1,420 | python | en | code | 0 | github-code | 90 |
6425707736 | # task 8
import os
import gensim.models
from w2vec import w2vec_vectorize
model = gensim.models.Word2Vec.load('../../assets/w2v_model')
test_path = "C:/Users/User/Desktop/dataset/20news-bydate-test/"
result = ""
count = 0
for category in os.listdir(test_path):
for filename in os.listdir(test_path + category):
... | MANASLU8/nlp-22-autumn | projects/cake-crusher/source/vectorization/test_vectorizer.py | test_vectorizer.py | py | 810 | python | en | code | 0 | github-code | 90 |
72058811177 | numNames = 'zero', 'one', 'two', 'three', 'four', 'five', ' six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', \
'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty'
while True:
userNum = int(input('Enter a number between 0 and 20(if you want stop, enter -1... | vytorrennan/Curso-de-python | ex/ex072.py | ex072.py | py | 565 | python | en | code | 0 | github-code | 90 |
37246229411 | # Unit 2 Lab
# Sum Calculator Program
# create function
def sum(numbers):
#initialize variable for list sum
total = 0
# loop to find add all values in list
for number in numbers:
total += number
return total
# initialize number list
number_list = []
# create number list from user inpu... | dani3lng/pdx_code | programming_102/code/unit_02/lab-2.2.py | lab-2.2.py | py | 596 | python | en | code | 0 | github-code | 90 |
18376643369 | N = 1000000007
def fac(n,r,N):
ans=1
for i in range(r):
ans=ans*(n-i)%N
return ans
def combi(n,r,N):
if n<r or n<0 or r<0:
ans = 0
return ans
r= min(r, n-r)
ans = fac(n,r,N)*pow(fac(r,r,N),N-2,N)%N
return ans
n , k = map(int, input().split())
for i in range(1,k+1... | Aasthaengg/IBMdataset | Python_codes/p02990/s121702208.py | s121702208.py | py | 370 | python | en | code | 0 | github-code | 90 |
7331734551 | """ Вычислить число c заданной точностью d
Пример:
- при $d = 0.001, π = 3.141.$ $10^{-1} ≤ d ≤10^{-10}$ """
acc = list(input("Задайте точность для вычисления pi: "))
n = len(acc)-2
pi = round(sum(1/16**x*(4/(8*x + 1) - 2/(8*x + 4) - 1/(8*x + 5) - 1/(8*x + 6)) for x in range(n)), n)
print(pi)
""" Задайте на... | pepZ1/pyHW | homework4.py | homework4.py | py | 2,483 | python | ru | code | 0 | github-code | 90 |
40957875184 | """
Question: Create a function that takes any string as input and returns the number of words for that string.
"""
def count_words(strng):
strng_list = strng.split()
return len(strng_list)
take = input("User input:")
print(count_words(take)) | MMR1998-DEV/python-excersise-workbook | 35.py | 35.py | py | 264 | python | en | code | 0 | github-code | 90 |
13159581963 | import requests
from telegram import ParseMode, Update
from telegram.ext import CallbackContext, run_async
from SophiaBot import dispatcher
from SophiaBot.modules.disable import DisableAbleCommandHandler
@run_async
def covid(update: Update, context: CallbackContext):
message = update.effective_message
text =... | dihanofficial/SophiaBot | SophiaBot/modules/covid_info.py | covid_info.py | py | 1,597 | python | en | code | 44 | github-code | 90 |
25300840476 | #
# @lc app=leetcode.cn id=188 lang=python3
#
# [188] 买卖股票的最佳时机 IV
#
# @lc code=start
class Solution:
# https://leetcode-cn.com/problems/best-time-to-have-and-no-stock-iv/solution/si-wei-dao-tu-zheng-li-dpshu-zu-gou-jian-e97c/
# 方法一:二个状态的DP(空间未优化)
# 在上述的状态转移方程中,确定边界条件是非常重要的步骤。我们可以考虑将所有的have[0][0.... | HughTang/Leetcode-Python | Dynamic Programming/股票交易/188.买卖股票的最佳时机-iv.py | 188.买卖股票的最佳时机-iv.py | py | 3,016 | python | zh | code | 0 | github-code | 90 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.