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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38031085805 | import torch
import torch.nn.functional as F
from torch import nn
# T-LEN model (2 stream logic embedding network)
class esem(nn.Module):
def __init__(self):
super(esem, self).__init__()
self.NUM_PANELS = 16
# used to process shape panels
self.cnn_shape = nn.Sequential(
... | alisaeidi92/distracting_feature | model/model_esem.py | model_esem.py | py | 13,422 | python | en | code | null | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_... |
6572886191 | from typing import List
import pandas as pd
def write_single_csv(dataframes: List[pd.DataFrame], target_path: str):
dataframes[0].to_csv(target_path, index=False)
for df in dataframes[1:]:
df.to_csv(target_path, mode='a', header=False, index=False)
def write_single_hdf(dataframes: List[pd.DataFrame... | hpi-epic/manm-cs | manm_cs/utils.py | utils.py | py | 532 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"l... |
13415646495 | from collections import defaultdict
from copy import deepcopy
from datetime import datetime
from functools import cached_property
from tabulate import tabulate
import vigorish.database as db
from vigorish.cli.components.viewers import create_display_table, create_table_viewer, DisplayTable
from vigorish.data.player_d... | a-luna/vigorish | src/vigorish/data/game_data.py | game_data.py | py | 51,846 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "vigorish.util.exceptions.ScrapedDataException",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "vigorish.enums.VigFile.COMBINED_GAME_DATA",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "vigorish.enums.VigFile",
"line_number": 42,
... |
4163071208 | from django.urls import path
from usuario import views
#UserUpdate
urlpatterns = [
# Ruta de la página de registro de usuario
path('signup/', views.signup, name='signup'),
# Ruta de la página de para realizar la activación de la cuenta
path('emailsent/<str:username>/', views.templateEmailSent, name='... | Vanne280/Proyecto-Inmobiliaria | usuario/urls.py | urls.py | py | 481 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "usuario.views.signup",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "usuario.views",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.urls.pat... |
74249424374 | from math import pow, sqrt
import matplotlib.pyplot as plt
class AbstractFigure:
__count = 0
plot = plt
def __init__(self, plotter):
AbstractFigure.__count += 1
self.id = AbstractFigure.__count
self.plot = plotter
def draw_line(self, x_values, y_values, color):
self.p... | Ulumanshu/group7 | inheritance_polymorphism_classes.py | inheritance_polymorphism_classes.py | py | 7,719 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.Circle",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "matplotli... |
849125796 | from rest_framework.response import Response
from rest_framework.views import APIView
from app import models
from app.serializers import FavoriteSerializer, FavoriteDetailSerializer
from app.utils.serializer_validator import validate_serializer
class Favorite(APIView):
permission_classes = ()
# List favorite... | dungnguyentien1998/hotel_recsys | backend/app/views/favorite.py | favorite.py | py | 1,759 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "app.models.Favorite.objects.filter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "app.models.Favorite",
"line_number": 14,
"usage_type": "attribute"
},
... |
36445026841 | """
This program is responding to Phase 2: Normalization and Initialization
Min_Max() is responding to Main-Max normalization
z_score() is responding to z-score normalization
K_Mean_Maximin() is responding to K-Mean with Maximin method
K_Mean_rdPartition() is responding to K-Mean with random partition implementation
K_... | jessiedong1/KMeanClustering | KMeanExternalMeasures/KMeanWithExternalMeasures.py | KMeanWithExternalMeasures.py | py | 11,232 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.floor",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line... |
2971718712 | # ATAKAN TÜRKAY 170401009
# 1 adet bug -> serverde olan dosya tekrar servere atılırken client çöküyor.
from scapy.all import *
import time
import sys
import hashlib
from pathlib import Path
from math import ceil # parca sayisi hesaplanirken 5.1 de olsa 6 parca oluyor.O yüzden yukarı yuvarlamak gerekiyor.
class dosya... | nyucel/blm304 | vize/170401009/client/v2_client.py | v2_client.py | py | 15,618 | python | tr | code | 8 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "hashlib.blake2b",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "hashlib.blake2b",
"line_nu... |
33233570338 | import os
import sys
import numpy as np
from collections import Counter
from FrequentKmers import FrequentKmers
from datasets import datasets
from task2 import tree_by_neighbor_joining
def get_genome_files(dir_path):
res = []
for path in os.listdir(dir_path):
if os.path.isfile(os.path.join(dir_path, path)):
... | fsigs/nmsu-cs516-bioinformatics-project | ps03/task4_e1.py | task4_e1.py | py | 2,943 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.listdir",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_numbe... |
21222618121 | import numpy
import unittest
import cupy
from cupy import testing
@testing.gpu
@testing.with_requires('numpy>=1.11')
class TestMayShareMemory(unittest.TestCase):
@testing.numpy_cupy_equal()
def test_different_arrays(self, xp):
a = xp.array([1, 2, 3])
b = xp.array([1, 2, 3])
assert xp... | yuhc/ava-cupy | tests/cupy_tests/misc_tests/test_memory_ranges.py | test_memory_ranges.py | py | 2,854 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cupy.testing.numpy_cupy_equal",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cupy.testing",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "cup... |
31763278291 | from django.template import loader
from django.http import HttpResponse, HttpResponseRedirect
from BusLuas.models import BusLuas as IrishRail
from BusLuas.models import DublinBusStopData
from django.http import JsonResponse
from APIHandling import DublinBusAPI
from django.db.models import Count
import xmltodict
import... | romaan7/trinity | CS7CS3-Advanced Software Engineering/Sustainable_City_Management/BusLuas/views.py | views.py | py | 3,511 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "django.template.loader.get_template",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.template.loader",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 15,
"usage_type": "call"
},
{
... |
72063112053 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import json
import time
import traceback
from datetime import datetime
import pymysql
file_name = 'network_status_3166756541_2019-04-17_12_55_20'
path = 'E:/python_workspace/' + file_name + '.log'
conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', password='', ... | luohaoGit/pybots | qqNetworkStatusSpider/persistData.py | persistData.py | py | 1,318 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pymysql.connect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strpti... |
34869999562 | """
https://leetcode.com/problems/combination-sum
"""
from typing import List
def comb_sum(candidates: List[int], target: int) -> List[int]:
result = []
def dfs(sub: int, start: int, path: List[int]):
if sub < 0:
return
if sub == 0:
result.append(path[:])
r... | dippingconda/python_algorithm_interview | combination-sum.py | combination-sum.py | py | 703 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
}
] |
984680193 | #!/usr/bin/env python
from flask import Flask, request
import pickle
app = Flask(__name__)
model = pickle.load(open('saved_model', 'rb'))
@app.route('/api/prediction', methods=['POST', 'GET'])
def index():
req_data = request.json
# print(req_data["age"])
prediction = model.predict(
[[req_data['ag... | ndsnas/titanic | titanic-be/app.py | app.py | py | 616 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.request.json",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"li... |
43703080017 | from columns import *
import pyspark.sql.functions as f
import pyspark.sql.types as t
def task8(df_ratings, df_title, path_to_save):
"""Get 10 titles of the most popular movies/series etc. by each genre
Args:
df_ratings: ratings dataframe
df_title: title dataframe
path_to_save: шлях до... | PavloDemidov/imdb-spark-project2 | task8.py | task8.py | py | 2,060 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyspark.sql.functions.concat_ws",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.functions",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "pyspark.sql.functions.col",
"line_number": 18,
"usage_type": "call"
},
{
"a... |
38709132588 | #!/usr/bin/env python
"""
This module contain different functions which can be uses to get the information
about package like their Cost,Stock keeping unit,Priority and Storage Info ,etc
on the basis of their colour and descriptions.
"""
import datetime
#-----------------------------Package Priority-----------------... | rajkumar2804/vb_0574 | eyantra_task/scripts/packageinfo/info.py | info.py | py | 4,502 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 101,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 101,
"usage_type": "attribute"
}
] |
26498472254 | import pandas as pd
import glob
import os
from datetime import datetime,timedelta
import sched
import time
day_time_sec = 60*60*24
current_datetime = datetime.now()
day_name = current_datetime.strftime("%A")
def run_weekly():
path_files = 'Extracted SocialMediaComments/*/*.csv'
path_files = glo... | omarmohamed2011/Social-Media-Database | weekly_concat.py | weekly_concat.py | py | 1,694 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "glob.glob",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
32303728974 | import csv
import json
from uuid import UUID
from django.http import HttpResponse
from rest_framework.decorators import api_view
from rest_framework.generics import ListAPIView
from rest_framework.response import Response
from rest_framework.views import APIView
from api.serializers import CommentListSerializer
from ... | MaksimBoltov/comments | api/views.py | views.py | py | 13,431 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.loads",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "json.decoder",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.response.Response",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "api.ser... |
11890672046 | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
dataset = pd.read_csv('Bidholi.csv')
X = dataset.iloc[:, :-1].values
Y = dataset.iloc[:, 2].values
#from sklearn.preprocessing import LabelEncoder, OneHot
from sklea... | RishabhKumr/Accident_Prediction | MultipleRegression.py | MultipleRegression.py | py | 1,077 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 20,
"usage_type": "call"
... |
70450016693 | import time
from reportlab.lib.enums import TA_JUSTIFY
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import inch
doc = SimpleDocTemplate("form_letter.pdf",page... | jawspeak/google-docs-spreadsheet-namebadge-printer | paragraph_pdf_sample.py | paragraph_pdf_sample.py | py | 1,781 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "reportlab.platypus.SimpleDocTemplate",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "reportlab.lib.pagesizes.letter",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "reportlab.lib.styles.getSampleStyleSheet",
"line_number": 14,
"usage_ty... |
40705798537 | import sys
# connection class to DB
# logger
from pandalogger.PandaLogger import PandaLogger
_logger = PandaLogger().getLogger('ProxyConnection')
class ProxyConnection:
# constructor
def __init__(self):
import redis
self.conn = redis.StrictRedis(host='localhost', port=6379, db=0)
... | PanDAWMS/panda-proxy | pandaproxy/proxycore/ProxyConnection.py | ProxyConnection.py | py | 1,742 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandalogger.PandaLogger.PandaLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "redis.StrictRedis",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.exc_info",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sys... |
39669169467 | from drawunit import drawunit
from pygame import transform
from pygame import Surface
class displaybar(drawunit):
def __init__(self,x,y,width,height,classtype,color):
drawunit.__init__(self,x,y,width,height,classtype)
self.bar = Surface((width,height))
self.bar.fill(color)
def drawobj... | Melpnn/Minigame_Test | displaybar.py | displaybar.py | py | 567 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "drawunit.drawunit",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "drawunit.drawunit.__init__",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "drawunit.drawunit",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pygame.Su... |
71259968053 | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
# # chrome88之前的版本
# options = webdriver.ChromeOptions()
# options.add_experimental_option('useAutomationExtension', False)
... | Bruceey/Spider_Learning | 07、Selenium/Demo09反爬.py | Demo09反爬.py | py | 1,292 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 27,
"usage_type": "call"
},
{
"api... |
17093010823 | import pandas as pd
import numpy as np
from collections import defaultdict
import re
from sklearn.metrics import accuracy_score
def preprocess_string(str_arg):
cleaned_str=re.sub('[^a-z\s]+',' ',str_arg,flags=re.IGNORECASE) #every char except alphabets is replaced
cleaned_str=re.sub('(\s+)',' ',cleaned_... | johnjagu25/ML-Algo-from-scratch | naive_bayes.py | naive_bayes.py | py | 3,377 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "re.sub",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "re.IGNORECASE",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "re.sub",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets.fetch_20newsgroups"... |
38708637710 | from rest_framework.permissions import IsAdminUser, IsAuthenticated
from rest_framework.views import APIView
from goods.models import BidRecord, Goods
from h_utils.errors import ErrBaseNotData
from h_utils.response_extra import success_request, error_request
from h_utils.serializers_extra import serializer_list_data
f... | midas66/django_project | homes/views.py | views.py | py | 3,076 | python | en | code | null | github-code | 21 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "homes.models.Banner.objects.all",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "homes.models.Banner.objects",
"line_number": 22,
"usage_type": "attribute"
... |
71706546934 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import logging
from weakref import WeakSet
from pkg_resources import resource_filename
from aiohttp import web, WSCloseC... | jhrmnn/knitj | knitj/webserver.py | webserver.py | py | 1,710 | python | en | code | 48 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "aiohttp.web.Application",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "aiohttp.web",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "aiohttp.we... |
23609985130 | from django.contrib import admin
from django.urls import path
from chemicals import views
urlpatterns = [
path('admin/', admin.site.urls),
path('home/', views.home_page,name='home'),
path('start/', views.startpage,name = 'start'),
path('', views.startpage),
path('detail/<int:id>', views.detailpage... | Lowen695/labapp | djcrm/urls.py | urls.py | py | 835 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "dja... |
29767204060 | from numexpr import *
from numexpr.math import sin, cos, e
#scant method
min = -5
max = -3
expr = lambda x : 2*sin(x) - e**x/4 - 1
iterexpr = lambda x : x - (2*sin(x) - e**x/4 - 1)/(2*cos(x) - e**x/4)
x_0 = Number(-4, name='x_0')
print('\\[ x_0 = -4 \\]')
def newtonraphsone(x, level=1):
xn = iterexpr(x)
prin... | sesajad/numeric | examples/gen-2/q3_d.py | q3_d.py | py | 732 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numexpr.math.sin",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numexpr.math.e",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numexpr.math.sin",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numexpr.math.e",
"l... |
11940743611 | # -*- encoding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 8
_modified_time = 1349749332.2285981
_enable_loop = True
_template_filename = u'/usr/local/src/mastrms/mastrms/app/templates/mako/admin/base_site.html'
_te... | google-code-export/mastr-ms | mastrms/mastrms/scratch/app/templates/admin/base_site.html.py | base_site.html.py | py | 2,644 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "mako.runtime.UNDEFINED",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "mako.runtime",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "mako.runtime._inherit_from",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "mak... |
37259636852 | import re
import json
from json import JSONEncoder
from kafka import KafkaConsumer
import redis
r = redis.Redis(host="redis", port=6379, db=0)
class NumpyArrayEncoder(JSONEncoder):
def default(self, obj):
if isinstance(obj, numpy.ndarray):
return obj.tolist()
return JSONEncoder.default... | ahmedakbari/big_data | kafka_to_redis/main.py | main.py | py | 884 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "redis.Redis",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "json.JSONEncoder",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "json.JSONEncoder.default",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.JSONEncoder"... |
3114181034 | '''
Created on Jul. 2, 2021
@author: zollen
'''
import pandas as pd
import numpy as np
import time
from sklearn.linear_model import Ridge
from sklearn.linear_model import PoissonRegressor
from sklearn.linear_model import GammaRegressor
from sklearn.linear_model import RANSACRegressor
from sklearn.linear_model import ... | zollen/Python-ML | futuresales_kaggle/work1/test.py | test.py | py | 5,469 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pandas.set_option",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pandas.set_option",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.se... |
33284268767 | import urllib.request
from bs4 import BeautifulSoup
import enchant
import re
import feedparser
from nltk.tokenize import sent_tokenize, word_tokenize
import dataset
import datetime
db = dataset.connect('sqlite:///:memory:')
def get_url():
url_list = []
# RSS with latest news
d = feedparser.parse('http://... | data7339/spellchecker | swedish_spellchecker.py | swedish_spellchecker.py | py | 3,699 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "dataset.connect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "feedparser.parse",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "urllib.request.request.Request",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "urlli... |
28703876645 | import tablib
from desktop.lib.export_csvxls import MAX_XLS_ROWS, MAX_XLS_COLS, create_generator, make_response
from nose.tools import assert_equal
def content_generator(header, data):
yield header, data
def test_export_csv():
headers = ["x", "y"]
data = [ ["1", "2"], ["3", "4"], ["5,6", "7"], [None, None] ]
... | lumanjiao/XLS_BigData_Hue | desktop/core/src/desktop/lib/test_export_csvxls.py | test_export_csvxls.py | py | 2,456 | python | en | code | 13 | github-code | 21 | [
{
"api_name": "desktop.lib.export_csvxls.create_generator",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "desktop.lib.export_csvxls.make_response",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "nose.tools.assert_equal",
"line_number": 17,
"usage_ty... |
71270931893 | from apscheduler.schedulers.blocking import BlockingScheduler
from datetime import datetime
def my_clock():
print("Hello! The time is: %s" % datetime.now())
if __name__ == '__main__':
scheduler = BlockingScheduler()
scheduler.add_job(my_clock, "interval", seconds=3)
scheduler.start() | Bruceey/Spider_Learning | 23、定时任务/ap1.py | ap1.py | py | 304 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "apscheduler.schedulers.blocking.BlockingScheduler",
"line_number": 10,
"usage_type": "call"
}
] |
18954291842 | from collections.abc import Sized
import logging
from typing import Dict, List, Optional, Set
from treeserve.mapping import Mapping
from treeserve.node import Node, JSONSerializableNode
from treeserve.node_store import NodeStore
class Tree(Sized):
"""
A container for `Node`s.
"""
def __init__(self, ... | wtsi-hgi/treeserve | python/treeserve/tree.py | tree.py | py | 11,123 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "collections.abc.Sized",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "treeserve.node_store.NodeStore",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name":... |
42041095798 | import random
from collections import defaultdict, Counter
from src.gamemodes import game_mode, GameMode
from src.messages import messages
from src.functions import get_players
from src.gamestate import GameState
from src.events import Event, EventListener
from src.trans import chk_win_conditions
from src import chann... | lykoss/lykos | src/gamemodes/maelstrom.py | maelstrom.py | py | 5,409 | python | en | code | 123 | github-code | 21 | [
{
"api_name": "src.gamemodes.GameMode",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "src.cats.All",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "src.cats.Team_Switcher",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "src.cats.W... |
34969486695 | import configparser
import json
import datetime
import logging
from pymongo import MongoClient
import numpy as np
import os
from dateutil import parser
from .DebianAdvisory import DebianAdvisory
from .CVEParse import CVEParse
from ..VendorModel import VendorModel
from .CSVReader import CSVReader
from fixcwes import re... | nikalexo/DVAF | vendors/debian/DebianModel.py | DebianModel.py | py | 18,957 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "VendorModel.VendorModel",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
... |
72084289012 | import logging
from termcolor import colored
import slixmpp
from slixmpp.xmlstream import ET
import slixmpp.plugins.xep_0060.stanza.pubsub as pubsub
from slixmpp.exceptions import IqError, IqTimeout
import re
NS_ATOM = 'http://www.w3.org/2005/Atom'
NS_JABBER_DATA = 'jabber:x:data'
class Publishx(slixmpp.ClientXMPP)... | edhelas/atomtopubsub | publishx.py | publishx.py | py | 5,537 | python | en | code | 16 | github-code | 21 | [
{
"api_name": "slixmpp.ClientXMPP",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "slixmpp.ClientXMPP.__init__",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "slixmpp.ClientXMPP",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_n... |
19595813723 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 2 23:40:28 2020
@author: Kwanyuen
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from collections import Counter
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassi... | kwanyuen/Coures-Project-music-recommendation | MAFS6010S Course Project.py | MAFS6010S Course Project.py | py | 15,346 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pandas.read_c... |
32715887911 | # import helpers
# import mainhelpers
import helpers
from helpers import *
# from helpers import *
# from mainhelpers import *
import csv
from time import sleep
from decimal import Decimal
from datetime import datetime
from selenium.webdriver.support import ui
from selenium.common.exceptions import TimeoutException, ... | stanjaromin/Fifa21-Autobidder | src/autobuyer.py | autobuyer.py | py | 7,511 | python | en | code | null | github-code | 21 | [
{
"api_name": "time.sleep",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 58,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 58,
"usage_type": "name"
},
{
... |
6005489867 | from PySide6.QtCore import Signal, Slot
from PySide6.QtGui import QDoubleValidator, QIntValidator
from PySide6.QtWidgets import QDialog, QHBoxLayout, QMessageBox, QTextEdit
from pyminflux import __APP_NAME__
from pyminflux.state import State
from ..settings import Settings
from .ui_options import Ui_Options
class O... | bsse-scf/pyMINFLUX | pyminflux/ui/options.py | options.py | py | 19,157 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "PySide6.QtWidgets.QDialog",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "ui_options.Ui_Options",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "PySide6.QtCore.Signal",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": ... |
2770097752 | from datetime import datetime
import jwt
import pytest
from authentication.models import Role, User
from django.conf import settings
pytestmark = [pytest.mark.django_db]
def test_token_enought_fields(superuser):
token = superuser.token
payload = jwt.decode(token, settings.SECRET_KEY, algorithm... | pykulytsky/freelance-service | src/authentication/tests/test_user_auth_token.py | test_user_auth_token.py | py | 1,682 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pytest.mark",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "jwt.decode",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.SECRET_KEY",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "djang... |
37378158338 | # Commented out IPython magic to ensure Python compatibility.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# %matplotlib inline
df = pd.read_csv('realtor.csv')
df = df.drop_duplicates(ignore_index=True)
#df= df[df['Sizes']<10000]
df = df[~(df['Beds']==0)]
df = df[~(df['S... | fjaffriOSU/Housing-Price-OK | code/histogram_linegraph.py | histogram_linegraph.py | py | 1,890 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.title",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "matplotlib.p... |
22104601954 | """Reads a collection of images and places those with an object in a directory."""
from imageai.Detection import ObjectDetection
import os
import argparse
import json
# Get Inputs
parser = argparse.ArgumentParser()
parser.add_argument(
"--objects", help="the object(s) to look for", nargs="+", required=True
)
par... | ric-evans/image-object-filter | filter.py | filter.py | py | 2,024 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "imageai.Detection.ObjectDetection",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "... |
9120125195 | import re
import warnings
from datetime import timedelta
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
from xarray.core.utils import is_scalar
from .times import _STANDARD_CALENDARS, cftime_to_nptime, infer_calendar_name
def named(name, pattern):
return '(?P<' + name + '>' +... | timothyyu/ml_monorepo | xarray/xarray/coding/cftimeindex.py | cftimeindex.py | py | 16,785 | python | en | code | 59 | github-code | 21 | [
{
"api_name": "re.match",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
... |
31953633451 | # coding:utf-8
import xlwt
import os
# 定义log日志列表
files = []
filelist = os.listdir(os.getcwd())
for fileitem in filelist:
if fileitem.endswith('.log'):
files.append(fileitem)
def creatxls(docs):
doc = docs.add_sheet('sheet1')
doc.write(0, 0, 'time')
doc.write(0, 1, 'app')
doc.write(0, 2, '1')
doc.write(0, 3,... | 1451297455/PersonPython | ThirdApp_100/Excle.py | Excle.py | py | 1,212 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.listdir",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "xlwt.Workbook",
"line_number": 32,
"usage_type": "call"
}
] |
18380834871 | import os
import pytest
import subprocess
from wazuh_testing.tools import ANALYSISD_BINARY_PATH, ANALYSISD_QUEUE_SOCKET_PATH
# Marks
pytestmark = [pytest.mark.linux, pytest.mark.tier(level=0), pytest.mark.server]
# Variables
command_exec = f'{ANALYSISD_BINARY_PATH} -t'
@pytest.fixture(scope="function")
def socket... | wazuh/wazuh-qa | tests/integration/test_analysisd/test_queue_socket_properties/test_queue_socket_properties.py | test_queue_socket_properties.py | py | 2,950 | python | en | code | 29 | github-code | 21 | [
{
"api_name": "pytest.mark",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pytest.mark.tier",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "wazuh_testing.tools.ANALYSISD_BINARY_PATH",
"line_number": 12,
"usage_type": "name"
},
{
"api_nam... |
19576825181 | import json
from website import create_app
configdata = ''
with open("config.json", "r") as jsonfile:
configdata = json.load(jsonfile)
app = create_app()
if __name__ == '__main__': app.run(host=configdata['Pi_IP'], port=configdata['Pi_port'])#app.run(debug=True) | SeanGol1/HomeAutomation | main.py | main.py | py | 272 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "website.create_app",
"line_number": 8,
"usage_type": "call"
}
] |
42376807794 | import numpy
import warnings
import scipy.misc
import scipy.ndimage
import os
import pickle
from PIL import Image
with open(os.path.join(os.path.dirname(__file__), "black.pickle"), "rb") as f:
black = pickle.load(f, encoding="latin1")
def lanczos_transform(image, h_size, v_size):
return numpy.array(Image.fr... | troelsy/ButeoX_Processing | utils/postprocessing.py | postprocessing.py | py | 6,440 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_num... |
35617354364 | from typing import List,Tuple
import sklearn_crfsuite
def load_file(filename:str)->List[List[Tuple[str,int]]]:
with open(filename, mode='r', encoding='utf-8') as f:
lines = [line.strip() for line in f.readlines()]
sentence_list=[[]]
for i in range(len(lines)):
if len(lines[i])==0:
... | qingshanlanshan/AI-course | PJ2/Part2/CRF_sklearn.py | CRF_sklearn.py | py | 4,335 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "sklearn_crfsuite.CRF",
"line_number": 108,
"usage_type": "call"
}
] |
12483741552 | # -*- coding: utf-8 -*-
# @Time : 2023/3/11 15:05
# @Author : simon.wang
# @File : get_token.py
# @Software: PyCharm
import requests
from common import common_util
class Token:
def __init__(self):
"""
token配置以及存放token值的路径
当请求token时的url或date有变动时,直接在配置文件修改即可
"""
sel... | TEST2022-WGC/PythonAutimationTest | LPS_Demo/base/get_token.py | get_token.py | py | 1,379 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "common.common_util.read_config_yaml",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "common.common_util",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "common.common_util.read_config_yaml",
"line_number": 23,
"usage_type": "call"
},... |
32728765028 | import streamlit as st
import tensorflow as tf
from tensorflow import keras
import random
from PIL import Image, ImageOps
import numpy as np
import warnings
warnings.filterwarnings("ignore")
st.set_page_config(
page_title="Deteksi Penyakit Cabai",
initial_sidebar_state = 'auto'
)
hide_streamlit_... | lizapk/deteksi-penyakit-cabai | pcd.py | pcd.py | py | 4,077 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "streamlit.set_page_config",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "streamlit.markdown",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "n... |
14298961705 | # coding: utf-8
import logging
import os
import json
import hashlib
from mimetypes import guess_type
from minio import Minio
from minio.error import S3Error
from dsm.utils import files
logger = logging.getLogger(__name__)
def get_mimetype(file_path):
return guess_type(file_path)[0]
class SHA1Error(Exception)... | scieloorg/dsm | dsm/extdeps/minio.py | minio.py | py | 5,129 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "mimetypes.guess_type",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "hashlib.sha1",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "minio.Minio",
... |
31186671412 | import random
import numpy as np
from scipy import linalg
f = open("Wiki-Vote.txt")
nodeCount=0
edges = []
edgeCount = 0
line=f.readline()
while line:
ls=line.split('\t')
u,v=int(ls[0]),int(ls[1])
edges.append((u,v))
edges.append((v,u))
nodeCount=max(nodeCount,max(u,v))
edgeCount+=1
edg... | Todobe/sircon | data/data_p2p.py | data_p2p.py | py | 1,163 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "scipy.linalg.eigh",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "scipy.linalg",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "random.randint",
"line... |
11749828847 | '''
@author: mroch
'''
"""
Pair Programming Equitable Participation & Honesty Affidavit
We the undersigned promise that we have in good faith attempted to follow the principles of pair programming.
Although we were free to discuss ideas with others, the implementation is our own.
We have shared a common work... | Darren-Ferrer/Checkers-AI | checkers.py | checkers.py | py | 5,352 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.version_info",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "sys.version_info",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "imp.load_compiled",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "lib.hum... |
8841726511 | import numpy as np
from scipy.optimize import differential_evolution, minimize
from scipy.stats import norm
from rto.optimization.optimizer import ModelBasedOptimizer
class ModelBasedBayesianOptimizer(ModelBasedOptimizer):
def __init__(self, ub, lb, g, solver={'name': 'de', 'params': {'strategy': 'best1bin'}}, ba... | vicrsp/rto | src/rto/optimization/bayesian.py | bayesian.py | py | 3,415 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "rto.optimization.optimizer.ModelBasedOptimizer",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "... |
21784997674 | import os
import sys
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
from base64 import b64encode
from loguru import logger
import binascii
def aes_encrypt(key, file_bytes):
#return encrypt_CTR_MODE(key, file_bytes)
##The nonce and the tag generated will be exactly 16 bytes
... | GraphicalDot/custodianwallet | src/encryption_utils/symmetric.py | symmetric.py | py | 2,274 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "Crypto.Cipher.AES.new",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "Crypto.Cipher.AES",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "Crypto.Cipher.AES.MODE_GCM",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name"... |
73749816693 |
import matplotlib.pyplot as plt
import numpy as np
def jedn_pravca2( x1 = int(input("Unesite x koordinatu prve tocke ")), y1 = int(input("Unesite y koordinatu prve tocke ")), x2 = int(input("Unesite x koordinatu druge tocke ")), y2 = int(input("Unesite y koordinatu druge tocke "))):
x = np.linspace(-20, 20, 20... | IvanKalajzic/PAF | Vjezbe1/5.py | 5.py | py | 877 | python | hr | code | 0 | github-code | 21 | [
{
"api_name": "numpy.linspace",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyp... |
36069032262 | from dagster import asset
from dagster_snowflake import snowflake_resource
from nhl_dagster.partitions.partitions import daily_partitions_def
@asset(
required_resource_keys={'snowflake'},
partitions_def=daily_partitions_def,
compute_kind='SQL',
key_prefix = 'SNOWFLAKE_RAW',
group_name = 'snowflake_... | alecryan88/chel | nhl_dagster/assets/s3_to_snowflake.py | s3_to_snowflake.py | py | 1,271 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "dagster.asset",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "nhl_dagster.partitions.partitions.daily_partitions_def",
"line_number": 7,
"usage_type": "name"
}
] |
69878543414 | import unittest
from unittest.mock import patch
from flask import request
from app import app
class TestApi(unittest.TestCase):
def test_index_status_200(self):
with app.test_client() as client:
response = client.get("/")
self.assertEqual(response.status_code, 200)
def test_s... | danielcn/flask-all | flask-sendmail/test/test_app_unittest.py | test_app_unittest.py | py | 742 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "app.app.test_client",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "app.app",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "app.app.test_client",... |
4130584161 | import matplotlib.pyplot as plt
from flask import Flask, request, Response
from panoptes_client import Subject
import json
import ast
import tqdm
import io
import datetime
import sys
import numpy as np
from astropy.io import ascii
from astropy.table import Table
from flask_cors import CORS
import plotly
import plotly.e... | ramanakumars/JuDE | backend/app.py | app.py | py | 12,167 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "json.JSONEncoder",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "numpy.integer",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "numpy.floating",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "numpy.nd... |
15323948455 | # -*- coding: utf-8 -*-
import re
from pygments.lexer import RegexLexer, include, bygroups
from pygments.token import *
class CSSLexer(RegexLexer):
name = "CSS"
aliases = ['css']
filenames = ['*.css']
flags = re.DOTALL
tokens = {
"root": [
(r"", Text, "rules"),
],
... | tabatkins/highlighter | highlighter/lexers.py | lexers.py | py | 2,087 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "pygments.lexer.RegexLexer",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "re.DOTALL",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygments.lexer.include",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pygmen... |
8808082592 | #!/usr/bin/env python3
# This python3 script can be run locally or in a github workflow.
# It requires "pip3 install requests".
import json
import os
import sys
import requests
def create_session(github_token=None):
sess = requests.Session()
sess.headers = {
"Accept": "; ".join([
"appli... | samuelgruetter/check-ci-success | check_ci_success.py | check_ci_success.py | py | 2,735 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.Session",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 42... |
12182359500 | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.font_manager import FontProperties
from sklearn.linear_model import LinearRegression
def f(x, m, b):
return m*x + b
def run():
df = pd.read_csv('./data/datos.csv')
T = df['T']
E = df['E']
T4 = []
El = ... | MaxGalindo150/Practica_Cuerpo-Negro | stefan_boltzmann.py | stefan_boltzmann.py | py | 1,086 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRe... |
27539504854 | from os import environ, path
from dotenv import load_dotenv
basedir = path.abspath(path.dirname(__file__))
load_dotenv(path.join(basedir, '.env'))
class Config:
"""Set Flask configuration from .env file."""
# General Config
SECRET_KEY = environ.get('SECRET_KEY')
FLASK_APP = environ.get('FLASK_APP')... | wahinipa/cupboard | www/config.py | config.py | py | 738 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_n... |
18786812536 | import bs4
import requests
# food = "とまと"
# res = requests.get(f"https://cookpad.com/search/{food}")
# soup = bs4.BeautifulSoup(res.text, 'html.parser')
def main():
food = "とまと"
recipes = find_recipe_with_food(food)
for recipe in recipes: # 配列をそのまま入力すると、len等使用しなくて良い
recipe_info = f"レシピ名 {recipe... | 0123yes/scraping_sample | recipe_check.py | recipe_check.py | py | 1,144 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 23,
"usage_type": "call"
}
] |
10117200683 | from django.urls import path, re_path
from Seller.views import *
urlpatterns = [
re_path(r'^$', index),
path('register/', register),
path('login/', login),
path('index/', index),
path('logout/', logout),
re_path('goods_list/(?P<page>\d+)/(?P<status>[01])/', goods_list),
re_path('goods_statu... | dzlzhenyang/Qshop | Seller/urls.py | urls.py | py | 554 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.re_path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",... |
15231805376 | from selenium import webdriver # 导入selenium
b = webdriver.Firefox() # 火狐浏览器 # 实例化对象 # 打开浏览器
# b = webdriver.Chrome() # 谷哥浏览器
# 输入网址
b.get("https://www.baidu.com")
# 元素定位
# class_name元素定位
b.find_element_by_class_name("s_ipt").send_keys("selenium1")
# name元素定位
b.find_element_by_name("wd").send_keys("selenium") ... | vothin/code | 代码/day5/A.SeleniumBaidu.py | A.SeleniumBaidu.py | py | 553 | python | zh | code | 0 | github-code | 21 | [
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 3,
"usage_type": "name"
}
] |
37090460055 | import numpy as np
import warnings
import skimage.measure
from lca.nd.util import get_parent_labels_2D
import pandas as pd
import skimage
def measure_assignment_2DT(label_images, assigned_label_images, fv, fv_assignment):
assigned_unique_object_ids = []
for idx, label_image in enumerate(list(label_images)):
... | adrtsc/lca | lca/ndt/util.py | util.py | py | 2,361 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "lca.nd.util.get_parent_labels_2D",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.isnan",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.nan",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "numpy.arr... |
18955383902 | #PYTHON MP CODE & OUTPUT
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import random
df=pd.read_csv(r'C:\Users\MUSTERYA SM\Dropbox\My PC (LAPTOP-VAG6P3ER)\Desktop\python PRJ\most_subscribed_youtube_channels.csv')
df.isnull()
df = df.dropna()
fig, axs = plt.subplots(2,1, figsize=(10, 10... | musteryasm/ilovepython | youtube_stats/prj.py | prj.py | py | 1,911 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "pandas.Data... |
17385223002 | import os
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
from torch.utils.data import Dataset
class RootsDataset(Dataset):
def __init__(self, root, train=True, mode='RGB', img_transform=None,
label_transform=None):
"""
Initialize the ... | GatorSense/PlantRootSeg | RootsData.py | RootsData.py | py | 3,456 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"l... |
8329948458 | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 13 10:20:18 2018
@author: zhanglisama jxufe
"""
import pandas as pd
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor
import xgboost as xgb... | zlsama/ml-or-dl | sofa_bike.py | sofa_bike.py | py | 3,537 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing... |
35535295825 | # -*- coding: utf-8 -*-
from utils import *
import os
import time
import random
import torch
import torch.nn as nn
import torch.optim as optim
from model import SequenceGraphAtt
class CONFIG_PARAS():
def __init__(self):
# 参数等常量存放
self.data_dir = "./data/r52"
self.data_graph_path = self.d... | finint/graphSEAT | train.py | train.py | py | 5,384 | python | en | code | 16 | github-code | 21 | [
{
"api_name": "torch.device",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
... |
25084384981 | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.3.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# +
import sqlalchemy as ... | lab156/arxivDownload | getting problem articles for latexml.py | getting problem articles for latexml.py | py | 3,404 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "sys.path.insert",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "re.match",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": ... |
72161404213 | import pickle
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument('--utt2cost', type=str)
parser.add_argument('--thres', type=float)
parser.add_argument('--outdir', type=str)
args = parser.parse_args()
with open(args.utt2cost, 'rb') as f:
utt2cost = pickle.load(f)
with open(os.path.j... | ishine/RNN-Transducer_alignment_for_espnet | local/filter_alignments.py | filter_alignments.py | py | 460 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_n... |
22639527282 | import os
import lmdb
import torch
import io
from PIL import Image
from torchvision.transforms import ToTensor
import numpy as np
lmdb_dir = "../../datasets/GoPro/test/input_mask.lmdb"
output_folder = "../../datasets/GoPro/test/grouped_masks"
def grayscale_to_masks(grayscale_img):
unique_values = torch.unique(gra... | HPLQAQ/SAM-Deblur | scripts/data_preparation/2_masks_to_grouped_masks.py | 2_masks_to_grouped_masks.py | py | 1,242 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "torch.unique",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.stack",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number... |
582492991 | import pyfiglet
import os
# Colores disponibles en formato ANSI
COLORES = {
"rojo": "\033[31m",
"verde": "\033[32m",
"amarillo": "\033[33m",
"azul": "\033[34m",
"magenta": "\033[35m",
"cyan": "\033[36m",
"blanco": "\033[37m"
}
# Restaurar ajustes originales
RESTAURAR = "\033[0m"
# Pide al... | ivangabriel21/IvanDXScript | ascii.py | ascii.py | py | 1,311 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "pyfiglet.figlet_format",
"line_number": 33,
"usage_type": "call"
}
] |
14114793546 | import os
import random
from typing import List
from pathlib import Path
from typing import Tuple
from glob import glob
import hydra
import datasets
import omegaconf
import numpy as np
import pandas as pd
import torch
from torch.utils.data import Dataset
import torchaudio
from transformers import AutoProcessor, AutoT... | 1pha/MulitmodalERC-TensorMixerNetwork | erc/datasets.py | datasets.py | py | 26,642 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "random.seed",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "erc.utils.get_logger",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "torch.utils.data.Dataset",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "erc.constan... |
16266099436 | from django.urls import path
from django.conf.urls import url
from . import views
from . import accounts
app_name = 'General'
urlpatterns = [
path('', views.create_voip, name='index'),
path('create_time_management/', views.create_time_management, name='create_time_management'),
path('edit_time_management/... | livemonkey1300/estimator | General/urls.py | urls.py | py | 1,885 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
25875642932 | #!/usr/bin/env python3
import os
import argparse
import matplotlib.pyplot as plt
import numpy as np
parser = argparse.ArgumentParser(description='Display performance plots.')
parser.add_argument('output_dir', help='directory containing the measurement files')
parser.add_argument('commands', nargs='*', type=str)
arg... | GothenburgBitFactory/timewarrior | test/performance-plot.py | performance-plot.py | py | 1,198 | python | en | code | 1,070 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.axes",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "matpl... |
41741383976 | import cv2
import numpy as np
import math
cap = cv2.VideoCapture("./output.mov")
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (5,5)) #kernel for erosion/dilation operations
B = 0.005
G = 0.005
R = 0.990
while cap.isOpened():
ret,frame = cap.read()
if ret:
blue = frame[:,:,0]
blue = cv2... | pradipto111/obstacle-lane-segmentation | main.py | main.py | py | 2,054 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.getStructuringElement",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.MORPH_RECT",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "cv2.Gauss... |
29113690166 | from django.contrib.auth.models import AbstractUser as BaseUser
from django.db.models import (
Model as DjangoModel,
UUIDField,
DateTimeField,
CharField,
EmailField,
BooleanField,
)
from django.core.validators import MinLengthValidator
from uuid import uuid4
class Model(DjangoModel):
id = ... | UWCoffeeNCode/barista | barista/models.py | models.py | py | 1,828 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.db.models.UUIDField",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "django.d... |
887143566 | import os
from pathlib import Path
from shutil import copyfile
file_name = "simple.vtt"
base_path = os.path.dirname(os.getcwd())
subtitle_path = os.path.join(base_path, "simple_file")
new_file_name = os.path.join(subtitle_path, file_name.split(".")[0] + ".srt")
old_file_name = os.path.join(subtitle_path, file_name)
d... | Alexlivtex/youtube-transporter | test/subtitle_convert.py | subtitle_convert.py | py | 5,606 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number":... |
12595828552 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ivr', '0010_auto_20160818_2150'),
('flows', '0073_auto_20161111_1534'),
]
database_operations = [
migrations.AlterMo... | HeroinZL/rapidpro | temba/ivr/migrations/0011_auto_20161111_1151.py | 0011_auto_20161111_1151.py | py | 618 | python | en | code | null | github-code | 21 | [
{
"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.AlterModelTable",
"line_number": 15,
"usage_type": "call"
}... |
74249918134 | from unicodedata import name
import paho.mqtt.client as mqtt
import json
import sqlite3
import time
import logging
import sys
import datetime
DB_Name = "solar_panel_sep05.db"
class DatabaseManager():
def __init__(self):
self.conn = sqlite3.connect(DB_Name)
self.conn.execute('pr... | UMMEATHIYA/Solar_Inspection | store_sensor_data.py | store_sensor_data.py | py | 6,917 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number":... |
73036466613 | import unittest
import numpy
import cupy
from cupy import testing
@testing.gpu
class TestCount(unittest.TestCase):
_multiprocess_can_split_ = True
@testing.for_all_dtypes()
def test_count_nonzero(self, dtype):
def func(xp):
m = testing.shaped_random((2, 3), xp, xp.bool_)
... | LiuFang816/SALSTM_py_data | python/pfnet_chainer/chainer-master/tests/cupy_tests/sorting_tests/test_count.py | test_count.py | py | 815 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cupy.testing.shaped_random",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cupy.testing",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "cupy.t... |
24916846230 | from django.shortcuts import render
from agents.models import *
from django.urls import reverse
from datetime import date
from django.utils.translation import gettext as _
from django.contrib.humanize.templatetags.humanize import ordinal
from django.contrib.auth.decorators import login_required
def getBirthdays():
ag... | lucas42/lucos_contacts | app/agents/calendar.py | calendar.py | py | 3,455 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.date",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "datetime.date.year",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "datetime.date",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "django.utils.tran... |
74821556211 | # encoding: utf-8
import numpy as np
import time
import argparse
import mindspore
from mindspore import Tensor
from mindspore import numpy
from mindspore import dtype as mstype
import mindspore.ops as ops
from mindspore import Profiler
def read_argument():
parser = argparse.ArgumentParser()
parser.add_argument(... | HEROhaoyu/DepGraph | MyProject/communication/test1/PY.py | PY.py | py | 3,851 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "mindspore.ops.Add",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "mindspore.ops",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "mindspore.ops... |
6039004669 | import sys
from sys import stdin
input = stdin.readline
from collections import deque
sys.setrecursionlimit(10**9)
n = int(input())
arr = [[] for _ in range(n+1)]
ans = [ 0 for _ in range(n+1)]
visited = [False] * (n+1)
queue = deque([])
visited[1] = True
for i in range(1, n):
x, y = map(int, input().split())
... | hoyeonlim/Baekjoon_exercise | 11725.py | 11725.py | py | 619 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin.readline",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "sys.setrecursionlimit",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "collections.dequ... |
15474986579 | import torch
from torch_geometric.utils import to_dense_adj
def unnormalized_laplacian_eigenvectors(L): #
el, ev = torch.linalg.eig(L)
el = torch.real(el)
ev = torch.real(ev)
idx = torch.argsort(el)
el = el[idx]
ev = ev[:,idx]
#print("L", L, el[1])
return el, ev
# Compute Fiedler values of all ... | AdrianArnaiz/DiffWire | layers/utils/spectral_utils.py | spectral_utils.py | py | 947 | python | en | code | 14 | github-code | 21 | [
{
"api_name": "torch.linalg.eig",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "torch.linalg",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.real",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "torch.real",
"line_num... |
14538966282 | """
This script reads the xls sheets contained in the `data_path` directory and
creates a dictionary with words as keys and a numpy array with 3 elements (EPA)
as values.
Two data sets are used: all sheets containing "AffectiveMeaningConcepts" are
part of one data set, and the sheet "EmotionFeatures_Fontaine" is part ... | ikajic/spa-poem | scripts/read_epa.py | read_epa.py | py | 2,485 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.pardir",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number"... |
20696715139 | import os
import configparser
from utilities import database
from discord import Embed
from commands.base_command import BaseCommand
class ReturnTagUser(BaseCommand):
def __init__(self):
# A quick description for the help message
description = "Return Discord id associated with the tag"
... | arnavn101/brawlClubRegulator | commands/returnTagUser.py | returnTagUser.py | py | 2,293 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "commands.base_command.BaseCommand",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name... |
31879338431 | import torch.nn as nn
import math
import torch.utils.model_zoo as model_zoo
import functools
def conv3x3(in_planes, out_planes, stride=1):
"3x3 convolution with padding"
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=1, bias=False)
class BasicBlock(nn.Module... | hyunjaelee410/style-based-recalibration-module | models/resnet.py | resnet.py | py | 6,348 | python | en | code | 55 | github-code | 21 | [
{
"api_name": "torch.nn.Conv2d",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.Module",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_numb... |
34877639247 | from django.urls import path
from . import views
app_name = 'OrchestratorApp'
urlpatterns = [
path('', views.index, name='index'),
path('recon/', views.recon_view, name='recon'),
path('workspaces/', views.show_workspaces, name='workspaces'),
path('workspaces/<str:target_name>', views.show_workspace, n... | badBounty/Orchestrator | Orchestrator/OrchestratorApp/urls.py | urls.py | py | 712 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
36691791383 | import requests, json, lxml, re, csv
from bs4 import BeautifulSoup
from concurrent.futures import ThreadPoolExecutor
from time import perf_counter
import pandas as pd
from typing import List, Dict
start_time = perf_counter()
header = ["Id", 'Locality', 'Type of property','Subtype of property','Price','Type of sale','N... | melikkekaya/immoweb_project | maciej.py | maciej.py | py | 6,467 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "time.perf_counter",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "concurrent.futures.Th... |
42118212632 | import pandas as pd
import numpy as np
import scipy.linalg as la
import math
from sklearn.linear_model import LinearRegression
import csv
class LinearReg:
def get_data(self):
df_home = pd.read_csv("../data/pittsburgh_housing_data_2.csv")
df_yelp = pd.read_csv("../data/yelp.csv")
df_neighbor = pd.read_csv("../da... | royli1013/15388_project | src/linear_regression.py | linear_regression.py | py | 6,628 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"l... |
31471386309 | from rich.console import Console
from newpotato.hitl import HITLManager
from newpotato.utils import matches2triplets
def test_subedge2toks():
hitl = HITLManager()
console = Console()
sen1 = "John loves Mary"
hitl.get_graphs(sen1)[0]
pred, args = (1,), [(0,), (2,)]
hitl.store_triplet(sen1, pre... | adaamko/newpotato | tests/test_utils.py | test_utils.py | py | 920 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "newpotato.hitl.HITLManager",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "rich.console.Console",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "newpotato.utils.matches2triplets",
"line_number": 27,
"usage_type": "call"
}
] |
43791070007 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import statsmodels.api as sm
# -------------------------
# load data, it contains SAT, GPAs but also attendance as dummy variable
# ------------
raw_data = pd.read_csv('../data/1.03. Dummies.csv')
# print(raw_data.head())
# print(raw_data.descri... | warpalatino/public | Machine learning/ML/traditional_ML/regressions/DS1_stat_multi_linear_reg_dummies.py | DS1_stat_multi_linear_reg_dummies.py | py | 2,309 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "statsmodels.api.add_constant",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "statsmodels.api",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "statsmod... |
74016379574 | import datetime
import sys
from pprint import pprint
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor
sys.path.insert(1, 'C:\\Users\\timofey.inozemtsev\\PycharmProjects\\dll_power')
from dll_power import CANMarathon
from PyQt5 import QtWidgets, QtGui
from PyQt5.QtWidgets import QTableWidgetItem, QComboBox,... | hochu-leto/CAN_Analyzer | main.py | main.py | py | 21,499 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "sys.path.insert",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets.QMessageBox.critical",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "PyQt... |
33210562943 | import cv2
import time
import socket
HOST = '0.0.0.0' # Standard loopback interface address (localhost)
PORT = 65432 # Port to listen on (non-privileged ports are > 1023)
#=============Object detection Copy===================
CONFIDENCE_THRESHOLD = 0.5
NMS_THRESHOLD = 0.4
COLORS = [(0, 255, 255), (255, 255, ... | ozanakyel/object_detection_w_PLC | Object_detection_Server.py | Object_detection_Server.py | py | 3,337 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.dnn.readNet",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.dnn",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "cv2.dnn",
"line_num... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.