seq_id
string
text
string
repo_name
string
sub_path
string
file_name
string
file_ext
string
file_size_in_byte
int64
program_lang
string
lang
string
doc_type
string
stars
int64
dataset
string
pt
string
api
list
7784070706
"""MYAPP Core application logic.""" from json import ( JSONDecoder, JSONEncoder, loads as _json_loads, ) from logging import getLogger from pathlib import PosixPath from http import HTTPStatus from flask import Blueprint, current_app, request, Response from flask.views import MethodView from webargs.flaskp...
jjj4x/flask_api_example
src/myapp/core.py
core.py
py
7,547
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 34, "usage_type": "call" }, { "api_name": "pathlib.PosixPath", "line_number": 37, "usage_type": "call" }, { "api_name": "webargs.flaskparser.FlaskParser", "line_number": 42, "usage_type": "name" }, { "api_name": "h...
277770918
import os, sys import subprocess # os.environ['DISPLAY'] = ':99.0' # os.environ['PYVISTA_OFF_SCREEN'] = 'true' # os.environ['PYVISTA_USE_IPYVTK'] = 'true' # bashCommand ="Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & sleep 3" # process = subprocess.Popen(bashCommand, stdout=subprocess.PIPE, shell=True) # process.w...
uncbiag/shapmagn
shapmagn/experiments/datasets/lung/lung_data_analysis.py
lung_data_analysis.py
py
28,299
python
en
code
94
github-code
6
[ { "api_name": "sys.path.insert", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_num...
39635306222
from datetime import datetime from django.http import Http404, HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.template import loader from django.urls import reverse from .models import BusinessIdea # Create your views here. def list(request): ideas_list = BusinessIdea.objects....
Gael-Bernard/business_ideas_upm
business_ideas_upm/ideas/views.py
views.py
py
1,571
python
en
code
0
github-code
6
[ { "api_name": "models.BusinessIdea.objects.order_by", "line_number": 12, "usage_type": "call" }, { "api_name": "models.BusinessIdea.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "models.BusinessIdea", "line_number": 12, "usage_type": "name" }, ...
11403898752
from torch.utils.data import Dataset from transformers import Trainer from transformers import TrainingArguments from trainer.callbacks.printer import PrinterCallback from data_manager.batch_sampler import Batch_Sampler from model.model_parameters import Model_Parameters from trainer.tne_config import TNE_Config import...
ranraboh/TNE_TASK
trainer/tne_trainer.py
tne_trainer.py
py
4,430
python
en
code
0
github-code
6
[ { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.utils.data.Dataset", "line_number": 16, "usage_type": "name" }, { "api_name": "trainer.tne_co...
16838024238
from typing import List from csvcubed.models.cube import ( Cube, QbDimension, ExistingQbDimension, QbColumn, CsvColumnUriTemplateMissingError, QbAttributeLiteral, CsvColumnLiteralWithUriTemplate, QbAttribute, NoDimensionsDefinedError, ) from csvcubed.models.validationerror import Va...
GDonRanasinghe/csvcubed-models-test-5
csvcubed/csvcubed/utils/qb/validation/cube.py
cube.py
py
2,817
python
en
code
0
github-code
6
[ { "api_name": "csvcubed.models.cube.Cube", "line_number": 21, "usage_type": "name" }, { "api_name": "csvcubed.utils.qb.validation.observations.validate_observations", "line_number": 30, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 21, "usage_type": ...
25147617203
import errno import logging as _logging import socket import socketserver import threading import time from napalm import utils # Log logging = _logging.getLogger("SERVER") # Temp # utils.default_logging_setup() try: from twisted.internet import reactor from twisted.internet.protocol import connectionDone, P...
markelov-alex/py-sockets
napalm/socket/server.py
server.py
py
18,945
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.warning", "line_number": 20, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 69, "usage_type": "call" }, { "api_name": "logging.debug", ...
71087029308
"""Simple wrapper for app""" import json from rich.console import Console from typing import List import requests from src.utils import Oracles class FlaskAppClient: ERROR_KEY = "error" TRACEBACK_KEY = "traceback" def __init__(self, base_url="http://127.0.0.1:5000"): self.base_url = base_url ...
molecule-one/mlinpl-23-workshops
src/server_wrapper.py
server_wrapper.py
py
2,462
python
en
code
1
github-code
6
[ { "api_name": "rich.console.Console", "line_number": 15, "usage_type": "call" }, { "api_name": "json.JSONDecodeError", "line_number": 20, "usage_type": "attribute" }, { "api_name": "requests.post", "line_number": 36, "usage_type": "call" }, { "api_name": "requests...
43431205524
import datetime import uuid import logging from concurrent.futures import ThreadPoolExecutor from functools import partial import pandas as pd import sys import pprint import traceback from core.scraper.scraper import Scraper from core.db.db_helper import DbHelper from common.constants import THREAD_NO, LARGE_CHUNK, B...
CMUChimpsLab/playstore-scraper
core/scraper/updater.py
updater.py
py
5,745
python
en
code
1
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 18, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 19, "usage_type": "attribute" }, { "api_name": "pprint.Pretty...
10906525746
import argparse import time import pika from pika.exceptions import ( ChannelClosed, ConnectionClosed, AMQPConnectionError, AMQPHeartbeatTimeout, ) class Logger: LOG_EXCHANGE = "logs" LOG_EXCHANGE_TYPE = "topic" def __init__(self, url, routing_keys): connection = pika.BlockingCo...
allo-media/eventail
scripts/logger.py
logger.py
py
2,599
python
en
code
2
github-code
6
[ { "api_name": "pika.BlockingConnection", "line_number": 19, "usage_type": "call" }, { "api_name": "pika.URLParameters", "line_number": 19, "usage_type": "call" }, { "api_name": "pika.exceptions.ChannelClosed", "line_number": 52, "usage_type": "name" }, { "api_name...
29209651660
import os from pathlib import Path def correct_content(req): with open(req, "rb") as fp: content = fp.read() try: if b"\x00" in content: raise ValueError() content = content.decode("utf-8") except (UnicodeDecodeError, ValueError): content = ( content...
smythi93/Tests4Py
requirements.py
requirements.py
py
2,015
python
en
code
8
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 25, "usage_type": "call" }, { "api_name": "pathlib.Path.cwd", "line_number": 26, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 26, "usage_type": "name" }, { "api_name": "os.listdir", "line_num...
21247797774
import os import pandas as pd from sklearn.model_selection import train_test_split import click FILENAME_DATA = "data.csv" FILENAME_TARGET = "target.csv" FILENAME_TRAIN_X = "X_train.csv" FILENAME_TRAIN_Y = "y_train.csv" FILENAME_TEST_X = "X_test.csv" FILENAME_TEST_Y = "y_test.csv" @click.command("split_data") @cli...
made-mlops-2022/alexey_sklyannyy
airflow_ml_dags/images/airflow-split/split_data.py
split_data.py
py
1,308
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path", "line_number": 22, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 23, "usage_type": "call" }, { "api_name": "sklearn.model_selection.tra...
23800674981
from pynput.keyboard import Key,Listener keys=[] def on_press(key): try: key=str(key) if(key=='Key.enter'): key='\n' elif(key=='Key.space'): key=' ' elif(key=='Key.alt'): key=' alt ' elif(key=='Key.ctrl'): key=' ctrl ' ...
prajwalcbk/tools
keylogger/3.py
3.py
py
791
python
en
code
0
github-code
6
[ { "api_name": "pynput.keyboard.Key", "line_number": 19, "usage_type": "name" }, { "api_name": "pynput.keyboard.Listener", "line_number": 34, "usage_type": "call" } ]
36396554295
""" Compare catalogs of candidates and benchmarks. """ from __future__ import annotations # __all__ = ['*'] __author__ = "Fernando Aristizabal" from typing import Iterable, Optional, Callable, Tuple import os import pandas as pd from rioxarray import open_rasterio as rxr_or import xarray as xr import dask.dataframe ...
NOAA-OWP/gval
src/gval/catalogs/catalogs.py
catalogs.py
py
9,027
python
en
code
14
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 19, "usage_type": "attribute" }, { "api_name": "dask.dataframe.DataFrame", "line_number": 19, "usage_type": "attribute" }, { "api_name": "dask.dataframe", "line_number": 19, "usage_type": "name" }, { "api_name": "pa...
30138290765
# !/usr/local/python/bin/python # -*- coding: utf-8 -*- # (C) Wu Dong, 2020 # All rights reserved # @Author: 'Wu Dong <wudong@eastwu.cn>' # @Time: '2020-04-09 14:39' """ ๆผ”็คบ่‡ชๅฎšไน‰ๅ“ๅบ”็ฑป """ # sys import json # 3p from flask import Flask from pre_request import BaseResponse from pre_request import pre, Rule class CustomRespo...
Eastwu5788/pre-request
examples/example_flask/example_response.py
example_response.py
py
1,281
python
en
code
55
github-code
6
[ { "api_name": "pre_request.BaseResponse", "line_number": 17, "usage_type": "name" }, { "api_name": "flask.make_response", "line_number": 30, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 30, "usage_type": "call" }, { "api_name": "flask.Flask",...
14594653005
import tensorflow as tf import pathlib import os import cv2 import numpy as np import tqdm import argparse class TFRecordsSeg: def __init__(self, image_dir="/datasets/custom/cityscapes", label_dir="/datasets/custom/cityscapes", tfrecord_path="data.tfrecords", ...
AhmedBadar512/Badr_AI_Repo
utils/create_seg_tfrecords.py
create_seg_tfrecords.py
py
6,714
python
en
code
2
github-code
6
[ { "api_name": "tensorflow.io.FixedLenFeature", "line_number": 34, "usage_type": "call" }, { "api_name": "tensorflow.io", "line_number": 34, "usage_type": "attribute" }, { "api_name": "tensorflow.string", "line_number": 34, "usage_type": "attribute" }, { "api_name"...
30353219011
from os.path import abspath from io import BytesIO import copy # Local imports. from common import TestCase, get_example_data class TestOptionalCollection(TestCase): def test(self): self.main() def do(self): ############################################################ # Imports. ...
enthought/mayavi
integrationtests/mayavi/test_optional_collection.py
test_optional_collection.py
py
4,072
python
en
code
1,177
github-code
6
[ { "api_name": "common.TestCase", "line_number": 9, "usage_type": "name" }, { "api_name": "mayavi.sources.vtk_file_reader.VTKFileReader", "line_number": 30, "usage_type": "call" }, { "api_name": "common.get_example_data", "line_number": 31, "usage_type": "call" }, { ...
32161722151
import sys from pathlib import Path from colorama import Fore sys.path.append(str(Path(__file__).parent.parent)) from g4f import BaseProvider, models, Provider logging = False class Styles: ENDC = "\033[0m" BOLD = "\033[1m" UNDERLINE = "\033[4m" def main(): providers = get_providers() failed_pr...
dovgan-developer/discord-bot-g4f
testing/test_providers.py
test_providers.py
py
2,239
python
en
code
1
github-code
6
[ { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 5, "usage_type": "call" }, { "api_name": "colorama.Fore.RED", "line...
26304099314
from django.conf import settings from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import ObjectDoesNotExist from django.shortcuts import get_object_or_404, redirect, render, reverse from django.utils import timezone from django.views import generi...
ifty123/ecomm_fix
ecomm/toko/views.py
views.py
py
14,172
python
en
code
0
github-code
6
[ { "api_name": "django.views.generic.ListView", "line_number": 16, "usage_type": "attribute" }, { "api_name": "django.views.generic", "line_number": 16, "usage_type": "name" }, { "api_name": "models.ProdukItem.objects.all", "line_number": 18, "usage_type": "call" }, { ...
24742947009
from asyncirc import irc import asyncirc.plugins.sasl import asyncio, configparser, time, sys config = configparser.ConfigParser(interpolation=None) config.read('config.ini') network = config["DEFAULT"]["network"] server = config[network]["server"] port = config[network]["port"] nick = config[network]['nick'] passwor...
kyrias/reclaimer
reclaimer.py
reclaimer.py
py
2,611
python
en
code
2
github-code
6
[ { "api_name": "configparser.ConfigParser", "line_number": 5, "usage_type": "call" }, { "api_name": "asyncirc.irc.connect", "line_number": 15, "usage_type": "call" }, { "api_name": "asyncirc.irc", "line_number": 15, "usage_type": "name" }, { "api_name": "asyncirc.p...
11301162272
from rest_framework.response import Response from rest_framework.decorators import api_view from datetime import datetime from coupon.models import Coupon from coupon.serializers import CouponSerializer @api_view(['GET']) def get_coupons(request): user_id = request.GET.get('user_id') expired = request.GET.get...
jpswing/assmovie
coupon/views.py
views.py
py
1,042
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.response.Response", "line_number": 15, "usage_type": "call" }, { "api_name": "coupon.models.Coupon.objects.filter", "line_number": 25, "usage_type": "call" }, { "api_name": "coupon.models.Coupon.objects", "line_number": 25, "usage_type": "att...
14069562246
'''' Microbial growth model for A. Niger including inhibition dynamics based on Haldane's equation ''' ############################################################################## mic_name = 'A. niger' print( '\n'*2, 'Summary of params used for species ', mic_name) # Imports from inhibition import lo...
TheoBatik/microbial_models
5b_A_niger.py
5b_A_niger.py
py
9,887
python
en
code
0
github-code
6
[ { "api_name": "inhibition.load_csv", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 95, "usage_type": "call" }, { "api_name": "lmfit.Parameters", "line_number": 121, "usage_type": "call" }, { "api_name": "scipy.integrate.ode...
72033875709
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('forestfires.csv') pd.plotting.scatter_matrix(dataset) X = dataset.iloc[:,0:12].values y = dataset.iloc[:,-1].values dataset.isnull().sum() dataset.info() temp = pd.DataFrame(X[:,[2,3]]) temp_month = pd.get_du...
Manavendrasingh/ML-code
forestfire.py
forestfire.py
py
1,103
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.plotting.scatter_matrix", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.plotting", "line_number": 7, "usage_type": "attribute" }, { "api_name": "pand...
7160469481
import skfuzzy as fuzz from skfuzzy import control as ctrl import numpy as np import matplotlib.pyplot as plt def v(d, a): return np.sqrt((d * 9.81) / np.sin(2 * np.radians(a))) def main(): x_distance = np.arange(1, 100, 5) x_angle = np.arange(1, 90, 1) distance = ctrl.Antecedent(x_distance, 'dista...
DonChaka/PSI
Fuzzy/fuzzy_easy.py
fuzzy_easy.py
py
2,354
python
en
code
0
github-code
6
[ { "api_name": "numpy.sqrt", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.radians", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 12,...
26042467106
from __future__ import annotations import logging from abc import ABCMeta from dataclasses import dataclass from pants.core.util_rules.environments import EnvironmentNameRequest from pants.engine.environment import EnvironmentName from pants.engine.fs import MergeDigests, Snapshot, Workspace from pants.engine.goal im...
pantsbuild/pants
src/python/pants/core/goals/generate_snapshots.py
generate_snapshots.py
py
3,031
python
en
code
2,896
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 20, "usage_type": "call" }, { "api_name": "pants.engine.target.FieldSet", "line_number": 24, "usage_type": "name" }, { "api_name": "abc.ABCMeta", "line_number": 24, "usage_type": "name" }, { "api_name": "pants.engi...
8963786234
#!/usr/bin/env python3 import multiprocessing from queue import Empty import subprocess import Robocode import os, os.path from datetime import datetime import sys import time # This class knows about Robocode and the Database. def recommendedWorkers(): cpus = multiprocessing.cpu_count() if cp...
mojomojomojo/di-arena
lib/BattleRunner.py
BattleRunner.py
py
4,617
python
en
code
0
github-code
6
[ { "api_name": "multiprocessing.cpu_count", "line_number": 15, "usage_type": "call" }, { "api_name": "multiprocessing.current_process", "line_number": 25, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 28, "usage_type": "attribute" }, { "api_nam...
29852066628
__author__ = "Rohit N Dubey" from django.conf.urls import patterns, include, url from django.contrib import admin from views import Ignite from . import prod urlpatterns = patterns('', url(r'^ui/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': prod.UI_ROOT, }), url(r'^api/pool...
salran40/POAP
ignite/urls.py
urls.py
py
805
python
en
code
0
github-code
6
[ { "api_name": "django.conf.urls.patterns", "line_number": 10, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 12, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 14, "usage_type": "call" }, { "api_name": "d...
11499299532
import requests,json def ranking(duration="daily",ranking_type="break",offset=0,lim=20,unit=False): try: resp = requests.get(f'https://w4.minecraftserver.jp/api/ranking?type={ranking_type}k&offset={offset}&lim={lim}&duration={duration}') data_json = json.loads(resp.text) rank_list = list(dat...
nekorobi-0/seichi_ranking
seichi_ranking.py
seichi_ranking.py
py
3,146
python
en
code
2
github-code
6
[ { "api_name": "requests.get", "line_number": 4, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 32, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 33...
73100458107
# Network Traffic Analyzer: # Analyze network packet captures for anomalies and threats. # pip install pyshark ''' Python script that reads a Wireshark PCAP file and performs basic security analysis, such as identifying suspicious traffic, detecting port scans, and checking for potential security threats. The scrip...
Cnawel/greyhat-python
wireshark/traffice_analyzer.py
traffice_analyzer.py
py
1,415
python
en
code
0
github-code
6
[ { "api_name": "pyshark.FileCapture", "line_number": 16, "usage_type": "call" } ]
655282827
import argparse import os import torch import torch_em from torch_em.model import AnisotropicUNet ROOT = '/scratch/pape/mito_em/data' def get_loader(datasets, patch_shape, batch_size=1, n_samples=None, roi=None): paths = [ os.path.join(ROOT, f'{ds}.n5') for ds in datasets ...
constantinpape/torch-em
experiments/unet-segmentation/mitochondria-segmentation/mito-em/challenge/embeddings/train_embeddings.py
train_embeddings.py
py
4,556
python
en
code
42
github-code
6
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch_em.data.MinForegroundSampler", "line_number": 22, "usage_type": "call" }, { "api_name": "torch_em...
41858795618
############################################################################################# # Foi feita uma estatรญstica em cinco cidades brasileiras para coletar dados sobre acidentes # # de trรขnsito. Foram obtidos os seguintes dados: # # a) Cรณdigo da cidade; ...
nralex/Python
3-EstruturaDeRepeticao/exercรญcio40.py
exercรญcio40.py
py
2,234
python
pt
code
0
github-code
6
[ { "api_name": "datetime.date.today", "line_number": 19, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 19, "usage_type": "name" }, { "api_name": "datetime.date.today", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.date",...
1633248512
from builtins import next from builtins import range import os import datetime from xml.sax.saxutils import quoteattr import sys import logging import random import glob from itertools import cycle from flask import Blueprint, url_for, Response, stream_with_context, send_file, \ jsonify from werkzeug.datastructure...
cmusatyalab/opendiamond
opendiamond/dataretriever/augment_store.py
augment_store.py
py
6,831
python
en
code
19
github-code
6
[ { "api_name": "flask.Blueprint", "line_number": 41, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 43, "usage_type": "call" }, { "api_name": "sys.maxsize", "line_number": 52, "usage_type": "attribute" }, { "api_name": "werkzeug.datastruc...
5345020806
import email.utils import json import os import smtplib import ssl from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from pathlib import Path import jinja2 from dotenv import load_dotenv send_user = "" load_dotenv() class SendEmailController: def __init__(self): pass ...
nguyendoantung/e-maintenance-system
back-end/service/utils/email/EmailController.py
EmailController.py
py
3,978
python
en
code
0
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 15, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 24, "usage_type": "call" }, { "api_name": "jinja2.FileSystemLoader", "line_number": 25, "usage_type": "call" }, { "api_name": "jinja2.Enviro...
9777903968
import math from django.db import models from django.db.models.signals import pre_save, post_save from apps.addresses.models import Address from apps.carts.models import Cart from apps.billing.models import BillingProfile from main.utils import unique_order_id_generator # ORDER STATUS OPTIONS ORDER_STATUS_CHOICES = (...
ehoversten/Ecommerce_Django
main/apps/orders/models.py
models.py
py
4,469
python
en
code
2
github-code
6
[ { "api_name": "django.db.models.Manager", "line_number": 20, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 20, "usage_type": "name" }, { "api_name": "django.db.models.Model", "line_number": 41, "usage_type": "attribute" }, { "api_na...
41409285856
import json estudantes = [] professores = [] disciplinas = [] turmas = [] matriculas = [] def main(): while True: print("Menu Principal") print("1. Estudantes") print("2. Disciplinas") print("3. Professores") print("4. Turmas") print("5. Matrรญculas") ...
enzupain/Python-Projetos
sistema gerenciamento academico.py
sistema gerenciamento academico.py
py
18,786
python
pt
code
0
github-code
6
[ { "api_name": "json.dump", "line_number": 120, "usage_type": "call" }, { "api_name": "json.load", "line_number": 126, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 207, "usage_type": "call" }, { "api_name": "json.load", "line_number": 213, ...
60822349
""" scrapy1.5้™ๅˆถrequest.callback and request.errbackไธ่ƒฝไธบ้žNoneไปฅๅค–็š„ไปปไฝ•้žๅฏ่ฐƒ็”จๅฏน่ฑก๏ผŒๅฏผ่‡ดไธ€ไบ›ๅŠŸ่ƒฝๆ— ๆณ•ๅฎž็Žฐใ€‚่ฟ™้‡Œ่งฃ้™ค่ฏฅ้™ๅˆถ """ from scrapy import Request as _Request from scrapy.http.headers import Headers class Request(_Request): def __init__(self, url, callback=None, method='GET', headers=None, body=None, cookies=None, meta=No...
ShichaoMa/structure_spider
structor/custom_request.py
custom_request.py
py
1,255
python
en
code
29
github-code
6
[ { "api_name": "scrapy.Request", "line_number": 8, "usage_type": "name" }, { "api_name": "scrapy.http.headers.Headers", "line_number": 25, "usage_type": "call" } ]
37559653754
from selenium import webdriver import time # Have to change the path according to where your chromedriver locate PATH = "C:\Program Files (x86)\chromedriver.exe" driver = webdriver.Chrome(PATH) driver.get("http://ec2-54-208-152-154.compute-1.amazonaws.com/") arrayOfBar = [] arrayLeftBowl = [] arrayRight...
LiyaNorng/Fetch-Rewards-Coding-Exercise
FakeGold.py
FakeGold.py
py
2,344
python
en
code
1
github-code
6
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 7, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 7, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 48, "usage_type": "call" }, { "api_name": "time.sleep", ...
32509281023
import torch import torch.nn as nn # nn.linear ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด import # F.mse(mean squared error) <- linear regression, LOSS Function ์กด์žฌ # Classification problem์—์„œ ์‚ฌ์šฉํ•˜๋Š” loss function : Cross-Entropy import torch.nn.functional as F import torch.optim as optim # SGD, Adam, etc.์ตœ์ ํ™” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ # ์ž„์˜ ๋ฐ์ดํ„ฐ ์ƒ์„ฑ # ์ž…๋ ฅ์ด 1, ์ถœ๋ ฅ์ด 1...
JEONJinah/Shin
multi_varialbe_LR.py
multi_varialbe_LR.py
py
2,761
python
ko
code
0
github-code
6
[ { "api_name": "torch.FloatTensor", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.FloatTensor", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.nn.Linear", "line_number": 30, "usage_type": "call" }, { "api_name": "torch.nn", "l...
24452709455
import json import os import random from nonebot import on_keyword, logger from nonebot.adapters.mirai2 import MessageSegment, Bot, Event tarot = on_keyword({"ๅก”็ฝ—็‰Œ"}, priority=5) @tarot.handle() async def send_tarot(bot: Bot, event: Event): """ๅก”็ฝ—็‰Œ""" card, filename = await get_random_tarot() image_dir = ...
mzttsaintly/Warfarin-bot
warfarin/plugins/Tarot/__init__.py
__init__.py
py
1,590
python
en
code
1
github-code
6
[ { "api_name": "nonebot.on_keyword", "line_number": 8, "usage_type": "call" }, { "api_name": "nonebot.adapters.mirai2.Bot", "line_number": 12, "usage_type": "name" }, { "api_name": "nonebot.adapters.mirai2.Event", "line_number": 12, "usage_type": "name" }, { "api_n...
12959904969
from .declarative import ( declarative, get_declared, get_members, ) from .dispatch import dispatch from .evaluate import ( evaluate, evaluate_recursive, evaluate_recursive_strict, evaluate_strict, get_callable_description, matches, ) from .namespace import ( EMPTY, flatten, ...
jlubcke/tri.declarative
lib/tri_declarative/__init__.py
__init__.py
py
6,981
python
en
code
17
github-code
6
[ { "api_name": "evaluate.get_callable_description", "line_number": 89, "usage_type": "call" }, { "api_name": "traceback.extract_stack", "line_number": 128, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 165, "usage_type": "call" }, { "api_name":...
17940292131
from sklearn.metrics import confusion_matrix, roc_auc_score import json import numpy as np def general_result(y_true, y_score, threshold=0.6): def pred(score, best_thresh): label = 0 if score > best_thresh: label = 1 return label y_score = np.array(y_score) if len(y_scor...
jingmouren/antifraud
antifraud/metrics/normal_function.py
normal_function.py
py
2,233
python
en
code
0
github-code
6
[ { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.metrics.confusion_matrix", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.metrics.roc_auc_score", "line_number": 28, "usage_type": "call" }, { "api_na...
32483785153
import random from collections import Counter import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, Scale, bias_init_with_prob, normal_init from mmcv.runner import force_fp32 import nltk from nltk.cluster.kmeans import KMeansClusterer from mmdet.core import (anchor_ins...
johnran103/mmdet
test_dy_conv.py
test_dy_conv.py
py
5,635
python
en
code
1
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 21, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 21, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
18307407152
import importlib.util as iutil import os from datetime import datetime from time import perf_counter from uuid import uuid4 import numpy as np import yaml from aequilibrae.distribution.ipf_core import ipf_core from aequilibrae.context import get_active_project from aequilibrae.matrix import AequilibraeMatrix, Aequili...
AequilibraE/aequilibrae
aequilibrae/distribution/ipf.py
ipf.py
py
10,544
python
en
code
140
github-code
6
[ { "api_name": "importlib.util.find_spec", "line_number": 15, "usage_type": "call" }, { "api_name": "importlib.util", "line_number": 15, "usage_type": "name" }, { "api_name": "aequilibrae.matrix.AequilibraeMatrix", "line_number": 99, "usage_type": "call" }, { "api_...
29007933984
# Databricks notebook source from pyspark.sql.functions import expr, col import pyspark.sql.functions as fn sampleEmployee = spark.read.format("csv").option("header","true").load("dbfs:/FileStore/shared_uploads/bhaskar.dakoori072@gmail.com/us_500.csv") # COMMAND ---------- employeeDF = sampleEmployee.withColumn('web'...
bhaskar553/DatabricksAssignment
Vaccine Drive Assignment.py
Vaccine Drive Assignment.py
py
2,302
python
en
code
0
github-code
6
[ { "api_name": "pyspark.sql.functions.expr", "line_number": 8, "usage_type": "call" }, { "api_name": "pyspark.sql.functions.count", "line_number": 13, "usage_type": "call" }, { "api_name": "pyspark.sql.functions", "line_number": 13, "usage_type": "name" }, { "api_n...
43734225885
# -*- coding: utf-8 -*- """ Created on Mon May 10 19:03:44 2021 @author: Samael Olascoaga @email: olaskuaga@gmail.com """ import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt df = pd.read_csv('drugbank.csv') overlap = [] for i in range(0, 1000000): set1 = s...
Olascoaga/Senotherapy
bootstrapping_targets.py
bootstrapping_targets.py
py
938
python
en
code
1
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 21, "usage_type": "call" }, { "api_name": "seaborn.set_style", "line_number": 25, "usage_type": "call" }, { "api_name": "seaborn.despine", ...
29643271631
# -*- coding: utf-8 -*- # (c) 2015 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api from dateutil.relativedelta import relativedelta class ProcurementOrder(models.Model): _inherit = 'procurement.order' @api.multi def ...
odoomrp/odoomrp-wip
procurement_plan/models/procurement.py
procurement.py
py
5,931
python
en
code
119
github-code
6
[ { "api_name": "openerp.models.Model", "line_number": 8, "usage_type": "attribute" }, { "api_name": "openerp.models", "line_number": 8, "usage_type": "name" }, { "api_name": "openerp.api.multi", "line_number": 11, "usage_type": "attribute" }, { "api_name": "openerp...
29446328549
# -*- coding: utf-8 -*- import sys import cv2 import mediapipe as mp import re import time import threading from PySide2 import QtCore, QtGui, QtWidgets from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * from selenium import webdriver from lib.handsign.gesture import define_gest...
cheeseBG/EmergencyResponseSystem
main.py
main.py
py
17,061
python
en
code
1
github-code
6
[ { "api_name": "mediapipe.solutions", "line_number": 30, "usage_type": "attribute" }, { "api_name": "mediapipe.solutions", "line_number": 31, "usage_type": "attribute" }, { "api_name": "lib.ui.ui_main.Ui_MainWindow", "line_number": 52, "usage_type": "call" }, { "ap...
33869960923
import fasttext import pickle model = fasttext.load_model('/data/disk1/private/yx/model200v2_8.bin', encoding='utf-8') (wordnum,vec_size) = (len(model.words),model.dim) word2id = {} vecList = [] for idx,word in enumerate(model.words): word2id[word] = idx vecList.append(model[word]) with open("/data/disk1/privat...
xcjthu/TopTextClassification
utils/powerlawtools/fastmodeltrans.py
fastmodeltrans.py
py
533
python
en
code
3
github-code
6
[ { "api_name": "fasttext.load_model", "line_number": 3, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 11, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_...
23213929420
""" IMU 6-DOF Acceleration - imu_accel_x - imu_accel_y - imu_accel_z Angular speed - imu_gyro_x - imu_gyro_y - imu_gyro_z """ import numpy as np from numpy.linalg import inv from scipy.spatial.transform import Rotation as rot """ X: states: - pitch - roll - yaw (not used) - bias angul...
toshiharutf/Kalman_Filter_GNS_INS
ins_filter_full_state_demo.py
ins_filter_full_state_demo.py
py
5,133
python
en
code
6
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.arctan2", "line_number": 41, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 41, "usage_type": "call" }, { "api_name": "numpy.arctan2", "line_number...
10211319525
# -*- coding: utf8 -*- from django.test import TestCase from django.apps import apps from blog.models import ExecuteStatus, Tag from blog.models import TestCase as TC from django.contrib.auth.models import User import datetime import os class TestCaseModelTestCase(TestCase): def setUp(self): #apps.get_app...
charleszh/rf-web
DjangoDemo/blog/tests/test_models.py
test_models.py
py
1,209
python
en
code
0
github-code
6
[ { "api_name": "django.test.TestCase", "line_number": 11, "usage_type": "name" }, { "api_name": "django.utils.timezone.now", "line_number": 16, "usage_type": "call" }, { "api_name": "django.utils.timezone", "line_number": 16, "usage_type": "name" }, { "api_name": "...
27646567910
import http.server from colorama import Fore, Style import os import cgi HOST_NAME = '127.0.0.1' # Kali IP address PORT_NUMBER = 80 # Listening port number class MyHandler(http.server.BaseHTTPRequestHandler): # MyHandler defines what we should do from the client / target def do_GET(s): # If we got a G...
zAbuQasem/Misc
http reverse shell/Server.py
Server.py
py
2,367
python
en
code
6
github-code
6
[ { "api_name": "http.server.server", "line_number": 10, "usage_type": "attribute" }, { "api_name": "http.server", "line_number": 10, "usage_type": "name" }, { "api_name": "colorama.Fore.LIGHTCYAN_EX", "line_number": 16, "usage_type": "attribute" }, { "api_name": "c...
13767499463
import os import pytest from stips import stips_data_base # from stips.utilities import SelectParameter # from stips.utilities.utilities import GetParameter @pytest.fixture(autouse=True) def pre_post_test(): # Setup config file environment variable config_param = None if "stips_config" in os.environ: ...
spacetelescope/STScI-STIPS
stips/utilities/tests/test_config.py
test_config.py
py
2,091
python
en
code
12
github-code
6
[ { "api_name": "os.environ", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.exists", ...
28300388553
import pandas as pd from sklearn.ensemble import GradientBoostingClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score # Load the datasets regular_season_results = pd.read_csv('MRegularSeasonDetailedResults.csv') tournament_results = pd.read_csv('MNCAATourneyDetaile...
lakshayMahajan/March-Madness-ML
madness.py
madness.py
py
4,404
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.model_selection.t...
32312362218
from osgeo import gdal import numpy as np # calculating SAVI and NDVI noDataVal = -28672 def calculate_ndvi(nir, red): valid_mask = (nir != noDataVal) & (red != noDataVal) ndvi_band = np.where(valid_mask, (nir - red) / (nir + red), np.nan) return ndvi_band # Function to calculate SAVI def calculate_savi(n...
dustnvan/ET_goes16
goes_export_geotiff/export_savi_ndvi.py
export_savi_ndvi.py
py
2,866
python
en
code
0
github-code
6
[ { "api_name": "numpy.where", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 8, "usage_type": "attribute" }, { "api_name": "numpy.where", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 1...
648697707
import numbers import time from itertools import product import numpy as np import torch try: from tqdm import tqdm except ImportError: def tqdm(x): return x def product1d(inrange): for ii in inrange: yield ii def slice_to_start_stop(s, size): """For a single dimension with a give...
constantinpape/3d-unet-benchmarks
bench_util/inference.py
inference.py
py
7,760
python
en
code
3
github-code
6
[ { "api_name": "numbers.Number", "line_number": 79, "usage_type": "attribute" }, { "api_name": "numbers.Number", "line_number": 97, "usage_type": "attribute" }, { "api_name": "itertools.product", "line_number": 152, "usage_type": "call" }, { "api_name": "torch.floa...
35093472448
import pygame, sys, operator, random, time from pygame.locals import * # Global variables WIDTH = 800 HEIGHT = 500 SUB_SPEED = 3 BUBBLE_MAX_SPEED = 1 TIME_LIMIT = 30 BONUS_SCORE = 1500 BLACK = (0, 0, 0) BLUE = (12,34,56) RED = (255,0,0) WHITE = (255,255,255) x_sub = 40 y_sub = 250 score = 0 game_end = time.time() + ...
nicoseng/bubble_blaster
test.py
test.py
py
7,112
python
en
code
0
github-code
6
[ { "api_name": "time.time", "line_number": 20, "usage_type": "call" }, { "api_name": "pygame.display.quit", "line_number": 31, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 31, "usage_type": "attribute" }, { "api_name": "pygame.quit", "...
22461213731
import xarray as xr import numpy as np #Este script baixa os dados do hycom para os perรญodos selecionados para o experimento GLBv0.08/expt_53.X #Importante: Por conta da estruturas dos servidores OpenDAP, e preciso baixar o dado por cada passo de tempo para postriormente concaternar #Para concatenar, selecionar os ar...
Igoratake/Hycom_Opendap
baixa_hycom_2014_frente_Pontual.py
baixa_hycom_2014_frente_Pontual.py
py
2,248
python
pt
code
0
github-code
6
[ { "api_name": "xarray.open_dataset", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.unravel_index", "line_number": 46, "usage_type": "call" }, { "api_name": "numpy.argmin", "line_number": 46, "usage_type": "call" } ]
30886261452
######### import statements for sample_models.py ########### from keras import backend as K from keras.models import Model from keras.layers import (BatchNormalization, Conv1D, Dense, Input, TimeDistributed, Activation, Bidirectional, SimpleRNN, GRU, LSTM) ################################ ########### import...
MdAbuNafeeIbnaZahid/English-Speech-to-Text-Using-Keras
speech-recognition-neural-network/train.py
train.py
py
31,706
python
en
code
6
github-code
6
[ { "api_name": "utils.calc_feat_dim", "line_number": 65, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 67, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 68, "usage_type": "call" }, { "api_name": "random.Random", "line_...
71971288509
from kubeflow.fairing.cloud.docker import get_docker_secret from kubeflow.fairing.constants import constants import json import os def test_docker_secret_spec(): os.environ["DOCKER_CONFIG"] = "/tmp" config_dir = os.environ.get('DOCKER_CONFIG') config_file_name = 'config.json' config_file = os.path.joi...
kubeflow/fairing
tests/unit/cloud/test_docker.py
test_docker.py
py
578
python
en
code
336
github-code
6
[ { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_...
15565393240
import logging import os from typing import List from plumbum import cmd, local from pathlib import Path import doit from doit.action import CmdAction from constants import DEFAULT_DB, DB_USERNAME, DB_PASSWORD, VERBOSITY_DEFAULT logging.basicConfig() logger = logging.getLogger("dodo") logger.setLevel(logging.DEBUG) ...
karthik-ramanathan-3006/15-799-Special-Topics-in-Database-Systems
dodos/dodo.py
dodo.py
py
7,577
python
en
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pathlib.Path...
69894822589
from airflow import DAG from airflow.operators.bash_operator import BashOperator import datetime as dt from airflow.utils.dates import days_ago default_args = { 'owner': 'gregh', 'start_date': days_ago(0), 'email': ['myemail@gmail.com'], 'email_on_failure': True, 'email_on_retry': True, 'retri...
gregh13/Data-Engineering
Projects/Capstone Project/Task 5/Part Two - Apache Airflow ETL/process_web_log.py
process_web_log.py
py
1,221
python
en
code
0
github-code
6
[ { "api_name": "airflow.utils.dates.days_ago", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 14, "usage_type": "call" }, { "api_name": "airflow.DAG", "line_number": 18, "usage_type": "call" }, { "api_name": "datetime.t...
8927274924
from datetime import datetime as dt from datetime import timedelta import pickle import time import dask.dataframe as dd from dask.distributed import as_completed, worker_client import numpy as np import pandas as pd import requests import s3fs BUCKET = "insulator-citi-bikecaster" INSULATOR_URLS = [ "https://api...
EthanRosenthal/citi-bikecaster-model
calcs.py
calcs.py
py
4,374
python
en
code
0
github-code
6
[ { "api_name": "s3fs.S3FileSystem", "line_number": 20, "usage_type": "call" }, { "api_name": "pickle.loads", "line_number": 29, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.int64", "line_nu...
30827334271
import json import os class FileUtils: @staticmethod def readJsonFile(filePath): with open(filePath, 'r', encoding='utf-8') as file: jsonData = json.load(file) return jsonData @staticmethod def writeJsonFile(filePath, jsonData): with open(filePath, 'w', encoding='u...
Danny0515/Portfolio-crawler
src/main/utils/FileUtils.py
FileUtils.py
py
622
python
en
code
0
github-code
6
[ { "api_name": "json.load", "line_number": 9, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 15, "usage_type": "call" } ]
21419147973
import numpy as np from os.path import join from psbody.mesh import Mesh from fitting.landmarks import load_embedding, landmark_error_3d, mesh_points_by_barycentric_coordinates, load_picked_points from fitting.util import load_binary_pickle, write_simple_obj, safe_mkdir, get_unit_factor import open3d as o3d import argp...
qdmy/flame-fitting
modify_pointcloud.py
modify_pointcloud.py
py
11,254
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.std", ...
31282202503
# pylint: disable=missing-docstring # pylint: disable=invalid-name import functools import re # import unicodedata from string import punctuation as PUNCTUATIONS import numpy as np from doors.dates import get_timestamp SPECIAL_PUNCTUATIONS = PUNCTUATIONS.replace("_", "") def not_is_feat(col): return not is_fe...
chechir/doors
doors/strings.py
strings.py
py
4,406
python
en
code
0
github-code
6
[ { "api_name": "string.punctuation.replace", "line_number": 13, "usage_type": "call" }, { "api_name": "string.punctuation", "line_number": 13, "usage_type": "name" }, { "api_name": "string.lower", "line_number": 25, "usage_type": "call" }, { "api_name": "string.low...
10389322209
import glob import os from os import path as op import cv2 import numpy as np from torch.utils.data import DataLoader from pathlib import Path from PIL import Image, ImageFilter from detection.dummy_cnn.dataset import BaseBillOnBackGroundSet from tqdm import tqdm from sewar.full_ref import sam as sim_measure from iter...
KaraLandes/BachelorsProject
Repo/compare_data_similarity.py
compare_data_similarity.py
py
8,019
python
en
code
0
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 20, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path", "line_number": 22, ...
20444657924
from selenium import webdriver from selenium.webdriver.chrome.options import Options from bs4 import BeautifulSoup import time import csv class Scraper: def __init__(self, url): self.driver = webdriver.Chrome("./chromedriver", options=self.set_chrome_options()) self.url = url self.open_url...
RasbeeTech/Web-Scraper
scraper.py
scraper.py
py
3,381
python
en
code
1
github-code
6
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 10, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 10, "usage_type": "name" }, { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 16, "usage_type": "call" }, {...
18757756190
import argparse import cv2 # ArgParse รฉ usado para captar argumentos passados na chamada do .py no CMD ap = argparse.ArgumentParser() # Aqui definimos a label do argumento esperado ap.add_argument("-i", "--image", required=True, help= "Path to the image") # Criamos um dicionรกrio que receberรก os valores...
CarlosAlfredoOliveiraDeLima/Practical-Python-and-OpenCV-Book
01 - load_display_save.py
01 - load_display_save.py
py
1,041
python
pt
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 22, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_...
14868890436
from django.views.generic.base import TemplateView from albums.forms import FileForm from albums.models import Album, File from core.decorators import view_decorator from core.views import ResourceView class AlbumPage(TemplateView): template_name = "albums/main.html" def expose(view): view.expose = True ...
qrees/backbone-gallery
albums/views.py
views.py
py
508
python
en
code
0
github-code
6
[ { "api_name": "django.views.generic.base.TemplateView", "line_number": 8, "usage_type": "name" }, { "api_name": "core.views.ResourceView", "line_number": 18, "usage_type": "name" }, { "api_name": "albums.models.Album", "line_number": 19, "usage_type": "name" }, { ...
14987411881
from PIL import Image import os from tkinter import filedialog import tkinter as tk def convert_pdf(): index = 0 path_picture = filedialog.askdirectory() dire = 'Converted' path_pdf = os.path.join(path_picture , dire) os.mkdir(path_pdf) my_list = os.listdir(path_picture) for i in my_list...
Elkayamacc/Image2PDF
PDFConverterV2.py
PDFConverterV2.py
py
561
python
en
code
0
github-code
6
[ { "api_name": "tkinter.filedialog.askdirectory", "line_number": 10, "usage_type": "call" }, { "api_name": "tkinter.filedialog", "line_number": 10, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.pa...
10819469391
import numpy as np import argparse import imutils import cv2 ap = argparse.ArgumentParser() ap.add_argument("-i","--image",required = True, help="Path of Image File") args = vars(ap.parse_args()) #image = cv2.imread("image.png") print("Path: ", args["image"]) image = cv2.imread(args["image"]) # find all the 'black' ...
Pallavi04/ComputerVision
FindShapes/shape.py
shape.py
py
837
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line...
18798291843
import matplotlib.pyplot as plt import random import numpy as np from IPython.display import display, clear_output import time def head_home(x, y): """ Head home down and to the left. Parameters ---------- x : float Horizontal coordinate. y : float Vertical coor...
msu-cmse-courses/cmse202-F22-data
code_samples/ant_function.py
ant_function.py
py
4,304
python
en
code
1
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.random.choice", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 33, "usage_type": "attribute" }, { "api_name": "random.choice", ...
6118401140
''' ะฃั€ะพะบ 2. ะŸะฐั€ัะธะฝะณ HTML. BeautifulSoup, MongoDB ะะตะพะฑั…ะพะดะธะผะพ ัะพะฑั€ะฐั‚ัŒ ะธะฝั„ะพั€ะผะฐั†ะธัŽ ะพ ะฒะฐะบะฐะฝัะธัั… ะฝะฐ ะฒะฒะพะดะธะผัƒัŽ ะดะพะปะถะฝะพัั‚ัŒ (ะธัะฟะพะปัŒะทัƒะตะผ input) ั ัะฐะนั‚ะพะฒ Superjob(ะฝะตะพะฑัะทะฐั‚ะตะปัŒะฝะพ) ะธ HH(ะพะฑัะทะฐั‚ะตะปัŒะฝะพ). ะŸั€ะธะปะพะถะตะฝะธะต ะดะพะปะถะฝะพ ะฐะฝะฐะปะธะทะธั€ะพะฒะฐั‚ัŒ ะฝะตัะบะพะปัŒะบะพ ัั‚ั€ะฐะฝะธั† ัะฐะนั‚ะฐ (ั‚ะฐะบะถะต ะฒะฒะพะดะธะผ ั‡ะตั€ะตะท input). ะŸะพะปัƒั‡ะธะฒัˆะธะนัั ัะฟะธัะพะบ ะดะพะปะถะตะฝ ัะพะดะตั€ะถะฐั‚ัŒ ะฒ ัะตะฑะต ะผะธะฝะธะผัƒ...
XYI7I/GeekBrains
AI/Method_collecting_Internet_data/Lesson2/lesson2.py
lesson2.py
py
10,254
python
ru
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 28, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 39, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 91, "usage_type": "call" }, { "api_name": "requests.get", "line_num...
27022143594
from pymongo import MongoClient import pprint from urllib.request import urlopen from bs4 import BeautifulSoup class Data_extraction_creation: def __init__(self): self.source="" self.search="" self.search_length=0 def getting_source(self): #client=MongoClient("mongodb://127.0...
Harkishen-Singh/Uber-App-Record-Analysis
creating databasse copy.py
creating databasse copy.py
py
7,444
python
en
code
0
github-code
6
[ { "api_name": "bs4.BeautifulSoup", "line_number": 24, "usage_type": "call" } ]
31356164054
import os import argparse import re import textwrap default_mpi_function_list = [ "int MPI_Init(int *argc, char ***argv)", "int MPI_Finalize(void)", "int MPI_Comm_rank(MPI_Comm comm, int *rank)", "int MPI_Comm_size(MPI_Comm comm, int *size)", "int MPI_Send(const void *buf, int count, MPI_Datatype d...
cea-hpc/selFIe
src/parse_mpi.py
parse_mpi.py
py
9,164
python
en
code
16
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 260, "usage_type": "call" } ]
38815716976
import argparse import asyncio import csv import functools import gc import hashlib import http.client import importlib import io import math import platform import re import socket import statistics import sys import textwrap import time import urllib.parse from typing import Callable, Awaitable, Tuple, Iterable, Opti...
ska-sa/pyconza2020-httpbench
httpbench.py
httpbench.py
py
8,026
python
en
code
4
github-code
6
[ { "api_name": "typing.Callable", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 23, "usage_type": "name" }, { "api_name": "typing.Awaitable", "line_number": 23, "usage_type": "name" }, { "api_name": "typing.Iterable", ...
34565307158
from random import random, randint from collections import deque from math import sin, cos MAXVAL = 200 MAXINSTR = 12 def new_random_code(length): return [ (randint(0, MAXINSTR)) if random() > 0.5 else (randint(MAXINSTR + 1, MAXVAL)) for _ in range(length) ] def point_mutate(code): cod...
gwfellows/trees
grow.py
grow.py
py
2,644
python
en
code
0
github-code
6
[ { "api_name": "random.random", "line_number": 12, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 12, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 18, "usage_type": "call" }, { "api_name": "random.random", "line...
34218646786
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 6 12:31:40 2023 @author: tillappel """ from arc import * from IPython.display import display, HTML import numpy as np import scipy.constants as sc import matplotlib.pyplot as plt def find_largest_c3(n,n_2, l0, j0): largest_c3_d0 = 0 larges...
tappelnano/RydbergPTG
ARC C3_C6 calc.py
ARC C3_C6 calc.py
py
7,589
python
en
code
0
github-code
6
[ { "api_name": "numpy.abs", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 34, "usage_type": "attribute" }, { "api_name": "scipy.constants.epsilon_0", "line_number": 34, "usage_type": "attribute" }, { "api_name": "scipy.constant...
29381018111
import copy import tempfile import yaml import re import os import constellation.vault as vault from constellation.util import ImageReference def read_yaml(filename): with open(filename, "r") as f: dat = yaml.load(f, Loader=yaml.SafeLoader) dat = parse_env_vars(dat) return dat def config_build(...
reside-ic/constellation
constellation/config.py
config.py
py
4,914
python
en
code
0
github-code
6
[ { "api_name": "yaml.load", "line_number": 13, "usage_type": "call" }, { "api_name": "yaml.SafeLoader", "line_number": 13, "usage_type": "attribute" }, { "api_name": "copy.deepcopy", "line_number": 19, "usage_type": "call" }, { "api_name": "constellation.vault.vaul...
37091297903
#!/usr/bin/python from __future__ import print_function import negspy.coordinates as nc import sys import argparse from itertools import tee def pairwise(iterable): "s -> (s0, s1), (s2, s3), (s4, s5), ..." a = iter(iterable) return zip(a, a) def main(): parser = argparse.ArgumentParser(description="...
pkerpedjiev/negspy
scripts/chr_pos_to_genome_pos.py
chr_pos_to_genome_pos.py
py
3,851
python
en
code
9
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 16, "usage_type": "call" }, { "api_name": "negspy.coordinates.get_chrominfo_from_file", "line_number": 55, "usage_type": "call" }, { "api_name": "negspy.coordinates", "line_number": 55, "usage_type": "name" }, { ...
26040958016
from __future__ import annotations import logging from dataclasses import dataclass from pants.backend.python.subsystems.twine import TwineSubsystem from pants.backend.python.target_types import PythonDistribution from pants.backend.python.util_rules.pex import PexRequest, VenvPex, VenvPexProcess from pants.core.goal...
pantsbuild/pants
src/python/pants/backend/python/goals/publish.py
publish.py
py
7,218
python
en
code
2,896
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 25, "usage_type": "call" }, { "api_name": "pants.engine.target.StringSequenceField", "line_number": 28, "usage_type": "name" }, { "api_name": "pants.util.strutil.help_text", "line_number": 30, "usage_type": "call" }, {...
27321032293
""" Kela Purchase data preprocessing Reads Kela Purchase data, applies the preprocessing steps below and writes the result to files split by year. - Convert column names to uppercase - Rename HETU to FINREGISTRYID - Format dates to YYYY-MM-DD - Drop duplicates rows - Fix data types Input files: - For years 1995-2019...
dsgelab/finregistry-data
finregistry_data/registries/kela_purchase.py
kela_purchase.py
py
3,850
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 38, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 45, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 91, "usage_type": "call" }, { "api_name": "finregistry_data.u...
20840870665
""" ั„ะฐะนะป ั ัƒั‚ะธะปะธั‚ะฐะผะธ """ import os from time import perf_counter import numpy as np from sklearn.metrics import ( brier_score_loss, matthews_corrcoef, roc_curve, precision_recall_curve, auc, cohen_kappa_score, classification_report, # confusion_matrix, ) from sklearn.metrics import reca...
Lenin22/ML-Demo
utils.py
utils.py
py
1,071
python
en
code
0
github-code
6
[ { "api_name": "numpy.mean", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.fabs", "line_number": 32, "usage_type": "call" }, { "api_name": "shap.TreeExplainer", "line_number": 39, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", ...
74190845628
# -*- coding: utf-8 -*- __author__ = "ALEX-CHUN-YU (P76064538@mail.ncku.edu.tw)" from word2vec import Word2Vec as w2v import MySQLdb import numpy as np from bert_embedding import BertEmbedding import codecs import re # Entity to Vector class E2V_BERT: # init def __init__(self): self.db = MySQLdb.connect(host = "127...
Alex-CHUN-YU/Recommender-System
main_embedding/e2v_bert.py
e2v_bert.py
py
9,420
python
en
code
0
github-code
6
[ { "api_name": "MySQLdb.connect", "line_number": 13, "usage_type": "call" }, { "api_name": "bert_embedding.BertEmbedding", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 69, "usage_type": "call" }, { "api_name": "numpy.zeros"...
26625473616
"""Pluggable newsletter handling.""" from django import forms from django.utils.translation import ugettext_lazy as _ from livesettings import config_value from satchmo_store.accounts.signals import satchmo_registration from satchmo_store.contact.signals import satchmo_contact_view from satchmo_utils import load_modul...
dokterbob/satchmo
satchmo/apps/satchmo_ext/newsletter/__init__.py
__init__.py
py
2,206
python
en
code
30
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "livesettings.config_value", "line_number": 17, "usage_type": "call" }, { "api_name": "satchmo_utils.load_module", "line_number": 21, "usage_type": "call" }, { "api_name": ...
16370593696
import re import sys from collections import defaultdict def get_num_overlapping_points(lines): counts = defaultdict(lambda: 0) for (x1, y1), (x2, y2) in lines: if x1 == x2: # hortizonal y11, y22 = (y1, y2) if y2 > y1 else (y2, y1) for y in range(y11, y22 + 1): ...
sjsawyer/aoc-2021
q05/q05.py
q05.py
py
1,577
python
en
code
0
github-code
6
[ { "api_name": "collections.defaultdict", "line_number": 7, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 38, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 53, "usage_type": "attribute" } ]
3326207971
import json import logging from datetime import datetime import requests from system import settings from system.constants import MODACTION_WH, USELESS_DETAILS webhook = settings.DISCORD_MODLOG_WEBHOOK bots = ['AutoModerator', 'FloodgatesBot'] log = logging.getLogger('worker.dsws') def make_embed(entry): ts = d...
rchile/mod-toolbox
toolbox/discord_ws.py
discord_ws.py
py
2,511
python
en
code
3
github-code
6
[ { "api_name": "system.settings.DISCORD_MODLOG_WEBHOOK", "line_number": 9, "usage_type": "attribute" }, { "api_name": "system.settings", "line_number": 9, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_n...
41313263665
import appdaemon.plugins.hass.hassapi as hass import time from babel.numbers import format_number, format_decimal class wasserdroger(hass.Hass): def initialize(self): self.listen_state(self.inputhandler, self.args["trigger"], old="off", new="on") self.listen_state(self.inputhandler, self.args["tri...
balk77/Home-AssistantConfig
appdaemon4/conf/apps/wasserdroger.py
wasserdroger.py
py
1,208
python
en
code
3
github-code
6
[ { "api_name": "appdaemon.plugins.hass.hassapi.Hass", "line_number": 6, "usage_type": "attribute" }, { "api_name": "appdaemon.plugins.hass.hassapi", "line_number": 6, "usage_type": "name" }, { "api_name": "time.time", "line_number": 17, "usage_type": "call" }, { "a...
32188046557
# ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ์™„์ „ํƒ์ƒ‰(ํ”ผ๋กœ๋„) # ์ˆœ์—ด์„ ์‚ฌ์šฉํ•ด์„œ ๋˜์ „ ์ˆœ์„œ๋ฅผ ๋ชจ๋‘ ๋งŒ๋“ค์–ด ์ฃผ์—ˆ๋‹ค. # ์ดํ›„ ๋งŒ๋“ค์–ด์ง„ ๋˜์ „ ์ˆœ์„œ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  for๋ฌธ์„ ์‚ฌ์šฉํ•ด์„œ result์˜ ๊ฒฐ๊ณผ๊ฐ€ # ๊ฐ€์žฅ ๋งŽ์€ ๊ฒƒ์œผ๋กœ ๊ฐ’์„ ๋ฐ”๊พธ์–ด ์ฃผ๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜์˜€๋‹ค. from itertools import permutations def solution(k, dungeons): answer = 0 a = [] for i in range(len(dungeons)): a.append(i) permute = permutations(a,len(dungeons)) ...
kcw0331/python-for-coding-test
programmers-coding/ํ”ผ๋กœ๋„.py
ํ”ผ๋กœ๋„.py
py
794
python
ko
code
0
github-code
6
[ { "api_name": "itertools.permutations", "line_number": 11, "usage_type": "call" } ]
29686629055
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.request import Request from rest_framework import status from drf_yasg.utils import swagger_auto_schema from ..models import ( Appeal, ) from ..serializers import ( AppealSerializer, ) class AppealCreate(A...
quvvatullayev/tour
tour/views/appeal.py
appeal.py
py
2,625
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.views.APIView", "line_number": 13, "usage_type": "name" }, { "api_name": "rest_framework.request.Request", "line_number": 15, "usage_type": "name" }, { "api_name": "serializers.AppealSerializer", "line_number": 17, "usage_type": "call" }, ...
43865643259
import os import re import ssl from datetime import datetime, timedelta from typing import Any, Dict, Optional, TypeVar, Union import ciso8601 T = TypeVar("T", str, None) # From https://stackoverflow.com/questions/4628122/how-to-construct-a-timedelta-object-from-a-simple-string # Answer: https://stackoverflow.com/a/...
No767/Kumiko
Bot/Libs/utils/utils.py
utils.py
py
3,388
python
en
code
20
github-code
6
[ { "api_name": "typing.TypeVar", "line_number": 9, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 14, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 23, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_n...
25208776927
from flask import Flask, request, jsonify import os import jwt from flask_cors import CORS, cross_origin from dynamodb import DB application = Flask(__name__) db = DB() CORS(application, headers=['Content-Type', 'Authorization'], supports_credentials=True, expose_headers='Authorization', origins='*') JWT_S...
DiscreetAI/explora-server
server/main.py
main.py
py
2,020
python
en
code
9
github-code
6
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "dynamodb.DB", "line_number": 10, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.request", "line_numb...
13583035400
#!/usr/bin/env python3 import random import base64 from argparse import ArgumentParser from os import urandom from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend from flask import Flask, jsonify, request, send_from_directory app = Fla...
zer0x64/breaking-aes-101
challenges/ctr/ctr2/ctr2.py
ctr2.py
py
2,060
python
en
code
1
github-code
6
[ { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "os.urandom", "line_number": 25, "usage_type": "call" }, { "api_name": "os.urandom", "line_number": 26, "usage_type": "call" }, { "api_name": "base64.b64encode", "line_number...
72179452347
import json with open("test.txt","r",encoding="utf-8") as f: text = f.read() "hallo".replace() # removing unwanted characters from text words = text.replace('\n',' ').replace('.',' ').replace(',',' ').replace(';',' ').replace('!',' ').replace('?',' ').replace(':',' ') # split the text into list of words, drop ...
Zadest/python-5
word_count_dict.py
word_count_dict.py
py
889
python
en
code
0
github-code
6
[ { "api_name": "json.dump", "line_number": 30, "usage_type": "call" }, { "api_name": "json.load", "line_number": 33, "usage_type": "call" } ]
70911318267
# -*- coding: utf-8 -*- import scrapy from time import sleep from random import randint class ImdbSpiderSpider(scrapy.Spider): name = 'imdb_spider' allowed_domains = ['www.imdb.com'] start_urls = ['https://www.imdb.com/search/title/?release_date=2019-01-01,&sort=num_votes,desc'] page_count = 0 de...
ArRosid/Scrapy-Project
scrapy_project/spiders/imdb_spider.py
imdb_spider.py
py
1,669
python
en
code
1
github-code
6
[ { "api_name": "scrapy.Spider", "line_number": 6, "usage_type": "attribute" }, { "api_name": "time.sleep", "line_number": 32, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 32, "usage_type": "call" }, { "api_name": "scrapy.Request", "lin...
44476674074
from abc import ABCMeta, abstractmethod from typing import List import torch import torch.nn as nn import torch.nn.functional as F from app.config.settings import FONT_LABEL_TO_META, NUM_TOP_K from app.domain.entity import BoundingBox, PredictFont from app.domain.preprocess import Preprocessor from PIL.Image import Im...
kishimoto-banana/font-search-api
app/domain/predictor.py
predictor.py
py
2,308
python
en
code
0
github-code
6
[ { "api_name": "torchvision.models.vgg16_bn", "line_number": 15, "usage_type": "call" }, { "api_name": "torchvision.models", "line_number": 15, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 16, "usage_type": "call" }, { "api_name": "torch....
39373093044
import requests __author__ = "Griffith Asare Awuah (@gwuah)" class ogma(): """Language Detection Library For Pythonistas""" def __init__(self, accessKey): self.payload = {'access_key': str(accessKey)} def detect(self, phrase) : self.payload['query'] = str(phrase) try : r = requests.get('http://apilaye...
gwuah/ogma
api.py
api.py
py
1,561
python
en
code
1
github-code
6
[ { "api_name": "requests.get", "line_number": 14, "usage_type": "call" }, { "api_name": "requests.codes", "line_number": 16, "usage_type": "attribute" }, { "api_name": "requests.exceptions", "line_number": 32, "usage_type": "attribute" } ]
71573663549
import requests from bs4 import BeautifulSoup import pandas as pd import numpy as np import regex as re from sqlalchemy import create_engine, String, Float, DATE import pymssql from datetime import date, datetime import matplotlib.pyplot as plt import os from dotenv import load_dotenv from empiricaldist import Cdf impo...
emadam/glassdoor
app.py
app.py
py
9,171
python
en
code
0
github-code
6
[ { "api_name": "numpy.nan", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path", "line_number": 27, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_n...
70945121788
# ์›น์—์„œ ๊ฒ€์ƒ‰์ž๋ฃŒ ์ฝ์€ ํ›„ ์›Œ๋“œ ํด๋ผ์šฐ๋“œ๋กœ ์ถœ๋ ฅ from bs4 import BeautifulSoup import urllib.request from urllib.parse import quote from boto.dynamodb import item #keyword = input('๊ฒ€์ƒ‰์–ด:') keyword = '์žฅ๋งˆ' print(keyword) print(quote(keyword)) # ๋™์•„์ผ๋ณด ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ ์‚ฌ์šฉ target_url = "http://www.donga.com/news/search?query=" + quote(keyword)...
kangmihee/EX_python
py_morpheme/pack/morp3wordcloud.py
morp3wordcloud.py
py
1,969
python
en
code
0
github-code
6
[ { "api_name": "urllib.parse.quote", "line_number": 10, "usage_type": "call" }, { "api_name": "urllib.parse.quote", "line_number": 13, "usage_type": "call" }, { "api_name": "urllib.request.request.urlopen", "line_number": 14, "usage_type": "call" }, { "api_name": "...
20156935479
from flask import request def validate_id(id): # if not found in params if (id is None): raise TypeError("Request params (id) not found") # if description params is empty if not id: raise ValueError("id is empty") # if not integer if not isinstance(id, int): rais...
adriangohjw/cz2006-software-engineering
contracts/point_contracts.py
point_contracts.py
py
1,360
python
en
code
0
github-code
6
[ { "api_name": "flask.request.args.get", "line_number": 42, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 42, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 42, "usage_type": "name" }, { "api_name": "flask.re...
19214467121
from replit import clear print("Welcome to the secret auction program!") def highest_bidder(bid_record): highest = 0 winner = "" for bidder in bid_record: bid_amount = bid_record[bidder] if bid_amount > highest: highest = bid_amount winner = bidder print(f"The winner is {winner} with a bid ...
Iyemizee/Secret_Auction_Project
main.py
main.py
py
678
python
en
code
0
github-code
6
[ { "api_name": "replit.clear", "line_number": 24, "usage_type": "call" } ]