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
22372400313
from math import * def smooth(path, weight_data = 0.1, weight_smooth = 0.1, tolerance = 0.00001): # # Enter code here # # Make a deep copy of path into newpath newpath = [[0 for row in range(len(path[0]))] for col in range(len(path))] change = tolerance while change >= toleran...
petrooha/ML-notes
AI for Robotics/PID Control (Cyclic Smoothing).py
PID Control (Cyclic Smoothing).py
py
718
python
en
code
0
github-code
50
70207179676
import base64 import functools import web3 from bicxer import config def get_klaytn_web3_provider_using_kas( kas_access_key_id: str, kas_secret_access_key: str ) -> web3.Web3: """ Returns a Web3 instance that is connected to the Klaytn network using the KAS API. Args: kas_access_key_id (str...
ricepotato/block-indexer
bicxer/w3.py
w3.py
py
1,400
python
en
code
0
github-code
50
19162579450
T = int(input()) nums = [int(input()) for i in range(T)] def isPrime(n): if n==2 or n==3: return True if n%2==0 or n<2: return False for i in range(3, int(n**0.5)+1, 2): if n%i==0: return False return True for i in nums: A = B = 0 for Ai in range(2, i): ...
sushimon/CCC-Solutions
ccc 2019/S2.py
S2.py
py
896
python
en
code
0
github-code
50
44267456248
# ๋ฐฑ์ค€ 1966 # ํ”„๋ฆฐํ„ฐ ํ(์™„์„ฑ) T = int(input()) # ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ์ž…๋ ฅ index_list = [] for i in range(T): N, M = input().split() N_int = int(N) M_int = int(M) doc_list = input().split() index_list = list(range(N_int)) # ์ธ๋ฑ์Šค๋ฅผ ๋น„๊ตํ•  index_list ์ƒ์„ฑ most_imp = max(doc_list) # doc_lis...
dupe-in/BaekJoon
2022_07/1966.py
1966.py
py
1,864
python
ko
code
0
github-code
50
40905887066
from ...Qt import QtGui, QtWidgets from ..Parameter import Parameter from .basetypes import WidgetParameterItem class FontParameterItem(WidgetParameterItem): def makeWidget(self): w = QtWidgets.QFontComboBox() w.setMaximumHeight(20) w.sigChanged = w.currentFontChanged w.value = w.c...
pyqtgraph/pyqtgraph
pyqtgraph/parametertree/parameterTypes/font.py
font.py
py
1,211
python
en
code
3,463
github-code
50
12356599649
#!/usr/bin/env python from kivy.app import App from kivy.config import Config from kivy.uix.screenmanager import ScreenManager, FadeTransition Config.set('input', 'mouse', 'mouse,disable_multitouch') class Katurigja(App): view = ScreenManager(transition=FadeTransition()) def build(self): return se...
matumaros/katurigja
main.py
main.py
py
916
python
en
code
1
github-code
50
29633842802
import bpy import csv import mathutils as mt # globals frames = [] rotation_frames = {} hipy = [] hipx = [] class CSVPropertiesPanel(bpy.types.Panel): bl_label = "CSV Properties" bl_idname = "OBJECT_PT_csv_properties" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" ...
Pramish-Aryal/Pratibimbha
src/minor_blender.py
minor_blender.py
py
21,332
python
en
code
1
github-code
50
4395418255
#!/usr/bin/python3 #coding:utf-8 import os import sys import time import signal import pyqrcode #By:H3C4 def handler(signum, frame): print("Exit..") time.sleep(1) sys.exit(0) signal.signal(signal.SIGINT, handler) def error(): if len(sys.argv) != 2: print("[!] Options\n") print("\t[...
h3c4/basicTool
basicTool.py
basicTool.py
py
1,815
python
en
code
0
github-code
50
26715520977
import os import re import numpy as np from PIL import Image def parse(filename): chunks = re.split(r'A|E',filename[0:-4]) A = int(chunks[1]) E = int(chunks[2]) return [A, E] ### Transform spherical coordinates into cartesian coordinate def sph2cart(theta, phi, r=1): # theta is elevation and phi is a...
CharlesLiangZHY/PhotometricStereo
read.py
read.py
py
1,094
python
en
code
1
github-code
50
6574272414
import pytest from pylixir.application.council import CouncilType from pylixir.core.committee import Sage from pylixir.core.randomness import SeededRandomness from pylixir.core.state import GameState from pylixir.data.council_pool import ConcreteCouncilPool from pylixir.data.pool import get_ingame_council_pool @pyte...
oleneyl/pylixir
tests/data/test_pool.py
test_pool.py
py
1,381
python
en
code
0
github-code
50
11464794711
# BOJ 17779 ๊ฒŒ๋ฆฌ๋งจ๋”๋ง 2 # x, y, d1, d2 ๋กœ ๊ฒฝ๊ณ„์„  ์ฐพ์•„์„œ 5๋ฒˆ ๊ตฌ์—ญ ์ฐพ๊ณ  # 5๋ฒˆ ๊ตฌ์—ญ์— ํ‘œ์‹œ # ๊ฐ ๊ตฌ์—ญ๋ณ„๋กœ ๋”ํ•˜๋Š”๋ฐ ํ‘œ์‹œ๋œ๊ฑด ๋บด๊ณ  ๋”ํ•จ def min_dif(x,y,d1,d2): zone = [[0] * (N+1) for _ in range(N+1)] population = [0] * 6 for i in range(d1+1): zone[x+i][y-i] = 5 zone[x+d2+i][y+d2-i] = 5 for i in range(d2+1): zone[x+i][y+i...
5angjae/Algorithm
BAEKJOON/Python/BJ17779.py
BJ17779.py
py
2,086
python
ko
code
0
github-code
50
71265917596
from webob.exc import HTTPForbidden, HTTPNotFound, HTTPUnauthorized from swift.common.utils import get_logger, split_path, get_remote_client from swift.common.middleware.acl import clean_acl, parse_acl, referrer_allowed class SwiftAuth(object): """ Keystone to Swift authorization system. Add to your pip...
HugoKuo/keystone-essex3
keystone/middleware/swift_auth.py
swift_auth.py
py
7,195
python
en
code
1
github-code
50
26212448058
# import sqlite3 # def display_values(): # conn = sqlite3.connect("Result.db") # cur = conn.cursor() # cur.execute("SELECT Data, attacktype FROM Datas") # rows = cur.fetchall() # print("Values in the table:") # for row in rows: # print("Data:", row[0]) # print("Attack ...
kpister/prompt-linter
data/scraping/repos/HeisenbergCipherCracker~SQLJ/lib~scripts~Hackgpt.py
lib~scripts~Hackgpt.py
py
1,277
python
en
code
0
github-code
50
37248842828
""" =================================================== UTILS.PY Helper functions. =================================================== """ # Imports import pennylane as qml from model import num_qubits def square_loss(labels, predictions): loss = 0 for l, p in zip(labels, predictions): loss += (l - p...
emilystamm/crypto_time_series_quantum
src/utils.py
utils.py
py
947
python
en
code
1
github-code
50
557495729
import numpy as np def axis_angle_rot_matrix(k,q): c_theta = np.cos(q) s_theta = np.sin(q) v_theta = 1 - np.cos(q) kx = k[0] ky = k[1] kz = k[2] # Row 1 r00 = kx * kx * v_theta + c_theta r01 = kx * ky * v_theta - kz * s_theta r02 = kx * kz * v_theta + ky...
Nil69420/Newton-Raphson-Forward-and-Inverse-Kinematics
Python/inverse_kinematics.py
inverse_kinematics.py
py
9,497
python
en
code
0
github-code
50
75180342555
from bs4 import BeautifulSoup from numpy import NaN import csv import requests import json import pandas as pd df1 = pd.read_csv("stage1-part3.csv") df2 = pd.read_csv("stage1-part1-stage2.csv") df3 = pd.read_csv("stage3.csv") df4 = pd.read_csv("daily-matchups.csv") playerName = df2['Player'].tolist() playerTeam =...
daygodavy/nba-jock
merge-stages.py
merge-stages.py
py
2,011
python
en
code
0
github-code
50
12864614224
import sys import numpy import matplotlib.pyplot def Func(x): return pow(x,2) def Trapz(): A=float(input("Please enter the location of the 1D domain left bound A: ")) B=float(input("Please enter the location of the 1D domain right bound B: ")) M=int(input("Please enter your desired number of subinterva...
manirazi/Python_codes
Trapezoidal_rule.py
Trapezoidal_rule.py
py
741
python
en
code
0
github-code
50
73065585116
import os from imagekitio import ImageKit from dotenv import load_dotenv load_dotenv() # Imagekit config imagekit = ImageKit( public_key=os.getenv('IMAGE_KIT_PUBLIC_KEY'), private_key=os.getenv('IMAGE_KIT_PRIVATE_KEY'), url_endpoint=os.getenv('IMAGE_KIT_URL') ) # Folder with images # Images should be i...
dayumsam/elyssian-api
image_upload.py
image_upload.py
py
1,509
python
en
code
0
github-code
50
26201185030
# Fonksiyon nesne oluลŸtururken isim, maas, rutbe deฤŸerlerinin alฤฑnmasฤฑnฤฑ saฤŸlฤฑyor. # ร‡alฤฑลŸ fonksiyonu รงaฤŸrฤฑlmasฤฑ ile personelin gรผn sayฤฑsฤฑ bir artฤฑyor ve รงalฤฑลŸtฤฑฤŸฤฑ sรถyleniyor. # Terfi fonksiyonu รงaฤŸrฤฑlmasฤฑ ile personele atanan maaลŸ deฤŸeri artฤฑyor.(200) # Bilgileri gรถster fonksiyonu รงaฤŸrฤฑlmasฤฑ ile ekrana isim, maaลŸ, ...
seref7275/Python-Beginners-Project
personel-calisma-ucretlenirme.py
personel-calisma-ucretlenirme.py
py
1,388
python
tr
code
0
github-code
50
10502105582
#!/usr/bin/env python3 """ Count and change workers salary. .manage_salary_list - method, that provides to edit list of workers with and add salary to them. """ from .support_modules.standart_functions import ( BasicFunctionsS as BasF_S ) class WorkersSalary(BasF_S): """Manage workers salary.""" __slot...
Acetonen/Interkamen_career
interkamen_career/modules/workers_salary.py
workers_salary.py
py
3,476
python
en
code
0
github-code
50
10011091812
#coding:utf-8 ''' example: print pcolor.pcolorstr("hello",4,4,4) print pcolor.pcolorstr("world",pcolor.PHIGHLIGHT,pcolor.PRED,pcolor.PWHITE) ''' PESC=chr(27) POFF=0 PHIGHLIGHT=1 PUNDERLINE=4 PFLICKER=5 PINVERSE=7 PHIDDEN=8 PBLACK=0 PRED=1 PGREEN=2 PYELLOW=3 PBLUE=4 PMAUVE=5 PCYAN=6 PWHITE=7 def pcolorstr(mystr,attr,fo...
xurenlu/hyer
hyer/pcolor.py
pcolor.py
py
477
python
en
code
38
github-code
50
18499028963
from model.CRNN import CRNN C = CRNN() Trainmodels,PredictModel = C.build((None,32,1)) adadelta = Adadelta(lr=0.05) Trainmodels.compile(loss=lambda y_true, y_pred: y_pred , optimizer=adadelta) Trainmodels.summary() Trainmodels.fit_generator( C.generateBacthData(32), epochs=3, steps_per_epoch=100, verbo...
Shaocr/Keras-OCR
src/main.py
main.py
py
403
python
en
code
0
github-code
50
72423229915
import json import cv2 shot_count = 1 frame_list = [] frame = 1 with open("MiSang_Frame.json", 'r') as outfile: frame_list = json.load(outfile) shot_count = frame_list[-1]["shot"] + 1 frame = frame_list[-1]["frame"] + 1 print(f'Current Shot : {shot_count}') while(True): image = cv2.imread(f'C:\\Users...
inha-slab/similaritySegmentation
shot_json_maker/generator_cv.py
generator_cv.py
py
1,015
python
en
code
0
github-code
50
26886777255
import psycopg2 from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT connection = psycopg2.connect("postgresql://postgres:1234@localhost:5432") connection.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) cursor = connection.cursor() table_name = "ex6" cursor.execute("SELECT 1 FROM pg_database WHERE datname='joke...
deniss619/parser
createDB_for_ex6.py
createDB_for_ex6.py
py
775
python
en
code
0
github-code
50
15305509461
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import json json_content = u""" { "server":"45.76.222.198", "server_port":8888, "local_address": "127.0.0.1", "local_port":1080, "password":"self boot", "timeout":300, "method":"aes-256-cfb", "comments": ["...
selfboot/AnnotatedShadowSocks
issue_codes/4_hook.py
4_hook.py
py
1,355
python
en
code
3
github-code
50
17855217888
import logging import uuid from decimal import Decimal from uuid import UUID from asyncpg import ForeignKeyViolationError from sqlalchemy.dialects.postgresql import insert from app.db import database from app.db.models import accounts, operation_history from app.billing.entities import * logger = logging.getLogger(...
Nerevarsoul/billing_system
app/billing/services.py
services.py
py
2,300
python
en
code
0
github-code
50
70068221917
#!/usr/bin/python3 from flask import Flask, request import requests app = Flask(__name__) key = "[api key telegram]" users = {} text = "" @app.route('/hello') def hello(): return 'Hello World' def send_message(chat_id, text): url = "https://api.telegram.org/bot{}/sendMessage".format(key) payload = {...
amauri/ey-fast-track-ml
main.py
main.py
py
2,101
python
en
code
0
github-code
50
34983693359
from tqdm import tqdm as tqdm def check_divisible( num, start, end ): for i in range( start, end+1 ): if num % i != 0: return( False ) return( True ) number = None for i in tqdm( range( 1, int( 1e10 ) ) ): if check_divisible( i, 1, 20 ) == True: number = i break print( number )
drosophominin/project_euler
0005-smallest_multiple/problem-0005.py
problem-0005.py
py
295
python
en
code
0
github-code
50
22148877569
#!/usr/bin/env python3 # -*- coding:utf-8 -*- import cv2 import numpy as np import tensorflow as tf from help_file import label_map_util from help_file import visualization_utils as vis_util import sys import time import roslib import rospy from sensor_msgs.msg import Image from geometry_msgs.msg import P...
ps-micro/PROBOT_Anno
probot_vision_pick/probot_detect/scripts/Detector_pick.py
Detector_pick.py
py
7,340
python
en
code
84
github-code
50
42786611333
import socket from utils.initializehttpsocket import InitializeHttpSocket from threading import Thread def NUTS(): print("nutsocket") if __name__ == "__main__": webpage = InitializeHttpSocket(HOST="localhost", PORT=80) Thread(target=webpage.add_endpoint(endpoint="/uwu", html_file=...
LumieOwO/bruh-
main.py
main.py
py
584
python
en
code
0
github-code
50
13966505388
#!/usr/bin/env python """ OTU_sampleData: make a 'sample_data' table (phyloseq) from the OTU table Usage: OTU_sampleData [options] <OTU_table_file> OTU_sampleData -h | --help OTU_sampleData --version Options: <OTU_table_file> OTU table file name. -h --help Show this screen. --version ...
nick-youngblut/SIPSim
SIPSim/Commands/OTU_sampleData.py
OTU_sampleData.py
py
1,742
python
en
code
1
github-code
50
36535021736
import inspect import pandas as pd import numpy as np from ..plot import candles, show class placeholder: def __call__(self, *args, **kwargs): return None class Indicator: function = placeholder() on_chart = True def __init__( self, *args, **kwargs ): self.axis = Non...
JizzFactoryEmployee/nibblerppman
nibbler/trading/collectors/AlgoTrader/indicators/indicator_base.py
indicator_base.py
py
2,192
python
en
code
0
github-code
50
20299841387
from pymodbus.client.sync import ModbusTcpClient def write(c): c.write_coil(1, False) c.read_coils(1, 1) if __name__ == "__main__": import timeit client = ModbusTcpClient('127.0.0.1', 5020) client.connect() print (timeit.timeit("lamda:write(client)", setup="from __main__ import write")) c...
mjfarmer/scada_py
simpleTest_with_timeit.py
simpleTest_with_timeit.py
py
334
python
en
code
0
github-code
50
35646175719
import geopandas as gpd import pandas as pd import numpy as np from scipy.stats import rankdata import copy def _homogenise_gdf_( geodataframe, id_header, name_header ): gdf = copy.deepcopy(geodataframe) # Add a dummy variable to allow cross-joins later gdf['__dummy__'] = gdf.apply(lambda ...
tompeterken-os/AutoCartogram
autocartogram_utils.py
autocartogram_utils.py
py
5,221
python
en
code
0
github-code
50
37990438174
#!/usr/bin/env python # -*- coding: iso-8859-15 -*- from pyramid.view import view_config from pyramid.response import Response from pyramid.httpexceptions import HTTPFound from sqlalchemy.exc import DBAPIError from .. import process_request from sqlalchemy import or_, between from .. import models import logging impor...
foerstner-lab/CoxBase-Webapp
webapp/views/mlva_query.py
mlva_query.py
py
2,995
python
en
code
0
github-code
50
14033669313
""" Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. """ # Definition for singly-linked list. # class ListNode: # def __init__(self, v...
KaneZhao/LeetCode
Python/086_Partition_List.py
086_Partition_List.py
py
1,009
python
en
code
0
github-code
50
12356680349
from kivy.clock import Clock from kivy.uix.screenmanager import Screen from kivy.lang import Builder from views.world import World class Game(Screen): Builder.load_file('views/game.kv') def __init__(self, client, *args, **kwargs): super().__init__(*args, **kwargs) self.client = client ...
matumaros/katurigja
views/game.py
game.py
py
1,772
python
en
code
1
github-code
50
39899165330
from gde.models import * class Cart: def __init__(self, request): self.request = request self.session = request.session cart = self.session.get("cart") if not cart: cart = self.session["cart"] = {} self.cart = cart def save(self): self.session["cart"...
sadj123/Ecommerce-Videogames
cart/cart.py
cart.py
py
3,480
python
en
code
0
github-code
50
41515839192
#!/usr/bin/python # take_psf.py # # PURPOSE: # Basic script to take PSF data. # The script also saves a "psf.fits" file on the local machine for later use (e.g., with QACITS). # # INPUTS # Three arguments giving the (1) the X position of the PSF, (2) the Y position of the PSF, and (3) an argument to take data (if =...
mwanakijiji/NOMIC_scripts
observing/general/take_psf.py
take_psf.py
py
3,765
python
en
code
0
github-code
50
32676445394
import sys from collections import namedtuple from enum import Enum from typing import Callable from typing import Mapping from maps_generator.checks import check from maps_generator.checks.check_addresses import get_addresses_check_set from maps_generator.checks.check_categories import get_categories_check_set from m...
muralito/omim
tools/python/maps_generator/checks/default_check_set.py
default_check_set.py
py
3,658
python
en
code
null
github-code
50
21277621497
from tkinter import * import datetime import csv from datetime import timedelta import shutil import os class Invoice(): def __init__(self, master): self.master = master self.toolsinfo ={} path = r".\dump" files = os.listdir(path) yesterday = datetime.date...
sammanadh/Shared_power
invoice.py
invoice.py
py
8,996
python
en
code
0
github-code
50
34655134074
_author_ = 'jake' _project_ = 'leetcode' # https://leetcode.com/problems/minimum-time-visiting-all-points/ # On a plane there are n points with integer coordinates points[i] = [xi, yi]. # Your task is to find the minimum time in seconds to visit all points. # You can move according to the next rules: # In one second a...
jakehoare/leetcode
python_1001_to_2000/1266_Minimum_Time_Visiting_All_Points.py
1266_Minimum_Time_Visiting_All_Points.py
py
1,244
python
en
code
49
github-code
50
17151180334
def is_finished(N, board): for line in board: for i in range(N): if line[i]: return False return True def is_board(N, row, col): return (0 <= row < N) and (0 <= col < N) N = int(input()) board = [list(map(int, input().split())) for _ in range(N)] ans = 0 while not is_finished(N, board): temp = [[0]*N fo...
kaki1013/Algorithm_Monday_Challenge_Goorm
4์ฃผ์ฐจ/2๋ฒˆ_๋‹จํ’๋‚˜๋ฌด.py
2๋ฒˆ_๋‹จํ’๋‚˜๋ฌด.py
py
655
python
en
code
0
github-code
50
1554038504
#!/usr/bin/env python # -*- coding: utf-8 -*- import icbckg.config as config print ("Loading model:word2vec ......") model = config.w2v_model # ่Žทๅ–ไธคไธชๅ•่ฏๅˆ—่กจ็š„็›ธไผผๅบฆ def get_similarity(seg_list, word_list): if ("".join(seg_list) == u'ๆ˜ฏไป€ไนˆ') and ("".join(word_list) in [u'ไธšๅŠก็ฎ€่ฟฐ', u'ไธšๅŠก็ฎ€ไป‹', u'ไบงๅ“็ฎ€ไป‹', u'ๅก็‰‡็ฎ€ไป‹', u'ๅŠŸ่ƒฝๅฎšไน‰', 'descr...
sadxiaohu/icbckg
graph/serviceWord2vec.py
serviceWord2vec.py
py
726
python
en
code
1
github-code
50
28002898574
from openerp.osv import osv, fields from openerp.tools import DEFAULT_SERVER_DATE_FORMAT import datetime import time class mc_mrp_tipo(osv.osv) : _name = "mc.mrp.tipo" _desc = "Clase para definir los distintos tipos de Fabricacion" _columns = { "name" : fields.char("Nombre...
code2dev/O7-Sales-Manufacture
mc_mrp/sale.py
sale.py
py
8,908
python
en
code
0
github-code
50
15900967859
""" ็ป™ไธ€ไธชๅชๅŒ…ๅซ '(' ๅ’Œ ')' ็š„ๅญ—็ฌฆไธฒ๏ผŒๆ‰พๅ‡บๆœ€้•ฟ็š„ๆœ‰ๆ•ˆ๏ผˆๆญฃ็กฎๅ…ณ้—ญ๏ผ‰ๆ‹ฌๅทๅญไธฒ็š„้•ฟๅบฆใ€‚ ๅฏนไบŽ "(()"๏ผŒๆœ€้•ฟๆœ‰ๆ•ˆๆ‹ฌๅทๅญไธฒไธบ "()" ๏ผŒๅฎƒ็š„้•ฟๅบฆๆ˜ฏ 2ใ€‚ ๅฆไธ€ไธชไพ‹ๅญ ")()())"๏ผŒๆœ€้•ฟๆœ‰ๆ•ˆๆ‹ฌๅทๅญไธฒไธบ "()()"๏ผŒๅฎƒ็š„้•ฟๅบฆๆ˜ฏ 4ใ€‚ """ """ ่งฃ้ข˜ๆ€่ทฏ๏ผš ๅฎšไน‰ไธชstartๅ˜้‡ๆฅ่ฎฐๅฝ•ๅˆๆณ•ๆ‹ฌๅทไธฒ็š„่ตทๅง‹ไฝ็ฝฎ๏ผŒ ๆˆ‘ไปฌ้ๅކๅญ—็ฌฆไธฒ๏ผŒๅฆ‚ๆžœ้‡ๅˆฐๅทฆๆ‹ฌๅท๏ผŒๅˆ™ๅฐ†ๅฝ“ๅ‰ไธ‹ๆ ‡ๅŽ‹ๅ…ฅๆ ˆ๏ผŒ ๅฆ‚ๆžœ้‡ๅˆฐๅณๆ‹ฌๅท๏ผŒ ๅฆ‚ๆžœๅฝ“ๅ‰ๆ ˆไธบ็ฉบ๏ผŒๅˆ™ๅฐ†ไธ‹ไธ€ไธชๅๆ ‡ไฝ็ฝฎ่ฎฐๅฝ•ๅˆฐstart๏ผŒ ๅฆ‚ๆžœๆ ˆไธไธบ็ฉบ๏ผŒๅˆ™ๅฐ†ๆ ˆ้กถๅ…ƒ็ด ๅ–ๅ‡บ๏ผŒ ๆญคๆ—ถ่‹ฅๆ ˆไธบ็ฉบ๏ผŒๅˆ™ๆ›ดๆ–ฐ็ป“ๆžœๅ’Œi - start + 1ไธญ็š„่พƒๅคงๅ€ผ๏ผŒๅฆ ๅˆ™ๆ›ดๆ–ฐ็ป“ๆžœๅ’Œi - ๆ ˆ้กถๅ…ƒ็ด ไธญ็š„่พƒ...
alexkie007/offer
LeetCode/ๅŠจๆ€่ง„ๅˆ’/32. ๆœ€้•ฟๆœ‰ๆ•ˆๆ‹ฌๅท.py
32. ๆœ€้•ฟๆœ‰ๆ•ˆๆ‹ฌๅท.py
py
1,399
python
zh
code
0
github-code
50
8454872928
from django.shortcuts import render # Create your views here. from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from .serializers import OrderSerializer, OrderDetailSerializer from rest_framework.exceptions import APIException from .models import * ...
NithinKrishna10/GarbageGo
orders/views.py
views.py
py
962
python
en
code
0
github-code
50
25774704324
import warnings warnings.filterwarnings("ignore") import matplotlib.pyplot as plt import scipy.stats import pandas as pd import random import seaborn as sns def Snippet_121(): print(format('Spearman\'s correlation')) # Create empty dataframe df = pd.DataFrame() # Add columns #df['x'] = ra...
LiadzZ/Article-Vs-Tweets-Sentiment-Analysis-Spearman-correlation
SpearManCorrelation.py
SpearManCorrelation.py
py
1,717
python
en
code
0
github-code
50
9164914571
from PIL import Image from PIL import ImageFilter import numpy as np import cv2 import datetime import os import time import math import matplotlib.pyplot as plt #Metodo para guardar los datos def write2file(hola, nombre): if type(hola) == list: f = open("Datos_pruebas/" + nombre +".txt", "w") for i in hola: ...
arcoslab/llars
depth_calc/tests/test4.py
test4.py
py
2,551
python
en
code
0
github-code
50
18121861446
import torch from torch_geometric.data import Data from torch_geometric.transforms import RadiusGraph from open_gns.models import EncodeProcessDecode class Simulator(): def __init__(self, *, positions, properties, velocities=None, device=None, R=0.08): # initialize the model self.R = R sel...
alantrrs/open_gns
open_gns/simulator.py
simulator.py
py
2,360
python
en
code
2
github-code
50
73901145114
import argparse import sys import json import requests import base64 import time from git import Repo import tempfile import shutil import os import stat import glob import re import xml.etree.ElementTree as ET SLEEP = .3 def del_rw(action, name, exc): os.chmod(name, stat.S_IWRITE) os.remove(name) npm_cache ...
danamodio/scripts
dep_finder.py
dep_finder.py
py
9,658
python
en
code
0
github-code
50
74658691356
# break - example print("The break instruction:") for i in range(1, 6): if i == 3: break print("Inside the loop.", i) print("Outside the loop.") # continue - example print("\nThe continue instruction:") for i in range(1, 6): if i == 3: continue print("Inside the loop.", i) print("Out...
HongThaiPham/bkcad-python-for-iot
python-essentials-1/break-and-continue.py
break-and-continue.py
py
697
python
en
code
0
github-code
50
73702162074
from shutil import copyfile import xml.etree.ElementTree as ET from vtv_utils import initialize_timed_rotating_logger, vtv_send_html_mail_2 allowed_paths = ['/home/veveo/sports_spiders'] def get_table_header(title, headers): table_header = '<br /><br /><b>%s</b><br /><table border="1" \ style...
headrun/SWIFT
SPORTS/sports_spiders/monitoring_mails/check_spider_cronjob.py
check_spider_cronjob.py
py
2,316
python
en
code
1
github-code
50
27953709230
""" API controllers for node related operations. """ import base64 import hug from bson.objectid import InvalidId from marshmallow import ValidationError from shipyard.errors import (AlreadyPresent, MissingDevices, NotFeasible, NotFound) from shipyard.node.model import Node from shipyard....
varrrro/shipyard-server
shipyard/node/controllers.py
controllers.py
py
7,073
python
en
code
2
github-code
50
69954555034
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 19 02:51:59 2021 @author: lch """ import cv2 from torch.utils import data as data_utils import numpy as np import os import pdb class Dataset(data_utils.Dataset): """__init__ and __len__ functions are the same as in TorchvisionDataset"""...
Hwan-I/motion_keypoint
HRNet_bbox/lib/dataset/dataset.py
dataset.py
py
2,198
python
en
code
0
github-code
50
70897713434
from fastapi import Request, status from fastapi.utils import is_body_allowed_for_status_code from fastapi.responses import JSONResponse, Response from starlette.exceptions import HTTPException as StarletteHTTPException from src.response import ErrorResponse async def request_validation_exception_handler(request: Re...
DylanMsK/fastapi_template
src/exception_handlers.py
exception_handlers.py
py
1,103
python
en
code
0
github-code
50
4921157118
import re from django.core.exceptions import ValidationError def validate_slug(value): regex = r'^[-a-zA-Z0-9_]+$' if not re.match(regex, value): raise ValidationError( 'ะะตะบะพั€ั€ะตะบั‚ะฝั‹ะน ัะปะฐะณ' ) return value def validate_color(value): regex = r'^#[A-Fa-f0-9]{6}$' if n...
methodologyCode/foodgram-project-react
backend/foodgram/recipes/validators.py
validators.py
py
635
python
ru
code
0
github-code
50
40130456950
# This config can be used for tests of XML files containing mappings. # Since data in CondDB has same labels ESPrefer is needed. # For internal and testing purposes only import FWCore.ParameterSet.Config as cms from Configuration.Eras.Era_Run3_cff import Run3 process = cms.Process('RECODQM', Run3) process.maxEvents ...
cms-sw/cmssw
DQM/CTPPS/test/strip_dqm_test_xml_cfg.py
strip_dqm_test_xml_cfg.py
py
3,178
python
en
code
985
github-code
50
20912198449
#! /usr/bin/env python import openpyxl import datetime class WriteXlsxUtil(object): def __init__(self, file_name='File'): self.suffix = '.xlsx' self.workbook = openpyxl.Workbook() self.sheet = self.workbook.create_sheet(index=0, title="Sheet") self.file_name = file_name s...
infuq/infuq-others
Python/t_excel/WriteXlsxUtil.py
WriteXlsxUtil.py
py
985
python
en
code
1
github-code
50
40141905590
#!/usr/bin/env python3 import time import os import sys import zlib import struct DECOMPRESS_BUF_SIZE = 4*1024*1024 BLOCK_MAGIC = "\x00\x00\xFF\xFF" ENDLINE_MAGIC = "\n" # we treat everything as a deflate stream # gzip header has no power here def strip_gzip_header(body): assert body[0:2] == "\x1f\x8b" meth...
cms-sw/cmssw
DQMServices/StreamerIO/scripts/ztail.py
ztail.py
py
4,270
python
en
code
985
github-code
50
71604176156
import os import torch import mitsuba # Set the desired mitsuba variant mitsuba.set_variant('gpu_autodiff_rgb') from robust_vision.utils.graphics import GaussianSmoothing import robust_vision.utils.enoki as uek import enoki as ek from mitsuba.core import ScalarTransform4f, Transform4f, Vector3f, UInt32, Float32 from m...
hakanyi/robust-vision-thesis
robust_vision/renderer.py
renderer.py
py
13,830
python
en
code
0
github-code
50
34036778313
import re from datetime import datetime,timezone,timedelta def to_timestamp(dt_str,tz_str): #ๅˆฉ็”จreๆจกๅ—็š„ๆญฃๅˆ™่กจ่พพๅผๅŒน้…ๅ‡บๆ—ถๅŒบไฟกๆฏ re_tz = re.match(r'UTC([+-]\d+):\d+',tz_str).group(1) print(re_tz) #ๆ—ฅๆœŸๆ—ถ้—ดstr่ฝฌๅŒ–ๆˆdatetime dt = datetime.strptime(dt_str,'%Y-%m-%d %H:%M:%S') #strๅ˜้‡ไฝœไธบๅ‚ๆ•ฐไผ ๅ…ฅๆ—ถไธ้œ€่ฆๆ‰“'' print(dt) #ๆœฌๅœฐ...
Brownchen/learn-python
do_datetime.py
do_datetime.py
py
899
python
en
code
0
github-code
50
13133407123
# -*- coding: utf-8 -*- """ Created on Mon Jun 15 23:20:44 2020 @author: max20 """ def countingSort(arr): # number constraint: 0-99 arr_counter = [0] * 100 for i in range(len(arr)): # add 1 to the corresponding position when each arr[i] appears arr_counter[arr[i]] += 1 ...
max2004boy/Hackerrank-Problem-Solving
Counting Sort_part 2 practice_20200617.py
Counting Sort_part 2 practice_20200617.py
py
729
python
en
code
1
github-code
50
26054434766
#!/shared/software/python/bin/python3.2 # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any la...
wesen/blender
bf-extensions/py/scripts/tools/bi_farm/slideshow/preview_images_update.py
preview_images_update.py
py
2,979
python
en
code
1
github-code
50
4897619739
from os import cpu_count import argparse import uuid from math import ceil import pathlib from datetime import datetime from multiprocessing import Pool from functools import partial import pandas as pd from tqdm import tqdm def save_chunk(df_chunk, output_dir): outfile = f"{output_dir}{uuid.uuid4()}.json" # ...
ryancollingwood/chunk_large_json
chunk_large_json.py
chunk_large_json.py
py
4,004
python
en
code
0
github-code
50
19450987757
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : test_auth.py # @Author : mocobk # @Email : mailmzb@qq.com # @Time : 2020/3/11 14:23 import pytest def test_get_users_info(auth_client, default_super_user): res = auth_client.get("/v1/users") assert res.status_code == 200, res.json assert isinsta...
mocobk/MonlineServer
tests/test_users.py
test_users.py
py
983
python
en
code
0
github-code
50
419802579
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/5/5 21:39 # @Author : lingxiangxiang # @File : demon2.py import pymysql class TestMysql(object): def __init__(self): self.dbConfig = { "host": "192.168.48.136", "port": 3306, "user": "xiang", ...
ajing2/LivePython1
็ฌฌๅไบ”่ฏพ/demon2.py
demon2.py
py
640
python
en
code
2
github-code
50
33932476328
from tree_node import Tree_Node class AVL_Tree: def __init__(self): self.root = None def add(self, value): key = self.hash(value) if self.root == None: self.root = Tree_Node((key, value)) else: current_node = self.root found = False ...
ehimen-io/python-dsa
data-structures/complex-data-structures/trees/avl-tree/avl_tree.py
avl_tree.py
py
6,028
python
en
code
0
github-code
50
74890377756
import requests import re import json from os import listdir from random import randrange #### Created by Matthew Franklin ### #### Please see www.github.com/mefranklin6 for license, readme, updates ### # Execute this code on your computer, don't put it on the processor ############################################...
mefranklin6/ControlDeploymentHelper
ControlDeploymentHelper.py
ControlDeploymentHelper.py
py
6,752
python
en
code
1
github-code
50
12822281609
# https://leetcode.com/problems/longest-common-prefix/ # BINARY-SEARCH class Solution: # returns if all the words have the prefix till word_of_min_len[0:mid] def isCP(self, strs, leng)->bool: sub_stri = strs[0][:leng] for i in range(1, len(strs)): if strs[i][0:leng]!=su...
bitan2988/leetcode
longest_common_prefix.py
longest_common_prefix.py
py
1,917
python
en
code
0
github-code
50
34400326511
import numpy as np import pandas as pd import math from model import NaiveBayes def pre_processing(df): X = df.drop([df.columns[-1]], axis = 1) y = df[df.columns[-1]] return X, y if __name__ == "__main__": df = pd.read_table("weather.txt") X,Y = pre_processing(df) model = NaiveBayes() model.fit(X,Y)...
ahmedbasemdev/Machine-Learning-Algorithms-From-Scratch
04- Naive Bayes/main.py
main.py
py
352
python
en
code
1
github-code
50
26228265221
print("ะ—ะฐะดะฐั‡ะฐ 6") # ะ ะตะฐะปะธะทัƒะนั‚ะต ะฟั€ะพะณั€ะฐะผะผัƒ, # ะบะพั‚ะพั€ะฐั ะทะฐะฟั€ะฐัˆะธะฒะฐะตั‚ ะดะฒะฐ ั‡ะธัะปะฐ ัƒ ะฟะพะปัŒะทะพะฒะฐั‚ะตะปั. # ะŸะพัะปะต ัั‚ะพะณะพ ัƒ ะบะฐะถะดะพะณะพ ั‡ะธัะปะฐ ะฒะพะทัŒะผะธั‚ะต ะดะฒะต ะฟะพัะปะตะดะฝะธะต ั†ะธั„ั€ั‹. # ะŸะพะปัƒั‡ะธะฒัˆะธะตัั ะดะฒะฐ ั‡ะธัะปะฐ ัะปะพะถะธั‚ะต ะธ ะฒั‹ะฒะตะดะธั‚ะต ะฝะฐ ัะบั€ะฐะฝ. # ะŸั€ะธะผะตั€: # ะ’ะฒะตะดะธั‚ะต ะฟะตั€ะฒะพะต ั‡ะธัะปะพ: 456 # ะ’ะฒะตะดะธั‚ะต ะฒั‚ะพั€ะพะต ั‡ะธัะปะพ: 123 # ะกัƒะผะผะฐ: 79 # ะฟะตั€ะตะผะตะฝะฝะฐั, ะบะพั‚ะพั€ะฐั ะฟะพะบะฐะทั‹ะฒะฐะตั‚, ั‡...
little-beetle/skillbox_python_basic
module_3/task_6.py
task_6.py
py
999
python
ru
code
0
github-code
50
29002666693
import socket import datetime # code written by William Ngo for CS3357 UDP_IP = "127.0.0.1" UDP_PORT = 5005 properQuestion = "What is the current date and time?" while True: mySocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) mySocket.bind((UDP_IP, UDP_PORT)) # still need to bind port when handli...
wngo1337/CS3357
asn2/Server_UDP.py
Server_UDP.py
py
1,326
python
en
code
0
github-code
50
41501331937
# ################################################################# # File name: Tรฝr.py # Author: Need4Swede # Company: N/A # Contact: need4swede@gmail.com # Description: Omniscient Database for Inventory Notation # ################################################################# ## LIBRARY IMPORT...
need4swede/ODIN
Tyr/Tรฝr.py
Tรฝr.py
py
98,781
python
en
code
0
github-code
50
72158899356
""" Module to adjust general SolydXK settings """ #!/usr/bin/env python3 import os from os.path import exists, dirname, isdir from utils import get_apt_force, is_package_installed, \ get_apt_cache_locked_program, get_debian_version # --force-yes is deprecated in stretch APT_FORCE = get_apt_force() ...
abalfoort/solydxk-system
usr/lib/solydxk/system/adjust.py
adjust.py
py
4,805
python
en
code
0
github-code
50
38349211457
import unittest # returns an array from 1 to max_number with values according to the fizzbuzz rules def fizzbuzz(max_number): result = [] for n in range(1, max_number+1): if (n % 5 == 0) and (n % 3 == 0): result.append("FizzBuzz") elif (n % 3 == 0): result.append("Fizz") elif (n % 5 == 0): result.app...
hackjoy/fizzbuzz
python/fizzbuzz.py
fizzbuzz.py
py
618
python
en
code
0
github-code
50
71316604955
import numpy as np import torch EPS = 1e-3 def torch_sgd_linear(dots: torch.tensor, batch_size, start=None, lr=1e-6, epoch_limit=100, method="SGD", log=False, dtype=torch.float64): if start is None: start = [0., 0.] n = len(dots) # looking for solution of linear regression y ...
Marlesss/nonlinear-regression
pytorch_tool.py
pytorch_tool.py
py
2,426
python
en
code
0
github-code
50
22191118521
import numpy as np from openmdao.api import ExplicitComponent class BatteryCostComp(ExplicitComponent): def setup(self): self.add_input('kwh') self.add_input('kwhcost') self.add_input('quantity') self.add_output('BatteryCost') self.declare_partials('BatteryCost', 'quantit...
UAM-Team-Optimization-Problem/UAM-Team-Optimization
UAM_team_optimization/components/Economics/batterycost_comp.py
batterycost_comp.py
py
886
python
en
code
0
github-code
50
10832897608
import argparse import constants def get_train_args(): """ Retrieves and parses the command line arguments provided by the user when they run the training program from a terminal window. This function uses Python's argparse module to created and defined these command line arguments. This function ...
felixglush/FlowerImageClassifier
get_input_args.py
get_input_args.py
py
2,889
python
en
code
0
github-code
50
13777409153
# B - Counterclockwise Rotation # https://atcoder.jp/contests/abc259/tasks/abc259_b # NOTE: ๅบงๆจ™ใฎๅ›ž่ปขใฎๅ…ฌๅผใ‚’ๅˆฉ็”จใ€‚https://keisan.casio.jp/exec/system/1496883774 import math a, b, d = map(int, input().split()) rad = math.radians(d) x = a * math.cos(rad) - b * math.sin(rad) y = a * math.sin(rad) + b * math.cos(rad) print(x, y)
ryu-0729/AtCoder-Beginners-Selection
AimingForBrownCoders/atcoder/b_counterclockwise-rotation.py
b_counterclockwise-rotation.py
py
343
python
en
code
0
github-code
50
26437267464
import re pattern = r"(#|\|)(?P<item>[A-Za-z\s]+)\1(?P<date>[0-9]{2}/[0-9]{2}/[0-9]{2})\1(?P<calories>[0-9][0-9]{0,3}|10000)\1" string = input() data = re.finditer(pattern, string) items = [] total_calories = 0 for match in data: result = match.groupdict() items.append(result) total_c...
konsatanasoff/python-fundameltals-2020
final_exam_preparations/ad_astra.py
ad_astra.py
py
564
python
en
code
0
github-code
50
73445158556
# coding: utf-8 # In[4]: import pylab as plt import pickle # In[10]: with open('abs_sp', 'rb') as handle: abs_spectrum = pickle.load(handle) with open('emis_sp', 'rb') as handle: emis_spectrum = pickle.load(handle) # In[13]: # plot the spectra ft = 14 plt.figure(figsize=(3.5, 2.5)) plt.plot(abs...
ArtemStrashko/Organic_Polariton_Lasing
data_and_scripts_producing_figures/1_Plotting_abs_emis_spectra__fig1d.py
1_Plotting_abs_emis_spectra__fig1d.py
py
980
python
en
code
2
github-code
50
16106421915
from flask import Flask, render_template, request from flask_mysqldb import MySQL app = Flask(__name__) app.config['MYSQL_USER'] = 'sql9365288' app.config['MYSQL_PASSWORD'] = 'RLtjMbHeDA' app.config['MYSQL_HOST'] = 'sql9.freemysqlhosting.net' app.config['MYSQL_DB'] = 'sql9365288' mysql= MySQL(app) ## home page is...
naveendayakar/health-insurance-project
app.py
app.py
py
7,972
python
en
code
0
github-code
50
23334035042
#!/usr/bin/python3 import argparse import logging import binpack import uuid import statistics import time import os.path import pprint logr = logging.getLogger() console_handler = logging.StreamHandler() formatter = logging.Formatter( '%(levelname)s [%(filename)s %(lineno)d] %(message)s' ) console_handler.setFormatt...
ncsa/pdbkup
bin/split_filelist.py
split_filelist.py
py
5,466
python
en
code
0
github-code
50
18725053601
print('\033[36m~' * 7) print('COMPRAS') print('~' * 7) n = int(input('''\033[31m[1]\033[m MICROONDAS \033[31m[2]\033[m BICICLETA \033[1mDigite o nรบmero referente ao poduto que vocรช deseja?\033[m''')) if n == 1: print('O microondas custa R$500.00!') elif n == 2: print('A bicicleta custa R$350.00!') else: pri...
luhpazos/Exercicios-Python
Pacote download/Desafios/44.Gerenciador de Pagamentos.py
44.Gerenciador de Pagamentos.py
py
1,772
python
pt
code
0
github-code
50
3797541546
import RPi.GPIO as GPIO import httplib2 import socks import sys,os import time from datetime import datetime import re from apiclient.discovery import build from oauth2client import tools, client, file from oauth2client.file import Storage from oauth2client.client import AccessTokenRefreshError from oauth2client.clien...
flavioipp/Gcalendar
daemon/gcalendar.py
gcalendar.py
py
10,794
python
en
code
0
github-code
50
39796606309
device = "cuda" import torch from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('t5-small') # Load model.bin print("Please enter the input text:") input_text = input() model = torch.load("D:\DL5-SmartSense\output-model\output\final\pytorch_model.bin") with torch.no_grad(): tokenize...
sbthycode/DL5-SmartSense
src/inference.py
inference.py
py
975
python
en
code
0
github-code
50
26799336116
import os import requests TELEGRAM_BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN') TELEGRAM_CHAT_ID = os.getenv('TELEGRAM_CHAT_ID') def send(msg, pictures=[]): if isinstance(pictures, list) and len(pictures) > 0: telegram_url = 'https://api.telegram.org/bot{0}/sendPhoto'.format( TELEGRAM_BOT_TOKEN...
ApaRiauSedangBerasap/bot
send_telegram.py
send_telegram.py
py
914
python
en
code
0
github-code
50
38138119166
from IPython.display import clear_output def display_board(board): clear_output() print(board[7] + '|' + board[8] + '|' + board[9]) print('-|-|-') print(board[4] + '|' + board[5] + '|' + board[6]) print('-|-|-') print(board[1] + '|' + board[2] + '|' + board[3]) def player_input(): marker =...
david2999999/Python
Complete Python BootCamp - Udemy/Section 7 - Milestone Project 1/tic-tac-toe.py
tic-tac-toe.py
py
564
python
en
code
0
github-code
50
946787109
""" 2019.06.29 """ ### ้€’ๅฝ’ class Solution(object): def maxDepth(self, root): """ :type root: TreeNode :rtype: int """ if not root: return 0 return max(self.maxDepth(root.right),self.maxDepth(root.left))+1 ### ้ž้€’ๅฝ’ class Solution(object): def maxDepth(...
jiechenyi/jyc-record-
Algorithm/leetcode/ไบŒๅ‰ๆ ‘็š„ๆœ€ๅคงๆทฑๅบฆ.py
ไบŒๅ‰ๆ ‘็š„ๆœ€ๅคงๆทฑๅบฆ.py
py
794
python
en
code
0
github-code
50
7485240991
class subjectt: def __init__(self, name, mark): self.name = name self.mark = mark subject1 = subjectt("english", 90) subject2 = subjectt("math", 85) subject3 = subjectt("It", 92) print(subject1.name) print(subject1.mark)
SamahElShareef/task_test
subjectt_module.py
subjectt_module.py
py
241
python
en
code
0
github-code
50
11664680458
#!/usr/bin/env python3 import multiprocessing from multiprocessing.sharedctypes import RawArray, RawValue import array import time import spidev class Driver(): MEM_SIZE = 3 * 64 RED_OFFSET = 0 GREEN_OFFSET = 64 BLUE_OFFSET = 128 def __init__(self, bam_bits): self.bam_bits = bam_bits self.buf = RawArray('B'...
peterpdj/Py3-RGBCube
cubedriver.py
cubedriver.py
py
3,324
python
en
code
0
github-code
50
36497450432
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : get_file.py # @Author : Norah C.IV # @Time : 2022/4/22 15:54 # @Software: PyCharm import os def find_file(search_path, include_str=None, filter_strs=None): """ ๆŸฅๆ‰พๆŒ‡ๅฎš็›ฎๅฝ•ไธ‹ๆ‰€ๆœ‰็š„ๆ–‡ไปถ๏ผˆไธๅŒ…ๅซไปฅ__ๅผ€ๅคดๅ’Œ็ป“ๅฐพ็š„ๆ–‡ไปถ๏ผ‰ๆˆ–ๆŒ‡ๅฎšๆ ผๅผ็š„ๆ–‡ไปถ๏ผŒ่‹ฅไธๅŒ็›ฎๅฝ•ๅญ˜ๅœจ็›ธๅŒๆ–‡ไปถๅ๏ผŒๅช่ฟ”ๅ›ž็ฌฌ1ไธชๆ–‡ไปถ็š„่ทฏๅพ„ :param search_path: ๆŸฅๆ‰พ็š„็›ฎๅฝ•่ทฏๅพ„ ...
RoziSec/sectools
scan_start/get_file.py
get_file.py
py
1,318
python
en
code
3
github-code
50
41826730600
import os, shutil import tkinter as tk from tkinter import * directorya = r"path/to/png" dirpng = r"path/to/Photo" dirmp4 = r"path/to/video" direv3 = r"path/to/EV3" dirlego = r"path/to/lego_digital_designer" dirmc = r"path/to/Minecraft" dirmus = r"path/to/Music" dirscra = r"path/to/Scratch" bin = r"path/to/bin" dirmkv...
0CT0PUCE/Basic-python-sorting-algorithm
sorting.py
sorting.py
py
8,114
python
en
code
1
github-code
50
25136176368
import argparse import os import tarfile import urllib.request from urllib.request import urlopen as uReq from zipfile import ZipFile from bs4 import BeautifulSoup as soup from tqdm import tqdm def create_directory(dir_path): if os.path.exists(dir_path): print(f"Directory for {dir_path} already exists.")...
learningmatter-mit/PatentChem
download.py
download.py
py
5,874
python
en
code
26
github-code
50
1020423096
import time import keyboard from const import * class Tamagucci: def __init__(self, name="Person_name", health=100, eat=140, type="REAL"): self.name = name self.age = 0 self.health = health self.type = type self.is_living = True self.sleep = MAX_SLEEP self....
VladimirSpe/Tamagucci1
game.py
game.py
py
4,134
python
ru
code
0
github-code
50
21711720254
""" Program to log and display crop plantings. crop, quantity date, outcome notes User can: view all records search for an entry add an entry update an entry delete an entry exit """ from tkinter import * from backend import Database database=Database("plantings.db") def get_selected_row(event): global selected...
sethgerou/PlantingLog
frontend.py
frontend.py
py
3,125
python
en
code
0
github-code
50
72137620956
from collections import defaultdict def transform_into_distinct_wordlist(wordlist): """Eliminate duplicates""" words_dict = dict() distinct_wordlist = [] for word in wordlist: # no need in dealing with duplicates if word in words_dict: continue distinct_wordlist.ap...
AndreiHondrari/various_test
python/imc_challenge/s2_func1bkp.py
s2_func1bkp.py
py
6,665
python
en
code
0
github-code
50
26448213104
#!/usr/bin/evn python # -*- encoding:utf-8 -*- # function: connect fusion server api # date:2020-08-16 # Arthor:Timbaland import json import time import requests requests.packages.urllib3.disable_warnings() class Fusionvm(): #็™ปๅ…ฅfusion computerๅˆๅง‹ๅŒ– def __init__(self,login_head,login_url,login_data): sel...
Timbaland8888/QYNHGS
huawei/fusion_api.py
fusion_api.py
py
16,025
python
en
code
0
github-code
50
17437702994
#!/usr/bin/python import rospy import numpy as np import sys from velocity_controller import VelocityController, vector from geometry_msgs.msg import Twist, PoseStamped, Pose, Point, Quaternion import tf.transformations as tft def controller(marker_num, self_num, master_num): vel_control = VelocityController(marker_...
toby-l-baker/robotics-project
src/move_turtlebot/src/set_turtlebot_goal.py
set_turtlebot_goal.py
py
1,969
python
en
code
0
github-code
50