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
6990895999
#!/usr/bin/env python3 # File: webserver.py # Description: cn-atda6 socket programming assignment 1, python version # a simple webserver which accepts a file path and return that file # in a http response # Author: Burgess Wong # Created Date: 2013-9-26 import io import mimetypes import sock...
FBurgessReplicator/cn-atda6
webserver/webserver.py
webserver.py
py
2,905
python
en
code
6
github-code
1
29312612664
from yxsim.action import Action from yxsim.cards.base import Card from yxsim.combat import combat from yxsim.player import Player from yxsim.resources import Sect class CardType(Card): display_name = 'Normal Attack' phase = 1 sect = Sect.CLOUD def play(self, attacker: Player, defender: Pl...
Reggles44/YXSim
yxsim/cards/logic/normal_attack.py
normal_attack.py
py
1,022
python
en
code
0
github-code
1
25458547615
import unittest from profile_chrome import profiler from devil.android import device_utils from devil.android.sdk import intent class BaseControllerTest(unittest.TestCase): def setUp(self): devices = device_utils.DeviceUtils.HealthyDevices() self.browser = 'stable' self.package_info = profiler.GetSupp...
hanpfei/chromium-net
third_party/catapult/systrace/profile_chrome/controllers_unittest.py
controllers_unittest.py
py
604
python
en
code
289
github-code
1
16264517580
''' Chapter 11.26 ''' def main(): m = [] createMatrix(m) sortRows(m) print("The row-sorted list is ") printMatrix(m) # 0.15 0.875 0.375 # 0.55 0.005 0.225 # 0.30 0.12 0.4 def createMatrix(m): print("Enter a 3-by-3 matrix row by row:") number0 = input() number1 = input() ...
JMCSci/Introduction-to-Programming-Using-Python
Chapter 11/11.26/rowsort/RowSort.py
RowSort.py
py
1,097
python
en
code
0
github-code
1
41181898812
#Window Server Code #2. server.py import cv2 import imagezmq share = imagezmq.ImageHub() while True: rasp,iamge = share.recv_image() cv2.imshow(rasp, image) if cv2.WaitKey(1) == ord('q'): break image.send_reply(b'ok')
Lime0/KSE_Practice
win_cam_server_week1.py
win_cam_server_week1.py
py
257
python
en
code
0
github-code
1
1602438456
import pymysql db=pymysql.connect('localhost','root','123456','java1') cur=db.cursor() sql='SELECT * FROM node' try: cur.execute(sql) res=cur.fetchall() for i in res: number=i[0] xcoord=i[1] ycoord=i[2] print('number=%d xcoord=%d ycoord=%d'%(number,xcoord,ycoord)) except : ...
Lousm/Python
่ฎฟ้—ฎๆ•ฐๆฎๅบ“/01.py
01.py
py
357
python
en
code
0
github-code
1
41663441089
from PyQt5.QtCore import Qt, QRect from PyQt5.QtGui import QPixmap, QPainter, QFont, QColor from Picture import Picture class MiddlePicture(Picture): # A middle picture is consisted of a background picture # a caption and a subtitle def __init__(self, size : int): super().__init__() self.c...
paul-zz/WechatLongPic
MiddlePicture.py
MiddlePicture.py
py
6,342
python
en
code
3
github-code
1
7730939127
import re """ #expect two digits from the given input # allow only 0-5 """ #pattern = "hi{1,2}"; pattern = "[0-5]{2}"; test_strings = ['hi123bye', 'Apple', 'cat', '---B---', '1313','!@#!#!#!#','6789','hi123hibye','hii','hi hi hi hi'] test_strings = ['1','99','11111'] for testStr in test_strings: result = r...
murali-kotakonda/PythonProgs
PythonBasics1/regularExp/check/Ex10.py
Ex10.py
py
446
python
en
code
0
github-code
1
22292770009
# Exercise 1 Chapter 10 Page 135 inp = input("Please enter the filename: ") if len(inp)<1: inp = 'mbox.txt' try: fhand = open(inp) except: print("Cannot open the file:",inp) quit() count_dict = dict() for line in fhand: words = line.split() length = len(words) if line.startswith("From") and ...
ChanghaoWang/py4e
Chapter10_Tuples/Exercise1.py
Exercise1.py
py
666
python
en
code
1
github-code
1
7486883399
# -*- coding: utf-8 -*- """ Created on Mon Jul 26 12:27:48 2021 @author: bjorn Traininer and Evaluation loops functioning with WandB """ import torch import time from tqdm import tqdm import wandb import numpy as np from sklearn.metrics import confusion_matrix from model_utils import get_rri, plot_grad_flow def tra...
bh1995/AF-classification
src/models/train_eval.py
train_eval.py
py
4,761
python
en
code
32
github-code
1
38897114939
""" Author: Jiajie Chen Date: Apr 24, 2016 """ import numpy as np from scipy.optimize import fmin_ncg class logisticRegression(object): def __init__(self, theta=None, lambd=0.0, cost=0.0, max_iter=100, tol=1e-5, solver='newton-cg', verbose=False): self.theta = th...
jiajiechen/Georgia-Tech-MS
CSE-6240-Web-Search/hw2/part1/logisticRegression.py
logisticRegression.py
py
2,214
python
en
code
0
github-code
1
15534518918
import gym from gym import Wrapper from gym import spaces import d4rl import torch import numpy as np from src.config import conf class SkillWrapper(gym.Wrapper): """ gym wrapper that augment the state with random chosen skill index """ def __init__(self, env, n_skills, max_steps=1000, ev=False, sample_freq=...
FaisalAhmed0/SLUSD
src/environment_wrappers/env_wrappers.py
env_wrappers.py
py
11,212
python
en
code
3
github-code
1
191894094
import unittest import numpy import six import chainer from chainer import cuda from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition class TestAccuracy(unittest.TestCase): def setUp(self): self.x = numpy.random.uniform(-1,...
jem0101/BigSwag-SQA2022-AUBURN
TestOrchestrator4ML-main/resources/Data/supervised/GITLAB_REPOS/jamieoglindsey0@chainer/tests/chainer_tests/functions_tests/test_accuracy.py
test_accuracy.py
py
1,253
python
en
code
2
github-code
1
16120882343
import asyncio from aioauth_client import YandexClient import settings from datetime import datetime import ujson yandex = YandexClient( client_id=settings.client_id, client_secret=settings.client_secret, access_token=settings.access_token ) @asyncio.coroutine def get_counters(): current_date = date...
singulared/aiohttp-example
yandex.py
yandex.py
py
1,084
python
en
code
0
github-code
1
14844168075
import keras from keras.layers import Conv2D, MaxPooling2D from keras.layers import Input, Dense, Activation from keras.layers import Reshape, Lambda from keras.models import Model, load_model from keras.layers import Bidirectional from keras.layers import LSTM from keras.optimizers import Adam from generate_data impor...
b8Nw8/number_plate_detection
train_model.py
train_model.py
py
4,458
python
en
code
0
github-code
1
7453468217
import datetime, threading, time class Car(): def __init__(self, type): self.type = type self.speed = 0 self.acceleration = 0 self.gear_num = 0 self.distance = 0 self.start_time = time.time() if self.type == "manual": self.manual_ge...
shrey1098/prac
learningOOP/class.py
class.py
py
3,135
python
en
code
0
github-code
1
21003778323
import time from elasticsearch_dsl import connections from protobuf_to_dict import dict_to_protobuf from protobufs.services.post import containers_pb2 as post_containers from protobufs.services.profile import containers_pb2 as profile_containers from protobufs.services.search.containers import entity_pb2 from protobuf...
getcircle/services
search/tests/test_search_v2.py
test_search_v2.py
py
19,015
python
en
code
0
github-code
1
13826191377
wordList = [] key_word = {'char': 101, 'int': 102, 'double': 104, 'break': 105, 'return': 106, 'void': 107, 'continue': 108, 'if': 109, 'main': 110, 'float': 111, 'else': 112, 'while': 113, 'for': 114, 'printf': 115, 'scanf': 116} operator = {'!': 205, '*': 206, '/': 207, '%': 208, '+': 209, '-...
NianZheChao/Compiler_Theory
src/final/lex.py
lex.py
py
4,725
python
en
code
0
github-code
1
17446551912
''' Mob class. Classes Turret and Mob inherits from class Entity ''' # ------ Importations ------ import pygame import math from isometric import IsoSprite, isoutils import constants as cst from . import misc,entity # ------ Mob Class ------ class Mob(entity.Entity): ''' Classe de base des monstres traversant l...
florimondmanca/tower-defense
entities/mob.py
mob.py
py
4,238
python
en
code
1
github-code
1
35979062217
import datetime from flask import Flask, Response, send_from_directory import httpx from os.path import exists app = Flask(__name__) now = datetime.datetime.now().strftime("%Y%m%d") @app.route("/health") def health(): return "Ready" @app.route("/") def root(): if not exists(f"/data/{now}.jpg"): print("Daily...
jammer/k8s-python
project/project.py
project.py
py
1,252
python
en
code
0
github-code
1
22538194760
""" ะกะตะผะธะฝะฐั€ ะทะฐะฝัั‚ะธะต โ„–3 ะ‘ะฐะทะพะฒั‹ะต ะทะฐะดะฐะฝะธั 1) ะ ะตะฐะปะธะทะพะฒะฐั‚ัŒ ั„ัƒะฝะบั†ะธัŽ, ะฟั€ะธะฝะธะผะฐัŽั‰ัƒัŽ ะดะฒะฐ ั‡ะธัะปะฐ (ะฟะพะทะธั†ะธะพะฝะฝั‹ะต ะฐั€ะณัƒะผะตะฝั‚ั‹) ะธ ะฒั‹ะฟะพะปะฝััŽั‰ัƒัŽ ะธั… ะดะตะปะตะฝะธะต. ะงะธัะปะฐ ะทะฐะฟั€ะฐัˆะธะฒะฐั‚ัŒ ัƒ ะฟะพะปัŒะทะพะฒะฐั‚ะตะปั, ะฟั€ะตะดัƒัะผะพั‚ั€ะตั‚ัŒ ะพะฑั€ะฐะฑะพั‚ะบัƒ ัะธั‚ัƒะฐั†ะธะธ ะดะตะปะตะฝะธั ะฝะฐ ะฝะพะปัŒ. """ def dividing(a, b): # ะคัƒะฝะบั†ะธั ะดะตะปะตะฝะธั ั‡ะธัะปะฐ try: result = a / b except ZeroDivisi...
AlexandrGrishchenko/Python_2-_quarter_seminar_GB
Basik task/lesson 3/Seminar 3 basik task 1.py
Seminar 3 basik task 1.py
py
875
python
ru
code
0
github-code
1
24916803132
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits import mplot3d fig = plt.figure() ax = plt.axes(projection='3d') z = np.linspace(0,1,100) x = z*np.sin(z) y = z*np.cos(z) ax.plot3D(x,y,z,'g') plt.show()
sa-y-an/datasets
AI_ML/Programs/plt.py
plt.py
py
222
python
en
code
0
github-code
1
30660429263
import sys import time from serial import Serial from serial.tools import list_ports from .config_handler import ConfigHandler class UtilityHandler: arduino = None def write(message): UtilityHandler.arduino.write(message.encode()) def init(): print(""" > Simulador ADS-B ...
caiorondon/ce2-final
handlers/utility_handler.py
utility_handler.py
py
1,583
python
pt
code
0
github-code
1
14089437388
import pygame from .constants import BLACK, WHITE, BLUE, SQUARE_SIZE, ROWS, COLS, RED from othello.board import Board from .piece import Piece LEFT = (0, -1) TOP_LEFT = (-1, -1) TOP = (-1, 0) TOP_RIGHT = (-1, 1) RIGHT = (0, 1) BOTTOM_RIGHT = (1, 1) BOTTOM = (1, 0) BOTOTM_LEFT = (1, -1) DIRECTION...
GeorgeKonomi/Othello
Othello/othello/game.py
game.py
py
10,493
python
en
code
0
github-code
1
44436368496
import os, time import zmq import zmq_helper import json, joblib import ast import training, inference class Node: """A peer-to-peer node that can act as client or server at each round""" def __init__(self, context, node_id, peers): self.context = context self.node_id = node_id self.pe...
alkaluqman/p2pFLsim
Device/peer/peer.py
peer.py
py
4,887
python
en
code
3
github-code
1
72799878755
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.core.exceptions import ObjectDoesNotExist from django_extensions.db.fields import CreationDateTimeField, ModificationDateTimeField class DjangoManager(models.Manager): ...
genghisu/eruditio
eruditio/apps/core/models.py
models.py
py
5,912
python
en
code
0
github-code
1
39271557738
from typing import Dict import requests from requests import Response BASE_URL = 'https://aw3.automationintesting.online' MESSAGE_ENDPOINT = f'{BASE_URL}/message' def create_message(payload: Dict) -> Response: response = requests.post(MESSAGE_ENDPOINT, json=payload) if not response.ok: raise Connect...
ElSnoMan/mot-automation-week
booker/message_service.py
message_service.py
py
398
python
en
code
0
github-code
1
42995752273
from django import forms class UserBookForm(forms.Form): CHOICES = [ ('te', 'Temporary Exchange'), ('pe', 'Permanent Exchange'), ('rt', 'Rental'), ('sl', 'Sale') ] health = forms.DecimalField(label='', required = True, widget=forms.TextInput( attr...
born-curious/OneBook
library/forms.py
forms.py
py
769
python
en
code
0
github-code
1
15168732536
#!/usr/bin/env python def str2bool(v): import argparse if isinstance(v, bool): return v if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argparse.ArgumentTypeError('Boolean value e...
crapula2010/file_copier
file_copier.py
file_copier.py
py
3,401
python
en
code
0
github-code
1
2705782405
# ๅฏผๅ…ฅๅŒ… import numpy as np import time # ๆ‰“ๅฐ็‰ˆๆœฌ print(np.__version__) # numpyไธŽๅŽŸ็”ŸPython็š„ๆ€ง่ƒฝๅฏนๆฏ”-------------------------------------------------- # ้œ€ๆฑ‚๏ผšๅฎž็Žฐไธคไธชๆ•ฐ็ป„้ขๅŠ ๆณ• # 1.ๅŽŸ็”Ÿpython def sum_python(n): a = [i ** 2 for i in range(n)] # ๅนณๆ–น b = [i ** 3 for i in range(n)] # ็ซ‹ๆ–น c = [] for i in range(n): c.appen...
BUBBLEbubbleBUBBLEbubble/deep-learning-from-scratch
numpy/numpyP1.py
numpyP1.py
py
1,220
python
zh
code
0
github-code
1
30080806891
from collections.abc import Iterator def get_diagnostic_code(input_list, list_of_inputs, logging=False): if not isinstance(list_of_inputs, Iterator): list_of_inputs = iter(list_of_inputs) input_list.extend([0] * 10000) i = 0 relative_base = 0 while True: op_code = input_list[i] ...
georgerouse/aoc_2019
day_13.py
day_13.py
py
4,470
python
en
code
4
github-code
1
42390085323
import numpy as np import matplotlib.pyplot as plt from matplotlib import animation import matplotlib.patches as patches import cv2 # write your script here, we recommend the above libraries for making your animation from LucasKanadeBasis import LucasKanadeBasis from LucasKanade import LucasKanade # write your scrip...
danenigma/Traditional-Computer-Vision
LK-Tracking/code/testSylvSequence.py
testSylvSequence.py
py
1,992
python
en
code
0
github-code
1
73789734435
import torch,torchvision import torch.nn as nn import torch.nn.functional as F import torchvision.transforms as transforms from torchvision import models from torch import optim import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from PIL import Image import cv2 import os devi...
Nithya-Satheesh/Drowsiness-And-Distraction-Detection-System
res_training.py
res_training.py
py
2,606
python
en
code
1
github-code
1
12048367682
import os import argparse from langchain.llms import OpenAI from langchain import PromptTemplate from langchain.chains import LLMChain, SequentialChain import warnings from datasets import load_dataset from evaluate import load import numpy as np from wasabi import color import pyutils.io as io import tqdm.auto as tqdm...
zphang/llm_feedback
llm_feedback/old/quick_feedback.py
quick_feedback.py
py
6,218
python
en
code
5
github-code
1
73737563555
# -*- coding: utf-8 -*- """Config for the Trunk. """ __authors__ = "emenager, tnavez" __contact__ = "etienne.menager@inria.fr, tanguy.navez@inria.fr" __version__ = "1.0.0" __copyright__ = "(c) 2020, Inria" __date__ = "Jun 29 2022" import sys import pathlib sys.path.insert(0, str(pathlib.Path(__file__).parent.absolute...
SofaDefrost/CondensedFEMModel
Models/3ContactFinger/Config.py
Config.py
py
2,193
python
en
code
1
github-code
1
70875858273
# ํšจ์œจ์ ์ธ ํ™”ํ ๊ตฌ์„ฑ # INF ์ดˆ๊ธฐํ™”๊ฐ’ : 10000๊ฐ™์ด ๋”์ด์ƒ ํ‘œ๊ธฐ๊ฐ€ ์•ˆ๋˜๋Š” ์ˆ˜ -> ์—ฌ๊ธฐ์„  ์ดˆ๊ธฐํ™”๋กœ ์‚ฌ์šฉ๋จ #์ •์ˆ˜ N, M์„ ์ž…๋ ฅ ๋ฐ›๊ธฐ n, m = map(int, input().split()) array = [] # n๊ฐœ์˜ ํ™”ํ ๋‹จ์œ„ ์ •๋ณด๋ฅผ ์ž…๋ ฅ ๋ฐ›๊ธฐ for i in range(n): array.append(int(input())) # DP ํ…Œ์ด๋ธ” ์ดˆ๊ธฐํ™” d = [10001] * (m + 1) # ๋‹ค์ด๋‚˜๋ฏน ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ง„ํ–‰ (๋ฐ”ํ…€์—…) d[0] = 0 for i in range(n): print("์ธ๋ฑ์Šค ๋ฒˆํ˜ธ :", i) ...
bongbub/Python_Coding_Test
Day_8/DP_CURRENCY.py
DP_CURRENCY.py
py
897
python
ko
code
0
github-code
1
12563421902
import pigpio import time class DCMotor: FREE = 0x00 BREAK = 0x01 FORWARD = 0x02 BACKWARD = 0x03 """ This class encapsulates a DC Motor control with pwm, inA, inB pins. """ def __init__(self, pi, pwm, inA, inB): self.pi = pi self._pwm_pin = pwm self._inA_pin =...
SweiLz/BlindBot
BlindBot/dcmotor.py
dcmotor.py
py
2,602
python
en
code
0
github-code
1
31778161847
import json, threading import re, requests from lxml import etree from queue import Queue class DouBan(threading.Thread): def __init__(self, q=None): super().__init__() self.base_url = 'https://movie.douban.com/chart' self.headers = { 'User-Agent': 'Mozilla/5.0 (Win...
ruirui-wang-study/pythonlearning
doubanthread.py
doubanthread.py
py
3,310
python
en
code
1
github-code
1
31031651958
print('ะ—ะฐะดะฐั‡ะฐ 7. ะžั‚ั€ะตะทะพะบ') # ะะฐะฟะธัˆะธั‚ะต ะฟั€ะพะณั€ะฐะผะผัƒ, # ะบะพั‚ะพั€ะฐั ัั‡ะธั‚ั‹ะฒะฐะตั‚ ั ะบะปะฐะฒะธะฐั‚ัƒั€ั‹ ะดะฒะฐ ั‡ะธัะปะฐ a ะธ b, # ัั‡ะธั‚ะฐะตั‚ ะธ ะฒั‹ะฒะพะดะธั‚ ะฝะฐ ะบะพะฝัะพะปัŒ #ัั€ะตะดะฝะตะต ะฐั€ะธั„ะผะตั‚ะธั‡ะตัะบะพะต ะฒัะตั… ั‡ะธัะตะป ะธะท ะพั‚ั€ะตะทะบะฐ [a; b], ะบะพั‚ะพั€ั‹ะต ะบั€ะฐั‚ะฝั‹ ั‡ะธัะปัƒ 3. a = int(input("ะงะธัะปะพ a: ")) b = int(input("ั‡ะธัะปะพ b: ")) c = 0 #ัั‡ะตั‚ั‡ะธะบ c1 = 0 #ััƒะผะผัƒ for n in range(a,b,1): ...
nikrofill/Python-study
Lesson 7/Lesson 7. HW 7.py
Lesson 7. HW 7.py
py
613
python
ru
code
0
github-code
1
21844414253
class Solution: def coinChange(self, coins: List[int], amount: int) -> int: ans = [float("inf")] * (amount + 1) ans[0] = 0 for c in coins: for amt in range(amount + 1): # print(c, amt) if c <= amt: ans[amt] = min(ans[am...
uditmanav17/leetcode
322-coin-change/322-coin-change.py
322-coin-change.py
py
438
python
en
code
0
github-code
1
74541188832
import json from functools import partial from pytest import fixture, mark from traitlets.config import Config from ..generic import GenericOAuthenticator from .mocks import setup_oauth_mock def user_model(username, **kwargs): """Return a user model""" return { "username": username, "scope":...
jupyterhub/oauthenticator
oauthenticator/tests/test_generic.py
test_generic.py
py
7,623
python
en
code
384
github-code
1
32931276072
from django.shortcuts import render from .models import Articles from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.template.context_processors import csrf def articles(request): articles_list = Articles.objects.all().order_by("-date") paginator = Paginator(articles_list,5) ...
sytyy00/News-blog
main/views.py
views.py
py
813
python
en
code
0
github-code
1
29110569541
#-*- encoding: UTF-8 -*- from django import forms from AlyMoly.mantenedor.models import Bodega from AlyMoly.movimiento.models import ProductoBodega, Ingreso, Producto, Egreso, Traspaso from AlyMoly.utils import widgets class IngresoMercaderiaForm(forms.ModelForm): def __init__(self,*args,**kwargs): super(...
CreceLibre/alymoly
AlyMoly/movimiento/forms.py
forms.py
py
6,606
python
es
code
0
github-code
1
34470233140
# ๋‚ด๊ฐ€ ๋„ˆ๋ฌด ์–ด๋ ต๊ฒŒ ์ƒ๊ฐํ–ˆ์Œ # ์™„์ „ํƒ์ƒ‰, hash๋กœ ํ’€ ์ˆ˜ ์žˆ์Œ n, k = map(int, input().split()) a = list(map(int, input().split())) # n๊ฐœ์˜ ์ˆ˜๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ k๋ฒˆ์ด์ƒ ๋“ฑ์žฅํ•˜๋Š” ์ˆ˜ ์ค‘ ์ตœ๋Œ€๊ฐ’ a.sort() s = 0 e = 0 cur_num = a[0] max_num = -1 for i in range(1, n): if cur_num == a[i]: if i == n-1: e = i e += 1 continue else:...
yeafla530/algorithms
์ฝ”๋“œํŠธ๋ฆฌ/๋ชจ์˜๊ณ ์‚ฌ/๋„ค์นด๋ผ์ฟ ๋ฐฐ1/2_k๋ฒˆ์ด์ƒ๋“ฑ์žฅํ•˜๋Š”์ตœ๋Œ€.py
2_k๋ฒˆ์ด์ƒ๋“ฑ์žฅํ•˜๋Š”์ตœ๋Œ€.py
py
1,071
python
ko
code
0
github-code
1
42999604349
''' Problem 290 | Word Pattern https://leetcode.com/problems/word-pattern/ ''' class Solution: def wordPattern(self, pattern: str, s: str) -> bool: lookup = {} s = s.split() if len(pattern) != len(s) or len(set(pattern)) != len(set(s)): return False for i in range(len(pattern)): ...
davijit868/Programming-Solutions
Data Structures/Hash Tables/Word Pattern.py
Word Pattern.py
py
512
python
en
code
2
github-code
1
27917745436
# # ไฝฟ็”จpython asyncio็ผ–ๅ†™tcpๆœๅŠก็ซฏ๏ผŒ่ฆๆฑ‚: ็›‘ๅฌ7000็ซฏๅฃ, ่ฎพ็ฝฎ็ซฏๅฃๅฏ้‡็”จ, ๆ–ฐๅปบ่ฟžๆŽฅ็š„ๆ—ถๅ€™ๆ‰“ๅฐๆ–ฐ่ฟžๆŽฅไฟกๆฏ๏ผŒๆ–ญๅผ€่ฟžๆŽฅ็š„ๆ—ถๅ€™ไนŸๆ‰“ๅฐๆ–ญๅผ€ๆ—ถ็š„ไฟกๆฏ๏ผŒ่ฟžๆŽฅ่ฎพ็ฝฎtcp nodelay้€‰้กน, ไฝฟ็”จๅŒ…ๅคดไธบ: 4ๅญ—่Š‚ๅšๅŒ…ไฝ“้•ฟๅบฆ, 4ๅญ—่Š‚ๅšpack_id, 8ๅญ—่Š‚ๅšuser_idใ€‚ import asyncio import struct import datetime import yaml import logging async def handle_client(reader, writer): peername = writer.get_extra_info('peername') prin...
hhhflow2020/AS
server.py
server.py
py
1,727
python
en
code
0
github-code
1
15428156236
"""Signup processing (Waiting list and payments). So far only dummy functionality, i.e. if a payment is posted, all courses are set to accepted. As soon as we have payment service provider, the definite functionality needs to be implemented. TODO: Send notification mails """ import json from functools import wraps ...
amiv-eth/pvk-tool
Backend/backend/signups.py
signups.py
py
5,368
python
en
code
0
github-code
1
6564116562
from Bandit import * from pylab import * import matplotlib.pyplot as plt class EpsilonGreedy: #eps of -1 will use an average reward (1/n) rathr than a constant step size def __init__(self, bandit, alpha, eps): self.name = "Epsilon Greedy" self.bandit = bandit self.numberOfArms = len(sel...
dquail/NonStationaryBandit
EpsilonGreedy.py
EpsilonGreedy.py
py
1,344
python
en
code
34
github-code
1
25888595229
def number_of_digits(number): counter = 0 while number > 0: number //= 10 counter += 1 return counter result = "" cm = input() cm = int(cm) for i in "|...." * cm: result += i result += "|\n0" for i in range(1, cm + 1): result = result + (" " * int(5 - number_of_digits(i))) + str(...
MichalKosciolek/Python-2023-2024
Zestaw1/zadanie2.py
zadanie2.py
py
338
python
en
code
0
github-code
1
4247808845
from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow.models import Param from common.operators.gce import ( StartGCEOperator, StopGCEOperator, CloneRepositoryGCEOperator, SSHGCEOperator, ) from airflow.providers.google.cloud.operators.bigquery import ( BigQ...
pass-culture/data-gcp
orchestration/dags/jobs/export/export_posthog.py
export_posthog.py
py
5,583
python
en
code
2
github-code
1
36656630174
#!/usr/bin/env python import sys class Display(object): def __init__(self): self._clock = 0 self._x = 1 self._x_hist = {} self._record() def _record(self): self._x_hist[self._clock] = self._x def x_at_clock(self, clock): return self._x_hist[clock] de...
gerrowadat/adventofcode
2022/10/10-2.py
10-2.py
py
1,130
python
en
code
1
github-code
1
32039040636
from collections import defaultdict FILE_NAME = "input16.in" fields = defaultdict(list) your_ticket = [] other_tickets = defaultdict(list) with open(FILE_NAME, 'r') as file: fieldos = True your = False other = False other_index = 0 for line in file: if line == "\n": ...
Jozkings/advent-of-code-2020
16.py
16.py
py
3,214
python
en
code
0
github-code
1
24262589675
import pandas as pd import astropy as ap from astropy.table import Table from astropy.coordinates import SkyCoord import healpy as hp import matplotlib as mpl mpl.use('agg') import matplotlib.pyplot as plt import numpy as np import seaborn as sns from matplotlib.patches import Patch from matplotlib.lines import Line2D ...
apizzuto/Novae
scripts/create_master_nova_dataframe.py
create_master_nova_dataframe.py
py
18,679
python
en
code
1
github-code
1
72729690593
from telegram.ext import Updater, MessageHandler, Filters, CommandHandler import csv with open("worldcities.csv", newline='', encoding = 'UTF-8') as csvfile: data = csv.reader(csvfile, quoting=csv.QUOTE_ALL) def start(bot, update): update.message.reply_text("Cities game. If you want to stop enter...
DonMaxon/Cities-game-bot
cityTest.py
cityTest.py
py
2,655
python
en
code
0
github-code
1
32204994985
# save model not replace import face_recognition import cv2 import os import pickle print(cv2.__version__) j=0 Encodings=[] Names=[] with open('train.pkl','rb') as f: Names=pickle.load(f) Encodings=pickle.load(f) for root,dirs, files in os.walk(image_dir): for file in files: print(root) ...
suriya43426/SuperAI_-_Edge_Computing
41_readRecognize.py
41_readRecognize.py
py
1,426
python
en
code
0
github-code
1
37614396512
import math import numpy as np import matplotlib import torch from matplotlib import pyplot as plt from matplotlib.colors import ListedColormap, LinearSegmentedColormap from matplotlib.patches import Arc # https://stackoverflow.com/questions/34017866/arrow-on-a-line-plot-with-matplotlib def add_arrow(line, position=No...
dvgodoy/PyTorchStepByStep
plots/chapter9.py
chapter9.py
py
20,754
python
en
code
622
github-code
1
14770513187
#!/usr/bin/env python import csv import numpy as np from mylib.util import cross_val_split from mylib.linear_model import LogisticRegression def iris(): np.seterr(over='ignore', invalid='ignore') print('ๅœจiris.dataไธŠ้ชŒ่ฏ๏ผš') m = 150 dataset = np.zeros((m, 5)) # load dataset with open('./datase...
neoql/note4xigua
exercise_3_4.py
exercise_3_4.py
py
4,532
python
en
code
0
github-code
1
15638250697
# -*- coding: utf-8 -*- """ Author: [Yunting Chiu](https://www.linkedin.com/in/yuntingchiu/) """ import cv2 import matplotlib.pyplot as plt import numpy as np import time import pandas as pd from sklearn.model_selection import train_test_split from sklearn.pipeline import make_pipeline from sklearn.preprocessing impor...
twyunting/Deepfake_Video_Classifier
code/10.final_rf_model.py
10.final_rf_model.py
py
4,082
python
en
code
0
github-code
1
28934336962
word = input() n = int(input()) words = [] for i in range(n): words.append(input()) vowels = ("ะฐ", "ัƒ", "ะพ", "ั‹", "ะธ", "ั", "ั", "ัŽ", "ั‘", "ะต") def search_vowels(word: str): result = [] for i in range(len(word)): if word[i] in vowels: result.append(i) return result word_vowels = search_...
Anonymkus/python
16.04.22.py
16.04.22.py
py
558
python
en
code
0
github-code
1
35632517667
from heapq import heapify, heappop, heappush class priority_queue: def __init__(self, heap): self.heap = heap heapify(self.heap) def push(self, item): heappush(self.heap, item) def pop(self): return heappop(self.heap) def __len__(self): return len(self.heap) inf = 10**6 st...
YujinMiyoshi/0202
graph2/single_source_shortest_path2.py
single_source_shortest_path2.py
py
1,122
python
en
code
0
github-code
1
23643007351
from django.conf import settings from django.conf.urls import url from django.contrib.auth.views import LogoutView as logout, LoginView as login from django.urls import path from inc_mgmt import views as v app_name = 'inc_mgmt' urlpatterns = [ url(r'^register/$', v.self_register, name='register'), u...
mmanfro/djinn
inc_mgmt/urls.py
urls.py
py
1,376
python
en
code
0
github-code
1
27035153841
#!/usr/bin/python # coding: utf8 def shell_sort(_list): """ ะกะพั€ั‚ะธั€ะพะฒะบะฐ ะจะตะปะปะฐ. ะกะพั€ั‚ะธั€ัƒะตะผ ะฟะพะดะณั€ัƒะฟะฟั‹ ัะปะตะผะตะฝั‚ะพะฒ ะฝะฐ ั€ะฐััั‚ะพะฝะธะธ d. :param _list: ะœะฐััะธะฒ ะดะปั ัะพั€ั‚ะธั€ะพะฒะบะธ. :type _list: list :return: ะžั‚ัะพั€ั‚ะธั€ะพะฒะฐะฝั‹ะน ะผะฐััะธะฒ. :rtype: list """ length = len(_list) d = int(length // 2) while...
nxexox/aist
sort/shell_sort.py
shell_sort.py
py
947
python
ru
code
1
github-code
1
43638896476
def get_preprocess(data): n, m = data.shape columns = data.columns.tolist() nn = 0 has3 = 0 previous = -1 isnull = data.isnull() total3 = 0 f = False interactions_modified = [] temp = [] for i in range(n): ff = True for j in range(m): if isnull.ilo...
guoyuanjing2988/ML-GYJ
recsyschallenge2016/src/interactions/pretreatment.py
pretreatment.py
py
1,199
python
en
code
0
github-code
1
1704787578
import math x, y, c = map(float, input().split()) r = min(x, y) l = 0 while abs(l-r) >= 0.001: d = (l+r) / 2 h1 = math.sqrt(pow(x, 2) - pow(d, 2)) h2 = math.sqrt(pow(y, 2) - pow(d, 2)) h = h1 * h2 / (h1 + h2) if h <= c: r = d else: l = d print(round(d, 3))
SunghunKim98/Algorithm_Study
sprint11/KMS/SW/BOJ_2022.py
BOJ_2022.py
py
299
python
en
code
0
github-code
1
19993551681
# -*- coding: utf-8 -*- from odoo import api, fields, models class MergeOpportunity(models.TransientModel): _inherit = 'crm.merge.opportunity' #owner_type = fields.Selection([('team', 'ๅˆ†้…็ป™็บฟ็ดขๅ›ข้˜Ÿ'), ('user', 'ๅˆ†้…็ป™่ดŸ่ดฃไบบ')], required=True, string='ๅˆ†้…ๆ–นๅผ', default='user', help="็บฟ็ดขๅฏไปฅๅˆ†้…็ป™ๅ›ข้˜Ÿ่ดŸ่ดฃ,ๆˆ–่€…ๅˆ†้…็ป™ๆŒ‡ๅฎšๅ…ทไฝ“ไบบๅ‘˜่ดŸ่ดฃ") ...
anodoo/anodoo
sale/anodoo_lead/wizard/crm_merge_opportunities.py
crm_merge_opportunities.py
py
1,503
python
en
code
12
github-code
1
33607082163
import os root_dir = "./folders" for dirpath, dirnames, filenames in os.walk(root_dir): for filename in filenames: filepath = os.path.join(dirpath, filename) if "-01" in filename or "-02" in filename or "-03" in filename: new_filename = filename.replace( "-01", "").re...
snsa-kscc/scraper
remove010203.py
remove010203.py
py
466
python
en
code
0
github-code
1
24153835574
import datetime import textwrap from pathlib import Path from slap import __version__ from slap.application import Application, Command, argument, option from slap.plugins import ApplicationPlugin from slap.util.external.licenses import get_spdx_license_details, wrap_license_text from slap.util.vcs import get_git_auth...
pombredanne/slap.cli
src/slap/ext/application/init.py
init.py
py
8,116
python
en
code
null
github-code
1
7981171072
def inspect_target(fuzzer): fuzz_targets = [] built_in_msg_types = ros_utils.get_all_message_types() subscriptions = ros_utils.get_subscriptions(fuzzer.node_ptr) if fuzzer.config.px4_sitl: if fuzzer.config.use_mavlink: topic_name = "/dummy_mavlink_topic" msg_type_class ...
sslab-gatech/RoboFuzz
src/inspector.py
inspector.py
py
7,001
python
en
code
13
github-code
1
29704572650
import numpy as np from lightfm.datasets import fetch_movielens from lightfm import LightFM data = fetch_movielens(min_rating = 4.0) print(repr(data['train'])) print(repr(data['test'])) #model with loss func. model = LightFM(loss = 'warp') model.fit(data['train'],epochs = 30,num_threads = 2) def samp...
varunp04/Basic-ML-projects
PythonClassifierApplication1/recom.py
recom.py
py
918
python
en
code
0
github-code
1
79605347
import concurrent from concurrent import futures import grpc import json import booking_pb2 import booking_pb2_grpc class BookingServicer(booking_pb2_grpc.BookingServicer): def __init__(self): with open('{}/databases/bookings.json'.format("."), "r") as jsf: self.db = json.load(jsf)["bookings"]...
InSomniaMoon/imt-api-grpc
servers/booking.py
booking.py
py
1,470
python
en
code
0
github-code
1
21256651942
#1 wala issue import json import pprint import collections import operator import pandas as pd import csv import math from collections import defaultdict import networkx as nx csv_file = open('article-ids.csv') csv_reader = csv.reader(csv_file,delimiter = ',') aid = {} for row in csv_reader: if row[0] == "๏ปฟArticl...
abhishekb785/CS685
170022_assign2/question9.py
question9.py
py
3,480
python
en
code
0
github-code
1
11677658789
def calculate(map): changed=False for i in range(len(map)-1): for j in range(len(map[i])): if map[i][j]=="-" and map[i+1][j+1]!="-" and map[i+1][j]!="-": map[i][j]= map[i+1][j]+map[i+1][j+1] changed=True for i in range(len(map)-1,0,-1): ...
m7mdony/GPC-FTW
2017/pyramid/main.py
main.py
py
1,857
python
en
code
0
github-code
1
3757066687
import bs4 import urllib.request import smtplib import time prices_list=[] def check_price(): url = 'https://www.amazon.in/dp/B082MDMW3X/ref=s9_acsd_al_bw_c2_x_0_i?pf_rd_m=A1K21FY43GMZF8&pf_rd_s=merchandised-search-5&pf_rd_r=CF9JY0WX1GAAPBD3S9KW&pf_rd_t=101&pf_rd_p=8398f427-fbf5-4310-a31e-29a4be7a59bc&pf_rd_i...
anshpratap013/monitorPrice
price.py
price.py
py
1,394
python
en
code
0
github-code
1
8396194856
""" Definition of the GridOsc trading logic, which constitutes the basic components of swing trading. """ from math import ceil, floor from constants import * from strategy import INIT, REQ, SPLIT from strategy import calc_order_params, update_position_avg_price_2way class GridOsc: """ Oscillatory trading o...
tilakchandlo/swing
grid_osc_strategy.py
grid_osc_strategy.py
py
10,038
python
en
code
4
github-code
1
8144343701
import requests import os import sys from physics import calculate LINE_URL = 'https://api.line.me/v2/bot/message/reply' token = os.environ.get('LINE_TOKEN') VALID_VARIABLES = ['v', 'u', 'a', 't', 's'] class User: def __init__(self, userId): self.userId = userId self.reset() def reset(...
ruboon-dej/graph-project
user.py
user.py
py
3,398
python
en
code
1
github-code
1
24217427343
from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.keras.layers import Lambda, Dense, TimeDistributed, Input from tensorflow.keras.models import Model from tensorflow.keras.preprocessing import image import tensorflow.keras.backend as K from vgg16 import VGG1...
emilymuller1991/thesis
chapter4clustering/clustering/1.rmac/rmac.py
rmac.py
py
5,915
python
en
code
0
github-code
1
25377643097
from unittest.mock import Mock, patch import botocore.session from botocore.exceptions import ParamValidationError from moto import ( # pylint: disable=import-error mock_ec2, mock_kinesis, mock_kms, mock_lambda, mock_s3, mock_sqs, ) from opentelemetry.instrumentation.botocore import BotocoreI...
NathanielRN/clone-opentelemetry-python
instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_instrumentation.py
test_botocore_instrumentation.py
py
8,794
python
en
code
0
github-code
1
30979856005
# -*- coding: utf-8 -*- class Singleton(type): """ This is a Singleton metaclass. All classes affected by this metaclass have the property that only one instance is created for each set of arguments passed to the class constructor.""" def __init__(cls, name, bases, dict): super(Singleton, cls...
manujosephv/MovieScraper
PlaylistPorting/Singleton.py
Singleton.py
py
693
python
en
code
0
github-code
1
17709340792
import requests import json import os def buscar_pokemon(nombre): url = f"https://pokeapi.co/api/v2/pokemon/{nombre.lower()}" response = requests.get(url) if response.status_code == 404: print("El Pokรฉmon no fue encontrado.") return None data = response.json() imagen ...
Shynomni/practicaspython
LUISARTURO_GUTIERREZ_proyectoM4..3.py
LUISARTURO_GUTIERREZ_proyectoM4..3.py
py
2,129
python
es
code
0
github-code
1
71019847074
#IMPORTING LIBRARIES import matplotlib.pyplot as plt import numpy as np import pandas as pd # READING DATA FROM TRAIN DATASET data_1 = pd.read_csv('iosdml1_train.csv') x_train = data_1.iloc[:, :2].values y_train = data_1.iloc[:, -1].values # READING DATA FROM TEST DATASET data_2 = pd.read_csv('iosdml1_test.csv') x_tes...
chanakyakapoor/IOSD_ML
IOSD__ML/IOSD_ML_1.py
IOSD_ML_1.py
py
939
python
en
code
0
github-code
1
8011180631
import cv2 import numpy as np import torch class BaseTransform(object): def __init__(self, resize, rgb_means, swap=(2, 0, 1)): self.means = rgb_means self.resize = resize self.swap = swap def __call__(self, img): interp_methods = [cv2.INTER_LINEAR, cv2.INTER_CUBIC, cv2.INTER_A...
TR19006/robot_controller
utils/data_augment.py
data_augment.py
py
666
python
en
code
0
github-code
1
7548656650
from PyQt5.QtCore import QSize, Qt from PyQt5.QtWidgets import QLabel, QPushButton, QFrame, QWidget, QVBoxLayout, QHBoxLayout from PyQt5.QtGui import * from modules.codeeditor import CodeEditor def add(self): # Creacion del tab tab = QFrame(self.ui.pages) tab.setObjectName(u"file_"+str(self.tab_number)) tab.setMi...
self-david/notpad-modern
modules/tabs.py
tabs.py
py
2,703
python
es
code
0
github-code
1
3196927893
class Solution(object): def kthSmallest(self, mat, k): """ :type mat: List[List[int]] :type k: int :rtype: int """ m, n = len(mat), len(mat[0]) smallest = sum(mat[i][0] for i in range(m)) hq = [[smallest] + [0] * m ] seen = set(tuple([0] * m)) ...
niufenjujuexianhua/Leetcode
find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows.py
find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows.py
py
872
python
en
code
0
github-code
1
19425883495
file = open('์—ฐ๋ฝ์ฒ˜.txt','rt') line_list = file.readlines() count = 0 idx = 0 for line in line_list: arr = line.split(",") tel = arr[2] if tel[:3].count('751') == 1: tel = tel.replace('751','010') count += 1 arr[2] = tel line_list[idx] = ",".join(arr) idx += 1 file.close() f...
NamSangKyu/2111Python
Section13/08_Practice_13_2.py
08_Practice_13_2.py
py
537
python
en
code
1
github-code
1
18055497974
import ply.lex as lex # List of token names. This is always required reserved = { 'if': 'IF', 'then': 'THEN', 'else': 'ELSE', 'while': 'WHILE', "switch": "SWITCH", 'bool': "BOOL", 'char': "CHAR", 'byte': "BYTE", 'short': "SHORT", 'int': "INT", 'long': "LONG", 'double':...
DanielFraser/SimplyJava
flex.py
flex.py
py
1,723
python
en
code
0
github-code
1
42039508376
from django.shortcuts import render, get_object_or_404, redirect from recipes.models import Recipe from recipes.forms import RecipeForm # SHOW_RECIPE def show_recipe(request, id): recipe = get_object_or_404(Recipe, id=id) context = { "recipe_object": recipe, } return render(request, "recipes/de...
DennieCodes/delicious
recipes/views.py
views.py
py
1,358
python
en
code
1
github-code
1
1442466849
# -*- coding: utf-8 -*- import os HERE = os.path.dirname(os.path.abspath(__file__)) # We setup the cache for Chameleon templates template_cache = os.path.join(HERE, 'cache') if not os.path.exists(template_cache): os.makedirs(template_cache) os.environ["CHAMELEON_CACHE"] = template_cache # Bootstrapping the Cr...
morganjk/ZodbDemo
server.py
server.py
py
3,402
python
en
code
0
github-code
1
2055515251
import random # Ejercicio 8 # ''' Definir una estructura de datos con listas que permita guardar la temperatura mรญnima y mรกxima de 5 dรญas. --- Realiza un programa que de la siguiente informaciรณn: - La temperatura media de cada dรญa - Los dรญas con menos temperatura - Que permita leer una temperatura por te...
profeInformatica101/ejerciciosListaPython
ejercicio8.py
ejercicio8.py
py
2,227
python
es
code
1
github-code
1
2416421872
import pathlib import os from setuptools import setup, find_packages UPSTREAM_URLLIB3_FLAG = "--with-upstream-urllib3" def get_requirements(raw=False): """Build the requirements list for this project""" requirements_list = [] with open("requirements.txt") as reqs: for install in reqs: ...
Vito39/testing_repo_2
setup.py
setup.py
py
2,241
python
en
code
0
github-code
1
11791827681
def set_crease_interactive(self): """ Set the crease for the edges which are in the unique_edges array by picking vertices forming an edge in an interactive PyVista widget. When called the first time creates np.array with zeros of length unique_edges. Returns -------- edges_crease: (n,1...
SimBe-hub/PySubdiv
scratched_stuff/pysubiv_not_in_use.py
pysubiv_not_in_use.py
py
4,155
python
en
code
2
github-code
1
11351792106
import sys sys.path.append("../common/tests") from test_utils import * import test_common sys.path.insert(0, '../../../../build/debug/config/schema-transformer/') from vnc_api.vnc_api import * import uuid class STTestCase(test_common.TestCase): def setUp(self): super(STTestCase, self).setUp() self...
Juniper/contrail-dev-controller
src/config/schema-transformer/test/test_case.py
test_case.py
py
4,591
python
en
code
3
github-code
1
34872495828
import torch import torchreid import tensorrt as trt # Load pre-trained OSNet model with x0.25 width multiplier model_name = 'osnet_x0_25' model = torchreid.models.build_model( name=model_name, num_classes=1000, pretrained=True ) # Create example input tensor data_shape = (3, 256, 128) input_tensor = torc...
strikerPro818/strikerBot
Xavier_NX/mobileSelectTrack/trtConversion.py
trtConversion.py
py
1,594
python
en
code
0
github-code
1
74371131553
import os import pandas as pd import bifacial_radiance os.chdir('C:/Users/ferdl/Documents/bifacial_radiance/TFG_Final/Seguimiento/Anual/Sudafrica_Diciembre') path = os.getcwd() print("Cambio de directorio de trabajo a:", path) resultfolder = os.path.join(path, 'results') writefiletitle = "Mismatch_Results_...
ferdlhc/TFG_Final
Programas/Calculo de potencia/CalculoPotencia.py
CalculoPotencia.py
py
1,006
python
en
code
0
github-code
1
72143589475
from copy import deepcopy import logging from typing import Any, Dict, List, Optional, Type from braces.views import ( FormInvalidMessageMixin, FormValidMessageMixin, LoginRequiredMixin, MessageMixin ) from django.forms import BaseModelForm, Form from django.http.response import HttpResponse from djang...
caltechads/django-wildewidgets
wildewidgets/views/generic.py
generic.py
py
22,102
python
en
code
9
github-code
1
23029542095
# -*- coding: utf-8 -*- """ Methods to compute the centroid from a dataset. @author: alex-merge @version: 0.8 """ import numpy as np from random import randrange class centroid(): """ Set of methods to compute the centroid for OAT. """ def compute_distance_sum(point, arr): """ Ret...
alex-merge/Organoid-Analyzing-Tools
modules/utils/centroid.py
centroid.py
py
6,883
python
en
code
0
github-code
1
42689807900
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import queue as q import os from os.path import isfile, join import seaborn as sns import matplotlib.pylab as pylab import sys sys.path.append('/Users/aabir/anaconda/envs/pca/simulations') sns.set_style('whitegrid') params = {'legend.fontsiz...
bakerwho/invmgmt
__init__.py
__init__.py
py
1,444
python
en
code
1
github-code
1
19075153405
from odoo import http from odoo.http import request class WebsiteOrganizationRegistration(http.Controller): _ORGANIZATION_REGISTRATION_FIELDS = [ "company_name", "business_name", "website_description", "street", "street2", "city", "zipcode", "country...
Lokavaluto/lokavaluto-addons
lcc_members_portal/controllers/website_organization_registration.py
website_organization_registration.py
py
4,622
python
en
code
5
github-code
1
3517113382
# ์–‘๋ถ„์€ ๋ชจ๋“  ์นธ์— 5๋งŒํผ ๋“ค์–ด์žˆ๋‹ค. # ๊ฐ™์€ 1ร—1 ํฌ๊ธฐ์˜ ์นธ์— ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๋‚˜๋ฌด๊ฐ€ ์‹ฌ์–ด์ ธ ์žˆ์„ ์ˆ˜๋„ ์žˆ๋‹ค. # ๋ด„ # ์ž์‹ ์˜ ๋‚˜์ด๋งŒํผ ์–‘๋ถ„์„ ๋จน # ์–ด๋ฆฐ๋†ˆ๋ถ€ํ„ฐ ๋จน์Œ #์—ฌ๋ฆ„ # ์—ฌ๋ฆ„์—๋Š” ๋ด„์— ์ฃฝ์€ ๋‚˜๋ฌด๊ฐ€ ์–‘๋ถ„์œผ๋กœ ๋ณ€ํ•˜๊ฒŒ ๋œ๋‹ค. # ๊ฐ๊ฐ์˜ ์ฃฝ์€ ๋‚˜๋ฌด๋งˆ๋‹ค ๋‚˜์ด๋ฅผ 2๋กœ ๋‚˜๋ˆˆ ๊ฐ’์ด ๋‚˜๋ฌด๊ฐ€ ์žˆ๋˜ ์นธ์— ์–‘๋ถ„์œผ๋กœ ์ถ”๊ฐ€๋œ๋‹ค. # ์†Œ์ˆ˜์  ์•„๋ž˜๋Š” ๋ฒ„๋ฆฐ๋‹ค. #๊ฐ€์„ - ๋ฒˆ์‹ # ๋‚˜๋ฌด ๋‚˜์ด 5์˜๋ฐฐ์ˆ˜, ์ธ์ ‘ํ•œ 8๊ฐœ์นธ ๋‚˜์ด 1์ธ๋‚˜๋ฌด๊ฐ€ ํ•˜๋‚˜ ์ƒ๊น€ #๊ฒจ์šธ - ์–‘๋ถ„์ถ”๊ฐ€ # A[r][c]๋งŒํผ ๊ฐ ์นธ์— ์ถ”๊ฐ€ import sys;input=sys.stdin.readline import hea...
leezzangmin/pythonBOJ
ํŒŒ์ด์ฌ/16235.py
16235.py
py
3,046
python
ko
code
0
github-code
1
2225168081
from functools import lru_cache cache_fib = {} def fibo(x): if type(x)!=int: raise TypeError("type mismatch") if x<0: raise ValueError("value should be positive") if x in cache_fib: return cache_fib[x] if x==1: return 0 elif x==2: return 1 elif x>2: ...
sandy124356/python_ide
fibonacci.py
fibonacci.py
py
494
python
en
code
0
github-code
1
10633828499
import re from pyparsing import ( Char, Combine, LineEnd, LineStart, Literal, MatchFirst, OneOrMore, Optional, ParserElement, ParseResults, Regex, SkipTo, StringEnd, Token, ) from jira2markdown.markup.advanced import Panel from jira2markdown.markup.base import A...
catcombo/jira2markdown
jira2markdown/markup/lists.py
lists.py
py
4,074
python
en
code
14
github-code
1