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
38313678941
import os import shutil PROJECT_DIRECTORY = os.path.realpath(os.path.curdir) def remove_file(filepath): os.remove(os.path.join(PROJECT_DIRECTORY, filepath)) if __name__ == '__main__': if '{{ cookiecutter.create_author_file }}' != 'y': remove_file('AUTHORS.rst') if '{{ cookiecutter.use_oasis }}...
ferie24/DemoNotebook
ArangoDB_Template/hooks/post_gen_project.py
post_gen_project.py
py
671
python
en
code
0
github-code
36
32473828762
from config import bot, chat_id from time import sleep from telebot import types from plugins.error import Error from plugins.message import shout import random from plugins.error import in_chat, check_private @in_chat() def say(m): bot.delete_message(m.chat.id, m.message_id) try: if m.chat.type != "pr...
evilcatsystem/telegram-bot
plugins/say.py
say.py
py
2,015
python
ru
code
1
github-code
36
44209779593
"""OWM API parser for creating weather report of different cities""" from app.input_file_handler import * from app.logging_and_error_handler import * import requests class CityReport: """Get report from OWM for current city and process it""" def __init__(self, city: City): """ :par...
vizamo/Python-Study-Coding
ICD0004/Final Project/app/owm_parser.py
owm_parser.py
py
7,368
python
en
code
0
github-code
36
44648666543
from rest_framework.documentation import include_docs_urls from django.contrib import admin from django.urls import path, re_path, include from django.conf.urls import url urlpatterns = [ path('admin/', admin.site.urls), ] urlpatterns += [ path( 'drf-docs/', include_docs_urls( tit...
Endlex-net/Easting_kanban
kanban/urls.py
urls.py
py
539
python
en
code
3
github-code
36
39014063579
# 55+20-50+40-30+20 data = input().split('-') # [55+20, 50+40, 30+20] ์ฒซ๋ฒˆ์งธ ๊ฐ’์€ ์ œ์™ธํ•ด์•ผํ•˜๊ตฌ๋‚˜ cnt = 0 temp = [] for i in range(1, len(data)): # ์ฒซ๋ฒˆ์งธ ๊ฐ’ ์ดํ›„๋ถ€ํ„ฐ '+' splitํ•˜๊ณ  cnt์— - ํ•ด์ค€๋‹ค. temp = data[i].split('+') for num in temp: cnt -= int(num) if '+' in data[0]: # ๋งŒ์•ฝ์— ์ฒซ๋ฒˆ์งธ ๊ฐ’์— +๊ฐ€ ์žˆ๋‹ค๋ฉด ๋ถ„๋ฆฌํ•ด์„œ int๋กœ ๋” ํ•ด์ค˜์•ผํ•จ print(sum(map(...
eomsteve/algo_study
nogusdn/1541 ์žƒ์–ด๋ฒ„๋ฆฐ ๊ด„ํ˜ธ.py
1541 ์žƒ์–ด๋ฒ„๋ฆฐ ๊ด„ํ˜ธ.py
py
521
python
ko
code
0
github-code
36
11497660843
''' github.com/razyar ''' import sys import os from PyQt4 import QtCore, QtGui class QDataViewer(QtGui.QWidget): def __init__(self): QtGui.QWidget.__init__(self) self.setGeometry(600, 400, 600, 400) self.setWindowTitle('iSpace Platform - Upload') self.quitButton = QtGui.QPushButton...
razyar/iSpace
upload.py
upload.py
py
1,062
python
en
code
0
github-code
36
16490047889
#!/usr/bin/env python # coding: utf-8 # ๋‹ค์šด๋กœ๋“œํ•œ ์›น ํŽ˜์ด์ง€ ๋˜๋Š” RSS์—์„œ์˜ ์Šคํฌ๋ ˆ์ดํ•‘์„ ์‹œ๋„ํ•ด๋ณด์ž. ํŒŒ์ด์ฌ ํ‘œ์ค€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ ์ €์žฅํ•œ ํŒŒ์ผ์—์„œ ๋„์„œ์˜ ์ œ๋ชฉ ๋ฐ URL ๋“ฑ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”์ถœํ•œ๋‹ค. # * ์ •๊ทœํ‘œํ˜„์‹ # # * XML ํŒŒ์„œ # * ์ •๊ทœ ํ‘œํ˜„์‹์œผ๋กœ Scrapingํ•  ๋•Œ์—๋Š” HTML์„ ๋‹จ์ˆœํ•œ ๋ฌธ์ž์—ด๋กœ ์ทจ๊ธ‰ํ•˜๊ณ , ํ•„์š”ํ•œ ๋ถ€๋ถ„์„ ์ถ”์ถœํ•œ๋‹ค. ์ œ๋Œ€๋กœ ๋งˆํฌ์—…๋˜์ง€ ์•Š์€ ์›น ํŽ˜์ด์ง€๋„ ๋ฌธ์ž์—ด์˜ ํŠน์ง•์„ ํŒŒ์•…ํ•˜๋ฉด ์‰ฌ์šด ์Šคํฌ๋ ˆ์ดํ•‘ ์ž‘์—…์ด ๊ฐ€๋Šฅํ•˜๋‹ค. # * XML ํŒŒ์„œ๋กœ ํ•˜๋Š” Scrapingํ•  ๋•Œ๋Š” HTMLํƒœ๊ทธ๋ฅผ ๋ถ„์„(ํŒŒ์‹ฑ:...
polkmn222/Statistic-Python
0627/02)์›นํŽ˜์ด์ง€์—์„œ_๊ธฐ์ดˆ_ํฌ๋กค๋ง_2.py
02)์›นํŽ˜์ด์ง€์—์„œ_๊ธฐ์ดˆ_ํฌ๋กค๋ง_2.py
py
4,338
python
ko
code
0
github-code
36
32432567007
from django import template from django.utils.translation import ugettext as _ from message.models import Message from milestone.models import Milestone from lib import utils register = template.Library() def displaystatistic(context, name, trans_name, number): icons_folder = '/media/basepage/images/icons/' ic...
joaquimrocha/Rancho
rancho/lib/templatetags/displaystatistic.py
displaystatistic.py
py
794
python
en
code
7
github-code
36
35802636506
from tkinter import * from PyQt4 import QtGui,QtCore import cv2 import re from selenium.webdriver import Firefox from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.by import By class Window(QtGui.QMainWindow): def __init__(self, parent=None): super(Window,self).__...
lucifer6666/Reverse-Image-Search
revimage.py
revimage.py
py
3,601
python
en
code
0
github-code
36
69905549866
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. ############################################################################## """Perform inference on a single imag...
chhari/tiredwebsite
infer_website.py
infer_website.py
py
5,203
python
en
code
0
github-code
36
15521725834
''' 40. Combination Sum II Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target. Each number in candidates may only be used once in the combination. Note: All numbers (including target) will be positive...
MarshalLeeeeee/myLeetCodes
40-combinationSum2.py
40-combinationSum2.py
py
3,071
python
en
code
0
github-code
36
30233007647
#https://github.com/wintun-devop #https://www.youtube.com/channel/UCz9ebjc-_3t3p49gGpwyAKA/videos #declare a string a_name="Win Tun Hlaing" about="He is am IT Professional." #change all to title case a_name_capital=a_name.title() #change all to lower case a_name_lower=a_name.lower() #change all to upper case a_name_up...
wintun-devop/python
data-type-operation/string-minipulation.py
string-minipulation.py
py
874
python
en
code
0
github-code
36
2232093034
import interfaceAi class console(): def __init__(self): self.yes = ("yes", "ja", "y", "j", "1", "") self.no = ("no", "nein", "n", "0") self.printProgressCounter = 0 def chooseAi(self, playerId): validAnswer = False ifAi = interfaceAi.interfaceAi() while not val...
pythonfoo/TicTacToe
bison/interfaceConsole.py
interfaceConsole.py
py
4,207
python
en
code
0
github-code
36
73360141224
# django imports from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType from django.db import IntegrityError from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from django.template....
django-lfs/lfs
manage/views/lfs_portlets.py
lfs_portlets.py
py
6,283
python
en
code
23
github-code
36
5313775703
import numpy as np import cv2 import os.path as osp from glob import glob import matplotlib.pyplot as plt from PIL import Image from sklearn.metrics import confusion_matrix import random """ return all gif frames as a Python list """ def load_gif(path): im = Image.open(path) n_frames = im.n_frames count = ...
CS6220-YelpImageSearch/YelpImageSearch
evaluation/utils.py
utils.py
py
3,045
python
en
code
1
github-code
36
40171037803
import pygame import config pygame.init() class Text: """ Text class handles all text displays on a game window, which is passed by the game handle. Each instance of Text is its own type of text (e.g. velocity output, position output), allowing for easy enabling and disabling of text disp...
tbone-iii/Car-Driving-Simulator
text_display.py
text_display.py
py
3,644
python
en
code
0
github-code
36
1124135740
#!/usr/bin/python3 """This defines a class Student.""" class Student: """This represents a student.""" def __init__(personal, first_name, last_name, age): """It initializes a new Student. Args: first_name (str): The first name of the student. last_name (str): The last ...
Fran6ixneymar/alx-higher_level_programming
0x0B-python-input_output/10-student.py
10-student.py
py
1,016
python
en
code
0
github-code
36
39915116580
import pandas as pd import numpy as np import datetime as dt import os import matplotlib.pyplot as plt from util import get_data, plot_data # prepare the data def normalize_stocks(prices): prices.fillna(method='ffill', inplace=True) prices.fillna(method='bfill', inplace=True) return prices / prices.iloc[0]...
EntingHsiao/Stock_trading_with_ML
indicators.py
indicators.py
py
7,063
python
en
code
1
github-code
36
23504518781
import struct from pathlib import Path from npkpy.common import NPKError, NPKIdError, NPKMagicBytesError from npkpy.npk.npk_constants import CNT_HANDLER from npkpy.npk.cnt_basic import BYTES_LEN_CNT_ID, BYTES_LEN_CNT_PAYLOAD_LEN from npkpy.npk.npk_file_basic import FileBasic MAGIC_BYTES = b"\x1e\xf1\xd0\xba" BYTES_LE...
botlabsDev/npkpy
npkpy/npk/npk.py
npk.py
py
3,324
python
en
code
13
github-code
36
15134640368
import codecs import logging import pandas as pd from ekorpkit import eKonf log = logging.getLogger(__name__) class BaseInfo: Keys = eKonf.Keys def __init__(self, **args): self.args = eKonf.to_config(args) self._initialized = False def __str__(self): classname = self.__class__....
entelecheia/ekorpkit
ekorpkit/info/column.py
column.py
py
12,331
python
en
code
4
github-code
36
24111054603
def fizz1(): for i in range(1,50): div3 = i % 3 div5 = i % 5 prtStr = "" if div3 == 0: prtStr += "Fizz" if div5 == 0: prtStr += "Buzz" print(f"{i} {prtStr}") fizz1()
General-Mudkip/Computer-Science-y10
Other/fizzbuzz.py
fizzbuzz.py
py
243
python
en
code
0
github-code
36
12486364960
""" Lists Check your answer: https://judge.softuni.bg/Contests/Practice/Index/425#5 06. * Winecraft Problem: You will be given a sequence of integers, which will represent grapes. On the next line, you will be given N - an integer, indicating the growth days. You must increment every integer in the list by 1 ...
SimeonTsvetanov/Coding-Lessons
SoftUni Lessons/Python Development/Python Fundamentals June 2019/Problems and Files/04. LISTS/03. Lists-Exercises-More/06. Winecraft.py
06. Winecraft.py
py
3,764
python
en
code
9
github-code
36
26610511083
#DEFAULT ARGUMENTS# import torch import numpy as np from utilities.optirank.src.BCD.Create_Instructions_List import classical_architecture_separate_b_once from utilities.small_functions import percentage_zero, percentage_ones from utilities.optirank.src.relaxation.lambda_P_setting import delta_loss from utilities.opti...
paolamalsot/optirank
utilities/optirank/classifiers/default_args.py
default_args.py
py
2,224
python
en
code
0
github-code
36
3954925048
# -*- codind: utf-8 -*- import os, sys, random, argparse, time import math import json import codecs import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch import optim install_path = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspat...
ZiJianZhao/Unaligned-SLU
base/stc/main.py
main.py
py
7,763
python
en
code
1
github-code
36
20522871772
from django.shortcuts import render, get_object_or_404 from .models import Project from django.db.models import Q # Create your views here. def render_producto(request): print(request.GET) queryset = request.GET.get("buscar") print(queryset) productos = Project.objects.all() if queryset: ...
Eliothd2/Imprentala-Website
productos/views.py
views.py
py
871
python
en
code
0
github-code
36
32925197471
import time import random from copy import deepcopy class cube(): def __init__ (self, model=None): if model == None: self.face = [ [[0,0,0], [0,0,0], [0,0,0]], [[1,1,1], [1,1,1], ...
jonoreilly/python
pyscripts/rubik/rubik.py
rubik.py
py
4,719
python
en
code
0
github-code
36
22565281077
class Solution: def twoCitySchedCost(self, costs: List[List[int]]) -> int: arr = [] n = len(costs) for i in range(n): a, b = costs[i][0], costs[i][1] arr.append((b-a,i)) ans = 0 arr.sort(reverse = True) mid = (n-1)//2 for i ...
miedan/competetive-programming
two-city-scheduling.py
two-city-scheduling.py
py
521
python
en
code
0
github-code
36
32195231000
def addBinary(a, b): #print(len(a)," ",len(b)) if len(a)<len(b): while len(a)<len(b): a='0'+a elif len(b)<len(a): while len(b)<len(a): b='0'+b #print(a," ",b) binary='' carry=0 for i in range(len(a)-1,-1,-1): #print(a[i]," ",b[i]," ...
JimNtantakas/Leetcode-problems
67.py
67.py
py
1,236
python
en
code
0
github-code
36
38799393419
from discord import Interaction import bdg import enum class FormatStyle(enum.Enum): UPPER = 0 LOWER = 1 REVERSED = 2 SPACED = 3 HACKER = 4 IRONIC = 5 hacker_dict = { "a": "4", "s": "5", "o": "0", "e": "3" } class FormatCommand(bdg.BdgCommand): header = { 'name': "formatar", 'description'...
DanielKMach/BotDusGuri
src/commands/fun/format.py
format.py
py
1,487
python
pt
code
1
github-code
36
39964545331
import openai openai.api_key = "[YOUR_OPENAI_API]" chat_history = [{"role": "system", "content": "You are a assistant."}] def bot_message(input): chat_history.append({"role": "user", "content": f"{input}"}) chat = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=chat_history ...
ingyunson/gpt_chatbot
GPT_chatbot.py
GPT_chatbot.py
py
1,411
python
en
code
0
github-code
36
18583370851
from pygame.locals import * import figures import pygame import random import sys types = [figures.Square, figures.Line] class Game: def __init__(self, window=(500, 500), speed=5, block=20, fps=20): pygame.init() pygame.display.set_caption("Tetrissss") self.WINDOW_SIZE = ...
Clapsouille/Tetris
main.py
main.py
py
5,526
python
en
code
0
github-code
36
694411018
import datetime from airflow import models from airflow.operators.bash_operator import BashOperator from airflow.operators.dummy_operator import DummyOperator default_dag_args = { # https://airflow.apache.org/faq.html#what-s-the-deal-with-start-date 'start_date': datetime.datetime(2020, 4, 27) } dataset = 'ai...
cs327e-spring2020/snippets
country2.py
country2.py
py
1,245
python
en
code
2
github-code
36
43165322693
# Python code to check if a file exist in a folder # whose name is equal to the row data of csv file. # Importing required libraries import os import csv # Opening CSV file in a variable. with open("Python\\Colors.csv", newline='') as f: # Reading CSV file ereader = csv.DictReader(f) # Init...
WaliKhan09/Programming
Python/File_CSV_loop.py
File_CSV_loop.py
py
973
python
en
code
1
github-code
36
11378302691
from functools import reduce n = int(input()) data = list(map(int, input().split())) def mean(data): sum = reduce(lambda x, y: x + y, data) return sum / len(data) def stdev(data): mu = mean(data) sq_sq_dists_mean = list(map(lambda x: (x - mu) ** 2, data)) sum_sq_dists_mean = reduce(lambda x, y:...
scouvreur/hackerrank
10-days-of-statistics/python/day_1_3.py
day_1_3.py
py
427
python
en
code
1
github-code
36
10762352030
import os import cv2 import rclpy from rclpy.node import Node from sensor_msgs.msg import Image from cv_bridge import CvBridge from handy_msgs.msg import Float32Stamped import readchar import json class MyNode(Node): def __init__(self, name, published_image): super().__init__(name) self.image_publi...
bresilla/webo
webots_ros2_pioneer3at/webots_ros2_pioneer3at/utils/image_player.py
image_player.py
py
2,641
python
en
code
0
github-code
36
950544652
pkgname = "grilo" pkgver = "0.3.16" pkgrel = 0 build_style = "meson" configure_args = [ "-Denable-introspection=true", "-Denable-vala=true", "-Denable-gtk-doc=false", "-Dsoup3=true", ] hostmakedepends = [ "meson", "pkgconf", "gobject-introspection", "glib-devel", "gettext", "vala...
chimera-linux/cports
main/grilo/template.py
template.py
py
865
python
en
code
119
github-code
36
73581418663
from flask import Flask, render_template, jsonify from database import engine, text, load_job_from_db app = Flask(__name__) def load_jobs_from_db(): try: with engine.connect() as conn: result = conn.execute(text("select * from jobs")) column_names = result.keys() jobs = [] for row in re...
Maulikdavra/mdfinance-carrer-webiste-v2
app.py
app.py
py
974
python
en
code
0
github-code
36
11394835592
''' Script to export PASCAL VOC 2012 annotation data in VIA format Author: Abhishek Dutta <adutta@robots.ox.ac.uk> 12 Apr. 2018 ''' import xmltodict import os import json base_dir = '/data/datasets/voc2012/VOCdevkit/VOC2012/' img_dir = os.path.join(base_dir, 'JPEGImages/') ann_dir = os.path.join(base_dir, 'Annotatio...
ox-vgg/via
via-2.x.y/scripts/import/pascal_voc/exp_annotations.py
exp_annotations.py
py
3,496
python
en
code
184
github-code
36
73088171303
# -*- coding: utf-8 -*- from fabric.api import * import os #env.hosts = ['catchment.niva.no'] env.hosts=['35.242.200.24'] env.user='jose-luis' env.key_filename='/home/jose-luis/.ssh/fimexKeys/jose-luis' env.roledefs={'ncquery':['35.242.200.24'], 'basin': ['catchment.niva.no'], # ...
Lecheps/VansjoModelling
fabfile.py
fabfile.py
py
2,424
python
en
code
0
github-code
36
4014322782
import unittest import skill_tree class TestSkillTree(unittest.TestCase): def test_skill_tree1(self): result = skill_tree.solution('CBD', ['BACDE', 'CBADF', 'AECB', 'BDA']) self.assertEqual(result, 2) if __name__ == '__main__': unittest.main()
ThreeFive85/Algorithm
Programmers/level2/skillTree/test_skill_tree.py
test_skill_tree.py
py
273
python
en
code
1
github-code
36
9294254942
## This module from StreamAnimations import utils, sprite from StreamAnimations.sprite import hitbox from StreamAnimations.canvases import SinglePageCanvas from StreamAnimations.engine.renderers.gif import GifRenderer from StreamAnimations.engine import utils as engineutils from StreamAnimations.systems import twodimen...
AdamantLife/StreamAnimations
sample.py
sample.py
py
3,312
python
en
code
0
github-code
36
73313892585
#coding=gbk #ๆ–‡ไปถๅค‡ไปฝๆ”น่ฟ›็‰ˆ๏ผŒไปฅๅฝ“ๅคฉๆ—ฅๆœŸไธบ็›ฎๅฝ•๏ผŒ้ป˜่ฎคไปฅๆ—ถ้—ดไธบzipๆ–‡ไปถๅๅญ—๏ผŒๅฆ‚ๆžœ็”จๆˆท่พ“ๅ…ฅๅค‡ๆณจๅˆ™ไปฅๆ—ถ้—ด+ๅค‡ๆณจไฝœไธบๆ–‡ไปถๅๅญ— import os import time #้œ€่ฆๅค‡ไปฝ็š„ๆ–‡ไปถ็›ฎๅฝ•ๅˆ—่กจ source=[r'C:\Users\zk\Pictures', r'"C:\Users\zk\Documents\WeChat Files\zhengknight\Files"'] #็›ฎๆ ‡ๆ–‡ไปถๅคน target_dir=r'e:\backup' #ๅฆ‚ๆžœ็›ฎๆ ‡็›ฎๅฝ•ไธๅญ˜ๅœจๅˆ™ๅˆ›ๅปบ if not os.path.exists(target_dir): os.mkdir(target_dir) #ๅฝ“ๆ—ฅๆ–‡ไปถๅคน today=targe...
zhengknight/pyExise
backup_ver3.py
backup_ver3.py
py
1,146
python
zh
code
0
github-code
36
13285114730
from flair.data import Corpus from flair.datasets import ColumnCorpus from flair.embeddings import TokenEmbeddings, WordEmbeddings, StackedEmbeddings from flair.models import SequenceTagger from flair.trainers import ModelTrainer from pathlib import Path columns={0: 'text', 1: 'label'} dataPath='../data/' test_file=in...
gfreitag/Recipe-Project
python/tester_script.py
tester_script.py
py
1,031
python
en
code
0
github-code
36
42898520329
print("Will I be printed in main when called? -Yes!") # print(__name__) # 'module' if a file is imported as a module, or __main__ if it's executed directly """ Personal/Private variable. Unlike many other programming languages, Python has no means of allowing you to hide such variables from the eyes of the m...
bacholabadze/Python_Essentials
Modules and Packages/modules/module.py
module.py
py
2,225
python
en
code
0
github-code
36
7795693438
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : ๅœฐ็‰ข้€ƒ่„ฑ.py # @Author: smx # @Date : 2020/2/16 # @Desc : # # ๆœ€็ปˆ็š„้ข˜ๆ„ๆ˜ฏ๏ผšไปŽ็ป™ๅฎš่ตท็‚น๏ผˆไธ€ๅฎšไธบ'.'๏ผ‰๏ผŒๆŒ‰็…ง็ป™ๅฎš็š„่‹ฅๅนฒ่ทณ่ทƒ๏ผˆๅฏไปฅ่ทจ่ฟ‡้šœ็ข๏ผŒไฝ†ไธๅฏไปฅ่ฝๅœจ'x'ไธŠ๏ผ‰๏ผŒๅˆฐ่พพไปปๆ„ไธ€ไธช'.'็š„ๆœ€ๅฐๆญฅ้ชคๆฌกๆ•ฐ้›†ๅˆไธญ๏ผŒ้€‰ๆ‹ฉไธ€ไธชๆœ€ๅคง็š„๏ผ # ๅฆ‚ๆžœๅญ˜ๅœจไธ€ไธช็‚น'.'ไปŽ่ตท็‚นๅง‹็ปˆๆ— ๆณ•ๆŠต่พพ๏ผŒๅˆ™่ฎคไธบ่ตท็‚นๅˆฐ่ฏฅ็‚น็š„ๆœ€ๅฐ่ท็ฆปไธบๆ— ็ฉทโˆž๏ผŒๅˆ™่ฟ”ๅ›ž-1. # ๅ› ๆญค๏ผŒไปŽ่ตท็‚นๅผ€ๅง‹ๅนฟๅบฆไผ˜ๅ…ˆ้ๅކๅˆฐๆ‰€ๆœ‰ๅฏ่พพ็‚น๏ผŒ่ฎฐๅฝ•ๆฏไธชๅฏ่พพ็‚น็š„ๆœ€ๅฐ่ท็ฆป๏ผŒๅฐ†ๅ…ถๅญ˜ๅ…ฅ้›†ๅˆไธญใ€‚ # ็„ถๅŽ้ๅކ้›†ๅˆๅฏปๆ‰พๆœ€ๅคง็š„่ท็ฆปใ€‚ๅฆ‚ๆžœๅญ˜ๅœจไธ€ไธช็‚น'.'ๆ— ๆณ•ๆŠต่พพ๏ผŒ็›ด...
20130353/Leetcode
target_offer/dfs+bfs+ๅŠจๆ€่ง„ๅˆ’/DFS+BFS/ๅœฐ็‰ข้€ƒ่„ฑ.py
ๅœฐ็‰ข้€ƒ่„ฑ.py
py
1,973
python
zh
code
2
github-code
36
24924994804
import sys input = sys.stdin.readline n = int(input()) L = [] for i in range(n): name, a, b, c = input().split() L.append([int(a), int(b), int(c), name]) L = sorted(L, key=lambda x: (-x[0], x[1], -x[2], x[3])) for l in L: print(l[3])
pla2n/python_practice
python/ThisIsCodingTestWithPython2/14-23 ๊ตญ์˜์ˆ˜.py
14-23 ๊ตญ์˜์ˆ˜.py
py
245
python
en
code
0
github-code
36
4107555647
def possible_scores(roundNumbers, totalScore, teams, team1, team2, c, d, n, amount, history, history2): # roundNumbers = the rounds that are left # totalScore = the scores of all four teams # team is my favourable team # team1 and team2 are the teams that compete, c and d are team1 score and team2 score...
AAZZAZRON/DMOJ-Solutions
ccc13s3.py
ccc13s3.py
py
3,399
python
en
code
1
github-code
36
19622754731
h, m, s = map(int, input().split()) input = int(input()) s = s + input m = m + int(s/60) h = h + int(m/60) s = s % 60 m = m % 60 h = h % 24 print(h,m,s)
monegit/algorithm-study
Training-Site/Baekjoon/2/2000/2530/2530.py
2530.py
py
155
python
en
code
0
github-code
36
7037221042
from flask import Flask,render_template,request import tweepy import re import pandas as pd from tweepy import OAuthHandler from nltk.corpus import stopwords from nltk.tokenize import TweetTokenizer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import train_test_split from skl...
saurabhc104/sentiment_analysis
analysis.py
analysis.py
py
3,670
python
en
code
0
github-code
36
16574355106
import collections import heapq from typing import List class Solution: def maxProbability(self, n: int, edges: List[List[int]], succProb: List[float], start: int, end: int) -> float: adj = collections.defaultdict(list) for i in range(len(edges)): src, dst = edges[i] adj[sr...
BLANK00ANONYMOUS/PythonProjects
Leetcode Daily Challenges/14_feb_2023.py
14_feb_2023.py
py
759
python
en
code
0
github-code
36
41145576381
from calendar import c from pyexpat import model from re import L import numpy as np import pandas as pd compas_scores_raw= pd.read_csv("compas_score_raw.csv", lineterminator='\n') compas_scores_two_year= pd.read_csv("compas_scores_two_years.csv", lineterminator='\n') print('-----------------Compas Score...
dansmith5764/A-study-of-fairness-in-transfer-learning
Compas/Parse_1.py
Parse_1.py
py
7,675
python
en
code
0
github-code
36
21688080146
# 2013 GCE A Level P1 """ Task 1.1 """ def main(): # read data from file and store in wordList # wordList format: [(term,occ)] wordList = [] inF = open('WORDS1.TXT', 'r') term = inF.readline().rstrip() while term != '': occ = int(inF.readline().rstrip()) wordList.append((ter...
ayangler/h2-comp
PYPs/2013 GCE A Level P1/Task 1.1.py
Task 1.1.py
py
769
python
en
code
0
github-code
36
36947640459
from __future__ import print_function __revision__ = "src/engine/SCons/Tool/FortranCommon.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan" import re import os.path import SCons.Action import SCons.Defaults import SCons.Scanner.Fortran import SCons.Tool import SCons.Util def isfortran(env, so...
mongodb/mongo
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/FortranCommon.py
FortranCommon.py
py
9,651
python
en
code
24,670
github-code
36
418860871
import sys import json import logging import argparse import select import time import logs.server_log_config from socket import socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR from common.variables import ACTION, PRESENCE, TIME, USER, ACCOUNT_NAME, RESPONSE, \ MESSAGE, MESSAGE_TEXT, ERROR, DEFAULT_PORT, MAX...
Shorokhov-A/repo_client-server-apps_python
practical_task_7/server.py
server.py
py
5,881
python
ru
code
0
github-code
36
40943554690
import sys import ruamel from ruamel.yaml import YAML from datetime import datetime, date, time from common import * import fileinput class NonAliasingRTRepresenter(ruamel.yaml.RoundTripRepresenter): def ignore_aliases(self, data): return True def main(): out = {'races': []} yaml = YAML(typ='sa...
pkdawson/workrobot
new_schedule.py
new_schedule.py
py
2,605
python
en
code
0
github-code
36
30374326803
import numpy as np from scipy.special import expit def piston_action(alfa, p_linea, p_servicio): alfa %= 2 * np.pi return (p_servicio - p_linea) * expit((alfa - np.pi) * 20) def build_indep( alfa: np.float32, beta: np.float32, omega: np.float32, mb: np.float32, mp: np.float32, R: np....
hanzy1110/paper_fem_bombas
src/solve.py
solve.py
py
3,065
python
en
code
0
github-code
36
14570657497
from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.button import Button from kivy.uix.relativelayout import RelativeLayout from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.graphics import Color, Line, Rectangle from image_to_text import get_text, train_model im...
ShantanuShinde/Character-Recognition-with-CNN
Character Recognition App/paintapp.py
paintapp.py
py
3,519
python
en
code
0
github-code
36
19449055889
from django.db import models import re import statistics from .direct_indicator import DirectIndicator from .question_response import QuestionResponse find_square_bracket_keys = re.compile(r"\[(.*?)\]") class IndirectIndicator(models.Model): topic = models.ForeignKey('Topic', related_name='indirect_indicators',...
sergioespana/openESEA
backend/core/models/indirect_indicator.py
indirect_indicator.py
py
11,653
python
en
code
1
github-code
36
31110031201
from lib_das.DAS220_240 import telnet_das220_240 import time import socket import numpy def REMOTE_SAMPLING_EXAMPLE(): print("-------------------------------------------------------") print(" Remote Sammpling example : ") print(" - Getting NUMBER_OF_SAMPLE sample of CHANNEL_LIST channel e...
sefram/DAS220-BAT-and-DAS240-BAT
Python/REMOTE_SAMPLING_EXAMPLE.py
REMOTE_SAMPLING_EXAMPLE.py
py
2,474
python
en
code
1
github-code
36
15544612417
from rally.common import logging from rally.task import hook LOG = logging.getLogger(__name__) class Trigger(hook.HookTrigger): """DEPRECATED!!! USE `rally.task.hook.HookTrigger` instead.""" def __init__(self, *args, **kwargs): super(Trigger, self).__init__(*args, **kwargs) LOG.warning("Plea...
DeanHwd/rally
rally/task/trigger.py
trigger.py
py
948
python
en
code
0
github-code
36
13768273606
from os import stat from flask import Flask, Response from flask_restx import Resource, Api, reqparse import random import json import os from werkzeug.exceptions import BadHost, BadRequest app = Flask(__name__) api = Api(app) #Cette route va permettre de retourner la valeur +1 @api.route('/plus_one/<int:number>') ...
eparisLR/FLASK-RESTX
api.py
api.py
py
3,444
python
en
code
0
github-code
36
38875746376
import torch import torch.nn as nn from torch.utils.cpp_extension import load import os import time import random import math cur_path = os.path.dirname(os.path.realpath(__file__)) cpu_unsorted_segsum = load('cpu_unsorted_segsum', [f'{cur_path}/cpu_extension.cc'], extra_cflags=['-fopenmp', '-O3', '-march=nati...
medav/meshgraphnets-torch
kernels/unsorted_segsum/kernel.py
kernel.py
py
4,483
python
en
code
6
github-code
36
10018427147
class numbers(object): def set(self): self.a=10 self.b=12 self.a,self.b=self.b,self.a print(self.a,self.b) print(self.b,self.a) class strings(numbers): def put(self): super().set() self.s1="prasad" self.s2="naidu" self.s1,self.s2=self.s2,se...
prasadnaidu1/django
Adv python practice/method override/KV RAO OVERRIDE.py
KV RAO OVERRIDE.py
py
407
python
en
code
0
github-code
36
22216786293
import bpy import bmesh import os #function for changing the topology of the object by triangulating it def triangulate_object(obj): me = obj.data # Get a BMesh representation bm = bmesh.new() bm.from_mesh(me) bmesh.ops.triangulate(bm, faces=bm.faces[:], quad_method=0, ngon_method=0) # Finis...
whorticulterist/RotationSimulation
blender objects/python_scripts/Initial_Individual_Processing.py
Initial_Individual_Processing.py
py
2,397
python
en
code
0
github-code
36
39099199233
# Incomplete import os import random def game(): with open("./files/data.txt","r",encoding="UTf-8") as data: words = [word for word in data] print(words) word = random.choice(words) random_word = word(words) print(random_word) with open("./files/gam...
ArturoCBTyur/Prueba_Nueva
hangman.py
hangman.py
py
523
python
en
code
0
github-code
36
25048960763
from Crypto.Cipher import AES # AES (all modes) from Crypto.Util import Counter # AES CTR from os import urandom # AES CBC or CTR #from Crypto import Random # AES CBC or CTR #Random.get_random_bytes(16) # AES CBC or CTR from Crypto.Cipher import PKCS1_OAEP # RSA from Crypto.PublicKey import RSA #...
chusanapunn/RSA_AY3T2
A1/aeR.py
aeR.py
py
4,658
python
en
code
0
github-code
36
1685939480
import pandas as pd import geopandas as gpd from sqlalchemy import create_engine from shapely.geometry import box from SGIS.api import SGISRequest from credentials.database import AP CSV = '/Users/dongookson/Code/data-project/SGIS/key_locations/ad8.csv' QUERY = 'select * from key_locations' GET = False # connect to ...
donny-son/airhealth-database
SGIS/test_geocode.py
test_geocode.py
py
1,276
python
en
code
0
github-code
36
37220479023
import json with open('settings.json','r',encoding='utf8') as token: data = json.load(token) import requests import subprocess from flask import Flask, render_template, request, abort, make_response, jsonify from datetime import datetime, timezone, timedelta import firebase_admin from firebase_admin import credenti...
NTX8205/LineBot
flask_server.py
flask_server.py
py
10,110
python
en
code
0
github-code
36
36955527539
from suite_subprocess import suite_subprocess from wtscenario import make_scenarios import wiredtiger, wttest # test_huffman01.py # Huffman key and value configurations # Basic smoke-test of huffman key and value settings. class test_huffman01(wttest.WiredTigerTestCase, suite_subprocess): """ Test basic ope...
mongodb/mongo
src/third_party/wiredtiger/test/suite/test_huffman01.py
test_huffman01.py
py
3,250
python
en
code
24,670
github-code
36
41585106305
import json # # Data to be written # dictionary = { # "hello":"lol" # } # # Serializing json # json_object = json.dumps(dictionary, indent=4) # Writing to sample.json # with open("sample.json", "a") as outfile: # outfile.write(json_object) filename="sample.json" entry={'hello','lol1'} with open(filename, ...
AugeGottes/Yet-Another-Kafka
test.py
test.py
py
484
python
en
code
0
github-code
36
36335146377
import json, sys, time, os import requests as rq import soundcloud as sc id = "ql3NWDyvuRgjpzwArS8lYmm2SrVGYLDz" scurl = "https://api-v2.soundcloud.com/" qcliid = "?client_id=ql3NWDyvuRgjpzwArS8lYmm2SrVGYLDz" client = sc.Client(client_id=id) class Track: def __init__(self, inp): data = json.loads(resolve(inp...
idosyncrasi/soundcloud-dl
main.py
main.py
py
4,200
python
en
code
0
github-code
36
34376075705
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.auth.views import login, logout from django.views.generic.edit import CreateView import views admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), # url('^', inc...
jonathantumulak/facebookwall
facebookwall/src/facebookwall/facebookwall/urls.py
urls.py
py
689
python
en
code
0
github-code
36
27745446285
import numpy as np class Data: def __init__(self): with open('goblet_book.txt', 'r') as file: content = file.read() self.book_data = np.array(list(content)) self.book_chars = np.unique(self.book_data) self.K = len(self.book_chars) self.dict_int_to_char = dict(zip( np.arange(self.K), self.book_chars)...
alanroussel/ML-assignments
4_RNN/dataset.py
dataset.py
py
757
python
en
code
0
github-code
36
30590086381
""" ๅˆ ้™ค้“พ่กจ็š„ๅ€’ๆ•ฐ็ฌฌNไธช่Š‚็‚น """ # 1 class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next # ๅฟซๆ…ขๆŒ‡้’ˆ class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: pre = ListNode(0) pre.next = head slow, fast = pre, pre for _...
leon1peng/alg_t
ๅˆท้ข˜็‹‚้ญ”/Week06/ๅˆ ้™ค้“พ่กจ็š„ๅ€’ๆ•ฐ็ฌฌNไธช่Š‚็‚น.py
ๅˆ ้™ค้“พ่กจ็š„ๅ€’ๆ•ฐ็ฌฌNไธช่Š‚็‚น.py
py
875
python
en
code
1
github-code
36
32194079583
import time import os import sqlite3 import mysql.connector import json import utils.normalize_data import git import importlib def process_requests(): maria_conn = None lite_conn = None try: maria_cnf_FD = open('db_conf.json') maria_cnf = json.load(maria_cnf_FD) maria_cnf_...
mathieu-bergeron/aquiletour2021
dockers/git/depot_manager/task_processor.py
task_processor.py
py
3,103
python
en
code
0
github-code
36
70911809705
import os import sys import re import json import math import argparse import time import subprocess import numpy as np import networkx as nx import tensorflow as tf import datetime from operator import itemgetter import collections FILE_PATH = os.path.dirname(os.path.abspath(__file__)) FATHER_PATH = os.path.join(FILE...
luke28/DNE
tools/get_input.py
get_input.py
py
2,670
python
en
code
8
github-code
36
42406250255
import json from flask import url_for from flask_login import current_user from flask_mail import Message from bd_project import mail from bd_project.models import OrderList, Product from bd_project.classes import UserHelper from bd_project.models import Order def add_current_ordered_products(order_products_by_curre...
Braindead3/bd_project
bd_project/users/utils.py
utils.py
py
2,407
python
en
code
0
github-code
36
2285190842
from setuptools import setup VERSION = "1.0.3" setup( name="builder", version=VERSION, license="Apache License 2.0", author="The Open Peer Power Authors", author_email="hello@openpeerpower.io", url="https://openpeerpower.io/", description="Opp.io wheels builder form Open Peer Power.", ...
actions-marketplace-validations/OpenPeerPower_wheels
setup.py
setup.py
py
989
python
en
code
0
github-code
36
73593036584
from django.urls import path from django.contrib.auth.views import LoginView, LogoutView from .views import home_view, account_view, meal_view, order_view, report_view, sign_up_view, add_meal_view, edit_meal_view app_name = 'restaurant' urlpatterns = [ path('', home_view, name='home'), path('sign-up/', sign_u...
AmarjotSingh21/food-delivery-django
restaurant/urls.py
urls.py
py
882
python
en
code
0
github-code
36
2315870297
# This is imp else block give u result if no errors occurs try: n = int(input("Enter number: ")) result = 100/n except ValueError: print("Please enter number only!") except ZeroDivisionError: print("we cannot divide by zero! pls enter another number...") else: print("Division:", result)
sudeepsawant10/python-development
exceptionh/4_else_clause.py
4_else_clause.py
py
308
python
en
code
0
github-code
36
17323116767
# Read outputs and write them in individual files # for polyb in ["gemm", "3mm", "cholesky", "durbin", "ludcmp", "covariance", "seidel-2d", "fdtd-2d"]: for polyb in ["4mm"]: for dataset_size in ["MINI", "SMALL", "MEDIUM", "LARGE"]: # for dataset_size in ["MINI", "SMALL", "MEDIUM"]: # for format in ["_po...
artecs-group/posit-hls
error_eval/results/outputs/clean_posit_outputs.py
clean_posit_outputs.py
py
949
python
en
code
2
github-code
36
5467848201
import pandas as pd import geopandas beam_skims_types = {'timePeriod': str,'pathType': str,'origin': int,'destination': int,'TIME_minutes': float, 'TOTIVT_IVT_minutes': float, 'VTOLL_FAR': float, 'DIST_meters': float, 'WACC_minutes': float, 'WAUX_minutes': float, 'WEGR_minutes': float, 'DTIM_minutes': float, 'DDIST_me...
urbansim/DEMOS_URBANSIM
demos_urbansim/process_skims.py
process_skims.py
py
2,507
python
en
code
1
github-code
36
31701293102
import os import importlib from collections import OrderedDict from .utils import (SettingsLoader, ProjectSettings, ThemeSettings, ShareData, PathResolver, SysPathContextManager) from .protocol import PluginRegister from .sequence_analyze import SequenceParser class SettingsProcedure: @clas...
huntzhan/GeekCMS
geekcms/loadup.py
loadup.py
py
4,407
python
en
code
5
github-code
36
4108004877
from collections import deque from sys import stdin, exit input = stdin.readline num, h = [int(x) for x in input().split()] grid = [[int(x) for x in input().split()] for _ in range(num)] visited = [[False] * num for _ in range(num)] visited[0][0] = True moves = [[1, 0], [0, 1], [-1, 0], [0, -1]] queue = deque() queue...
AAZZAZRON/DMOJ-Solutions
dmopc13c3p3.py
dmopc13c3p3.py
py
679
python
en
code
1
github-code
36
72569293224
import numpy as np import pylab as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import matplotlib def matshow(ax, data, x_name=None, y_name=None, x_n=None, y_n=None, x_tickslabels=None, y_tickslabels=None, inversed=False, cmap=plt.cm.gray_r, colorbar=False, colorbarticks=None, colorbarticklabels=N...
kuntzer/sclas
plots/matshow.py
matshow.py
py
2,325
python
en
code
3
github-code
36
33441946307
def get_value(data_list,index): try: return data_list[index] except IndexError: return None n=int(input("Enter no. of elements in list- ")) el=input("Enter the element- ") list=[el for i in range(n)] index_number=int(input("Enter index no.- ")) value=get_value(list,index_number) print(value ,"...
Hiteshwalia4/Python-Programs
oct22 prac/Q1_oct22.py
Q1_oct22.py
py
364
python
en
code
0
github-code
36
34987281436
import torch import torch.nn as nn from methods.ein_seld.data_augmentation import spec_augment_ from methods.ein_seld.data_augmentation import spec_augment, channel_rotation from methods.utils.stft import (STFT, LogmelFilterBank, intensityvector, spectrogram_STFTInput) import numpy as np...
saraalrawi/EIN-SELD
seld/methods/feature.py
feature.py
py
8,022
python
en
code
1
github-code
36
12507629411
# ์ •๋ ฌ # K๋ฒˆ์งธ์ˆ˜ def solution(array, commands): answer = [] for i, j, k in commands: arr = array[i - 1:j] arr.sort() answer.append(arr[k - 1]) print(answer) return answer solution([1, 5, 2, 6, 3, 7, 4], [[2, 5, 3], [4, 4, 1], [1, 7, 3]]) # [5, 6, 3]
Hong-Jinseo/Algorithm
programmers/42748.py
42748.py
py
300
python
en
code
0
github-code
36
18760515421
import numpy as np import cv2 import screeninfo import oa_ls def init_proj(window_name, screen_id): screen = screeninfo.get_monitors()[screen_id] width, height = screen.width, screen.height cv2.moveWindow(window_name, screen.x -1, screen.y-1) cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,...
olaals/multivision-depr
multivision/oa_realapi.py
oa_realapi.py
py
699
python
en
code
0
github-code
36
3685343845
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile import json from collections import defaultdict from io import StringIO from PIL import Image import requests from lib.helpers import DatabaseConnector as dtb from lib import label_map_util f...
MatthieuBlais/tensorflow-clothing-detection
obj_detection.py
obj_detection.py
py
6,828
python
en
code
11
github-code
36
19738758129
from vigilo.models.session import DBSession, MigrationDDL from vigilo.models import tables def upgrade(migrate_engine, actions): """ Migre le modรจle. @param migrate_engine: Connexion ร  la base de donnรฉes, pouvant รชtre utilisรฉe durant la migration. @type migrate_engine: C{Engine} @param act...
vigilo/models
src/vigilo/models/migration/012_ConfFile_name_index.py
012_ConfFile_name_index.py
py
661
python
fr
code
4
github-code
36
17237472456
#ํ‚ค์™€ ๋ชธ๋ฌด๊ฒŒ๋กœ ์„ฑ๋ณ„ classification import numpy as np import matplotlib.pyplot as plt from sklearn import neighbors, datasets from sklearn import svm from sklearn.discriminant_analysis import LinearDiscriminantAnalysis file=open('gender_dataset.txt') gender=[] height=[] weight=[] print("โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†โ–†...
hoony6134/kaist
gender.py
gender.py
py
4,612
python
en
code
0
github-code
36
33540908783
import logging from typing import List import funppy def sum(*args): result = 0 for arg in args: result += arg return result def sum_ints(*args: List[int]) -> int: result = 0 for arg in args: result += arg return result def sum_two_int(a: int, b: int) -> int: return a + ...
httprunner/hrp
examples/debugtalk.py
debugtalk.py
py
1,315
python
en
code
83
github-code
36
5600126262
import boto3 import json import logging import os from base64 import b64decode from urllib.request import Request, urlopen from urllib.error import URLError, HTTPError SLACK_CHANNEL = '#general' HOOK_URL = 'https://hooks.slack.com/services/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' logger = logging.getLogger() log...
ManuelGago/VodChallenge
vodchallenge/error_to_slack.py
error_to_slack.py
py
1,195
python
en
code
1
github-code
36
6418206467
import logging from datetime import datetime from flask import request from flask_mail import Mail, Message from service.schemas import MessageSchema, EmailSchema from service.models import tr_messages, tm_emails from service import db, app from service.tasks.task_email import email_users def saveMessage(data): t...
robinraintama/flask_email
service/controllers/MessageController.py
MessageController.py
py
3,148
python
en
code
0
github-code
36
944344202
pkgname = "cairomm1.0" pkgver = "1.14.5" pkgrel = 0 build_style = "meson" configure_args = ["-Dboost-shared=true"] hostmakedepends = ["meson", "pkgconf"] makedepends = ["cairo-devel", "libsigc++2-devel"] checkdepends = ["boost-devel", "fontconfig-devel", "fonts-dejavu-otf"] pkgdesc = "C++ bindings to Cairo graphics lib...
chimera-linux/cports
contrib/cairomm1.0/template.py
template.py
py
748
python
en
code
119
github-code
36
7424990082
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Harmonia's Kรคrcher # Fixes surnรคme items in รค mรคssive wรคy. import json from SPARQLWrapper import SPARQLWrapper, JSON import requests from bs4 import BeautifulSoup def getWDcontent(item): sparql.setQuery(""" SELECT DISTINCT ?lang ?label ?description WHERE {{ ...
Ash-Crow/scrapers
harmonias-karcher.py
harmonias-karcher.py
py
4,238
python
en
code
3
github-code
36
18035041317
class Solution: def findLatestStep(self, arr: List[int], m: int) -> int: if m == len(arr): return m length = [0] * (len(arr) + 2) res = -1 for i, a in enumerate(arr): left, right = length[a-1], length[a+1] if left == m or right == m: res = i ...
LittleCrazyDog/LeetCode
1562-find-latest-group-of-size-m/1562-find-latest-group-of-size-m.py
1562-find-latest-group-of-size-m.py
py
400
python
en
code
2
github-code
36
74169633702
import logging import os import uuid from io import BytesIO from typing import Sequence from zipfile import ZIP_DEFLATED, ZipFile import anndata as ad import dramatiq from fastapi import APIRouter, Depends, File, Form, HTTPException, UploadFile from fastapi.responses import ORJSONResponse from matplotlib.colors import...
BodenmillerGroup/histocat-web
backend/histocat/api/dataset/controller.py
controller.py
py
5,914
python
en
code
5
github-code
36
23124927437
from django.conf.urls import patterns, include, url from rest_framework.routers import DefaultRouter from blog import views router = DefaultRouter() router.register(r'post', views.PostViewSet) router.register(r'category', views.CategoryViewSet) urlpatterns = patterns('', url(r'^', include(router.urls)), url(...
PolarIt/myblog
myblog/urls.py
urls.py
py
398
python
en
code
1
github-code
36