index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
58,005
klgentle/lc_python
refs/heads/master
/vs_code/copy_create_table.py
" add drop table in the head " import os path = "/mnt/e/yx_walk/report_develop/sky/TABLE" path2 = "/mnt/e/yx_walk/report_develop/sky/TABLE2" for folderName, subfolders, filenames in os.walk(path): for file_name in filenames: #print(f"file_name:{file_name}") file_name2 = os.path.join(path2, file_na...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,006
klgentle/lc_python
refs/heads/master
/base_practice/birthday.py
keepgoing="y" while keepgoing=="y": birthyear=int(input("Enter year of birth:")) while birthyear<1900 or birthyear>2018: print("You need to enter a year before 2019 and after 1899.\n") birthyear=int(input("Enter another value:")) else: money=100/(1+0.025)**(2018-birthyear) pr...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,007
klgentle/lc_python
refs/heads/master
/decorator_test/logging_decorator.py
""" TODO write a decorator for logging out put """ import logging logging.basicConfig( level=logging.INFO, format="%(asctime)s - %(levelname)s: %(message)s" ) def logging_begin_end(fn): def wrapper(*args,**kwargs): logging.info("{0} begin ---------- ".format(fn.__name__)) fn(*args,**kwargs)...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,008
klgentle/lc_python
refs/heads/master
/code_in_books/clean_code/PrimeGenerator.py
""" This class Generates prime numbers up to a user specified maximum. The algorithm used is the Sieve of Eratosthenes. Given an array of integers starting at 2: Find the first uncrossed integer, and cross out all its multiples. Repeat until there are no more multiples in the array. """ import math class Prim...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,009
klgentle/lc_python
refs/heads/master
/vs_code/copy_upload.py
import shutil, os import openpyxl import pprint import csv # copy upload register and upload file def copyRegister(date_str: str): """ copy register """ code_home = "E:\\svn" dir_name = os.path.join(code_home, "1300_编码\\发布登记表") code_bate_path = "E:\\yx_walk\\report_develop\\sky" target_path = os....
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,010
klgentle/lc_python
refs/heads/master
/base_practice/test_private.py
class TestPrivate(object): def __init__(self, name): self.__name = name def get_value(self): return self.__name #a = TestPrivate("Cklll") #print(a.get_value()) class pub(): _name = 'protected类型的变量' __info = '私有类型的变量' def _func(self): print("这是一个protected类型的方法") def _...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,011
klgentle/lc_python
refs/heads/master
/leet_code/top_interview_questions/Medium_Case/P0046_Permutations.py
from pysnooper import snoop class Solution: @snoop() def permute(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ if len(nums) == 1: return [nums] results = [] for index in range(len(nums)): for item in self.permu...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,012
klgentle/lc_python
refs/heads/master
/base_practice/read_number.py
f=open('numbers.txt','r') line=f.readline().strip() sum = 0 while line != '': num=int(line) sum+=num line=f.readline() f.close()
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,013
klgentle/lc_python
refs/heads/master
/svn_operate/backupToZip.py
#! python3 # Copies an entire foleder and its contents into a ZIP file # whose filename increments import zipfile, os import shutil def backupToZip(folder: str): # change path dirname = os.path.dirname(folder) os.chdir(dirname) # Backup the entire contents of "folder" into a ZIP file. folder = o...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,014
klgentle/lc_python
refs/heads/master
/vs_code/CopyPicture.py
#! python3 import os import shutil import time from pathlib import Path # def readHistory(file_name:str)->list: # l = [] # with open(file_name) as f: # for i in f.readlines(): # l.append(i.strip('\n')) # return l def CopyPicture(): username = "klgentle" target_path = r"D:\picture...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,015
klgentle/lc_python
refs/heads/master
/leet_code/hard_case/p0037_Sudoku_Solver_2.py
from collections import defaultdict from collections import deque class Solution: def solveSudoku(self, board) -> None: rows, cols, blocks, toVisits = defaultdict(set), defaultdict(set), defaultdict(set), deque() for r in range(9): for c in range(9): if board[r][c] != '...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,016
klgentle/lc_python
refs/heads/master
/Intermediate_Python/generators_fibon.py
import time def fibon(n): """ 计算斐波那契数列的生成器 用这种方式,我们不用担心它会使用大量资源 no return, no list """ a = b = 1 for i in range(n): yield a a, b = b, a + b def fibon_list(n): a = b = 1 result = [] for i in range(n): result.append(a) a, b = b, a + b retu...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,017
klgentle/lc_python
refs/heads/master
/decorator_test/fib_with_cache.py
""" 利用缓存解斐波那契数例 """ import sys from functools import wraps sys.setrecursionlimit(1000000) # 解决maximum recursion depth exceeded def memoization(fn): cache = {} miss = object() @wraps(fn) def wrapper(*args): result = cache.get(args, miss) if result is miss: result = fn(*...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,018
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/merge.py
class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ l1 = len(nums1) l2 = len(nums2) if nums2[-1] <= nums1[0]: nums1 = nusm2 + nums1 else if num2...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,019
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/0162_Find_Peak_Element.py
class Solution: def findPeakElement(self, nums: list) -> int: # TODO logarithmic complexity. l = len(nums) if l == 1: return 0 elif l == 2: return 0 if nums[0] > nums[1] else 1 elif l == 0: return None else: if nums[0] >...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,020
klgentle/lc_python
refs/heads/master
/base_practice/polygon_sides_dict.py
n_polygons = {} #polygon_sides = {"third": 3, "four":4} for key, value in polygon_sides.items(): n_polygons[value] = key print(n_polygons)
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,021
klgentle/lc_python
refs/heads/master
/tests/TestReleaseRegistrationForm.py
import openpyxl import unittest from ReleaseRegistrationForm import ReleaseRegistrationForm class TestReleaseRegistrationForm(unittest.TestCase): def setUp(self): self.reg = ReleaseRegistrationForm('20200609','','cif') self.__registration_file = r'/mnt/e/svn/ODS程序版本发布登记表cif-test-20200609.xlsx' ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,022
klgentle/lc_python
refs/heads/master
/svn_operate/create_date.py
import datetime def getBetweenDay(begin_date,end_date): date_list = [] begin_date = datetime.datetime.strptime(begin_date, "%Y%m%d") #print(f"begin_date:{begin_date}") end_date = datetime.datetime.strptime(end_date, "%Y%m%d") #print(f"end_date:{end_date}") while begin_date <= end_date: d...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,023
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/array/p0167_Two_Sum_II_-_Input_array_is_sorted.py
""" 167. Two Sum II - Input array is sorted Easy Given an array of integers numbers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. Return the indices of the two numbers (1-indexed) as an integer array answer of size 2, where 1 <= answer[0] < answer[1] <=...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,024
klgentle/lc_python
refs/heads/master
/svn_operate/send_mail_demo.py
#!/usr/bin/python3 import traceback import time import os import smtplib from email.mime.text import MIMEText from email.utils import formataddr from email.mime.multipart import MIMEMultipart from sys import argv sender = "klgentle4@outlook.com" mail_to = [sender] def mail(date_str=None): time_str = time.strfti...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,025
klgentle/lc_python
refs/heads/master
/leet_code/top_interview_questions/Hard_Case/0042_Trapping_Rain_Water.py
class Solution: def trap(self, height: List[int]) -> int: if not height: return 0 sum_water = 0 height_len = len(height) left_max = [height[0]] * height_len right_max = [height[-1]] * height_len for i in range(1, height_len): ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,026
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/P0938_Range_Sum_of_BST.py
""" Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary search tree is guaranteed to have unique values. """ # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left =...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,027
klgentle/lc_python
refs/heads/master
/base_practice/chw_buy.py
all_goods_and_deliver = 4866.02 au_goods_and_deliver = 998.45 au_deliver = 66.81 print(f"CHW营养品总价及运费(第一次):¥ {all_goods_and_deliver}, 澳元原价: {au_goods_and_deliver}") rmb_deliver2 = 74.33 * 4 + 87.45 print(f"澳州转运费:¥ {rmb_deliver2}") all_fee = all_goods_and_deliver + rmb_deliver2 rate = all_goods_and_deliver / au_goods_an...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,028
klgentle/lc_python
refs/heads/master
/tests/test_map.py
def test_register_data_normalize(data_list): file_name_path_list = map(lambda data_row: data_row[2:5], data_list) return file_name_path_list def test_normalize2(data_list): print("data_list:", data_list) file_name_path_list = map(lambda data: (data[0].upper(), data[1].lower(), data[2].strip()), data_l...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,029
klgentle/lc_python
refs/heads/master
/stock_pandas/pandas_read.py
import pandas as pd loan=pd.read_csv('loan.csv') loan50=loan[(loan['Bo_Age']>50)] print(loan50['Cust_ID'].groupby(loan50['OUTCOME']).count(),'\n\n\n') print(loan50.groupby(loan50['OUTCOME']).mean()) #loan1=loan[(loan['Bo_Age']>50) & (loan['OUTCOME']=='default')] #print(loan1.head()) #loan2=loan[(loan['Bo_Age']>50) & (...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,030
klgentle/lc_python
refs/heads/master
/base_practice/handle_kindle_clippings.py
""" file sample: 万历十五年 (黄仁宇) - 您在位置 #135-135的标注 | 添加于 2016年9月23日星期五 上午5:59:19 嫡母隆庆的皇后陈氏 ========== 万历十五年 (黄仁宇) - 您在位置 #145-145的标注 | 添加于 2016年9月23日星期五 上午6:01:40 后来居上,实在是本末颠倒。 ========== """ import os.path import re # from pprint import pprint # my_clippings_file = r"D:\文本\kindle电子书\My Clippings-test.txt" my_clippin...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,031
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/array/p0283_Move_Zeroes.py
""" 283. Move Zeroes Easy Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Input: [0,1,0,3,12] Output: [1,3,12,0,0] """ class Solution: def moveZeroes(self, nums: List[int]) -> None: """ Do not return a...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,032
klgentle/lc_python
refs/heads/master
/stock_pandas/get_stock.py
import matplotlib.pyplot as plt import pandas as pd import requests def get_stock(): # 选择要获取的时间段 periods = "3600" # 通过Http抓取btc历史价格数据 resp = requests.get( "https://api.cryptowat.ch/markets/gemini/btcusd/ohlc", params={"periods": periods}, ) data = resp.json() # 转换成pandas...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,033
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/0017_Letter_Combinatioins_of_a_Phone_Number.py
class Solution: def letterComb(self, ret: list, digits: str) -> List[str]: # 递归 每次取第一个数字代入,返回其余数字,进行递归。 #print(f'ret:{ret}, digits:{digits}') if len(digits) == 0: return ret ret1 = [] for i in ret: for k in self.dic.get(digits[0]): ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,034
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/findNumberOfLIS_673_v11.py
#! python3 from collections import Counter from pprint import pprint class Solution: def findNumberOfLIS(self, nums) -> int: # 给定一个未排序的整数数组,找到最长递增子序列的个数。 """ to looking for increase sub set, conside each point of the list, for each point create one increase list, if one element is...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,035
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/convertToTitle_168.py
# leetcode 168 class Solution: def convertToTitle(self, n: int) -> str: ret = "" while n > 0: n -= 1 # why ? print(f"n:{n}") ret = chr(n % 26 + ord("A")) + ret print(f"ret:{ret}") n //= 26 print(f"ret: {ret}") return ret ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,036
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/sliding_window/p0424_Longest_Repeating_Character_Replacement.py
""" 424. Longest Repeating Character Replacement Medium Given a string s that consists of only uppercase English letters, you can perform at most k operations on that string. In one operation, you can choose any character of the string and change it to any other uppercase English character. Find the length of the lo...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,037
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/P0114_Flatten_Binary_Tree_to_Linked_List.py
""" Given the root of a binary tree, flatten the tree into a "linked list": The "linked list" should use the same TreeNode class where the right child pointer points to the next node in the list and the left child pointer is always null. The "linked list" should be in the same order as a pre-order traversal of...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,038
klgentle/lc_python
refs/heads/master
/svn_operate/CommitRegister.py
import datetime import platform import time import sys from sys import argv from date_add import date_add from PlatformOperation import PlatformOperation from SvnOperate import SvnOperate from CheckProcedure import CheckProcedure from ReleaseRegistrationForm import ReleaseRegistrationForm SVN_DIR = "/mnt/e/svn/1300_编...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,039
klgentle/lc_python
refs/heads/master
/data_structure/maze_rec.py
def passable(maze, pos): return maze(pos[0], pos[1]) == 0 def mark(maze, pos): maze(pos[0], pos[1]) = 2 def find_path(maze, pos, end): mark(maze, pos) if start == end: print(pos, end=" ") return dirs = ([0, 1], [1, 0], [-1, 0], [0, -1]) for i in range(0, 4): nextp = (po...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,040
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/P0094_Binary_Tree_Inorder_Traversal.py
""" Given the root of a binary tree, return the inorder traversal of its nodes' values. Input: root = [1,null,2,3] Output: [1,3,2] Example 2: Input: root = [] Output: [] Example 3: Input: root = [1] Output: [1] """ # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, r...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,041
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/LRU/p0146_LRU_Cache.py
""" 146. LRU Cache Medium Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initialize the LRU cache with positive size capacity. int get(int key) Return the value of the key if the key exists, otherwise return -1. ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,042
klgentle/lc_python
refs/heads/master
/automatic_office/py7zunzip.py
#!/usr/bin/env python """ @Author :Rattenking @Date :2021/06/02 15:42 @CSDN :https://blog.csdn.net/m0_38082783 """ import time import subprocess def get_current_time_stamp(): times = time.time() time_stamp = int(round(times * 1000)) return time_stamp def verify_password(pwd): cmd = f'7z t -p{pwd} ./test...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,043
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/0082_Remove_Duplicates_from_Sorted_List_II.py
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def deleteDuplicates0(self, head: ListNode) -> ListNode: """find duplicate value, and add this value in duplicate set if node.val in duplicate set...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,044
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/P0102_Binary_Tree_Level_Order_Traversal.py
""" Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 return its level order traversal as: [ [3], [9,20], [15,7] ] """ from collections import de...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,045
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/array/p0080_Remove_Duplicates_from_Sorted_Array_II.py
""" 80. Remove Duplicates from Sorted Array II Medium Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra space for another array; you must do this by modifying the input array in-place with O(1) extra memory. """ from...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,046
klgentle/lc_python
refs/heads/master
/shell_test/send_table_mail/sqlite3_demo.py
import sqlite3 def demo(): # 若不存在则创建 con = sqlite3.connect("test.db") # 游标对象 cur = con.cursor() # 新建表 cur.execute( "create table if not exists ifrs9_data \ (site_name text primary key not null, ind int, file_info text, path_name text, record_count int)" ) # insert data...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,047
klgentle/lc_python
refs/heads/master
/leet_code/top_interview_questions/Medium_Case/P0139_Word_Break.py
class Solution: def wordBreak(self, s, words): # ok[i] tells whether s[:i] can be built. ok = [True] for i in range(1, len(s)+1): ok += any(ok[j] and s[j:i] in words for j in range(i)), #print(ok) return ok[-1]
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,048
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/isUgly.py
class Solution: def isUgly(self, num: int) -> bool: if num <= 0: return False for i in (2,3,5): while num % i == 0: num //= i #print(True if num == 1 else False) return True if num == 1 else False if __name__ == '__main__': a = So...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,049
klgentle/lc_python
refs/heads/master
/data_structure/josephus.py
def josephus_a(total_num, start, target_num): """ 假设有n个人围坐一圈,现要求从第 k 个人开始报数,报到第 m 个数的人退出 """ people = list(range(1, total_num + 1)) index = start - 1 for times in range(total_num): count = 0 while count < target_num: if people[index] > 0: count += 1 ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,050
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/P0652_Find_Duplicate_Subtrees.py
""" Given the root of a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any one of them. Two trees are duplicate if they have the same structure with the same node values. Example 1: Input: root = [1,2,3,4,null,2,4,null,null,4] Output: [[2,4]...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,051
klgentle/lc_python
refs/heads/master
/leet_code/top_interview_questions/Medium_Case/P0050_Powx_n.py
class Solution: def myPow(self, x: float, n: int) -> float: out = 1 flag = '+' if n < 0: flag = '-' n = abs(n) while n > 0: out *= x n -= 1 return out if flag =='+' else 1/out
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,052
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/climStairs.py
import math class Solution: def climbStairs(self, n: int) -> int: print("n:", n) ret = 0 for i in range(0, n + 1): for j in range(0, n + 1): if i + 2 * j != n: continue print("i:{0},j:{1}".format(i, j)) y = 0 ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,053
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/buddyString.py
class Solution: def buddyStrings(self, A: str, B: str) -> bool: duplicate = False la = len(A) if la != len(B) or set(A) != set(B): return False if len(set(A)) < la: duplicate = True if duplicate and A == B: return True diff_list = ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,054
klgentle/lc_python
refs/heads/master
/data_structure/ackerman.py
def ack(m, n): if m == 0: return n+1 if n == 0: return ack(m-1, 1) return ack(m-1, ack(m, n-1)) print(ack(3, 4)) """ ack(0,0) = -1 ack(0,1) = -1 ack(1,0) = ack(0,1) = -1 ack(1,1) = ack(0,ack(1,0)) = ack(0,-1) = -1 ack(1,2) = ack(0,ack(1,1)) = -1 ack(2,0) = ack(1,0) = -1 ack(2,1) = ack(1,a...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,055
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/generateMatrix.py
class Solution: def generateMatrix(self, n: int): #def generateMatrix(self, n: int) -> List[List[int]]: # TODO 递归 # list.insert(index, obj) l = [[] for i in n] l[1] = list(range(1,n+1)) l[-1] = list(range(3n-2,-1,2n-2)) for i in range(n+1,2n-1): #ind =...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,056
klgentle/lc_python
refs/heads/master
/tests/test_re.py
import re def test_re_search(): # search_obj = re.search(pattern, string, flags=re.IGNORECASE) view_pattern = r"V_\w*_ALL" string1 = "V_DEAL_DATE,'FH00',T1.CCY,T1.OD_ALL" string2 = "V_ACCOUNT_M_ALL" if re.search(view_pattern, string1, flags=re.IGNORECASE) : print(f"{string1} fond")...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,057
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/P0338_Counting_Bits.py
from typing import List class Solution(object): """ 二进制数可以分成两部分: 一部分是最后一位 (i&1), 另一部分是除最后一位的其他部分 (i >> 1) 1 = 1 2 = 10 3 = 11 4 = 100 5 = 101 6 = 110 7 = 111 8 = 1000 """ def countBits(self, num: List[int]) -> List[int]: res = [0] for i i...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,058
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/0378_Kth_Smallest_Element_in_a_Sorted_Matrix.py
import heapq class Solution: def kthSmallest(self, matrix: list, k: int) -> int: length = len(matrix) counter = 0 ref = [] for i in range(length): for j in range(length): ref.append(matrix[i][j]) heapq.heapify(ref) ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,059
klgentle/lc_python
refs/heads/master
/svn_operate/SvnOperate.py
import os import platform import sys import requests class SvnOperate(object): def __init__(self, path): os.chdir(path) if not self.is_system_windows(): raise TypeError("not windows OS svn operate is not safe") self.checkSvnConnect() @staticmethod def checkSvnConnect()...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,060
klgentle/lc_python
refs/heads/master
/tests/test_svn.py
import os import sys from os.path import dirname # 项目根目录 BASE_DIR = dirname(dirname(os.path.abspath(__file__))) # 添加系统环境变量 sys.path.append(BASE_DIR) from vs_code.SvnOperate import SvnOperate SVN_DIR = r"E:\svn\1300_编码" def test_svn_add(): SvnOperate(SVN_DIR).svn_add() def test_svn_commit(): SvnOperate(SVN...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,061
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/p0199_Binary_Tree_Right_Side_View.py
""" 199. Binary Tree Right Side View Medium Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example: Input: [1,2,3,null,5,null,4] Output: [1, 3, 4] Explanation: 1 <--- / \ 2 3 <--- \ \ ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,062
klgentle/lc_python
refs/heads/master
/data_structure/c9_2_select_sort.py
def select_sort(lst): for i in range(len(lst) - 1): # 只需循环 len(lst) -1 次 k = i for j in range(i, len(lst)): # k 是已知最小元素的位置 if lst[j].key < lst[k].key: k = j if i != k: # lst[k] 是确定的最小元素,检查是否需要交换 lst[i], lst[k] = lst[k], lst[i]
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,063
klgentle/lc_python
refs/heads/master
/string_code/StringFunctions.py
class StringFunctions(str): def __init__(self, string: str): self = string def find_the_second_position(self, target_str: str) -> int: target_str_ind = self.find(target_str) if target_str_ind == -1: return -1 target_str_ind_and_len = target_str_ind+len(target_str) ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,064
klgentle/lc_python
refs/heads/master
/base_practice/data_to_html.py
import sys data = "" with open("star_data.txt","r") as f: data = f.readlines() for row in map(lambda x: x.rstrip().split(":"), data): #print("<tr><td>" + "</td><td>".join(row) + "</td></tr>") print("<tr><td>" + "</td><td>".join([i.rstrip() for i in row]) + "</td></tr>")
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,065
klgentle/lc_python
refs/heads/master
/base_practice/mix_color.py
colors = input("Enter primary color:") colors2 = input("Enter primary color:") primary_colors = [colors, colors2] if "red" in primary_colors and "blue" in primary_colors: print(f"When you mix {colors} and {colors2}, you get purple.") elif "red" in primary_colors and "yellow" in primary_colors: print(f"When you...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,066
klgentle/lc_python
refs/heads/master
/base_practice/str_upper.py
#str = input("Enter sentence to be capitalized:") str = "Enter sentence to be capitalized. kllsk. lsldk. kklsdl. kkk Ull." str_list = str.split('. ') for i in range(0,len(str_list)): a=str_list[i] str_list[i]=a[0].upper()+a[1:] str2='. '.join(str_list) print(str2)
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,067
klgentle/lc_python
refs/heads/master
/database/sqlFormat.py
import sqlparse def sqlFormat(sql: str) -> str: return sqlparse.format(sql, reindent=True, keyword_case='upper') if __name__ == "__main__": sql = """WITH TMP_CUSTOMER_NAME AS ( SELECT T61.ID ,T61.NAME_1||' '||T61.NAME_2 AS CUST_NAME FROM ODSUSER.CBS_FH00_CUSTOMER_M T61 --CUST...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,068
klgentle/lc_python
refs/heads/master
/automatic_office/word2pdf.py
from subprocess import call import shutil # Convert using Libre Office def convert_file(output_dir, input_file): call('libreoffice --headless --convert-to pdf --outdir %s %s ' % (output_dir, input_file), shell=True) if __name__ == "__main__": input_file = r'E:\yx_walk\report_develop\uat修复\201908\pc...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,069
klgentle/lc_python
refs/heads/master
/svn_operate/ReleaseRegistrationForm.py
import os import openpyxl import platform import pprint import shutil, os import sys import re import time from sys import argv from PlatformOperation import PlatformOperation from skip_table_structure_change import skip_table_structure_change SVN_DIR = "/mnt/e/svn/1300_编码/" SVN_LOG = "/mnt/e/svn/commit.log" if plat...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,070
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/p0101_Symmetric_Tree.py
""" 101. Symmetric Tree Easy Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 But the following [1,2,2,null,3,null,3] is not: 1 / \ 2 2 \ \ 3 3 Fo...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,071
klgentle/lc_python
refs/heads/master
/scrapy_test/send_mail_no_attacth.py
#!/usr/bin/python3 import traceback import time import os import smtplib from email.mime.text import MIMEText from email.utils import formataddr from email.mime.multipart import MIMEMultipart # from pysnooper import snoop # from getpass import getpass from sys import argv # password = '' # 发件人邮箱密码 sender = "klgen...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,072
klgentle/lc_python
refs/heads/master
/tests/test_logging.py
import logging logging.basicConfig(level=logging.DEBUG, format='%(levelname)s: %(message)s') logging.info("Start print log") logging.debug("Do something") logging.warning("Something maybe fail.") logging.info("Finish")
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,073
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/rob_ans.py
# coding:utf8 import pysnooper class Solution(object): # debug here # @pysnooper.snoop('/home/kl/log/leet_code/1.log') @pysnooper.snoop() def rob(self, nums: list) -> int: """ :type nums: List[int] """ last = 0 now = 0 for i in nums: # 这是一个动态...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,074
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/containsDuplicate.py
class Solution: def containsDuplicate(self, nums): l_set = len(set(nums)) l_nums = len(nums) """ if l_nums > l_set: return True else: return False """ return True if l_nums > l_set else False
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,075
klgentle/lc_python
refs/heads/master
/scrapy_test/jksj_yhs.py
import requests url = 'https://movie.douban.com/top250?start=0&filter=' # 把 user-agent 伪装成浏览器 user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36' # 构造请求头部的 user-agent header = {} header['user-agent'] = user_agent response = requests...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,076
klgentle/lc_python
refs/heads/master
/picture/removebg_test.py
import os from removebg import RemoveBg rmbg = RemoveBg("psCaKrA5rUMXJ6A12H8Kirup", "error.log") # 引号内是你获取的API #rmbg.remove_background_from_img_file("/mnt/d/picture/微信图片_20190801200023.jpg") # 图片地址 rmbg.remove_background_from_img_file("test.jpg") # 图片地址 #path = "/mnt/d/picture/cqb/anan" #for pic in os.listdir(path...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,077
klgentle/lc_python
refs/heads/master
/database/delete_view_fm00.py
import os view_path = "/home/kl/svn/1300_编码/1301_ODSDB/RPTUSER/03Views" new_path = "/home/kl/yx_walk/new_views" #for folderName, subfolders, filenames in os.walk(path): for file_name in os.listdir(view_path): one_file = os.path.join(view_path,file_name) content = "" with open(one_file) as f: conten...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,078
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/p0701_Insert_into_a_Binary_Search_Tree.py
""" 701. Insert into a Binary Search Tree Medium You are given the root node of a binary search tree (BST) and a value to insert into the tree. Return the root node of the BST after the insertion. It is guaranteed that the new value does not exist in the original BST. Notice that there may exist multiple valid ways f...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,079
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/p807_Max_InCrease_to_Keep_City_Skyline.py
class Solution: @staticmethod def changeGridToColumn(grid: List[List[int]]) -> List[List[int]]: colList = [] # colList初始化 for i in range(len(grid[0])): colList.append([]) for i, row in enumerate(grid): for j in range(len(row)): col...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,080
klgentle/lc_python
refs/heads/master
/vs_code/hello.py
print(""" #!/bin/bash for test in Nevada New Hampshire New Mexico New York North Carolina do echo "Now going to $test" done """)
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,081
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/math/p0319_Bulb_Switcher.py
""" 319. Bulb Switcher Medium There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it's off or turning off if it's on). For the ith round, you toggle every i bulb. For the nth round, you only togg...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,082
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/p0897_Increasing_Order_Search_Tree.py
""" 897. Increasing Order Search Tree Easy Given the root of a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only one right child. Example 1: Input: root = [5,3,6,2,4,null,8,1,null,null,null,7,9] Output: [...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,083
klgentle/lc_python
refs/heads/master
/vs_code/create_batch_sql.py
import os import shutil def listDir(path: str): pass # todo check exists
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,084
klgentle/lc_python
refs/heads/master
/leet_code/top_interview_questions/Hard_Case/0041_First_Missing_Positive.py
from pysnooper import snoop class Solution: #@snoop() def firstMissingPositive(self, nums: list) -> int: if 1 not in nums: return 1 l = len(nums) max_num = max(nums) min_num = min(nums) if min_num < 0: min_num = 1 # if missing on...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,085
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/array/p0875_Koko_Eating_Bananas.py
""" 875. Koko Eating Bananas Medium Koko loves to eat bananas. There are N piles of bananas, the i-th pile has piles[i] bananas. The guards have gone and will come back in H hours. Koko can decide her bananas-per-hour eating speed of K. Each hour, she chooses some pile of bananas, and eats K bananas from that pile...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,086
klgentle/lc_python
refs/heads/master
/vs_code/cutPicture2.py
#coding=utf-8 from PIL import Image #需要pillow库 import os #import cv2 class SplitPicture(object): """ 剪切手机图片,主要是剪掉图片头部跟图片下方的答案 """ def __init__(self): self.path = "/mnt/f/for_wife" def splitPicture(self): #for filename in os.listdir(self.path): for folderName, subfolders, f...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,087
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/0073_Set_Matrix_Zeroes.py
class Solution: def setZeroes(self, matrix: List[List[int]]) -> None: """ step 1 find all zero position, step 2 set its entire row and column to 0 """ # TODO A simple improvement uses O(m + n) space, but still not the best solution. Could you devise a constant space solutio...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,088
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/array/p0556_Next_Greater_Element_III2.py
""" 556. Next Greater Element III Medium Given a positive integer n, find the smallest integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such positive integer exists, return -1. Note that the returned integer should fit in 32-bit integer, if there is a valid ans...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,089
klgentle/lc_python
refs/heads/master
/leet_code/medium_case/0011_Container_With_Most_Water.py
# import pysnooper class Solution: """ 双指针 Double pointer """ #@pysnooper.snoop() def maxArea(self, height: "list[int]") -> int: res = 0 l = 0 r = len(height) - 1 while l < r: res = max(res, (r - l) * min(height[l], height[r])) if height[l] <...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,090
klgentle/lc_python
refs/heads/master
/scrapy_test/nsfwpicx/html_download_picture.py
import requests import os import re import random import sys import urllib.request import time import pprint import subprocess from bs4 import BeautifulSoup from urllib.parse import quote_plus, unquote_plus class GetNsfwPicture(object): def __init__(self): self.kv = { "User-Agent": "Mozilla/...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,091
klgentle/lc_python
refs/heads/master
/leet_code/easy_case/convertToTitle_ans.py
class Solution: def convertToTitle(self, n: int) -> str: ans = "" while n > 0: n -= 1 ans += chr(n % 26 + ord("A")) n //= 26 print(ans[::-1]) return ans[::-1] if __name__ == "__main__": a = Solution() a.convertToTitle(52)
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,092
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/heap/p0295_Find_Median_from_Data_Stream.py
""" 295. Find Median from Data Stream Hard Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. For example, [2,3,4], the median is 3 [2,3], the median is (2 + 3) / 2 = 2.5 Design a data structure that su...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,093
klgentle/lc_python
refs/heads/master
/scrapy_test/check_result_send_email.py
#!/usr/bin/python3 from crawler01 import check_result from send_mail_no_attacth import mail if __name__ == "__main__": if check_result(): mail() else: print("No result, please wait!")
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,094
klgentle/lc_python
refs/heads/master
/Intermediate_Python/set_find_duplicate.py
some_list = ['a', 'b', 'c', 'b'] duplicates = set([x for x in some_list if some_list.count(x) > 1]) print(duplicates) # {'b'}
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,095
klgentle/lc_python
refs/heads/master
/database/ProcedureLogModify.py
""" 存储过程日志修改 1. 添加主日志 2. job_step 写死的,改为变量 3. 添加 bat_report_log 登记 4. 日志编号在最后统一重写 """ import os import re import sys import time import logging # 绝对路径的import sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../") from database.Procedure import Procedure logging.basicConfig(leve...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,096
klgentle/lc_python
refs/heads/master
/leet_code/top_interview_questions/Medium_Case/P0227_Basic_Calculator_II.py
from pysnooper import snoop class Solution: #@snoop() def calculate(self, s: str) -> int: s += '+0' stack, num, preOp = [], 0, "+" print(f"s:{s}") for i in range(len(s)): print(f"num:{num}") print(f"preOp:{preOp}") if s[i].isdigit(): ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,097
klgentle/lc_python
refs/heads/master
/tests/test_string.py
from __future__ import absolute_import, division, print_function, unicode_literals from os.path import dirname import os import sys # 项目根目录 BASE_DIR = dirname(dirname(os.path.abspath(__file__))) # 添加系统环境变量 sys.path.append(BASE_DIR) print(BASE_DIR) sys.path.append('../') # 导入模块 from string_code.StringFunctions import S...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,098
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/tree/P0124_Binary_Tree_Maximum_Path_Sum.py
""" 124. Binary Tree Maximum Path Sum Hard Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any node sequence from some starting node to any node in the tree along the parent-child connections. The path must contain at least one node and does not need to go through the ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,099
klgentle/lc_python
refs/heads/master
/algorithm_code/recursive_sum.py
def recusive_sum(arr): if len(arr) == 1: return arr[-1] else: return arr.pop() + recusive_sum(arr) if __name__ == "__main__": # li = [1, 2, 3, 4] li = [2, 4, 6] print(recusive_sum(li))
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,100
klgentle/lc_python
refs/heads/master
/code_in_books/lp3thw/ex16_reading_and_writing_file.py
# seek(0): Moves the read/write location to the beginning of the file
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,101
klgentle/lc_python
refs/heads/master
/leet_code/labuladong/backtracking/P0111_Minimum_Depth_of_Binary_Tree.py
""" 111. Minimum Depth of Binary Tree Easy Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf is a node with no children. Example 1: Input: root = [3,9,20,null,null,15,7] Output: 2 Example ...
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,102
klgentle/lc_python
refs/heads/master
/database/__init__.py
import os import sys # 项目根目录 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # 添加系统环境变量 sys.path.append(BASE_DIR)
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,103
klgentle/lc_python
refs/heads/master
/stock_pandas/get_convertible_bond.py
#convertible_bond import pandas as pd import requests def get_convertible_bond(): resp = requests.get( "http://data.10jqka.com.cn/ipo/bond/" ) print(resp.text) #data = resp.json() #print(data) if __name__ == "__main__": get_convertible_bond()
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...
58,104
klgentle/lc_python
refs/heads/master
/frequency_model/deque.py
from collections import deque q = deque(['a', 'b', 'c']) q.append('x') q.appendleft('y') print(q) q.pop() print(q) #deque(['y', 'a', 'b', 'c', 'x'])
{"/tests/testCreateWeekReport.py": ["/automatic_office/CreateWeekReport.py"], "/tests/re_test.py": ["/database/Procedure.py"], "/tests/test_procedure.py": ["/database/Procedure.py"], "/tests/test_proc_log_modify.py": ["/database/ProcedureLogModify.py"], "/database/batch_replace.py": ["/database/ProcedureLogModify.py", ...