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
41205805111
# -*- coding: utf-8 -*- """ Created on Thu Oct 17 09:57:54 2019 @author: Chris Tracy """ """ This module contains functions for reading in GridFloat data from the National Elevation Dataset (NED) and plotting the data. NOTE: As of December 2019, this file type is no longer an option when downloading the da...
CTrac314159/elev-gridfloat-py
elev_gridfloat.py
elev_gridfloat.py
py
13,112
python
en
code
0
github-code
18
[ { "api_name": "os.path.path.splitext", "line_number": 64, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 64, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 64, "usage_type": "name" }, { "api_name": "numpy.isclose", "...
29692847042
import torch import torch_mlir import os import argparse os.environ['TRANSFORMERS_CACHE'] = '/tmp/transformers/cache/' def parse_args(): parser = argparse.ArgumentParser(description="Convert a PyTorch model to MLIR.") parser.add_argument("out_mlir_path", nargs="?", default="./output/01_tosa.mlir", help="Path ...
pnnl/soda-opt
docs/tutorials/pytorch/lowering/docker-version/torchscript.py
torchscript.py
py
1,804
python
en
code
15
github-code
18
[ { "api_name": "os.environ", "line_number": 6, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.nn.Conv2d",...
32269256486
import arcpy, sys from os import path from os import unlink username = arcpy.GetParameterAsText(0) appServerRoot = arcpy.GetParameterAsText(1) dataRoot = arcpy.GetParameterAsText(2) gisServerMachine = arcpy.GetParameterAsText(3) folder = arcpy.GetParameterAsText(4) gisConnection = arcpy.GetParameterAsText(5) #GIS ser...
wpears/BathCat
buildfiles/update.py
update.py
py
7,313
python
en
code
0
github-code
18
[ { "api_name": "arcpy.GetParameterAsText", "line_number": 5, "usage_type": "call" }, { "api_name": "arcpy.GetParameterAsText", "line_number": 6, "usage_type": "call" }, { "api_name": "arcpy.GetParameterAsText", "line_number": 7, "usage_type": "call" }, { "api_name"...
4332363628
# Given a string s, find the length of the longest substring without repeating characters. from collections import defaultdict class Solution(object): def lengthOfLongestSubstring(self, s): """ :type s: str :rtype: int """ # Brute Force: # longest_sub = 0 ...
johny1122/LeetCode
Array/medium/lengthOfLongestSubstring.py
lengthOfLongestSubstring.py
py
1,385
python
en
code
0
github-code
18
[ { "api_name": "collections.defaultdict", "line_number": 35, "usage_type": "call" } ]
23526767245
import sys from time import time sys.path.extend(['.']) from transaction import Transaction from merkle_tree import MerkleTree from utils import sha256 class BlockHeader: def __init__(self, index, previous_block_digest, mining_date, nonce, digest): """ Crée l'en-tête d'un bloc :param inde...
Quentin-Berthet/tp_blockchain_Python
block.py
block.py
py
2,466
python
fr
code
0
github-code
18
[ { "api_name": "sys.path.extend", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "merkle_tree.MerkleTree", "line_number": 28, "usage_type": "name" }, { "api_name": "transaction.Transa...
40820422263
import yaml import uuid import time import qrcode from io import BytesIO from flask import g from app.models.coupon_finder_db_model import User, Category, Coupon from sqlalchemy.orm import sessionmaker from qiniu import Auth, put_file from datetime import datetime from . import coupon_finder_engine with open('app/conf...
Shuobin-P/coupon_finder_python
app/utils.py
utils.py
py
2,771
python
en
code
0
github-code
18
[ { "api_name": "yaml.safe_load", "line_number": 14, "usage_type": "call" }, { "api_name": "app.models.coupon_finder_db_model.Category", "line_number": 17, "usage_type": "argument" }, { "api_name": "app.models.coupon_finder_db_model.Category.name", "line_number": 17, "usage...
36993238117
from flask import Flask from flask_cors import CORS import os from . import config from .app_blueprint import bp import logging __version__ = "0.2.12" def create_app(test_config=None): app = Flask(__name__) CORS(app, expose_headers='WWW-Authenticate') configure_app(app) if test_config is not None...
seung-lab/NeuroglancerJsonServer
neuroglancerjsonserver/__init__.py
__init__.py
py
979
python
en
code
3
github-code
18
[ { "api_name": "flask.Flask", "line_number": 14, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 15, "usage_type": "call" }, { "api_name": "app_blueprint.bp", "line_number": 22, "usage_type": "argument" }, { "api_name": "os.getenv", "lin...
40646763766
import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pl from matplotlib.colors import LogNorm, Normalize import matplotlib as mpl from astropy.io import fits, ascii from astropy.modeling import models from astropy import modeling from astropy import units as u # from kpicdrp import background,...
danechever/VFN-Lab
KPIC_VFN_cals/Calibration/extract_spec_flux.py
extract_spec_flux.py
py
33,132
python
en
code
1
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 43, "usage_type": "call" }, { "api_name": "Track_Cam_cmds.TC_cmds", "line_number": 46, "usage_type": "call" }, { "api_name": "Star_Tracker_cmds.Tracking_cmds", "line_number": 47, "usage_type": "call" }, { "ap...
74782662761
"""Added complain table Revision ID: 485543c154fc Revises: c6d2d23080c5 Create Date: 2022-11-03 11:14:20.799902 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '485543c154fc' down_revision = 'c6d2d23080c5' branch_labels = None depends_on = None def upgrade():...
danielTunwashe/myBlog
migrations/versions/485543c154fc_added_complain_table.py
485543c154fc_added_complain_table.py
py
956
python
en
code
0
github-code
18
[ { "api_name": "alembic.op.create_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
42904249424
import tweepy import time auth = tweepy.OAuth1UserHandler( '7POHEsJv6mrw668KcNTcyKmPs', '17a9opR34yX4YeJ2wnVSXkpyxev1liT8jmbPG4weMLCxDIamXn', '1597932774253809665-vX7OmjMr07p1OrMnpJgCDv3M7bP33G', 'cEnXNZjnZ1KErGsTOCYgWqjv7qo0lAzzFrrKftpkCY1zJ' ) api = tweepy.API(auth, wait_on_rate_limit=True) for follower in twe...
kshitij-codes/twitter-bot
twitter_bot.py
twitter_bot.py
py
889
python
en
code
0
github-code
18
[ { "api_name": "tweepy.OAuth1UserHandler", "line_number": 4, "usage_type": "call" }, { "api_name": "tweepy.API", "line_number": 8, "usage_type": "call" }, { "api_name": "tweepy.Cursor", "line_number": 11, "usage_type": "call" }, { "api_name": "tweepy.Cursor", "...
75439637800
""" Author: CHR-onicles© Date: 05/12/2020 DSC UG Python Challenge - Time Tracker App. """ from tkinter import * from tkcalendar import * from tkinter.filedialog import askdirectory from tkinter import messagebox from PIL import Image, ImageTk from datetime import datetime as dt import openpyxl import os import thread...
CHR-onicles/DSC-UG-Python-Challenge
main.py
main.py
py
41,822
python
en
code
1
github-code
18
[ { "api_name": "os.getcwd", "line_number": 59, "usage_type": "call" }, { "api_name": "PIL.ImageTk.PhotoImage", "line_number": 134, "usage_type": "call" }, { "api_name": "PIL.ImageTk", "line_number": 134, "usage_type": "name" }, { "api_name": "PIL.Image.open", "...
18104881181
from django.shortcuts import render from .models import Order, OrderItem from .forms import OrderCreateForm from cart.cart import Cart from django.contrib.admin.views.decorators import staff_member_required from django.shortcuts import get_object_or_404, redirect from .render import render_to_pdf from django.conf impor...
abdi-momo/SalesManagement
orders/views.py
views.py
py
7,842
python
en
code
0
github-code
18
[ { "api_name": "cart.cart", "line_number": 23, "usage_type": "name" }, { "api_name": "cart.cart.Cart", "line_number": 23, "usage_type": "call" }, { "api_name": "forms.OrderCreateForm", "line_number": 24, "usage_type": "call" }, { "api_name": "cart.cart.coupon", ...
39799416529
from bs4 import BeautifulSoup import re import requests def get_joke(): url = "https://icanhazdadjoke.com/" reading = requests.get(url) soup = BeautifulSoup(reading.text, "lxml") # print(reading.text) spans = soup.find_all('div', {'class': "card-content"}) # print(spans) return spans[0].fin...
GaryDoooo/emoji_game
get_a_joke.py
get_a_joke.py
py
534
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 7, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 8, "usage_type": "call" } ]
17079867439
from sklearn.linear_model import LinearRegression from sklearn.linear_model import Ridge from sklearn.tree import DecisionTreeRegressor from sklearn import linear_model from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestRegressor import pandas as pd import numpy as np from skle...
soorya-prakash/automated_machine_learning_code
evaluate_params.py
evaluate_params.py
py
13,555
python
en
code
0
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 24, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 25, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 26, "usage_type": "call" }, { "api_name": "pandas.DataFrame",...
11872786101
# -*- coding: utf-8 -*- """ Created on Mon Feb 17 21:02:08 2014 @author: ventilator Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107. A modern encr...
ventilator/peuler
problem 059 - XOR crypto/problem.py
problem.py
py
2,518
python
en
code
0
github-code
18
[ { "api_name": "numpy.loadtxt", "line_number": 39, "usage_type": "call" }, { "api_name": "itertools.product", "line_number": 40, "usage_type": "call" }, { "api_name": "itertools.cycle", "line_number": 41, "usage_type": "call" } ]
71427499880
# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O...
aorursy/new-nb-3
jamebondnguyen_simple-nyc-taxi-fare-starter.py
jamebondnguyen_simple-nyc-taxi-fare-starter.py
py
6,052
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.cos", "line_n...
3273117121
import tensorflow as tf import numpy as np from bench.core.executer import Executer def accuracy(pred, target, topk=1, thresh=None): if isinstance(topk, int): topk = (topk, ) return_single = True else: return_single = False maxk = max(topk) if pred.shape[0] == 0: accu ...
DeepLink-org/DLOP-Bench
bench/samples/long_tail/mmdetection_accuracy/xla_impl.py
xla_impl.py
py
1,339
python
en
code
38
github-code
18
[ { "api_name": "tensorflow.zeros", "line_number": 15, "usage_type": "call" }, { "api_name": "tensorflow.shape", "line_number": 15, "usage_type": "call" }, { "api_name": "tensorflow.math.top_k", "line_number": 17, "usage_type": "call" }, { "api_name": "tensorflow.ma...
43475312382
# -*- coding: utf-8 -*- """ @Author: xiezizhe @Date: 23/6/2020 下午7:29 """ from typing import List class Solution: def maximalSquare(self, matrix: List[List[str]]) -> int: if not matrix: return 0 m, n = len(matrix), len(matrix[0]) ret = 0 dp = [[0 for __ in range(n)]...
forrest0402/leetcode
python/221. Maximal Square.py
221. Maximal Square.py
py
1,029
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 12, "usage_type": "name" } ]
16324219620
from torch import nn, einsum import torch from functools import partial from src.models.helpers import exists, default, PreNorm, SinusoidalPositionEmbeddings, Residual from src.models.conv_blocks import ResnetBlock, Downsample, Upsample from src.models.attention import Attention, LinearAttention from src.train.util i...
stanipov/pytorch-diffusion
src/models/unet.py
unet.py
py
9,546
python
en
code
0
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 11, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 70, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
32922412695
import os import pandas as pd import numpy as np import tensorflow as tf from os.path import normpath from tensorflow.math import reduce_sum from tensorflow.keras import ( Input, Model ) from tqdm.auto import tqdm from joblib import Parallel, delayed from statsmodels.stats.multitest im...
npdeloss/mepp
mepp/utils.py
utils.py
py
15,529
python
en
code
1
github-code
18
[ { "api_name": "tensorflow.config.set_visible_devices", "line_number": 34, "usage_type": "call" }, { "api_name": "tensorflow.config", "line_number": 34, "usage_type": "attribute" }, { "api_name": "tensorflow.config.threading.set_intra_op_parallelism_threads", "line_number": 35...
9673716479
from __future__ import absolute_import from __future__ import print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages from setuptools import setup def read(*names, **k...
jshernandezs/swat-pytools
setup.py
setup.py
py
1,893
python
en
code
13
github-code
18
[ { "api_name": "io.open", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 18, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_num...
13731877375
from ultralytics import YOLO from PIL import Image model = YOLO("Models/YoloV8_own/best.pt") results = model.predict("Pictures/germanShepherd.jpg") result = results[0] len(result.boxes) box = result.boxes[0] # print("Object type:",box.cls[0]) # print("Coordinates:",box.xyxy[0]) # print("Probability:",box.conf[0]) # ...
CptTemplar1/Rozpoznawanie_obrazow
RozpoznawanieRasPsow/Code/UseModels/Yolov8.py
Yolov8.py
py
694
python
en
code
0
github-code
18
[ { "api_name": "ultralytics.YOLO", "line_number": 4, "usage_type": "call" }, { "api_name": "PIL.Image.fromarray", "line_number": 26, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 26, "usage_type": "name" } ]
7474679137
from typing import List import pandas as pd import pytest from numpy.testing import assert_allclose from make_dataset import read_data from entities.feature_params import FeatureParams from src.features.build_features import process_features, extract_target, build_transformer @pytest.fixture def feature_params( ...
made-ml-in-prod-2021/evgeniimunin
ml_project/tests/features/test_make_features.py
test_make_features.py
py
1,506
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "entities.feature_params.FeatureParams", "line_number": 16, "usage_type": "call" }, { "api_name": "pytest....
35505199977
from __future__ import division,print_function import sys,random sys.dont_write_bytecode = True import housing,ranges from rangesLib import * # add in scorerd. abcd mre, lift def g(x): return ('%g' % x) def _rangeLib(seed=1): random.seed(seed) def show(n,rule): print(n,g(rule.score),rule) #print(n,sorte...
ai-se/leaner
src/ranker.py
ranker.py
py
1,501
python
en
code
0
github-code
18
[ { "api_name": "sys.dont_write_bytecode", "line_number": 3, "usage_type": "attribute" }, { "api_name": "random.seed", "line_number": 13, "usage_type": "call" }, { "api_name": "housing.housing", "line_number": 17, "usage_type": "call" }, { "api_name": "ranges.sdiv",...
26505520012
from multiprocessing.sharedctypes import Value import atexit import os import wandb from pathlib import Path from minerl3161.agents import BaseAgent class Checkpointer: def __init__( self, agent: BaseAgent, checkpoint_every: int = None, use_wandb: bool = True, use_ate...
will-maclean/MineRL
src/minerl3161/utils/checkpointer.py
checkpointer.py
py
2,494
python
en
code
2
github-code
18
[ { "api_name": "minerl3161.agents.BaseAgent", "line_number": 14, "usage_type": "name" }, { "api_name": "atexit.register", "line_number": 46, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 65, "usage_type": "call" }, { "api_name": "os.path", ...
33595526020
import sys; sys.path.extend(['../crypto_trading']) import pandas as pd import os import asyncio from pathlib import Path from market.tardis import Tardis, TardisType, BitMEX, instrument_info, download_book_change_tasks, download_task from calendar import monthrange, isleap import datetime as dt # https://stackov...
qtests/tardis_data
TData_lib.py
TData_lib.py
py
2,527
python
en
code
0
github-code
18
[ { "api_name": "sys.path.extend", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "calendar.isleap", "line_number": 18, "usage_type": "call" }, { "api_name": "calendar.monthrange", ...
7140998180
# -*- coding:utf-8 -*- from sklearn.datasets import load_digits from scipy import optimize import numpy as np import matplotlib.pyplot as plt import scipy.io as sio # 这个数据集中并没有图片,而是经过提取得到的手写数字特征和标记,就免去了我们的提取数据的麻烦, # 但是在实际的应用中是需要我们对图片中的数据进行提取 digits = load_digits() # 1797*64 共有1797个数据,0 ~9中的某个,均为8*8像素,故有64列,每列代表其像素的灰度...
Messi-Q/Coursera-ml-class-ex
one-vs-all_logistic_regression/one-vs-all_logistic_regression.py
one-vs-all_logistic_regression.py
py
5,992
python
zh
code
3
github-code
18
[ { "api_name": "sklearn.datasets.load_digits", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.flatnonzero", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.random.choice", "line_number": 24, "usage_type": "call" }, { "api_name": "nu...
19061735874
''' Code to plot graph using data file Alexandre Mascarenhas ''' import json import shutil import itertools import operator import random import numpy as np import pandas as pd import math import matplotlib.pyplot as plt import datetime import os import csv import sys cDate = datetime.datetime.now() year = cDate.year...
AbEC-EC/AbEC
abec/metrics/metrics.py
metrics.py
py
3,046
python
en
code
2
github-code
18
[ { "api_name": "datetime.datetime.now", "line_number": 20, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 35, "usage_type": "call" }, { "api_name": "pandas.u...
7206077181
""" Created on Dec 13, 2018 @author: Yuedong Chen """ from data import create_dataloader from model import create_model from visualizer import Visualizer import copy class BaseSolver(object): """docstring for BaseSolver""" def __init__(self): super(BaseSolver, self).__init__() ...
donydchen/FMPN-FER
solvers/base_solver.py
base_solver.py
py
2,327
python
en
code
92
github-code
18
[ { "api_name": "visualizer.Visualizer", "line_number": 20, "usage_type": "call" }, { "api_name": "data.create_dataloader", "line_number": 50, "usage_type": "call" }, { "api_name": "model.create_model", "line_number": 51, "usage_type": "call" }, { "api_name": "data....
16516175327
import logging from datetime import datetime, timedelta from aiogram import Bot, Dispatcher, executor, types from aiogram.contrib.fsm_storage.memory import MemoryStorage from aiogram.dispatcher import FSMContext from aiogram.types import ReplyKeyboardRemove from config import API_TOKEN, EMAIL_DOMAIN from custom_funcs...
nodir-malikov/1second-mail-bot
main.py
main.py
py
4,139
python
ru
code
1
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 16, "usage_type": "attribute" }, { "api_name": "aiogram.Bot", "line_number": 17, "usage_type": "call" }, { "api_name": "config.API_TOKEN", ...
40721919840
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import * import BackGround import sqlite3 class Ui_QueryWindow(object): def setupUi(self, QueryWindow): QueryWindow.setObjectName("QueryWindow") QueryWindow.resize(911, 800) self.centralwidget = QtWidgets.QWidget(QueryWindow...
nguyenngocthien0206/PyQt5-Student-Management
UI_Python/QueryWindow.py
QueryWindow.py
py
7,598
python
en
code
0
github-code
18
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 13, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets", "line_number": 13, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QLabel", "line_number": 15, "usage_type": "call" }, { "api_name": "PyQt5....
42844598840
import time import pytest from fastapi.testclient import TestClient from productClass import Product from main import app client = TestClient(app) test_product = Product( product_name="pytest", description="new test product", quantity_available=4, contact_info="mail.com" ) test_product_json_data = {...
nqoy/TreasureJunk
app/backend/database_service/test_endpoints.py
test_endpoints.py
py
2,524
python
en
code
0
github-code
18
[ { "api_name": "fastapi.testclient.TestClient", "line_number": 7, "usage_type": "call" }, { "api_name": "main.app", "line_number": 7, "usage_type": "argument" }, { "api_name": "productClass.Product", "line_number": 9, "usage_type": "call" }, { "api_name": "time.sle...
8946746759
import re import glob import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy.ndimage import gaussian_filter1d plt.rcParams.update({ 'text.usetex': True, 'text.latex.preamble': r'\usepackage{siunitx}' }) plt.style.use('ggplot') # importing files into dataframes files = glob.glob('da...
davifeliciano/franck_hertz
plot2.py
plot2.py
py
2,884
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.rcParams.update", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 8, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 8, "usage_type": "name" }, { "...
14064998834
# -*- coding = utf-8 -*- # @time:2020/9/22 23:51 # Author:TC # @File:网格搜索+xgboost.py # @Software:PyCharm from sklearn.datasets import load_iris from xgboost import plot_importance from matplotlib import pyplot as plt from sklearn.metrics import accuracy_score import xgboost as xgb import pandas as pd from ...
Chantown1227/xgboost-gridsearchcv
网格搜索+xgboost.py
网格搜索+xgboost.py
py
1,996
python
en
code
2
github-code
18
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 20, "usage_type": "call" }, { "api_name": "xgboost.XGBClassifier", "line_number": 35, "usage_type": "call" }, ...
23152620619
# -*- coding: utf-8 -*- import numpy as np from collections import Counter def play_round(player, board, s, win_size): print('\n--------------------------------') print(f"Turn {turn} :: {symbol[player]}'s move") print('--------------------------------\n') while True: print_board(board, s) ...
erikblanchard/tictac_py
tictactoe-main.py
tictactoe-main.py
py
6,671
python
en
code
0
github-code
18
[ { "api_name": "numpy.diag", "line_number": 59, "usage_type": "call" }, { "api_name": "numpy.diag", "line_number": 60, "usage_type": "call" }, { "api_name": "numpy.fliplr", "line_number": 60, "usage_type": "call" }, { "api_name": "numpy.diag", "line_number": 62...
2285176797
import arxiv # max_results = float('inf'), search = arxiv.Search( query = "Word Embedding in Bangla", id_list = [], max_results = 10, sort_by = arxiv.SortCriterion.Relevance, sort_order = arxiv.SortOrder.Descending ) for result in search.results(): print(result.title) result.download_pdf()
abj-paul/BNLP-Knowledge-Graph
webscraping/main.py
main.py
py
309
python
en
code
0
github-code
18
[ { "api_name": "arxiv.Search", "line_number": 3, "usage_type": "call" }, { "api_name": "arxiv.SortCriterion", "line_number": 7, "usage_type": "attribute" }, { "api_name": "arxiv.SortOrder", "line_number": 8, "usage_type": "attribute" } ]
6094894677
import logging import subprocess import os import time import shlex from ..config import sim_config class Sim(): def __init__(self, port, time_till_timeout = sim_config.time_till_timeout): ''' A Sim object starts and holds the donkeysim subprocess. It must be pinged every time_till_timeout seconds with sel...
JBarmentlo/Self-Aware-Driving-Patate
srcs/simlaunch3000/src/modules/Sim.py
Sim.py
py
2,910
python
en
code
3
github-code
18
[ { "api_name": "config.sim_config.time_till_timeout", "line_number": 12, "usage_type": "attribute" }, { "api_name": "config.sim_config", "line_number": 12, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 24, "usage_type": "call" }, { "api_...
22835755
import requests from bs4 import BeautifulSoup url = 'https://finance.yahoo.com/quote/MSFT/balance-sheet?p=MSFT' page = requests.get(url) page_content = page.content soup = BeautifulSoup(page_content, 'html.parser') table = soup.find_all('div', {'class': "M(0) Whs(n) BdEnd Bdc($seperatorColor) D(itb)"}) for t in table:...
JorgePCDV/pcdv-algo-trading
1_getting_data/web_scraping.py
web_scraping.py
py
450
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 5, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 7, "usage_type": "call" } ]
4820033732
""" 867. Transpose Matrix Given a 2D integer array matrix, return the transpose of matrix. The transpose of a matrix is the matrix flipped over its main diagonal, switching the matrix's row and column indices. Example1: Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [[1,4,7],[2,5,8],[3,6,9]] Example2: Input: matr...
tkwang0530/LeetCode
0867.py
0867.py
py
1,423
python
en
code
4
github-code
18
[ { "api_name": "typing.List", "line_number": 29, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 41, "usage_type": "attribute" }, { "api_name": "unittest.main", "line_number": 53, "usage_type": "call" } ]
37710109667
#!/usr/bin/env python # -*- coding: utf-8 -*- import cv2 import numpy as np import glob import filter def remove_objects(img, lower_size=None, upper_size=None): # find all objects nlabels, labels, stats, centroids = cv2.connectedComponentsWithStats(img) sizes = stats[1:, -1] _img = np.zero...
oohara64531/image-process
remove_search.py
remove_search.py
py
2,283
python
en
code
0
github-code
18
[ { "api_name": "cv2.connectedComponentsWithStats", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.bitwise_xor", "line_number": 38, "usage_type": "call" }, { "api_name": "cv2.coun...
5758569430
from typing import List, Optional, Tuple class Node: def __init__(self, key=None, value=None): self.key = key self.value = value self.left = None self.right = None self.parent = None class TreeMap: def __init__(self): self.root = None self.length = 0 ...
veronica-zdanovich/code-challenges-public
treeMap/tree_map.py
tree_map.py
py
4,807
python
en
code
0
github-code
18
[ { "api_name": "typing.Tuple", "line_number": 98, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 98, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 150, "usage_type": "name" }, { "api_name": "typing.Optional", "line...
25812080882
import pandas as pd df= pd.read_csv("Seed_Data.csv") print(df.describe) df.info() X = df.iloc[:,0:7] X.info() y = df.iloc[:,7] print(y.describe) import sklearn from sklearn import svm from sklearn.svm import SVC from sklearn.model_selection import train_test_split X_train,X_test,y_train,y_test= trai...
yashpatil02121/PYTHON
sklearn/03_SVC model.py
03_SVC model.py
py
689
python
en
code
1
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 2, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 19, "usage_type": "call" ...
22809042967
from typing import Union from django.shortcuts import get_object_or_404 from rest_framework import permissions from rest_framework.exceptions import PermissionDenied from paasng.platform.applications.constants import ApplicationRole from paasng.platform.applications.models import Application, ApplicationMembership fr...
leafage-collb/bk-paas
apiserver/paasng/paasng/accounts/permissions/application.py
application.py
py
6,325
python
en
code
null
github-code
18
[ { "api_name": "base.ProtectedResource", "line_number": 15, "usage_type": "name" }, { "api_name": "rest_framework.permissions", "line_number": 17, "usage_type": "name" }, { "api_name": "paasng.platform.applications.constants.ApplicationRole", "line_number": 38, "usage_type...
4865626545
""" Singly Linked List implementation in Python 3.10 Node: (the first node is called: head) - data: data it stored in Node - next_node: contains the reference to next node LinkedLists are used as: queues/stacks/graphs """ from typing import Any # Create a Node: class Node: """ Class that creates each node ...
Sentymental/data-structures
linked_list/linked_list.py
linked_list.py
py
2,975
python
en
code
0
github-code
18
[ { "api_name": "typing.Any", "line_number": 21, "usage_type": "name" } ]
911799987
import wandb import time import numpy as np NO_REWARD_VALUE = 1000 NO_POSITION_VALUE = 10000 def train(agent, env, config): print("Starting training...") update_timestep = config.update_multiplier * env.max_ep_length debug = False time_step = 0 # training loop reward_times = np.ones(config.num_...
KachmanLab/PennWorldEnvironment
build/lib/TrainingLoops/train.py
train.py
py
2,561
python
en
code
0
github-code
18
[ { "api_name": "numpy.ones", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 16, "usage_type": "call" }, { "api_name": "time.time", "line_number": 17, "usage_type": "call" }, { "api_name": "time.time", "line_number": 24, ...
16349787991
from django.views.decorators.http import require_http_methods from django.http import JsonResponse from common.json import ModelEncoder import json from .models import InvVO, Technician, ServiceAppointment class InvVOEncoder(ModelEncoder): model = InvVO properties = [ "VINVO", "VIP", ] class Tech...
bmklei8p/motor-empire
service/api/service_rest/api_views.py
api_views.py
py
3,137
python
en
code
0
github-code
18
[ { "api_name": "common.json.ModelEncoder", "line_number": 8, "usage_type": "name" }, { "api_name": "models.InvVO", "line_number": 9, "usage_type": "name" }, { "api_name": "common.json.ModelEncoder", "line_number": 14, "usage_type": "name" }, { "api_name": "models.T...
42864816880
import logging from django_gcp.tasks import OnDemandTask from example.models import ERROR_STATUS, IN_PROGRESS_STATUS, FooFightingQuestion, FooFightingTest logger = logging.getLogger(__name__) class FooFightingTestTask(OnDemandTask): """An on-demand task to prepare and ask a question to foo-fighting-service ...
octue/exa
server/example/tasks.py
tasks.py
py
2,167
python
en
code
1
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "django_gcp.tasks.OnDemandTask", "line_number": 9, "usage_type": "name" }, { "api_name": "example.models.FooFightingTest.objects.get", "line_number": 30, "usage_type": "call" }, ...
40980391011
import time import pandas as pd from datetime import datetime import numpy as np from sklearn import preprocessing import matplotlib import matplotlib.pyplot as plt import seaborn as sns from scipy.stats import pearsonr import os from matplotlib.font_manager import FontProperties from statistics import stdev import...
nsfcac/gpupowermodel
archive/basic/pwrperf.py
pwrperf.py
py
5,171
python
en
code
3
github-code
18
[ { "api_name": "pwrcommon.readMetrics", "line_number": 25, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 27, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 27, "usage_type": "name" }, { "api_name": "matp...
19470618472
import os import argparse from render import * def run_script(args): steps = args.num_steps env_name = args.env seed = args.seed if args.episodic: train_beh = lambda x: "python3 ./BCQ/discrete_BCQ/main.py --env=" + str(env_name) + " --max_timesteps=" + str(x) + " --seed=" + str(seed) + " --epi...
shamith2/rl
AMD_Power_Scaling/scripts/rl_model/script.py
script.py
py
2,541
python
en
code
0
github-code
18
[ { "api_name": "os.system", "line_number": 20, "usage_type": "call" }, { "api_name": "os.system", "line_number": 23, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 27, "usage_type": "call" } ]
25675318760
#!/usr/bin/env python3 # По материалам интернета: # https://habrahabr.ru/post/321834/ # https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html # Отключение предупреждений и информационных сообщений по уровням. import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # Отключение пред...
lizatish/DigitRecognizer
DigitRecognizer.py
DigitRecognizer.py
py
7,471
python
ru
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "warnings.filterwarnings", "line_number": 11, "usage_type": "call" }, { "api_name": "keras.models.Sequential", "line_number": 50, "usage_type": "call" }, { "api_name": "keras....
29036691651
import matplotlib.pyplot as plt ## scatter plots x = [2, 4, 6, 8, 10] y = [6, 7, 4, 2, 9] plt.scatter(x, y, label="Sc1", color="r", marker="^") plt.xlabel("X-axis") plt.ylabel("Y-axis") plt.title("Simple graph") plt.legend() plt.show()
maddhruv/raw
matplotlib/scatter_plot.py
scatter_plot.py
py
242
python
en
code
2
github-code
18
[ { "api_name": "matplotlib.pyplot.scatter", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.xlabel", "line_number": 9, "usage_type": "call" }, { "api_name": "mat...
75327309800
from model.afnonet import BaseModel import torch.nn as nn import torch from einops.layers.torch import Rearrange from networks.utils.utils import DropPath, PatchEmbed from functools import partial class PatchEmbedAlignModel(BaseModel): def __init__(self, low_level_img_size=None, low_level_patch_size=None, ...
veya2ztn/Seq2SeqAutoregressiveModel
model/CaptibUpModel/align_model.py
align_model.py
py
2,326
python
en
code
2
github-code
18
[ { "api_name": "model.afnonet.BaseModel", "line_number": 8, "usage_type": "name" }, { "api_name": "networks.utils.utils.PatchEmbed", "line_number": 16, "usage_type": "call" }, { "api_name": "networks.utils.utils.PatchEmbed", "line_number": 17, "usage_type": "call" }, {...
30410229767
import torch ALPHA = 0.8 GAMMA = 2 class DiceLoss(nn.Module): def __init__(self, weight=None, size_average=True): super(DiceLoss, self).__init__() def forward(self, inputs, targets, smooth=1): inputs = inputs.view(-1) targets = targets.view(-1) intersection = (inputs * targe...
VigneshS10/Segmentation-VGG19
utils/losses.py
losses.py
py
1,398
python
en
code
2
github-code
18
[ { "api_name": "torch.sigmoid", "line_number": 42, "usage_type": "call" }, { "api_name": "torch.exp", "line_number": 48, "usage_type": "call" } ]
1814391990
import matplotlib.pyplot as plt from matplotlib.patches import Patch color_evt = { 'offer received': 'red', 'offer viewed': 'blue', 'transaction': 'black', 'offer completed': 'yellow' } legend_elements = [ Patch(facecolor='red', label='offer received'), Patch(facecolor='blue', label='offer vi...
6one2/StarbucksChallenge
code/data_visualization.py
data_visualization.py
py
1,834
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.patches.Patch", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib.patches.Patch", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.patches.Patch", "line_number": 15, "usage_type": "call" }, { "api_na...
7248904844
from cmath import sqrt import scipy.linalg as la x,y,z = 30,10,20 volume = 30*20*10 CUBE = [x,y,z] STEEL = { "yield": 350, "elastic": 210000, "shear":81000, "poisson":0.3 } ALUMINIUM = { "yield": 270, "elastic": 70000, "shear":27000, "poisson":0.3 } # data points: ...
mbfak/MECH426
maria_proj.py
maria_proj.py
py
3,175
python
en
code
0
github-code
18
[ { "api_name": "cmath.sqrt", "line_number": 55, "usage_type": "call" }, { "api_name": "scipy.linalg.eig", "line_number": 58, "usage_type": "call" }, { "api_name": "scipy.linalg", "line_number": 58, "usage_type": "name" } ]
25096621653
from snowflake.connector import DictCursor def databases_get(self,env_database_prefix:str)->dict: cur = self._conn.cursor(DictCursor) query = "SHOW DATABASES like '" + env_database_prefix + "%' in ACCOUNT;" data=[] try: cur.execute(query) for rec in cur: nw = {} ...
metaopslabs/snowflake_deployer
src/snowflake/functions/databases_get.py
databases_get.py
py
735
python
en
code
0
github-code
18
[ { "api_name": "snowflake.connector.DictCursor", "line_number": 4, "usage_type": "argument" } ]
331809252
''' Various utlity functions that are independant of any Django app or model. ''' from nturl2path import pathname2url as ntpathname2url from nturl2path import url2pathname as url2ntpathname import random import re import string from unicodedata import normalize from urllib.parse import urljoin, urlparse from urllib.re...
RecursiveGreen/spradio-django2
savepointradio/core/utils.py
utils.py
py
6,367
python
en
code
0
github-code
18
[ { "api_name": "string.ascii_letters", "line_number": 47, "usage_type": "attribute" }, { "api_name": "string.digits", "line_number": 47, "usage_type": "attribute" }, { "api_name": "string.punctuation", "line_number": 47, "usage_type": "attribute" }, { "api_name": "...
31512021488
import sys import pygame from settings import Settings from ship import Ship class AlienInvasion: """初始化游戏并创建游戏""" def __init__(self): pygame.init() self.settings = Settings() self.screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) self.settings.screen_wi...
wjyLearn/Learning-Python
practice_proj/AlienInvasion.py
AlienInvasion.py
py
1,950
python
en
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 10, "usage_type": "call" }, { "api_name": "settings.Settings", "line_number": 12, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.display"...
71426596520
# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra import pandas as pd # data processing, CSV fil...
aorursy/new-nb-3
fatmakursun_bike-sharing-feature-engineering.py
fatmakursun_bike-sharing-feature-engineering.py
py
6,271
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 27, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 32, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 34, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "...
15856630367
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ to compile fortran code, mk_fortran.f90: try first this f2py -c mk_fortran.f90 -m mankendall_fortran_repeat_exp2 --fcompiler=gfortran if not try this LDFLAGS=-shared f2py -c mk_fortran.f90 -m mankendall_fortran_repeat_exp2 --fcompiler=gfortran """ import pandas as ...
aspyk/vegeo_trend_analysis
time_series_reader.py
time_series_reader.py
py
36,953
python
en
code
0
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 44, "usage_type": "call" }, { "api_name": "pandas.Period", "line_number": 53, "usage_type": "call" }, { "api_name": "pandas.date_range", "line_number": 54, "usage_type": "call" }, { "api_name": "pandas.date_range", ...
6051967724
#!/usr/bin/python # -*- coding: UTF-8 -*- import json as json __author__ = 'Mx' pinyin_analyzer={ "index" : { "analysis" : { "tokenizer" : { "py" : { "lowercase" : True, "type" : "pinyin", "keep_original" : False, ...
mmxmmy/NiceFilm
els/gen_mapping.py
gen_mapping.py
py
4,010
python
en
code
0
github-code
18
[ { "api_name": "json.dumps", "line_number": 73, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 87, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 100, "usage_type": "call" } ]
28959545141
# -*- coding: utf-8 -*- import json from pyload.core.utils import parse from ..base.multi_downloader import MultiDownloader class LeechThreeHundreedSixtyCom(MultiDownloader): __name__ = "LeechThreeHundreedSixtyCom" __type__ = "downloader" __version__ = "0.01" __status__ = "testing" __pattern__...
pyload/pyload
src/pyload/plugins/downloaders/LeechThreeHundreedSixtyCom.py
LeechThreeHundreedSixtyCom.py
py
1,461
python
en
code
3,038
github-code
18
[ { "api_name": "base.multi_downloader.MultiDownloader", "line_number": 10, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 35, "usage_type": "call" }, { "api_name": "pyload.core.utils.parse.bytesize", "line_number": 41, "usage_type": "call" }, { ...
11964746438
# -*- coding: utf-8 -*- ############################################################################### ############################################################################### ## ## ## ___ _ _ __ ____ ____ __ _ _ _____...
sammmlow/quadrant
scenarios/pointing_policy/plot_demo_results.py
plot_demo_results.py
py
4,740
python
en
code
10
github-code
18
[ { "api_name": "matplotlib.pyplot.close", "line_number": 28, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 28, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 59, "usage_type": "call" }, { "api_name": "matplotlib.pypl...
2648098143
import numpy as np from scipy import signal def filterButterBP(y, fs, division, rangef): """ Pass-band Butterworth filter, 8th order, central frequencies given by "division" y = array to be filtered fs = sample rate division = 1 for 1/3 octave filtering and = 0 for 1/1 octave filtering """ ...
maiteatin/RIRPA-Software
Functions/filtroButter.py
filtroButter.py
py
2,627
python
en
code
6
github-code
18
[ { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.power", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": ...
70221846120
import numpy as np from six import string_types import tensorflow as tf DEFAULT_PADDING = 'SAME' def layer(tf_op): ''' Python装饰器的用法,具体教程看这个链接: http://wiki.jikexueyuan.com/project/explore-python/Functional/decorator.html 装饰器的作用是:封装成可以组装的基本网络层(卷积、膨胀卷积、池化等),方便组装复杂网络 ''' def layer_decorated(self,...
CSsaan/Deep-learning-of-machine-vision
ch11.通用场景图像分割/DeepLab_TF/deeplab_resnet/network.py
network.py
py
12,322
python
en
code
46
github-code
18
[ { "api_name": "tensorflow.placeholder_with_default", "line_number": 55, "usage_type": "call" }, { "api_name": "tensorflow.constant", "line_number": 55, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 72, "usage_type": "call" }, { "api_name": "te...
71209354281
from ..io.reader import BinaryFileReader from .rsm import Rsm from pprint import pprint class RsmReader(object): def __init__(self): pass @staticmethod def from_file(path) -> Rsm: with open(path, 'rb') as f: rsm = Rsm() reader = BinaryFileReader(f) magic...
cmbasnett/io_scene_rsw
src/rsm/reader.py
reader.py
py
3,610
python
en
code
11
github-code
18
[ { "api_name": "rsm.Rsm", "line_number": 12, "usage_type": "call" }, { "api_name": "io.reader.BinaryFileReader", "line_number": 13, "usage_type": "call" }, { "api_name": "rsm.anim_length", "line_number": 18, "usage_type": "attribute" }, { "api_name": "rsm.shade_typ...
45509180934
import os import gym import random import argparse import numpy as np import tensorflow as tf from networks import CartPoleNetwork from self_play import self_play from replay import ReplayBuffer from config import get_cartpole_config gpus = tf.config.experimental.list_physical_devices('GPU') for gpu in gpus: tf.co...
dummyindex/cmu-10703-reinforcement-learning
F22_10703_HW5/muzero_code_impl/main.py
main.py
py
1,607
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.config.experimental.list_physical_devices", "line_number": 12, "usage_type": "call" }, { "api_name": "tensorflow.config", "line_number": 12, "usage_type": "attribute" }, { "api_name": "tensorflow.config.experimental.set_memory_growth", "line_number":...
11943864064
from flask import request, jsonify from ..model.ItemOrcamento import ItemOrcamento, itemOrcamento_schema, itemOrcamentos_schema from ..model.ItemOrcamento import db def cad_itemOrcamento(): resp = request.get_json() nome = resp['nome'] valor = resp['valor'] item = ItemOrcamento(nome=nome, valor=valor...
ogabrielfelipe/SGOM-Repository
app/controller/itemOrcamentoController.py
itemOrcamentoController.py
py
2,114
python
pt
code
6
github-code
18
[ { "api_name": "flask.request.get_json", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 7, "usage_type": "name" }, { "api_name": "model.ItemOrcamento.ItemOrcamento", "line_number": 11, "usage_type": "call" }, { "api_name": "...
15783734061
import torch import torch.nn as nn import torch.nn.functional as F from ..common.blocks import Conv2dReLU from ..base.model import Model from ..encoders.scse import SCse class TransposeX2(nn.Module): def __init__(self, in_channels, out_channels, use_batchnorm=True, **batchnorm_params): super().__init__(...
okotaku/kaggle_Severstal
segmentation_models_pytorch/linknet/decoder.py
decoder.py
py
4,614
python
en
code
16
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 10, "usage_type": "name" }, { "api_name": "torch.nn.ConvTranspose2d", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.nn", ...
74455665960
from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains PATH = r"C:\Program Files (x86)\chromedriver.exe" # Path of the selenium driver s = Service(executable_path=PATH) driver = w...
merttcetn/cookie-clicker-automation
cookie_clicker.py
cookie_clicker.py
py
1,187
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.chrome.service.Service", "line_number": 7, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 8, "usage_type": "name" }, { ...
26581114296
import pathlib from typing import List import cv2 import h5py import numpy as np import typer def split_text(txt: List[np.bytes_]) -> List[List[str]]: """テキストを文字単位に分割 Args: txt (List[np.bytes_]): テキスト文字列の配列 Returns: List[List[str]]: テキスト文字列の文字単位に分割した配列 """ txt = [i.decode('utf-...
oq-Yuki-po/craft-tensorflow
src/dataset/synthtext.py
synthtext.py
py
2,249
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.bytes_", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.stack", "line_num...
43919011651
import codecs import os from setuptools import setup from release_exporter.version import __version__ here = os.path.abspath(os.path.dirname(__file__)) + os.sep def get_requirements(*parts): return codecs.open(os.path.join(here, *parts), 'r').read().splitlines() setup( name='release-exporter', version...
akshaybabloo/release-exporter
setup.py
setup.py
py
1,430
python
en
code
23
github-code
18
[ { "api_name": "os.path.abspath", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "os.sep", "line_number":...
15929131247
import os,sys import numpy as np import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import pickle from baselines import logger import ppo import gym from train_ppo import * import globals from time import * from utils.plotting_performance import * from utils.utils import * from brs_engine.Dubi...
SFU-MARS/reward-shaping-ttr
heatmap.py
heatmap.py
py
8,431
python
en
code
2
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 28, "usage_type": "attribute" }, { "api_name": "numpy.pi", "line_number": 29, "usage_type": "attribute" }, { "api_name": "numpy.pi", "line_number...
45280891398
import mlflow import sys sys.path.append("~/torch_study/paper/06_BERT/source") from utils import * from finetune.ner_bert import * from finetune.dataset import * import torch import dill import pytorch_lightning as pl import mlflow.pytorch from mlflow.tracking import MlflowClient from pytorch_lightning.callbacks impor...
sigirace/elmo_clone
paper/06_BERT/source/finetune/trainer.py
trainer.py
py
3,642
python
en
code
null
github-code
18
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "pytorch_lightning.LightningModule", "line_number": 17, "usage_type": "attribute" }, { "api_name": "to...
41508763669
import time from node_bfs_class import node import heapq as hq from PIL import Image import imageio import numpy as np import os class graph: """a container structure for nodes""" def __init__(self, map, watch_evolution=True): self.map = [x.copy() for x in map] self.pixel_array = [[(0,0,0) if ...
neilSchroeder/personal-projects
shortest_path_stargate/graph_bfs_class.py
graph_bfs_class.py
py
5,851
python
en
code
1
github-code
18
[ { "api_name": "node_bfs_class.node", "line_number": 35, "usage_type": "call" }, { "api_name": "heapq.heappush", "line_number": 57, "usage_type": "call" }, { "api_name": "heapq.heappop", "line_number": 63, "usage_type": "call" }, { "api_name": "heapq.heappush", ...
38158503004
import libusb1 import usb1 import time import sys from struct import * from datetime import datetime from mccUSB import * class bth_1208LS(mccUSB): """ Settings memory map |===========================================================================================| | Address | Value ...
wjasper/Linux_Drivers
USB/python/bth_1208LS.py
bth_1208LS.py
py
32,335
python
en
code
103
github-code
18
[ { "api_name": "sys.platform.startswith", "line_number": 137, "usage_type": "call" }, { "api_name": "sys.platform", "line_number": 137, "usage_type": "attribute" }, { "api_name": "datetime.datetime", "line_number": 230, "usage_type": "call" }, { "api_name": "libusb...
69800611241
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on Aug 5, 2016 @author: finetu ''' from bs4 import BeautifulSoup import hashlib import json import logging import re from scrapy.selector import Selector from six import string_types import xmltodict import zorba_api from web_crawler.items import WebTargetRes...
firemakergk/web_crawler
web_crawler/spiders/web_spider.py
web_spider.py
py
11,314
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 23, "usage_type": "call" }, { "api_name": "web_crawler.scrapyredis.spiders.RedisSpider", "line_number": 24, "usage_type": "name" }, { "api_name": "zorba_api.InMemoryStore_getInstance", "line_number": 29, "usage_type": "cal...
29149149701
#-*-coding:utf-8 -*- __author__ = 'Jy2881' import numpy as np import matplotlib.pyplot as plt import multivariateGaussian as mG def visualizeFit(X, mu, sigma2): X1,X2 = np.meshgrid(np.arange(0,35,0.5),np.arange(0,35,0.5)) m,n = np.shape(X1) a = X1.ravel().reshape(m*n,1) Z = mG.multivariateGaussian(n...
jy2881/AndrewNg-ML-python
ex8/plot.py
plot.py
py
924
python
en
code
0
github-code
18
[ { "api_name": "numpy.meshgrid", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.shape", "line_number": 10, "usage_type": "call" }, { "api_name": "multivariateGaussian.multivaria...
71426866280
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_csv('../input/train.csv') df.dropna(axis=0) df.set_index('id', inplace = True) df.head() import re from nltk.corpus import stopwords stopWords = set(stopwords.words('english')) #crea...
aorursy/new-nb-3
gooogr_a-deep-dive-into-sklearn-pipelines-forked.py
gooogr_a-deep-dive-into-sklearn-pipelines-forked.py
py
4,348
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 24, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 24, "usage_type": "name" }, { "api_name": "re.s...
72143110119
"""Download Anime""" # For USERGE-X # (C) 2021 All Rights Reserved # Idea by: [TG: @Lostb053] # Author: (github.com/code-rgb) [TG: @DeletedUser420] import asyncio from urllib.parse import quote from bs4 import BeautifulSoup as soup from pyrogram import filters from pyrogram.types import CallbackQuery, InlineKeyboar...
code-rgb/USERGE-X
userge/plugins/bot/gogo.py
gogo.py
py
8,425
python
en
code
130
github-code
18
[ { "api_name": "userge.Message", "line_number": 24, "usage_type": "name" }, { "api_name": "userge.userge.has_bot", "line_number": 25, "usage_type": "attribute" }, { "api_name": "userge.userge", "line_number": 25, "usage_type": "name" }, { "api_name": "userge.userge...
17773249909
#!/usr/bin/env python # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ Module used to parse all the route and scenario configuration parameters. """ import json import math import xml.etree.ElementTree as ET import sys import carla from agents....
zaidtahirbutt/Situation-Coverage-based-AV-Testing-Framework-in-CARLA
scenario_runner-0.9.10/srunner/tools/route_parser.py
route_parser.py
py
23,354
python
en
code
12
github-code
18
[ { "api_name": "json.loads", "line_number": 39, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree.parse", "line_number": 80, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree", "line_number": 80, "usage_type": "name" }, { "api_name": "srunner....
29873972982
import sys from collections import deque input = sys.stdin.readline dr = [-1, 1, 0, 0] dc = [0, 0, -1, 1] R, C = map(int, input().split()) MAP = [list(map(int, input().split())) for _ in range(R)] air = deque([[0, 0]]) q = deque() visited = [[0] * C for _ in range(R)] visited[0][0] = 1 # 처음부터 공기에 노출된 치즈 표면 저장 while...
essk13/Algorithm
01_problem/python/2022/BAEKJOON/BAEKJOON_2636/2636_BAEKJOON.py
2636_BAEKJOON.py
py
1,614
python
ko
code
0
github-code
18
[ { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 10, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" }, { "api_name": "collections.deque",...
28377068589
#!/usr/bin/env python # coding: utf-8 # In[ ]: import pandas as pd import numpy as np from sklearn.pipeline import Pipeline from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.ensemble import RandomForestClassifier from sklearn.feature_extraction.text import CountVectorizer, TfidfVectoriz...
alirezakarimi82/Reddit_project
Modeling.py
Modeling.py
py
3,716
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 24, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 37, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.CountVectorizer", "line_number": 43, "usage_type...
37980871617
import datetime import database as d def sumafecha(fecha,dias_repeticion): fecha = fecha Date = datetime.datetime.strptime(fecha, "%Y-%m-%d") EndDate = str(Date + datetime.timedelta(days=dias_repeticion))[0:10] a = datetime.datetime.strptime(EndDate, "%Y-%m-%d").date() fechaactual= datetime...
manjaro1/python
function.py
function.py
py
963
python
es
code
0
github-code
18
[ { "api_name": "datetime.datetime.strptime", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 6, "usage_type": "attribute" }, { "api_name": "datetime.timedelta", "line_number": 7, "usage_type": "call" }, { "api_name": "dat...
39960020383
from __future__ import absolute_import from __future__ import division from __future__ import print_function import glob import itertools import tempfile from collections import Counter import numpy as np import tensorflow as tf from pathlib import Path from tensorflow.lite.python.op_hint import convert_op_hints_to_...
MiloslavPalaxo/tflite-lstm-text
sentiment-lite3.py
sentiment-lite3.py
py
11,093
python
en
code
3
github-code
18
[ { "api_name": "tensorflow.ConfigProto", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 41, "usage_type": "attribute" }, { "api_name": "numpy.random.shuffle", "line_number": 48, "usage_type": "call" }, { "api_name": "numpy.ra...
14116310752
import os import json import uuid import boto3 from porper.controllers.auth_controller import AuthController class CognitoAuthController(AuthController): def __init__(self, permission_connection=None, loglevel="INFO"): AuthController.__init__(self, permission_connection, loglevel) self.client =...
SungardAS/porper-core
porper/controllers/cognito_auth_controller.py
cognito_auth_controller.py
py
3,316
python
en
code
0
github-code
18
[ { "api_name": "porper.controllers.auth_controller.AuthController", "line_number": 8, "usage_type": "name" }, { "api_name": "porper.controllers.auth_controller.AuthController.__init__", "line_number": 12, "usage_type": "call" }, { "api_name": "porper.controllers.auth_controller.Au...
11492167161
from django.urls import path from . import views urlpatterns = [ path('api-item/', views.Home.as_view()), path('api-item/<str:pk>/', views.Detail.as_view()), path('<str:pk>/add_to_cart/', views.add_to_cart), path('api-cart/', views.cart_view), path('<str:pk>/rmone_from_cart/', views.remove_one_ite...
mohamedhw/djr-e
backend/store/urls.py
urls.py
py
539
python
en
code
0
github-code
18
[ { "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", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", ...
70406591721
import pygame import sys from pygame.sprite import Group from rain_function import create_rains from rain_function import update_rains class Screen_setting(): screen_width = 1000 screen_height = 800 screen_bg_color = (52, 52, 52) # class Rain(Sprite): # def __init__(self, screen): # super()....
RyanLin1995/python
PythonLearning/小游戏/rain/rain_run.py
rain_run.py
py
2,387
python
en
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 60, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 61, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 61, "usage_type": "attribute" }, { "api_name": "pygame.displa...
42879108685
import csv import os from django.core.management.base import BaseCommand from reviews.models import Review import sqlite3 # from django.db import connection from django.conf import settings class Command(BaseCommand): help = 'The Zen of Python' def handle(self, *args, **options): list_files = { ...
sdvkam/api_yamdb
api_yamdb/reviews/management/commands/csv_to_base.py
csv_to_base.py
py
1,435
python
en
code
0
github-code
18
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 10, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "dja...
12862821765
import pyrealsense2 from cv2 import cv2 import numpy as np ImageNumber = 82 #change the following three lines for testing image = cv2.imread(f".\\{ImageNumber}.jpg", cv2.IMREAD_UNCHANGED ) #path to rgb image depthimg = np.array(cv2.imread(f".\\d{ImageNumber}.png", cv2.IMREAD_UNCHANGED )) #path to depth image l...
vinesmsuic/Depth-Cameras
D435i_D455/RS_imageAnalysis.py
RS_imageAnalysis.py
py
1,712
python
en
code
5
github-code
18
[ { "api_name": "cv2.cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.cv2", "line_number": 7, "usage_type": "name" }, { "api_name": "cv2.cv2.IMREAD_UNCHANGED", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.array", "...
22119663143
import re import json file = 'class.txt' # Dst-Site-Prefix: 10.225.76.164/32 DSCP: default [0] Traffic class id:59827542 p1 = re.compile(r'Dst-Site-Prefix:\s*(?P<dst_site_prefix>\S+)\s*DSCP:\s*(?P<dscp>\S*)') # Clock Time: 14:16:10 (CDT) 08/05/2019 p2 = re.compile(r'\S*Clock\s*Time:\s*(?P<clock_t...
jbronikowski/pyATS_Examples
iWAN/class_parser.py
class_parser.py
py
9,369
python
en
code
1
github-code
18
[ { "api_name": "re.compile", "line_number": 7, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 10, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 13, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 16, ...
10596093266
import os import io import sys import pickle import random import argparse import subprocess import numpy as np import torch import pandas as pd from logging import getLogger from itertools import permutations from .logger import create_logger MAIN_DUMP_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.rea...
hagait62/MWT
src/utils.py
utils.py
py
6,008
python
en
code
0
github-code
18
[ { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.realpath", "lin...
7205897124
from config.bd import app,bd,ma class ProfesorPrograma(bd.Model): __tablename__ = 'tblProfesorPrograma' idProfesorPrograma = bd.Column(bd.Integer, primary_key=True) profesorId = bd.Column(bd.Integer, bd.ForeignKey("tblProfesor.codigoProfesor")) programaId = bd.Column(bd.Integer, bd.ForeignKey("tblProgr...
joslex9/Fianl-Final
Model/ProfesorPrograma.py
ProfesorPrograma.py
py
668
python
es
code
0
github-code
18
[ { "api_name": "config.bd.bd.Model", "line_number": 3, "usage_type": "attribute" }, { "api_name": "config.bd.bd", "line_number": 3, "usage_type": "name" }, { "api_name": "config.bd.bd.Column", "line_number": 5, "usage_type": "call" }, { "api_name": "config.bd.bd", ...
72685959720
from unittest import TestCase from hyperlink import URL from minion import traversal from minion.request import Request, Response def path_view(request): """ A renderer (view) that returns a response with the request path. Optionally adds a prefix to the front. """ path = b"/" + b"/".join(eac...
Julian/Minion
minion/tests/test_traversal.py
test_traversal.py
py
4,656
python
en
code
6
github-code
18
[ { "api_name": "minion.request.Response", "line_number": 18, "usage_type": "call" }, { "api_name": "unittest.TestCase", "line_number": 21, "usage_type": "name" }, { "api_name": "minion.traversal.TreeResource", "line_number": 23, "usage_type": "call" }, { "api_name"...
31137527760
import numpy as np import pickle import time import torch from my_io import Vocabulary import io import argparse def load_vectors(fname): fin = io.open(fname, 'r', encoding='utf-8', newline='\n', errors='ignore') n, d = map(int, fin.readline().split()) data = {} for line in fin: tokens = line....
yuewang-cuhk/CMKP
unified_model/prepare_tw_glove_emb.py
prepare_tw_glove_emb.py
py
3,640
python
en
code
21
github-code
18
[ { "api_name": "io.open", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.load", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.random.normal", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.random", "line_numbe...
3102810529
#!/usr/bin/env python import argparse import hashlib import json from flask import Flask, jsonify, abort import yaml app = Flask(__name__) wines = [] supplier_name = '' @app.route('/api/wines/<string:wine_id>', methods=['GET']) def get_wine(wine_id): for wine in wines: if wine.get('id') == wine_id: ...
kragniz/SE31520
service/supplier.py
supplier.py
py
1,815
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_number": 19, "usage_type": "call" }, { "api_name": "flask.abort", "line_number": 20, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_numbe...
71930785640
import sys from typing import List from sklearn.metrics import mean_squared_error import numpy as np import cv2 from numpy.linalg import LinAlgError import matplotlib.pyplot as plt def myID() -> np.int: """ Return my ID (not the friend's ID I copied from) :return: int """ return 2073...
appeldaniel1998/Image-Processing-Assignment-3
ex3_utils.py
ex3_utils.py
py
22,057
python
en
code
0
github-code
18
[ { "api_name": "numpy.int", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "line_number": 22, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 24, "usage_type": "call" }, { "api_name": "cv2.filter2D", "lin...
70124766761
import numpy as np import pytest from point_sort import PointSortTracker, track_dets @pytest.fixture def tracker_params(): return { "max_age": 5, "min_hits": 3, "dist_threshold": 50, } def happy_path_test_data( dim: int = 3, num_frame: int = 5, num_obj: int = 3, have_local_id: b...
Joilence/point-sort
tests/test_track_dets.py
test_track_dets.py
py
3,788
python
en
code
0
github-code
18
[ { "api_name": "pytest.fixture", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.column_stack", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.column_stack...
3597601064
import requests import re from ncl.utils.common.singleton import Singleton from ncl.utils.config.configuration import Configuration from bs4 import BeautifulSoup from bzgi.feed.dal.car_crawler_dal import CarCrawlerDal from bzgi.model.vo.car_vo import CarVO from bzgi.model.vo.elastic_search_vo import ElasticSearchComm...
salar12345/bazdeh-server-crawller
bzgi/feed/logic/car_crawler_logic.py
car_crawler_logic.py
py
5,182
python
en
code
0
github-code
18
[ { "api_name": "ncl.utils.common.singleton.Singleton", "line_number": 15, "usage_type": "name" }, { "api_name": "bzgi.feed.dal.car_crawler_dal.CarCrawlerDal", "line_number": 18, "usage_type": "call" }, { "api_name": "bzgi.model.vo.car_vo.CarVO.DIVAR_CAR_URL", "line_number": 19...
26447706530
import subprocess from collections import defaultdict from multiprocessing import Pool import math import random import pandas as pd import numpy as np import pysam from celescope.tools import utils from celescope.tools.step import Step, s_common from celescope.flv_trust4.__init__ import CHAIN, REF_DIR, TOOLS_DIR # ...
singleron-RD/CeleScope
celescope/flv_trust4/assemble.py
assemble.py
py
10,332
python
en
code
71
github-code
18
[ { "api_name": "celescope.tools.step.Step", "line_number": 20, "usage_type": "name" }, { "api_name": "celescope.tools.step.Step.__init__", "line_number": 46, "usage_type": "call" }, { "api_name": "celescope.tools.step.Step", "line_number": 46, "usage_type": "name" }, {...