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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73473683913 | #!/usr/bin/env python
# license removed for brevity
import rclpy
from rclpy.node import Node
import cv2
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Imu
from nav_msgs.msg import Odometry
import numpy as np
from filterpy.common import Q_discrete_white_noise
from scipy.spatial.transform import Rotation... | FastSense/metalbot | ros2_ws/src/algorithms/state_estimation/state_estimation_2d/state_estimation_2d/state_estimation_node.py | state_estimation_node.py | py | 12,273 | python | en | code | 2 | github-code | 27 | [
{
"api_name": "rclpy.node.Node",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "geometry_msgs.msg.Twist",
"line_number": 86,
"usage_type": "argument"
},
{
"api_name": "geometry_msgs.msg.Twist",
"line_number": 91,
"usage_type": "argument"
},
{
"api_name"... |
41564976446 | import numpy as np
import argparse
import imutils
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-i","--image",required = True,help = "Path to The Image File")
args= vars(ap.parse_args())
#loading the Image
image = cv2.imread(args["image"])
# GrayScale Conversion of Image
gray = cv2.cvtColor(ima... | Zaid-Shaikh333/Python-Barcode-Detection | barcodedetection.py | barcodedetection.py | py | 1,621 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
... |
23071304548 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 16 18:31:37 2020
@author: baljeetkaur
"""
from mpl_toolkits import mplot3d
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = plt.axes(projection='3d')
def func(x, y):
return (x ** 2 + y ** 2)
x = np.linspace(-12, 12... | 43215-Anuj/SemesterVI_programs | python/surfaceplot.py | surfaceplot.py | py | 681 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.axes",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "mat... |
6884396239 | from flask import Flask, request
import logging
from OSOL_Extremum.computational_core.computational_core import *
from OSOL_Extremum.arithmetics.interval import Interval
def create_app():
app = Flask(__name__)
log = logging.getLogger('werkzeug')
log.disabled = True
app.logger.disabled = True
@a... | wol4aravio/OSOL.Extremum_old | PyTools/OSOL_Extremum/computational_core/tools.py | tools.py | py | 1,244 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "flask.request",... |
20897647360 | import mysql.connector
from faker import Faker
numero_tuplas = 10
# Conexión a la base de datos
connection = mysql.connector.connect(
host="localhost",
user="riggio",
password="123456",
database="Taquilla"
)
# Crear un cursor para ejecutar consultas
cursor = connection.cursor()
# Instanciar el gene... | CarlosRiggio/Sistemas-de-Informacion | poblar_tablas/poblar_cliente.py | poblar_cliente.py | py | 833 | python | es | code | 1 | github-code | 2 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 8,
"usage_type": "name"
},
{
"api... |
17196516623 | import os
from numpy import *
import webbrowser
from icon_lib import icon_get
#inp
from inp import inp_update_token_value
from inp import inp_load_file
from inp import inp_search_token_value
import i18n
_ = i18n.language.gettext
#epitaxy
from epitaxy import epitaxy_get_layers
from epitaxy import epitaxy_get_dos_file... | roderickmackenzie/gpvdm_gui | gui/doping.py | doping.py | py | 7,167 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "i18n.language",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.use",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "QWidgetSavePos.QWidgetSavePos",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "epita... |
24131315280 | '''
Average RTM settlement price variation
based on input frequency: HOUR, DAY, MONTH (data from 2019, 2020, 2022)
'''
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from ercot_prices import ercot_dam_prices, ercot_rtm_prices
df = pd.read_csv('data/ERCOT/post_processing/rtm_avg.csv')
# All s... | wrecktenwald/ORI_390Q8_Team_Project | visualization.py | visualization.py | py | 1,195 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "mat... |
13413881746 | import logging
import os
import markdown
LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(logging.StreamHandler())
LOGGER.setLevel("DEBUG")
SOURCE_FOLDER = "posts_md"
DEST_FOLDER = "content/blog"
def md_to_gatsby(source_folder=SOURCE_FOLDER, dest_folder=DEST_FOLDER):
all_posts = os.listdir(source_folder... | contraslash/blog_legacy | scripts/md_posts_to_gatsby_md.py | md_posts_to_gatsby_md.py | py | 1,062 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.StreamHandler",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "markdown.Markdown",
... |
41206130630 | import numpy as np
import matplotlib.pyplot as plt
#load the path to the first condition to be compared
modeldir1 = "results/RyR/"
modelname1 = "RSDr000_avg/"
path1 = modeldir1 + modelname1
#load the path to the second condition to be compared
modeldir2 = "results/RyR/"
modelname2 = "RSDr350_avg/"
path2 = modeldir2 +... | JerasFrey/Presynapse_MCell_Model | pythonplotting.py | pythonplotting.py | py | 4,976 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "numpy.genfromtxt",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.genfromtxt",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.genfromtxt",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.genfromtxt",... |
71550245166 | import requests_toolbelt
import responses
import d1_common.multipart
import d1_client.session
import d1_test.d1_test_case
import d1_test.mock_api.post
class TestMultipart(d1_test.d1_test_case.D1TestCase):
def _post_fields(self, fields_dict):
d1_test.mock_api.post.add_callback(d1_test.d1_test_case.MOCK_... | DataONEorg/d1_python | lib_common/src/d1_common/tests/test_multipart.py | test_multipart.py | py | 1,050 | python | en | code | 14 | github-code | 2 | [
{
"api_name": "d1_test.d1_test_case.d1_test_case",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "d1_test.d1_test_case",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "d1_test.d1_test_case.mock_api.post.add_callback",
"line_number": 14,
"usage_t... |
38266164889 | import logging
import os
import sys
import tempfile
import signal
import warnings
from luigi import lock
from luigi import parameter
from luigi import rpc
from luigi import scheduler
from luigi import task
from luigi import worker
from luigi.execution_summary import LuigiRunResult
from luigi.cmdline_parser import Cmdl... | spotify/luigi | luigi/interface.py | interface.py | py | 8,134 | python | en | code | 16,912 | github-code | 2 | [
{
"api_name": "luigi.task.Config",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "luigi.task",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "luigi.parameter.BoolParameter",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "luigi... |
5468859149 | # food program
import random
from docx import Document
from datetime import date
import ast
import re
"""
This is a food menu program designed to create cooking menus, you can store recipes, add ingredients and more!
"""
class MenuMaker:
def import_dinner_dict(self):
'''
Input : NA
O... | yothebob/menu-food-application | menumaker.py | menumaker.py | py | 7,518 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "ast.literal_eval",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "ast.literal_eval",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",... |
2313908705 | import sys
import os
import sqlite3
from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.uic import loadUiType
FORM_CLASS,_ = loadUiType(os.path.join(os.path.dirname("__file__"), "ui/liste.ui"))
class Listes(QtWidgets.QMainWindow, FORM_CLASS):
def __init__(self):
super().__init__()
self.setupUi... | OBAMARIE13/enrolement_pyqt | systeme_enrolement/enrolement/widgets/liste_widgets.py | liste_widgets.py | py | 1,618 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "PyQt5.uic.loadUiType",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"li... |
775949622 | from argparse import ArgumentParser, Namespace
parser = ArgumentParser()
##Positional arguments
parser.add_argument('a',type=int, help='The base value.')
parser.add_argument('b', type=int, help = 'The exponent value.')
##Optional arguments
parser.add_argument('-v','--verbose',action='count',
hel... | PurvanshBarodia/Argparse | arg.py | arg.py | py | 654 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "argparse.Namespace",
"line_number": 14,
"usage_type": "name"
}
] |
13199010264 | #!/usr/bin/env python
import argparse
import copy
import logging
import multiprocessing
from pathlib import Path
import sys
from joblib import delayed, Parallel
import matplotlib
import numpy as np
import pandas as pd
import torch
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
f... | linclab/valpaca | analysis/allen_analysis.py | allen_analysis.py | py | 38,320 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "matplotlib.use",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.path.extend",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
... |
2504457715 | import functools
import logging
from itertools import chain
from time import time
from ..business_logic.exceptions import ValidationError
from .utils.misc import Default, humanize_camel_case, upper_first
module_logger = logging.getLogger(__name__)
validation_logger = logging.getLogger(__name__ + '.validation')
clas... | LeapChain/thenewboston-node | thenewboston_node/core/logging.py | logging.py | py | 5,495 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.Filter",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "logging.WARNIN... |
12816957328 | from flask import Flask
from .routes import main
from .extensions import db
from .models import Country, City
from settings import Config
def create_app():
app = Flask(__name__)
app.config.from_object(Config)
app.register_blueprint(main)
db.init_app(app)
return app
app = create_app()
def add... | ariefendi992/flask-htmx | app/__init__.py | __init__.py | py | 1,203 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "settings.Config",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "routes.main",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "extensions.db.init_app... |
29737307584 | import requests
import json
SLACK_TOKEN = 'xoxp-872305152423-858981884739-1194141524086-62b15ef1e64d58023d4c20153b5892ed'
def channel(channel):
return requests.post('https://api.slack.com/methods/conversations.create', {
'token': SLACK_TOKEN,
'channel': channel,
'is_private': False,
}).j... | AnithaRamachandranR/airflow | airflow/dags/createslack.py | createslack.py | py | 352 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "requests.post",
"line_number": 5,
"usage_type": "call"
}
] |
35378165080 | import codecs
import json
from base64 import b64decode, b64encode
from typing import Any, Callable, get_origin
from urllib.parse import quote, unquote
import attrs
from attrs import define, field, fields
@define(kw_only=True, hash=True)
class Table:
prefix: str
row_model: Any # model representing row in dat... | macabrus/or-lab | lab/utils.py | utils.py | py | 5,338 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "typing.Any",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "attrs.field",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "attrs.define",
"line_numbe... |
32918189456 | from importlib.metadata import entry_points
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="emus",
version="1.0.0",
author="Gabe DuBose",
author_email="gabe.dubose.sci@gmail.com",
description="A package for statistically evaluating muta... | gabe-dubose/emus | setup.py | setup.py | py | 838 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "setuptools.setup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 16,
"usage_type": "call"
}
] |
34550134445 | from typing import Optional
import nest_asyncio
import asyncio
import gc
import os
from transformers import T5TokenizerFast
import numpy as np
from torch.utils.data import TensorDataset
class DataCollator:
def __init__(self, **kwargs):
self.tokenizer: T5TokenizerFast = kwargs['tokenizer']
self.in... | b-analyst/amira-tpu | app/collator.py | collator.py | py | 2,978 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "transformers.T5TokenizerFast",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "ty... |
2254952056 | from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
#url(r'^api/', include(router.urls)),
# Examples:
url(r... | renzoster/sism | sism/urls.py | urls.py | py | 1,648 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "django.contrib.admin.autodiscover",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.patterns",
"line_number": 8,
"usage_type": "call"
},
{
"api... |
5936244071 | from typing import List
from collections import defaultdict
class Solution:
def restore_from_adjacent_pairs(self, adjacent_pairs: List[List[int]]) -> List[int]:
if not self._check_constraints(adjacent_pairs):
raise ValueError("Constraints violated")
adjacency_list = defaultdict(list)
... | SanjarNormuradov/LeetCode | arrays/03_restore_from_pairs/restore_from_pairs.py | restore_from_pairs.py | py | 1,387 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.List",
"lin... |
5947512308 | import os
from google.cloud import translate
from dotenv import load_dotenv
load_dotenv('private/.env')
PROJECT_ID = os.getenv('PROJECT_ID')
def traducir(texto):
"""Traduce un texto a un idioma dado.
"""
cliente = translate.TranslationServiceClient()
parent = f"projects/{PROJECT_ID}/locations/global... | LeninElio/projects | traductor_google/app_test.py | app_test.py | py | 728 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "google.cloud.translate.TranslationServiceClient",
"line_number": 13,
"usage_type": "call"
},
{
"api_na... |
72687464695 | # get information (geometry, label) about the labelled buildings
import csv
import json
import configparser
from os.path import dirname, abspath, join
from osgeo import ogr
from solml import geo
config = configparser.ConfigParser()
config.read(join(dirname(abspath(__file__)), '../config.ini'))
building_info = conf... | opensolarmap/solml | solml/train/get_info.py | get_info.py | py | 2,635 | python | en | code | 48 | github-code | 22 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.abspat... |
21933130690 | from .minicap import *
from .minitouch import *
from .services import stfServices
from .adbkit import *
from . import db
from .ConnectDevice import ConnectScreenCap
from eventlet.queue import Queue
import time
import eventlet
# from Queuee import Queue as q
eventlet.monkey_patch()
class supportManager():
def __init... | xuzhaogit/mtp | app/testcase/manager.py | manager.py | py | 5,883 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "eventlet.monkey_patch",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "eventlet.queue.Queue",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "eventlet.queue.Queue",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "event... |
18973391165 | # URL Management Imports
from django.shortcuts import render, redirect
# Site Messages Import
from django.contrib import messages
# Model Imports
from .models import Change
from ..login_app.models import User
# Advanced Django Queries
from django.db.models import Q
# Date Management
from datetime import date, datetime
... | andrewixl/oepcm | apps/main/views.py | views.py | py | 13,848 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "django.contrib.messages.warning",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 45,
"usage_type": "call"
},
{
... |
42683747626 | from django.conf import settings
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.db.models import Count
# Create your views here.
from django.views import View
from apps.postoperate.models import Post, Category, Tags, Comments
from apps.userauth.models import User
from utils.local... | dearMrYang/darknight | apps/dataapi/views.py | views.py | py | 10,050 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "django.views.View",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.LIMIT",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 35,
"usage_type": "name"
},
{
"api_name":... |
32842915245 | #Python Implementation of Assignment 5
#Alec Kriesel
#010852983
#12/8/22
#Programming Paradigms, Dr. Lora Streeter
#game.py contains all the files translated from javascript from assignment7
import pygame
from pygame.locals import*
from time import sleep
class Sprite():
def __init__(self, x1, y1, w1, h1, image_url):... | alecjk/Paradigms-Project | game.py | game.py | py | 10,818 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "pygame.image.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pygame.image",
... |
12507182302 | # In this example, the program switches between 3 different scenes.
import importlib, inspect, scene, MultiScene
# assumes module name == scene name as in Scene0.Scene0
def find_scenes(): # Scene0.Scene0, Scene1.Scene1, Scene2.Scene2...
for i in xrange(999):
scene_name = 'Scene{}'.format(i)
try:
... | Mr-Coxall/MultisceneTest | SceneSwitcher.py | SceneSwitcher.py | py | 1,159 | python | en | code | 2 | github-code | 22 | [
{
"api_name": "importlib.import_module",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "inspect.getmembers",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "inspect.isclass",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "Multi... |
70077050287 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
from torch import select
# for using ros in the python3
sys.path.append("/opt/ros/kinetic/lib/python2.7/dist-packages")
import rospy
import rospkg
from std_msgs.msg import Float64MultiAr... | ma53ma/primitive_shapes_steppability | src/physical/runner.py | runner.py | py | 14,878 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "sys.path.append",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "sys.path.remove",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_nu... |
72054375095 | from __future__ import absolute_import
import os
import psutil
from datetime import datetime
from tracer.resources.processes import Processes
from tracer.resources.system import System
from tracer.resources.rules import Rules
from tracer.resources.applications import Applications
from tracer.version import __version__... | FrostyX/tracer | tracer/controllers/resource.py | resource.py | py | 2,490 | python | en | code | 77 | github-code | 22 | [
{
"api_name": "tracer.views.resource.processes.ProcessesView",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "tracer.resources.processes.Processes.all",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "tracer.resources.processes.Processes",
"line_number": ... |
4056364380 | # -*- coding: utf-8 -*-
"""
step02_button_click1.py
로케이터(locator) : By 클래스에서 제공되는 요소(element) 찾기 기능
<작업순서>
1. naver page 이동
2. login 버튼 클릭
3. 페이지 이동(뒤로, 앞으로)
"""
from selenium import webdriver # driver
from selenium.webdriver.common.by import By # 로케이터(locator)
import time # 화면 일시 정지
# 1. driver 객체 생성
path ... | junehh98/Deep_Learning | chapter07_Selenium_ImageCrawling/lecture/step02_button_click1.py | step02_button_click1.py | py | 1,531 | python | ko | code | 1 | github-code | 22 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.CLASS_NAME",
"line_number": 30,
"usage_type": "attribute"
... |
10413348085 | from collections import deque
n, m = map(int, input().split())
limit = m//2
q = deque([(n,1)])
temp = []
minCnt = float("inf")
flag = 0
while q:
values,cnt = q.popleft()
if values == m:
minCnt = min(minCnt, cnt)
flag = 1
continue
double,plus= values * 2, int(str(values) + ... | lbg030/Backjoon | 16953.py | 16953.py | py | 479 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "collections.deque",
"line_number": 5,
"usage_type": "call"
}
] |
71986942136 | # *** Praise the Lord God ***
# Import libraries
from torch.utils.data import Dataset as _Dataset
from typing import Union as _Union
import numpy as _np
import torch as _t
class DataConverter(_Dataset):
def __init__(self,
x: any,
y: _Union[_np.ndarray, None] = None,
... | denis-spe/torchextension | torchextension/data_converter.py | data_converter.py | py | 2,573 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.tensor... |
23189777558 | import decimal
from typing import Union, List, Dict
AvroMessage = Union[
None, # 'null' Avro type
str, # 'string' and 'enum'
float, # 'float' and 'double'
int, # 'int' and 'long'
decimal.Decimal, # 'fixed'
bool, # 'boolean'
bytes, # 'bytes'
List, # 'array'
Dict, # 'map' and... | fastavro/fastavro | fastavro/types.py | types.py | py | 419 | python | en | code | 595 | github-code | 22 | [
{
"api_name": "typing.Union",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "decimal.Decimal",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_n... |
30269228089 | import pytest
from unittest.mock import patch
from django.urls import reverse
from django_webtest import DjangoTestApp
from vitrina.viisp.xml_utils import create_signed_authentication_request_xml, \
create_signed_authentication_data_request_xml, _parse_ticket_id, _parse_user_data
from base64 import b64decode
@pytest.f... | atviriduomenys/katalogas | tests/viisp/test_xml.py | test_xml.py | py | 1,811 | python | en | code | 15 | github-code | 22 | [
{
"api_name": "base64.b64decode",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django_webtest.DjangoTestApp",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "vitr... |
74249932215 | from PySide2.QtWidgets import QWidget, QGraphicsScene, QMessageBox, QDialog
from PySide2.QtCore import Qt, Signal
from PySide2.QtGui import QPixmap
from junkbox.ui.assetpreviewwidget import Ui_assetPreviewWidget
from junkbox.view.thumbnaildialog import ThumbnailDialog
import junkbox.utils.file as fileUtils
import jun... | digitalgraphics/junkbox | python/junkbox/component/assetpreviewwidget.py | assetpreviewwidget.py | py | 4,412 | python | en | code | 2 | github-code | 22 | [
{
"api_name": "PySide2.QtWidgets.QWidget",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "PySide2.QtCore.Signal",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "PySide2.QtGui.QPixmap",
"line_number": 19,
"usage_type": "argument"
},
{
"api_nam... |
42387998208 | import json
import pandas as pd
def main():
id=-1
Prediction_strings=[]
file_names=[]
json_root='/opt/ml/detection/baseline/efficientdet-pytorch/result.json'
with open(json_root,'r') as f:
results=json.load(f)
Prediction_string = ''
for i, result in enumerate(results):
... | boostcampaitech3/level2-object-detection-level2-cv-05 | utils/EfficientDet_utils/submit.py | submit.py | py | 2,098 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "json.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 41,
"usage_type": "call"
}
] |
246318323 | # -*- coding: utf-8 -*-
import re
from django.core.cache import cache
from django.contrib.auth.models import Group
from django.contrib.auth import get_user_model
from django.db import transaction
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from guardian.shortcuts import as... | Q-skyworker/crc-sops | gcloud/core/utils.py | utils.py | py | 15,398 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "gcloud.conf.settings.DEFAULT_CACHE_TIME_FOR_CC",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "gcloud.conf.settings",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "django.core.cache.cache.get",
"line_number": 38,
"usage_type": "... |
24434763354 | """Evaluate MadGraph standalone matrix element modules."""
from collections import defaultdict
from collections.abc import Mapping
from dataclasses import dataclass, field
from numbers import Integral
from types import ModuleType
import numpy
PARAM_CARD = "param_card.dat"
# strong coupling constant matched to nn23lo... | Rupt/paper-hunting-vampires | liv/element.py | element.py | py | 6,614 | python | en | code | 2 | github-code | 22 | [
{
"api_name": "types.ModuleType",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "collections.abc.Mapping",
"line_number": 53,
"usage_type": "name"
},
{
"api_name": "dataclasses.field",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "collection... |
25334447220 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Created on Feb 26 15:15:37 2018
@author: Gabriel Oliveira, Mohammadreza Zolfaghari
"""
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
from fnmatch import fnmatch
import sys
import os
import matplotlib.image as mpimg
import scipy
# Make sure that... | mzolfaghari/chained-multistream-networks | body_part_segmentation/create_pose_maps.py | create_pose_maps.py | py | 8,923 | python | en | code | 27 | github-code | 22 | [
{
"api_name": "sys.path.insert",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "caffe.set_mode_gpu",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "caffe.set_device",
... |
21066856545 | #!/usr/bin/env python3
# math imports
import math
from math import degrees, inf, pi, radians, sin, cos
import matplotlib.pyplot as plt
import numpy as np
from numpy import linspace, meshgrid
from numpy.lib.function_base import select
# import ROS
import rclpy
from rclpy.node import Node
from geometry_msgs.msg impor... | arturtcoelho/ski_deliverer | src/ski_controller/ski_controller/ski.py | ski.py | py | 5,748 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "numpy.linspace",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.meshgrid",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_nu... |
25605093580 | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 29 11:56:49 2020
#Total Line count 212
@author: Dev Bhardwaj
"""
import mysql.connector as sql
import functions,os
from random import randrange
from datetime import date,datetime
mycon=sql.connect(user='root',passwd='root',database='school')
cursor=mycon.curso... | Dev32Bhardwaj/Hangman | project_suggestion.py | project_suggestion.py | py | 6,017 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "mysql.connector.connect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "mysql.connector",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetim... |
9735710275 | import random
from itertools import combinations
import holdem_calc
import math
################################################################################################
def spremeni_zapis_kart():
"""Vrne zapis kart primeren za računanje verjetnosti s holdem_calc."""
dek = Deck()
slovar_kart = {}
... | timotejstibilj/POKER | model.py | model.py | py | 34,953 | python | sl | code | 0 | github-code | 22 | [
{
"api_name": "random.shuffle",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "holdem_calc.calculate",
"line_number": 121,
"usage_type": "call"
},
{
"api_name": "itertools.combinations",
"line_number": 139,
"usage_type": "call"
},
{
"api_name": "random.... |
2034146123 | import bpy
import time
from . import (
settings,
utils
)
from .utils import skewedGauss
from .randomize_texture import randomizeTexture
from bpy_extras import object_utils
from mathutils import (
Vector
)
from bpy.props import (
BoolProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
... | Bforartists/Bforartists | scripts/addons/add_mesh_extra_objects/add_mesh_rocks/rockgen.py | rockgen.py | py | 43,377 | python | en | code | 492 | github-code | 22 | [
{
"api_name": "numpy.random",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "numpy.random",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "bpy.data.meshes.new",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "bpy.data",
"line_nu... |
19557123457 | from collections import OrderedDict
from datetime import datetime
from fixtures import * # noqa: F401,F403
from hashlib import sha256
from pyln.client import RpcError, Millisatoshi
from pyln.proto import Invoice
from utils import (
only_one, sync_blockheight, TIMEOUT, wait_for, TEST_NETWORK,
expected_peer_feat... | ElementsProject/lightning | tests/test_plugin.py | test_plugin.py | py | 183,381 | python | en | code | 2,670 | github-code | 22 | [
{
"api_name": "os.path.join",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number":... |
72474034107 | from PyQt6 import QtCore, QtGui, QtWidgets
import joblib
from graphviz import Source
from sqlalchemy import text
from sqlalchemy import create_engine
import sklearn
import numpy as np
import pandas as pd
from tkinter import filedialog
engine = create_engine('postgresql+psycopg2://postgres:admin@localhost/real_time_sys... | AlexSmirno/Learning | 6 Семестр/Системы реального времени/app.py | app.py | py | 6,525 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "joblib.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "joblib.load",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "joblib.load",
"l... |
2317444632 | from django.db import models
from django.contrib.auth.models import User
from datetime import datetime, timedelta
class Todo(models.Model):
task = models.CharField(max_length = 256)
completed = models.BooleanField(default = False, blank = True)
user = models.ForeignKey(User, on_delete = models.CASCADE)
... | Blank333/simple-api | core/api/models.py | models.py | py | 567 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "... |
24707721459 | import json
client_info = {}
def load():
global client_info
with open('client_info.json', 'r', encoding='utf-8') as json_file:
client_info = json.load(json_file)
def save():
with open('client_info.json', 'w', encoding='utf-8') as outfile:
json.dump(client_info, outfile)
if __name__ == '... | PYninjaAlex/finance_bank | main.py | main.py | py | 718 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 12,
"usage_type": "call"
}
] |
35738873455 | # -*- coding:utf-8 -*-
from openpyxl import load_workbook
from openpyxl import Workbook
class Load:
""" 从excel读取数据"""
def __init__(self, filename):
self.wb = load_workbook(filename)
self.ws = self.wb["Sheet01"]
self.rowList = []
def read(self):
for row in self.ws.iter_... | zhoujinl/SMWanStock | SMWanStock/load.py | load.py | py | 907 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 11,
"usage_type": "call"
}
] |
13042937264 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('discipulado', '0005_auto_20181206_1651'),
]
operations = [
migrations.RemoveField(
model_name='discipulador',
... | mfsalas/TesisIglesia | apps/discipulado/migrations/0006_auto_20181206_1656.py | 0006_auto_20181206_1656.py | py | 589 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.RemoveField",
"line_number": 14,
"usage_type": "call"
},
... |
40483404044 | from lxml import etree
import os
class Spells():
def __init__(self,interface):
self.interface = interface
self.list_spell = {}
def update_spells(self,spells_data):
self.interface.ongletsSorts.removes_spells()
for spell in spells_data[:len(spells_data)-1]:
... | Azzary/LeafMITM | character/spell.py | spell.py | py | 950 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line... |
74945258427 | """total de produtos já vendidos
Revision ID: fc173f122eae
Revises: 3d6e446c3a38
Create Date: 2021-08-09 17:04:11.989797
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fc173f122eae'
down_revision = '3d6e446c3a38'
branch_labels = None
depends_on = None
def u... | daniel-carlos/prog-web-backend | migrations/versions/fc173f122eae_total_de_produtos_já_vendidos.py | fc173f122eae_total_de_produtos_já_vendidos.py | py | 669 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "alembic.op.add_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer... |
10353311180 | from setuptools import setup, find_packages
version = '1.0'
setup(name='warmtuna',
version=version,
description="mysql warm backup plugin for holland",
long_description="""\
""",
classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='Andre... | abg/warmtuna | setup.py | setup.py | py | 745 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "setuptools.setup",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 16,
"usage_type": "call"
}
] |
12060339447 | from dataclasses import dataclass
@dataclass
class WidgetPage:
data: dict
id: int = 0
icon: str = ''
position: int = 0
def __post_init__(self): #NOSONAR
self.id = self.data['id']
self.icon = self.data['icon']
self.position = self.data['position']
def toDict(self) -> dict:
return {
'id' : sel... | skkostas/ProjectAlice | core/webui/model/WidgetPage.py | WidgetPage.py | py | 385 | python | en | code | null | github-code | 6 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 4,
"usage_type": "name"
}
] |
14827582728 | from __future__ import absolute_import, division, with_statement
from tornado.test.util import unittest
from pilbox.errors import *
class ErrorsTest(unittest.TestCase):
def test_unique_error_codes(self):
errors = [SignatureError, ClientError, HostError, BackgroundError,
DimensionsErro... | agschwender/pilbox | pilbox/test/errors_test.py | errors_test.py | py | 961 | python | en | code | 611 | github-code | 6 | [
{
"api_name": "tornado.test.util.unittest.TestCase",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "tornado.test.util.unittest",
"line_number": 8,
"usage_type": "name"
}
] |
72964995389 | from urlparse import urlparse
import urllib2
from bs4 import BeautifulSoup
import mmap
#html ='''
# <div id="results"><a class="title" href="http://www.breitbart.com/big-government/2016/11/16/5-most-absurd-ways-the-left-has-responded-to-the-2016-election/">5 Most Absurd Ways the Left Has Responded to the 2016 Elec... | jackbandy/hw6-election | NewsLookUp_article_url/nlu_crawler.py | nlu_crawler.py | py | 2,964 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "urllib2.Request",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "urllib2.urlopen",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "mmap.mmap",
"li... |
7266046645 | import logging
log = logging.getLogger(__name__)
from spacq.interface.resources import Resource
from spacq.tool.box import Synchronized
from ..abstract_device import AbstractDevice
from ..tools import quantity_wrapped
"""
Sample ABC1234 Device
"""
class ABC1234(AbstractDevice):
"""
Interface for the Sample ABC12... | 0/SpanishAcquisition | spacq/devices/sample/abc1234.py | abc1234.py | py | 1,602 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "abstract_device.AbstractDevice",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "abstract_device.AbstractDevice._setup",
"line_number": 23,
"usage_type": "call"
},
{
... |
17606697165 | from fastapi.testclient import TestClient
from queries.furniture import FurnitureRepository
from models.models import FurnitureIn, FurnitureOut
from main import app
import json
from authenticator import authenticator
from typing import List
client = TestClient(app=app)
def get_current_account_data_mock():
retur... | hannaerickson/ikeya | design_service/tests/test_furniture_routes.py | test_furniture_routes.py | py | 1,617 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fastapi.testclient.TestClient",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "main.app",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "models.models.FurnitureIn",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "mode... |
71528618428 | import cv2
import numpy as np
from PIL import ImageFont, ImageDraw, Image
# Create a VideoCapture object
cap = cv2.VideoCapture('../input_video/fauci_5s.mp4')
# Check if camera opened successfully
if (cap.isOpened() == False):
print("Unable to read camera feed")
# Default resolutions of the frame are obtained... | debbypark99/youhear | display/display.py | display.py | py | 2,084 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.VideoWriter",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "cv2.VideoWriter_fourcc",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont.... |
28097533075 | import csv, string
import numpy as np
from nltk.tokenize.treebank import TreebankWordDetokenizer
from nltk.tokenize import word_tokenize
from nltk.corpus import cmudict
START_WORD = 'xstart'
DELIM = '\n'
N_EMBEDDINGS = 50 # must be 25, 50, 100, or 200
N_HIDDEN = 100
BATCH_SIZE = 32
### functions for parsing data ##... | orioncleaver/Haiku-Generator | utils.py | utils.py | py | 4,428 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.random.uniform",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
... |
33783232627 | import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
raw = pd.read_csv('http://hilpisch.com/pyalgo_eikon_eod_data.csv', index_col=0, parse_dates=True)
raw.info()
data = pd.DataFrame(raw['EUR='])
data.rename(columns={'EUR=': 'price'}, inplace=True)
data['SMA42'] = data['price... | tkaden/AlgoTrading | sma.py | sma.py | py | 2,050 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib... |
74059036349 | import wx
app = wx.App() # 实例化主循环
win = wx.Frame(None, title='first', size=(410, 335)) # 实例化一个窗口组件
panel = wx.Panel(win)
bt1 = wx.Button(panel, label='open') # 实例化一个按钮
bt2 = wx.Button(panel, label='save') # 实例化一个按钮
finename = wx.TextCtrl(panel) # 实例化一个窗口组件
content = wx.TextCtrl(panel, style=wx.TE_MULTILINE | wx.... | HarveyWang81/PythonScript | xuegod/20160921.py | 20160921.py | py | 954 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "wx.App",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "wx.Frame",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "wx.Panel",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "wx.Button",
"line_number": 6,
"usage_ty... |
32171056566 | from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import View
from django.views.decorators.http import require_POST
from products.models import Item
from .cart import Cart
from .forms import AddProductCartForm
from django.views.generic.edit import FormView
@require_POST
def add... | Alisjj/Shop-From-Home | cart/views.py | views.py | py | 1,294 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cart.Cart",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.get_object_or_404",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "products.models.Item",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": ... |
23565326873 |
# -*- coding: utf-8 -*-
import struct as st
import numpy as np
filename = {'images' : 'train-images.idx3-ubyte' ,'labels' : 'train-labels.idx1-ubyte'}
train_imagesfile = open(filename['images'],'rb')
train_imagesfile.seek(0)
magic = st.unpack('>4B',train_imagesfile.read(4))
nImg = st.unpack('>I',train_imag... | n860404/Machine_learning_2019 | HW2/test.py | test.py | py | 773 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "struct.unpack",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "struct.unpack",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "struct.unpack",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "struct.unpack",
"line_n... |
463149623 | from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication,QMainWindow,QMessageBox,QProgressBar
from PyQt5.QtCore import QThread,pyqtSignal
import os
import matplotlib.pyplot as plt
import cv2
import numpy as np
from PIL import Image
from mpl_toolkits.basemap import Basemap
import pand... | ChristeenTJose/COVID-19 | Model COVID-19 IND/Model COVID-19 IND.py | Model COVID-19 IND.py | py | 8,700 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "shutil.rmtree",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_num... |
25146231803 | import xarray as xr
import numpy as np
phis = np.loadtxt("input_params.txt", dtype=str, skiprows=1, max_rows=1)
wphis = np.loadtxt("nphis.txt",skiprows=1, max_rows=1)
wmus = np.loadtxt("numus.txt",skiprows=1, max_rows=1)
Dphi = [xr.open_mfdataset("job_*_{}/mc.rad.spc.nc".format(j),concat_dim="mu") for j in phis]
D = x... | MujkanovicMax/master-thesis | radiances/mergerads_old.py | mergerads_old.py | py | 778 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.loadtxt",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "xarray.open_mfdataset",
"l... |
12900563686 | from sqlalchemy.sql.schema import (
Column,
ForeignKey,
PrimaryKeyConstraint,
Sequence,
)
from sqlalchemy.sql.sqltypes import (
DateTime,
Integer,
)
from sqlalchemy.sql.functions import func
from ozz_backend.database.entity.base import Base
class MaterialBridgeTB(Base):
__tablename__ = 'm... | honeybeeveloper/plat_back | ozz_backend/database/entity/material_bridge_tb.py | material_bridge_tb.py | py | 1,175 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "ozz_backend.database.entity.base.Base",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.sql.schema.Column",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.sql.sqltypes.Integer",
"line_number": 19,
"usage_type": "ar... |
30628887586 | #!/usr/bin/env python3
import cmath
from openpyxl import Workbook
import approxDeriv, relError, absError, DmacEp
def EvaluateApprox():
#initalize
i = 0
h = 1
aList = []
rList = []
apList = []
hList = []
ab = 1
rel = 1
#We are creating a while loop that will reduce h by half e... | Alekoll/Math4610 | routines/testApprox.py | testApprox.py | py | 1,375 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "approxDeriv.approxDeriv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "absError.absError",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "relError.relError",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "openpyxl.... |
5266203762 | from django.db import models
from django.contrib.auth.models import User
from django.db.models.aggregates import Max
from django.db.models.deletion import CASCADE
from django.core.validators import EMPTY_VALUES, MaxValueValidator, MinValueValidator
from django.conf import settings
#from django.db.models.fields import U... | nomanajmal009/Automatic-Resume-Ranking | AutomaticResumeRanking/main/models.py | models.py | py | 2,085 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.db.models.FileField",
"line_number": 15,
"usage_type": "call"
},
{
"api_name"... |
27441199862 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from torch_geometric.nn import GCNConv
from torch_geometric.datasets import Planetoid
from torch_geometric.utils import to_networkx
import networkx as nx
import os
os.environ['KMP_DUPLICATE_LIB_OK'] = 'T... | wenzhongfa/GNN-Learning-notes | GCN_Classification.py | GCN_Classification.py | py | 6,258 | python | zh | code | 1 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch_geometric.datasets.Planetoid",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch_geometric.utils.to_networkx",
"line_number": 49,
"usage_type": "call"
},
{
... |
38584255930 | import socket
import select
import time
import queue
import json
class ChatServer:
def __init__(self, host='localhost', port=8998):
self.outputs = []
self.message_queues = {}
self.address = (host, str(port))
self.server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
... | starsD/pyChatroom | server.py | server.py | py | 6,727 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "socket.socket",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "socket.SOL_... |
28193154457 | from pyspark.ml import Pipeline, Transformer
from pyspark.ml.feature import Tokenizer, CountVectorizer, StringIndexer,StopWordsRemover
from pyspark.sql import DataFrame
from pyspark.sql.types import *
from pyspark.sql import DataFrame
from pyspark.sql.functions import col,udf,struct
from pyspark.sql import *
class Se... | Nagendra1995/Bigdata | Project 2/submission.py | submission.py | py | 4,987 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pyspark.ml.Transformer",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pyspark.sql.DataFrame",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "pyspark.sql.DataFrame.unionAll",
"line_number": 27,
"usage_type": "attribute"
},
{
"... |
20960193624 | import pygame
import random
from pygame import mixer
import sys
sys.path.append('./phase-3-final-westworld/lib')
from classes.player import Player
from classes.ball import Ball
from classes.score import Score
from classes.highscore import Highscore
# ----------Initialize screen--------- #
SCREEN_WIDTH = 1200
SCREEN_... | clayruh/phase-3-final-westworld | lib/westworld.py | westworld.py | py | 6,349 | 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": "pygame.init",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.image.load",
"line... |
20973016846 | from selenium import webdriver
import pytest
'''to run tests in parallel pass in '-n=x' param, ie for 2 tests to run in parallel, use command:
pytest -s -v -n=2'''
@pytest.fixture()
def setup(browser):
if browser == 'chromeheadless':
from selenium.webdriver.chrome.options import Options
chromeopti... | DeeScully/hybrid_frmwk_nopcommerce | test_cases/conftest.py | conftest.py | py | 1,942 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 13,
"usage_type": "name"
},
{... |
34579004641 | import os
import logging
from google.appengine.ext import ndb
from google.appengine.ext import deferred
from google.appengine.ext.webapp import template
from controllers.base_controller import LoggedInHandler
from models.event import Event
from models.event_details import EventDetails
from helpers.event_details_manipu... | guoxiangyang/the-blue-alliance | controllers/admin/admin_migration_controller.py | admin_migration_controller.py | py | 1,324 | python | en | code | null | github-code | 6 | [
{
"api_name": "models.event.Event.get_by_id",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "models.event.Event",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "models.event_details.EventDetails",
"line_number": 16,
"usage_type": "call"
},
{
... |
40702135964 | #coding: utf-8
from flask.ext.restful import abort, marshal_with, fields
from log import warning, debug
from mails.model import Mail
from resources import InvoiceItemResource
from resources.core import BaseTokeniseResource, BaseTokenMixinResource, BaseModelPackResource
from services import MailInvoiceService, MailI... | StasEvseev/buy_api | resources/mail.py | mail.py | py | 1,712 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "resources.core.BaseTokeniseResource",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "services.MailInvoiceService.get_mail",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "services.MailInvoiceService",
"line_number": 16,
"usage_type": "... |
2116125034 | """
A command line interface to the qcfractal server.
"""
import argparse
import shutil
import sys
import yaml
import qcfractal
from .cli_utils import install_signal_handlers
from ..config import DatabaseSettings, FractalConfig, FractalServerSettings
from ..postgres_harness import PostgresHarness
def parse_args()... | yudongqiu/QCFractal | qcfractal/cli/qcfractal_server.py | qcfractal_server.py | py | 13,155 | python | en | code | null | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "config.DatabaseSettings.field_names",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "config.DatabaseSettings",
"line_number": 25,
"usage_type": "name"
},
{
... |
28983791236 | # Import dependencies
import numpy as np
import streamlit as st
st.set_page_config(layout="wide")
import streamlit.components.v1 as components
import pandas as pd
import networkx as nx
import matplotlib.pyplot as plt
from pyvis.network import Network
import datetime
import time
# Read dataset
df_zena_deps = pd.read_c... | chinmayyadav82/Hack | ORIGINIAL-Widgets_pyvis_network_app_test.py | ORIGINIAL-Widgets_pyvis_network_app_test.py | py | 4,154 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "streamlit.set_page_config",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "streamlit.title",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "streamlit.fo... |
10550897106 | import numpy as np
from sklearn import preprocessing
from numpy import dtype, random, sqrt
from scipy import linalg as LA
import time
from util import *
import torch.nn as nn
# hidden feature extracted from EEG model input to bls for enhancemnt in broad space
class BLS:
def __init__(self, N1, N2, N3, s, c, train_... | YangLiuuuu/graph-convolutional-network-and-bi-directional-LSTM-co-embedded-broad-learning-system | BLSSpace.py | BLSSpace.py | py | 5,394 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "scipy.linalg.orth",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scipy.linalg",
"... |
71989652987 | from tkinter import *
from tkinter import ttk
import tkinter as tk
import tkinter.messagebox
from PIL import ImageTk, Image
import sqlite3
#from GameMode import GameMode
HEIGHT = 500
WIDTH = 600
#global root
root = Tk()
temp = Tk()
hasenteredtable = False
def main():
root.destroy()
if hasen... | Alfred-Akinkoye/reacTen | GameServer/gameOver.py | gameOver.py | py | 2,746 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "MainMenuPage.MainMenu",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "MainMenuPage.MainMenu",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tkinter.messagebox.askyesno",
"line_number": 31,
"usage_type": "call"
},
{
"api_name"... |
10413760903 | import torch
from torch._export import capture_pre_autograd_graph
from torch.export import export, ExportedProgram
class SimpleConv(torch.nn.Module):
def __init__(self) -> None:
super().__init__()
self.conv = torch.nn.Conv2d(
in_channels=3, out_channels=16, kernel_size=3, padding=1
... | pytorch/executorch | docs/source/tutorials_source/export-to-executorch-tutorial.py | export-to-executorch-tutorial.py | py | 22,985 | python | en | code | 479 | github-code | 6 | [
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.ReLU",
"line_nu... |
72567684667 | import tkinter as tk
from tkinter import messagebox
import os.path
import pickle
from datetime import datetime
class Venda:
def __init__(self, produto, quantidade):
self.__produto = produto
self.__quantidade = quantidade
@property
def produto(self):
return self.__produto
@... | flp-gregorio/trabFinalPoo | vendas.py | vendas.py | py | 14,158 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "tkinter.Toplevel",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "tkinter.Toplevel.__init__",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "tkinter.Toplevel",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": ... |
36041006186 | import sys
from random import choices, random
import cv2
import gym
import numpy as np
import torch
import torch.distributions as dist
import torch.multiprocessing as mp
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
import torch.nn.utils as utils
import torch.optim as optim
import ... | ppaanngggg/rl_course | 08/a2c.py | a2c.py | py | 6,714 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
38076792811 | import traceback
from typing import Callable
from flask import Response
from werkzeug.exceptions import HTTPException
class ErrorHandler:
"""Error handler class."""
# pylint: disable = too-few-public-methods
def __init__(self, debug: bool):
self.debug = debug
def get_handler(self) -> Call... | JonSteinn/iceart_api | iceart/setup/error_handler.py | error_handler.py | py | 1,162 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "typing.Callable",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "flask.Response",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "werkzeug.exceptions.HTTPException",
"line_number": 26,
"usage_type": "argument"
},
{
"api_name": "... |
22547995825 | import itertools
def solution(arr):
grouped = itertools.groupby(arr)
answer = [k for k, v in grouped]
return answer
## Recommended Answer
def solution_R(s):
result = []
for c in s:
if (len(result) == 0) or (result[-1] != c):
result.append(c)
return result | yumjw/algorithm-programmers | Level 1/(2101-5)같은숫자는싫어.py | (2101-5)같은숫자는싫어.py | py | 320 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "itertools.groupby",
"line_number": 5,
"usage_type": "call"
}
] |
4987920564 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import itertools
import matplotlib.pyplot as plt
class MixtureMarkovChains():
""" Expectation Maximization for mixture of discret markov models.
Unsupervised sequences clustering of arbitrary length.
"""
def __init__(self, n_cluster: i... | adrz/py-mmm | pymmm/mmm.py | mmm.py | py | 11,507 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "numpy.reshape",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "numpy.reshape",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_numbe... |
37379291876 | import os
from copy import deepcopy
from functools import partial
import numpy as np
import torch
class WindowGenerator:
def __init__(self, h, w, ch, cw, si=1, sj=1):
self.h = h
self.w = w
self.ch = ch
self.cw = cw
if self.h < self.ch or self.w < self.cw:
raise N... | faye0078/RS-ImgShp2Dataset | train_example/data/concat.py | concat.py | py | 3,164 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.cat",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number": 82,
"usage_type": "attribute"
}
] |
72944849468 | from datasets.generator import AntibotDataset
from sklearn.preprocessing import MinMaxScaler
from sklearn.pipeline import make_pipeline
from sklearn.model_selection import GridSearchCV, StratifiedKFold, cross_validate
from sklearn.tree import DecisionTreeClassifier
from sklearn.neighbors import KNeighborsClassifier
f... | leonaascimento/antibot | benchmark.py | benchmark.py | py | 4,204 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datasets.generator.AntibotDataset",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "datasets.generator",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "... |
16627752316 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 28 16:38:58 2017
@author: ricky_xu
"""
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import plotly.offline as py
py.init_notebook_mode(connected=True)
import warnings
warnings.filterwarnings('ignore')
... | RickyXuPengfei/Kaggle-Titanic | src/modeling.py | modeling.py | py | 9,903 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "plotly.offline.init_notebook_mode",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "plotly.offline",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 16,
"usage_type": "call"
},
{
"api_name... |
31906860905 | #!/usr/bin/env python3
# Importamos paquetes que necesitamos
import os
import requests
import time
import datetime
from threading import Timer
# Consulta los datos del sensor en la IP del Wemos
estacion_metereologica = requests.get('http://192.168.1.72:80')
bus = requests.get('http://192.168.1.74:80')
persona = requ... | leonardcad02/Api-rest-IoT | Proyecto Movilidad/Api_rest/bot.py | bot.py | py | 1,629 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number":... |
17435274109 | import pytest
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':
# don't need to BFS... | naubull2/codingtests | leetcode/quick-prep/236_Lowest_Common_Ancestor_of_a_Binary_Tree/solution.py | solution.py | py | 1,197 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pytest.mark.parametrize",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "pytest.main",
"line_number": 42,
"usage_type": "call"
}
] |
32726030419 | import functools
import numpy as np
from umcog.confutils import xargs, xargsonce, extended_kwprop
from ..prob.windy_grid_world import AgentInGridWorld
from .default import ql_grid_world_play, fw_grid_world_play, NoVisMultiObserverXargs
_ql_grid_world_play = functools.partial(
ql_grid_world_play,
observer ... | wecacuee/floyd-warshal-rl | fwrl/conf/four_room_grid_world.py | four_room_grid_world.py | py | 1,133 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "functools.partial",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "default.ql_grid_world_play",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "default.NoVisMultiObserverXargs",
"line_number": 11,
"usage_type": "name"
},
{
"a... |
72602306749 | from turtle import left
from typing import List
class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
intervals.sort(key= lambda x:x[0])
res=[]
left = intervals[0][0]
right = intervals[0][1]
for i in range(1,len(intervals)):
if intervals[... | CountyRipper/offer_py | lc56.py | lc56.py | py | 642 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "turtle.left",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "turtle.left",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "turtle.left",
"line_number": 16... |
17535291112 | # -*- coding: utf-8 -*-
import datetime
import gettext
import json
import os
import requests
from distutils.util import strtobool
from requests_ntlm import HttpNtlmAuth
def start_jobs(process_name):
o = orchestrator()
if o.account_authenticate():
filters = "Name eq '{}'".format(process_name)
o... | miyaichi/uipath-webhook-receiver-on-aws | uipath.py | uipath.py | py | 3,851 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"lin... |
7817859748 | import texture
import six
class Scenario(texture.BaseScenario):
def load(self):
text = """
CONFIRM FILE
============
Will use file %s
""" % self.state.get('new_file', '')
texture.tprint(text)
texture.tnewline()
texture.tprint('Is this correct? (YES... | rmed/fyd | dialogs/loader_confirm.py | loader_confirm.py | py | 791 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "texture.BaseScenario",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "texture.tprint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "texture.tnewline",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "texture.tpri... |
29564650885 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
from api.thanos_http import xtthanos_http
from api.http_api import ResultBase
from common.logger import logger
from common.read_data import get_data
from common.get_signature import generate_auth_info
access_key = get_data().get_ini_data("api_key","access_key")
secret_key = ... | shiqilouyang/thanos_test | operation/contract/client/query_bracket.py | query_bracket.py | py | 891 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "common.read_data.get_data",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "common.read_data.get_data",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "api.http_api.ResultBase",
"line_number": 13,
"usage_type": "call"
},
{
"api_na... |
4738226745 | from requests_html import HTMLSession
import requests
from bs4 import BeautifulSoup as bs
import json
url = f"https://www.google.com/search?q=weather+London"
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"
LANGUAGE = "en-US,en;q=0.5"
s... | danlhennessy/Learn | Python/tools/webscrape/googleweathtest.py | googleweathtest.py | py | 725 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.Session",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
}
] |
40327677211 | from easy_pyechart import _grid_base_config, constants, set_water_marking, _set_logo_, _set_logo_ratate,_page_layout_base_config
from pyecharts import options as opts
from pyecharts.commons.utils import JsCode
from typing import Any, Optional
from pyecharts.charts import Grid
import os
import sys
sys.path.append(os.pat... | jayz2017/easy_pyechart.py | easy_pyechart/easy_grid.py | easy_grid.py | py | 1,514 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.