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
19409399587
from discord.ext import commands from cryptography.fernet import Fernet def get_token(): with open('cipher\secret_key.key') as f: key = f.readline() with open('cipher\cipher.txt') as f: cipher = f.readline() fernet = Fernet(key.encode()) dectex = fernet.decrypt(cipher.encode()).decode...
asdasdassb/python_class
lol_search/main.py
main.py
py
436
python
en
code
0
github-code
21
[ { "api_name": "cryptography.fernet.Fernet", "line_number": 11, "usage_type": "call" }, { "api_name": "discord.ext.commands.Bot", "line_number": 17, "usage_type": "call" }, { "api_name": "discord.ext.commands", "line_number": 17, "usage_type": "name" } ]
71528090294
from datetime import datetime from common.exceptions.db import NotFoundException from domain.flight_file.entities import FlightFile from domain.flight_file.value_objects import AllowedFiles from presentation.rest.dependencies import get_file_service from presentation.rest.serializers.file import FlightFileSerializer ...
searchwingCV/log-viewer
server/tests/unit/presentation/rest/controllers/test_file_controller.py
test_file_controller.py
py
2,707
python
en
code
1
github-code
21
[ { "api_name": "domain.flight_file.entities.FlightFile", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "name" }, { "ap...
16997992031
import reprlib from dataclasses import dataclass from datetime import datetime from typing import Any, List, Optional from packaging.version import Version from typing_extensions import TypeAlias from cheeseshop.repository.parsing.casts import ( from_bool, from_datetime, from_dict, from_int, from_...
AlexTereshenkov/cheeseshop-query
cheeseshop/repository/package.py
package.py
py
15,931
python
en
code
0
github-code
21
[ { "api_name": "typing.Optional", "line_number": 29, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 30, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 31, "usage_type": "name" }, { "api_name": "typing.Any", "lin...
21846310932
# cooldown.py # By: BentoBot02 # holds the cooldown command import discord import os from discord.ext import commands, tasks import asyncio import globalValues async def cooldown(ctx, args): id = None if len(args) > 0: id = args[0].replace('<', '').replace('@', '').replace('!', ''...
BentoBot02/Karuta-Catalog
cooldown.py
cooldown.py
py
1,065
python
en
code
0
github-code
21
[ { "api_name": "globalValues.catalog.getUser", "line_number": 19, "usage_type": "call" }, { "api_name": "globalValues.catalog", "line_number": 19, "usage_type": "attribute" }, { "api_name": "globalValues.catalog.getServerVoteStr", "line_number": 27, "usage_type": "call" ...
74133430451
import sys vec = sys.argv from datetime import datetime import os def add(item): count = 0 if os.path.exists('C:\\Users\\user\\OneDrive\\Desktop\\todo.txt'): with open('C:\\Users\\user\\OneDrive\\Desktop\\todo.txt','r') as file: lines = file.readlines() for line in lines: ...
ishn123/Todo-app
todo.py
todo.py
py
4,757
python
en
code
0
github-code
21
[ { "api_name": "sys.argv", "line_number": 2, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "datetime.datetime.today", ...
7893740835
from contextlib import contextmanager import maya.app.renderSetup.model.renderSetup as renderSetup @contextlib.contextmanager def maintained_render_layer(): previous_rs = renderSetup.instance().getVisibleRenderLayer() try: yield finally: renderSetup.instance().switchToLayer(previou...
geodesicPenguin/ASS_Render_Layer_Export
assRenderLayerExport.py
assRenderLayerExport.py
py
1,266
python
en
code
0
github-code
21
[ { "api_name": "maya.app.renderSetup.model.renderSetup.instance", "line_number": 6, "usage_type": "call" }, { "api_name": "maya.app.renderSetup.model.renderSetup", "line_number": 6, "usage_type": "name" }, { "api_name": "maya.app.renderSetup.model.renderSetup.instance", "line_...
19373404520
from __future__ import annotations from pathlib import Path from uuid import UUID from ...api.observer import Observable, Observer from ...model.workflow import WorkflowParametersPresenter from ...view.workflow import WorkflowInputDataView class WorkflowInputDataController(Observer): def __init__(self, presente...
AdvancedPhotonSource/ptychodus
ptychodus/controller/workflow/inputData.py
inputData.py
py
2,045
python
en
code
7
github-code
21
[ { "api_name": "api.observer.Observer", "line_number": 10, "usage_type": "name" }, { "api_name": "model.workflow.WorkflowParametersPresenter", "line_number": 12, "usage_type": "name" }, { "api_name": "view.workflow.WorkflowInputDataView", "line_number": 13, "usage_type": "...
1273572915
import math from typing import TypeVar, Iterable, List, Sequence import torch.utils from torch import distributed as dist from torch.utils.data import Dataset, IterableDataset, Subset, Sampler import bisect from classifier.config import ClassifierConfig T_co = TypeVar('T_co', covariant=True) import numpy as np # T...
samarth4149/task2sim
utils/data.py
data.py
py
6,962
python
en
code
22
github-code
21
[ { "api_name": "typing.TypeVar", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.utils.data.Dataset", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 25, "usage_type": "name" }, { "api_name": "torch.utils.data....
610528172
import os import unittest from dotenv import load_dotenv from unittest.mock import patch from symportal_kitchen.email_notifications.submission_status import send_email # Load environment variables from .env file load_dotenv() SENDGRID_EMAIL_SENDER = os.environ.get("SENDGRID_EMAIL_SENDER") class TestSendEmail(unitte...
reefgenomics/symportal_kitchen
tests/email_notifications/test_submission_status_update.py
test_submission_status_update.py
py
1,200
python
en
code
1
github-code
21
[ { "api_name": "dotenv.load_dotenv", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "unittest.TestCase", ...
5963725100
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Dec 12 23:16:53 2020 @author: anujhsawant """ #Importing all the necessary libraries import pandas as pd import numpy as np import matplotlib.pyplot as plt import plotly.express as px from plotly.offline import plot from sklearn import preprocessing fr...
anujhsawant/IBM-HR-Analytics-Employee-Attrition-and-Performance
IBM_HR_Analytics.py
IBM_HR_Analytics.py
py
8,053
python
en
code
0
github-code
21
[ { "api_name": "warnings.filterwarnings", "line_number": 25, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 28, "usage_type": "call" }, { "api_name": "seaborn.countplot", "line_number": 39, "usage_type": "call" }, { "api_name": "matplotlib....
74528225011
import json, requests, re, bs4 import urllib.request as urllib_request import pandas as pd import numpy as np from urllib.request import urlopen, Request from urllib.error import URLError, HTTPError from bs4 import BeautifulSoup def extrai_geracao_consoles(soup, geracao): consoles = [] precos = [] empr...
JaymeNeto/game-consoles-scratch
game-scrap.py
game-scrap.py
py
3,182
python
en
code
0
github-code
21
[ { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 22, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 28, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 33, ...
69888830132
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import json import os import re import collections import numpy from utils import print_daemon class Metrics(): def __init__(self, filename): self.filename = filename self.dataset = self.__load_file(self.filename) self.min_ts, self.max_ts = ...
jancajthaml-openbank/lake
perf/metrics/fascade.py
fascade.py
py
1,167
python
en
code
2
github-code
21
[ { "api_name": "utils.print_daemon", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 43, "usage_type": "call" }, { "api_name": "os.path", "line_number": 43, "usage_type": "attribute" }, { "api_name": "json.load", "line_...
41368810993
from __future__ import print_function import argparse import os import sys import numpy as np from sgdml.utils import io, ui def read_reference_data(f): # noqa C901 eV_to_kcalmol = 0.036749326 / 0.0015946679 e_next, f_next, geo_next = False, False, False n_atoms = None R, z, E, F = [], [], [], []...
stefanch/sGDML
scripts/sgdml_dataset_from_aims.py
sgdml_dataset_from_aims.py
py
4,384
python
en
code
125
github-code
21
[ { "api_name": "sgdml.utils.io._z_str_to_z_dict", "line_number": 37, "usage_type": "attribute" }, { "api_name": "sgdml.utils.io", "line_number": 37, "usage_type": "name" }, { "api_name": "sys.stdout.write", "line_number": 58, "usage_type": "call" }, { "api_name": "...
23307188061
from tkcalendar import Calendar, DateEntry import datetime import tkinter as tk from tkinter import ttk def print_sel(): print(cal.selection_get()) cal.see(datetime.date(year=2016, month=2, day=5)) def example1(): global cal top = tk.Toplevel(root) top.title("Selecione a Data") toda...
MarcieL-Bezerra/Meus_Rascunhos
datapicker.py
datapicker.py
py
1,961
python
en
code
0
github-code
21
[ { "api_name": "datetime.date", "line_number": 8, "usage_type": "call" }, { "api_name": "tkinter.Toplevel", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.date.today", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.date", ...
74667150131
import os import glob from tkinter import * from tkinter import filedialog from PIL import Image, ImageTk class Application(Frame): def __init__(self, master=None): super().__init__(master) self.master = master self.pack() self.create_button(cmd=self.getFolder) self.create_...
leonardoigor/Imgs_reshape
main.py
main.py
py
4,373
python
en
code
0
github-code
21
[ { "api_name": "tkinter.filedialog.askdirectory", "line_number": 69, "usage_type": "call" }, { "api_name": "tkinter.filedialog", "line_number": 69, "usage_type": "name" }, { "api_name": "tkinter.filedialog.askdirectory", "line_number": 71, "usage_type": "call" }, { ...
3900866147
from collections import deque # This class do real-time VWAP computations. # It has an add method to add incoming price-volume pairs. # This method actually do all computations. # Complexity of the add method is O(1) and not depend on # sliding window size. And there is a get method # for getting last computed value....
AlexZus/VwapCalculationEngine
VWAP/computer.py
computer.py
py
1,454
python
en
code
1
github-code
21
[ { "api_name": "collections.deque", "line_number": 12, "usage_type": "name" }, { "api_name": "collections.deque", "line_number": 13, "usage_type": "name" }, { "api_name": "collections.deque", "line_number": 21, "usage_type": "call" }, { "api_name": "collections.deq...
12256245735
import io from setuptools import ( setup, find_packages, ) # pylint: disable=no-name-in-module,import-error def dependencies(file): with open(file) as f: return f.read().splitlines() with io.open("README.md", encoding="utf-8") as infile: long_description = infile.read() setup( name="sm...
VictorAlessander/Smith
setup.py
setup.py
py
1,730
python
en
code
3
github-code
21
[ { "api_name": "io.open", "line_number": 13, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_number": 16, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 18, "usage_type": "call" } ]
74147150772
import argparse import enum import os import datetime import sys from models.image_classification import imagenet_preprocessing from models.image_classification import lr_scheduler from models import utils import tensorflow as tf import tf_multiworker_distribution as tf_dist SHUFFLE_BUFFER = 6400 # nranks_per_node *...
cc-hpc-itwm/tarantella_models
src/models/image_classification/train_imagenet_main.py
train_imagenet_main.py
py
11,842
python
en
code
0
github-code
21
[ { "api_name": "tensorflow.data", "line_number": 16, "usage_type": "attribute" }, { "api_name": "tensorflow.data", "line_number": 17, "usage_type": "attribute" }, { "api_name": "tensorflow.keras", "line_number": 21, "usage_type": "attribute" }, { "api_name": "tenso...
110056361
import xlrd workbook = xlrd.open_workbook('ecollection_report.xlsx') print(workbook.nsheets) print("Worksheet name(s): {0}".format(workbook.sheet_names())) sheet = workbook.sheet_by_index(0) print("{0} {1} {2}".format(sheet.name, sheet.nrows, sheet.ncols)) print("Cell G04 is {0}".format(sheet.cell_value(rowx=3, col...
kenedyakn/nssf-data-system
excel_reader.py
excel_reader.py
py
654
python
en
code
0
github-code
21
[ { "api_name": "xlrd.open_workbook", "line_number": 3, "usage_type": "call" } ]
31394958118
import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt pd.set_option('mode.chained_assignment', None) college_data = pd.read_csv('CollegeScorecard_Raw_Data/MERGED2017_18_PP.csv', low_memory = False) # Opens our data into a dataframe college_data['GRAD_DEBT_MDN10YR_SUPP'] = col...
uic-cs418/cs418-s20-cs418_spring20_mighty_python
baseline_classifier.py
baseline_classifier.py
py
1,818
python
en
code
0
github-code
21
[ { "api_name": "pandas.set_option", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", ...
1337697131
""" This Crawls the NewYorkTimes Archive looking for the work terrism """ import requests from bs4 import BeautifulSoup from selenium import webdriver import csv import time def main(start,stop): URL = ['http://query.nytimes.com/search/sitesearch/#/terrorism/from','0102to','0101/allresults/','/allauthors/oldest/'...
konrad-c/GlobalTerrorismAnalysis
Crawlers/NewYourArchiveCrawl.py
NewYourArchiveCrawl.py
py
3,151
python
en
code
0
github-code
21
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 15, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 15, "usage_type": "name" }, { "api_name": "csv.writer", "line_number": 20, "usage_type": "call" }, { "api_name": "time.sleep", ...
22702107447
#!/usr/bin/python3 """ Wochenende: A whole genome/metagenome analysis pipeline in Python3 (2018-2021) Author: Tobias Scheithauer Author: Dr. Colin Davenport Author: Fabian Friedrich Author: Sophia Poertner Changelog 2.0.0 allow configurable job scheduler in config.yaml 1.9.9 calculate bam.bai in paired end mode for a...
MHH-RCUG/Wochenende
run_Wochenende.py
run_Wochenende.py
py
58,152
python
en
code
36
github-code
21
[ { "api_name": "os.environ", "line_number": 85, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 86, "usage_type": "attribute" }, { "api_name": "yaml.safe_load", "line_number": 94, "usage_type": "call" }, { "api_name": "yaml.YAMLError", "...
32616777548
import asyncio from hashlib import sha1 from ScoutSuite.core.console import print_info from ScoutSuite.providers.aws.utils import is_throttled as aws_is_throttled from ScoutSuite.providers.gcp.utils import is_throttled as gcp_is_throttled def get_non_provider_id(name): """ Not all resources have an ID and so...
ryanmrestivo/red-team
cloud/ScoutSuite/ScoutSuite/providers/utils.py
utils.py
py
4,283
python
en
code
91
github-code
21
[ { "api_name": "hashlib.sha1", "line_number": 17, "usage_type": "call" }, { "api_name": "asyncio.get_event_loop", "line_number": 24, "usage_type": "call" }, { "api_name": "ScoutSuite.core.console.print_info", "line_number": 29, "usage_type": "call" }, { "api_name":...
18405706699
from itertools import accumulate; from math import floor,ceil,sqrt; import operator; import random; import string; from bisect import *; from collections import deque, defaultdict, Counter, OrderedDict; from functools import reduce,cache; from heapq import *; import unittest; from typing import List,Optional; from func...
afzalsiddique/problem-solving
Problem_Solving_Python/leetcode/lc377.py
lc377.py
py
1,331
python
en
code
1
github-code
21
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 22, "usage_type": "attribute" } ]
37458761412
import numpy as np, cv2 # # 8.3.2 양선형 보간법 # image = cv2.imread("ch08_images\interpolation.jpg", cv2.IMREAD_GRAYSCALE) # if image is None: # raise Exception("영상 파일 읽기 오류") # size = (350, 400) # dst3 = cv2.resize(image, size, cv2.INTER_LINEAR) #INTER_NEAREST, INTER_LINEAR, # dst4 = cv2.resize(image, size, cv2.INTE...
jaekim3220/OpenCV_practice
workplace/15_geometry.py
15_geometry.py
py
1,651
python
ko
code
0
github-code
21
[ { "api_name": "cv2.imread", "line_number": 43, "usage_type": "call" }, { "api_name": "cv2.IMREAD_GRAYSCALE", "line_number": 43, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.float32", ...
12861215801
import pytest from tests.util import int_sampler def test_sampler_basic(): it = int_sampler([2, 2], limit=100) assert next(it) == (0, 0) assert next(it) == (0, 1) assert next(it) == (1, 0) assert next(it) == (1, 1) with pytest.raises(StopIteration): next(it) @pytest.mark.parametrize...
nicktimko/dangercrypt
tests/meta/test_util.py
test_util.py
py
2,016
python
en
code
0
github-code
21
[ { "api_name": "tests.util.int_sampler", "line_number": 7, "usage_type": "call" }, { "api_name": "pytest.raises", "line_number": 12, "usage_type": "call" }, { "api_name": "tests.util.int_sampler", "line_number": 25, "usage_type": "call" }, { "api_name": "pytest.mar...
42269390718
import os import unittest import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging # # AutomaticSurfacePointPlacement # class AutomaticSurfacePointPlacement(ScriptedLoadableModule): """Uses ScriptedLoadableModule base class, available at: https://github.com/Slicer/Slicer/blob/master/...
PerkLab/SkullRegistration
extensions/AutomaticSurfacePointPlacement/AutomaticSurfacePointPlacement.py
AutomaticSurfacePointPlacement.py
py
7,201
python
en
code
0
github-code
21
[ { "api_name": "slicer.util.loadUI", "line_number": 45, "usage_type": "call" }, { "api_name": "slicer.util", "line_number": 45, "usage_type": "attribute" }, { "api_name": "slicer.util.childWidgetVariables", "line_number": 47, "usage_type": "call" }, { "api_name": "...
74064442614
#==>Library Import from django.shortcuts import get_object_or_404, render, redirect from django.core.paginator import Paginator from django.db.models import Max, Min from django.contrib import messages from django.db.models import Count from django.views import View #==>Local Import from .models import Category, Varian...
farhadggu/Django-Shop
product/views.py
views.py
py
3,960
python
en
code
0
github-code
21
[ { "api_name": "django.views.View", "line_number": 16, "usage_type": "name" }, { "api_name": "models.Category.objects.filter", "line_number": 18, "usage_type": "call" }, { "api_name": "models.Category.objects", "line_number": 18, "usage_type": "attribute" }, { "api...
33995609681
import matplotlib.pyplot as plt import numpy as np def f(x): return 1/x #return x**2 + 2*x + 1 def derivert(x, delta_x): return (f(x+delta_x)-f(x))/delta_x #x = np.linspace(-10,10,1000) #y = f(x) x_vals=[] y_vals=[] y_der_vals=[] x_step=0.1 x_min=-5.0 x_max=5.0 y_min=0 y_max=0 y=0 i=x_min while i<=x_ma...
rolfui/maths
r1/derivert2.py
derivert2.py
py
781
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.pyplot.xlim", "line_number": 42, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 42, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.ylim", "line_number": 43, "usage_type": "call" }, { "api_name": "matpl...
7334261103
# Based on # from imutils.video import WebcamVideoStream from threading import Thread import numpy as np import cv2 import mediapipe as mp # mp_drawing = mp.solutions.drawing_utils # mp_drawing_styles = mp.solutions.drawing_styles mp_pose = mp.solutions.pose class PoseDetection: def __init__(self, name="W...
andrewchiull/Google-HPS-2023-Team8
src/cv/mp/Pose.py
Pose.py
py
1,715
python
en
code
4
github-code
21
[ { "api_name": "mediapipe.solutions", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 37, "usage_type": "attribute" }, { "api_name": "threading.Thr...
18228371220
from datetime import datetime from .database import QuestionerDatabaseConnection class RsvpRegistration(QuestionerDatabaseConnection): ''' class for RSVP model ''' def __init__(self, response=None): super().__init__() db = QuestionerDatabaseConnection self.response = response ...
dennisdnyce/Questioner
app/api/v2/models/rsvp_models.py
rsvp_models.py
py
893
python
en
code
0
github-code
21
[ { "api_name": "database.QuestionerDatabaseConnection", "line_number": 6, "usage_type": "name" }, { "api_name": "database.QuestionerDatabaseConnection", "line_number": 10, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 12, "usage_type": "call...
73316207092
import numpy as np import matplotlib.colors as mcolors import tensorflow as tf tf.autograph.set_verbosity(0) from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import LabelEncoder from deepSculpt.manager.tools.params import COLORS from colorama import Fore, Style class OneHotEncoderDecoder:...
juan-garassino/deepSculpt
deepSculpt/curator/tools/preprocessing.py
preprocessing.py
py
13,215
python
en
code
2
github-code
21
[ { "api_name": "tensorflow.autograph.set_verbosity", "line_number": 6, "usage_type": "call" }, { "api_name": "tensorflow.autograph", "line_number": 6, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "line_number": 62, "usage_type": "attribute" }, { "api...
13360052091
import math import random from typing import Iterable, List import torch from torch.utils.data.dataset import Dataset, IterableDataset from refined.data_types.doc_types import Doc from refined.data_types.modelling_types import BatchElementTns, BatchedElementsTns, BatchElement from refined.doc_preprocessing.preprocess...
amazon-science/ReFinED
src/refined/dataset_reading/entity_linking/document_dataset.py
document_dataset.py
py
7,342
python
en
code
126
github-code
21
[ { "api_name": "torch.utils.data.dataset.Dataset", "line_number": 15, "usage_type": "name" }, { "api_name": "refined.doc_preprocessing.preprocessor.PreprocessorInferenceOnly", "line_number": 23, "usage_type": "name" }, { "api_name": "random.seed", "line_number": 34, "usage...
3726148134
from pipeline import matcher, nlp from typing import List, Tuple, Dict, Union from collections import defaultdict import re def get_matches(doc, matcher=matcher, nlp=nlp) -> List[Tuple[str, str]]: """Return matched phrases from a spacy matcher and a spacy doc Args: doc (spaCy Doc) : spacy doc object ...
murdomoyse/dockerised-flask-nlp-app
src/modules/pid.py
pid.py
py
5,315
python
en
code
0
github-code
21
[ { "api_name": "pipeline.matcher", "line_number": 7, "usage_type": "name" }, { "api_name": "pipeline.nlp", "line_number": 7, "usage_type": "name" }, { "api_name": "pipeline.nlp.vocab", "line_number": 19, "usage_type": "attribute" }, { "api_name": "pipeline.nlp", ...
36027963945
import math import pygame from pygame.locals import * from bullet import Bullet class ControlScheme: def __init__(self): self.moveLeft = K_a self.moveRight = K_d self.fire = K_SPACE class Player: def __init__(self, start_pos, tiled_level, control_scheme, explosions_sprite_sheet): ...
MyreMylar/scrolling_shooter
game/player.py
player.py
py
20,668
python
en
code
0
github-code
21
[ { "api_name": "pygame.image.load", "line_number": 21, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Sprite", "line_number": 24, "usage_type": "call" }, { "api_name": "pygame.sprit...
27554722099
import cv2 import numpy as np import time img1 = cv2.imread("./images/ultra.jpg", 0) # cv2.imwrite("../AssignmentTwo/images/palisadesThree.jpg", img1, [int(cv2.IMWRITE_JPEG_QUALITY), 100]) img2 = cv2.imread("./images/ultra.jpg", 0) index = [0, 10, 100, 1000, 10000] sizeBytes = [121263, ] for i in range(0,10): cv...
meisenstat/ComputerVisionAssignments
FinalProject/siftTest.py
siftTest.py
py
957
python
en
code
0
github-code
21
[ { "api_name": "cv2.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.IMWRITE_JPEG_QUALITY", "line_...
32712436814
import mplfinance as mpf import matplotlib.animation as animation import create_candles from main import Broker from candles import ReversalPatterns class Animation: tik = input("Choose your destiny: ") Broker.dataframe = Broker.form_data(tik) dframe = Broker.dataframe # dframe = create_candles.cre...
code-ronin6/DayTrading
animation.py
animation.py
py
2,484
python
en
code
5
github-code
21
[ { "api_name": "main.Broker.dataframe", "line_number": 12, "usage_type": "attribute" }, { "api_name": "main.Broker", "line_number": 12, "usage_type": "name" }, { "api_name": "main.Broker.form_data", "line_number": 12, "usage_type": "call" }, { "api_name": "main.Bro...
18411164617
import base64 from urllib.parse import quote, unquote from flask import (Flask, Response, redirect, render_template, request, send_file, session, stream_with_context, url_for) from htmlmin.minify import html_minify app=Flask(__name__) @app.route("/") def index(): a="k" return a @app.route("/url-e...
Hydrophobefireman/urltools
aa.py
aa.py
py
932
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.request.form", "line_number": 19, "usage_type": "attribute" }, { "api_name": "flask.reques...
33168843557
import pandas as pd import statistics import plotly.figure_factory as pf import random import plotly.graph_objects as go dataFrame = pd.read_csv("StudentMarks-0.csv") dataList = dataFrame["Math_score"].tolist() dataFrameOfClassScore1 = pd.read_csv("ClassScore-1.csv") dataListOfClassScore1 = dataFrameOfClassScore1["Ma...
RoshanJacob/Sample-ZTests-Class111
sampleZ-Test.py
sampleZ-Test.py
py
4,675
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "statistics.mean", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
6827987134
from sqlalchemy import ForeignKey, Column, BigInteger, Integer, Float, String, Boolean, Date, DateTime, Text from sqlalchemy.schema import UniqueConstraint from sqlalchemy.orm import relationship from sqlalchemy.exc import * from ..db_utils import DbInstance from ..config_utils import config from ..portability import q...
tunghoang/ips-manager
apis/engines/db.py
db.py
py
4,862
python
en
code
0
github-code
21
[ { "api_name": "db_utils.DbInstance.getInstance", "line_number": 12, "usage_type": "call" }, { "api_name": "db_utils.DbInstance", "line_number": 12, "usage_type": "name" }, { "api_name": "config_utils.config.get", "line_number": 13, "usage_type": "call" }, { "api_n...
31469788625
import vim import markdown2 MD_EXTRAS = { 'inline-css': { 'sup': 'color:#6D6D6D; font-size:1ex;', 'inline-code': 'color: #000000; font-family: monospace,monospace; padding: 0.1em 0.2em; ' \ 'margin: 0.1em; font-size: 85%; background-color: #F5F5F5; border-radius: 3px; ' \ 'b...
tarlaw/vim-markdown-exporter
plugin/vim_markdown_exporter.py
vim_markdown_exporter.py
py
2,447
python
en
code
0
github-code
21
[ { "api_name": "markdown2.markdown", "line_number": 41, "usage_type": "call" }, { "api_name": "vim.current", "line_number": 53, "usage_type": "attribute" } ]
13950149409
# -*- coding: UTF-8 -*- # By Quentin HARDY (quentin.hardy@protonmail.com) - bobsecq import logging import sys import os from winproc import * from windef import * from ctypes import * from utils import * from anytree import Node, RenderTree, find from tokenmanager import TokenManager class Impersonate(TokenManager): ...
quentinhardy/pytmipe
src/impersonate.py
impersonate.py
py
60,564
python
en
code
117
github-code
21
[ { "api_name": "tokenmanager.TokenManager", "line_number": 14, "usage_type": "name" }, { "api_name": "logging.error", "line_number": 74, "usage_type": "call" }, { "api_name": "logging.error", "line_number": 77, "usage_type": "call" }, { "api_name": "logging.info", ...
22215314286
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self.conv2 = nn.Conv2d(10, 20, kernel_size=5) self.conv2_drop = nn.Dropout2d() self.fc1 = nn....
op-real/dc-gan
mnist-test-mnist.py
mnist-test-mnist.py
py
1,762
python
en
code
0
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 5, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.nn", "line_numbe...
24433332177
import json nums = [5, 2, 3, 4, 1, 8, 8, 9, 5, 3] x = set(nums) y = list(x) y.sort() print(y) # eval json b = '1+1' print(eval(b)) per = {'name': 'lc', 'age': 20} # 字典 # 字典转为json’ j = json.dumps(per) print(j, type(j)) # json转为字典 # js = '{"name": "lc", "age": 20}' s = json.loads(j) print(s, type(s))
lc2019/pycode-sixmonth
day3/5.练习.py
5.练习.py
py
327
python
en
code
0
github-code
21
[ { "api_name": "json.dumps", "line_number": 15, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 20, "usage_type": "call" } ]
26381570145
# import openpyxl import bs4 import requests # # import os # # import sys def yearfinder(): y = "2016" m = "12" d = "25" code = y+"/"+m+"/"+d url = 'http://www.columbiapipeinfo.com/infopost/Default.aspx?info=Y' response = requests.get(url) soup = bs4.BeautifulSoup(response.text, "html.par...
samuel-casey/Skipping
scraper.py
scraper.py
py
584
python
en
code
0
github-code
21
[ { "api_name": "requests.get", "line_number": 15, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 16, "usage_type": "call" } ]
23711180246
import random import sys from PyQt5.QtGui import QPainter, QColor from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) ...
HeavySaharok/yellow_cyrc
main.py
main.py
py
2,346
python
en
code
0
github-code
21
[ { "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.QPushButton", "line_number": 15, "usage_type": "call" }, { "api_name": "P...
70592558452
#!/usr/bin/env python3 from decorator import decorator from memoize import memoize from pickle import dump, load from weakref import finalize class file_dict(dict): ''' Dictionary that is initiated from a given file (if it exists) and writes its own contents to the same file on deletion. ''' def __init__(self, f...
Daerdemandt/python-decorators
memoize_using_file.py
memoize_using_file.py
py
1,891
python
en
code
0
github-code
21
[ { "api_name": "pickle.load", "line_number": 19, "usage_type": "call" }, { "api_name": "weakref.finalize", "line_number": 23, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 27, "usage_type": "call" }, { "api_name": "memoize.memoize", "line_...
18522826695
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='creator'), url(r'^graph/$', views.create_graph_rules), url(r'^graph_ruleset/$', views.NewGraphRules.as_view()), url(r'^(?P<class_name>[\w-]+)/$', views.class_detail) ]
azz/clicker
creator/urls.py
urls.py
py
285
python
en
code
0
github-code
21
[ { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "django.co...
10404799349
from setuptools import setup from setuptools_rust import RustExtension from wheel.bdist_wheel import bdist_wheel ABI_VERSION = "37" class bdist_wheel_abi3(bdist_wheel): def get_tag(self): python, abi, plat = super().get_tag() if python.startswith("cp"): # on CPython, our wheels are a...
RazerM/crabwalk
setup.py
setup.py
py
700
python
en
code
0
github-code
21
[ { "api_name": "wheel.bdist_wheel.bdist_wheel", "line_number": 8, "usage_type": "name" }, { "api_name": "setuptools.setup", "line_number": 19, "usage_type": "call" }, { "api_name": "setuptools_rust.RustExtension", "line_number": 21, "usage_type": "call" } ]
27190811005
import csv import json csvFilePath= 'NASDAQ.csv' jsonFilePath = 'NASDAQ.json' #reading csv and adding data to dictonary data = {"symbols" :[]} with open(csvFilePath, 'r') as csvFile: csvReader = csv.reader(csvFile) next(csvReader) for row in csvReader: data['symbols'].append({ 'serial...
Sayed-Noman/Stock-Market-Dashboard
trading_widget/csv_to_json.py
csv_to_json.py
py
538
python
en
code
0
github-code
21
[ { "api_name": "csv.reader", "line_number": 11, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 23, "usage_type": "call" } ]
36167682632
"""The setup script.""" from setuptools import setup, find_packages with open("requirements.txt") as f: requirements = f.read().splitlines() with open("README.md") as readme_file: readme = readme_file.read() setup( author="Brice Michalski", author_email="brice.michalski.92@gmail.com", install_re...
BriceMichalski/Heimdall
setup.py
setup.py
py
619
python
en
code
0
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 11, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 19, "usage_type": "call" } ]
9905508358
# -*- coding: utf8 -*- import os import sys import re import time import collections from datetime import datetime, timedelta import libs.common as CMN import libs.base as BASE # import web_scrapy_company_profile as CompanyProfile # import web_scrapy_company_group_set as CompanyGroupSet # import web_scrapy_timeslice_g...
Everett6802/finance_scrapy
depreated_libs/stock/stock_url_time_range.py
stock_url_time_range.py
py
16,293
python
en
code
1
github-code
21
[ { "api_name": "libs.common.LOG.get_logger", "line_number": 14, "usage_type": "call" }, { "api_name": "libs.common.LOG", "line_number": 14, "usage_type": "attribute" }, { "api_name": "libs.common", "line_number": 14, "usage_type": "name" }, { "api_name": "libs.base...
23889879548
import pandas as pd from datetime import date import psycopg2 import config def populate_user_table_from_csv(csv_file): conn = psycopg2.connect( host=config.live_config.host, database=config.live_config.database, user=config.live_config.user, password=config.live_co...
tracedelange/money-talks-twitter-scrape
populate_user_table_from_csv.py
populate_user_table_from_csv.py
py
1,108
python
en
code
0
github-code
21
[ { "api_name": "psycopg2.connect", "line_number": 8, "usage_type": "call" }, { "api_name": "config.live_config", "line_number": 9, "usage_type": "attribute" }, { "api_name": "config.live_config", "line_number": 10, "usage_type": "attribute" }, { "api_name": "config...
71845809332
from collections import deque def bfs(s): queue.append(s) visited[s] = 1 while(queue): now = queue.popleft() if now == g: return visited[now] - 1 for next in range(1, v + 1): if arg[now][next] == 0: continue if visited[next] > 0:...
xktmxkem/TIL-Today-I-Learn
algorithm/in_class/노드의거리.py
노드의거리.py
py
859
python
en
code
0
github-code
21
[ { "api_name": "collections.deque", "line_number": 30, "usage_type": "call" } ]
43627445280
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ @Time : 2023/1/6 15:12 @Author : Haozhao Ma @Email : haozhaoma@mail.nwpu.edu.cn @time: 2023/1/6 15:12 """ import os import os.path as osp os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ['CUDA_VISIBLE_DEVICES'] = '3' import torch import numpy as n...
omtcyang/Text-Pass-filter
utils/draw_mask.py
draw_mask.py
py
5,337
python
en
code
0
github-code
21
[ { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 13, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.path", "line_...
10363515916
#!/usr/bin/python3 import pytest import datetime import pushbullet from convmgr import notification, config, status from tests import common from unittest import mock # python 3.3+ testConfigFile = config.convmgrconfig( common.rootPath ) testStatusFile = status.convmgrstatus( common.rootPath ) testDate = datetime...
jconstam/convmgr
tests/test_notification.py
test_notification.py
py
2,586
python
en
code
0
github-code
21
[ { "api_name": "convmgr.config.convmgrconfig", "line_number": 13, "usage_type": "call" }, { "api_name": "convmgr.config", "line_number": 13, "usage_type": "name" }, { "api_name": "tests.common.rootPath", "line_number": 13, "usage_type": "attribute" }, { "api_name":...
42081790026
# coding: utf-8 import json import logging import os import sys from edge_om.src.utils.high_risk.high_risk_op_policy import SiteHighRiskOp, HighRiskConfig from glib.utils.high_risk_op_policy import Cmd from glib.utils.high_risk_op_policy import CmdDisableAllOpt from glib.utils.high_risk_op_policy import HighRiskOpPoli...
Ascend/tools
intelligent_edge_tools/edge_ability_tool/site_high_risk_ops_cli.py
site_high_risk_ops_cli.py
py
4,397
python
en
code
11
github-code
21
[ { "api_name": "logging.basicConfig", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 13, "usage_type": "attribute" }, { "api_name": "glib.utils.high_risk_op_policy.HighRiskOpPolicyCli", "line_number": 16, "usage_type": "name" }, ...
29737035711
# -*- coding: utf-8 -*- """ Created on Mon Nov 16 23:03:24 2015 @author: dvalentin """ from weather_reader import get_temperature import datetime import random x = "10016" weather_url = "http://api.openweathermap.org/data/2.5/weather?zip=05753,us&appid=2de143494c0b295cca9337e1e96b00e0&units=imperial" def passit(z...
david-valentin/weather_extractor
weather_aggregator.py
weather_aggregator.py
py
1,863
python
en
code
1
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 26, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 26, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 31, "usage_type": "call" }, { "api_name": "da...
20640537176
import numpy as np from jacobi import jacobi A = np.array([[1,2,3],[4,-8,1],[-2,1,5]]) b = np.array([7,-21,15]).T x0 = np.array([0,0,0]).T ep = 1e-7 x,k = jacobi(A,b,x0,ep) print(x) print(k)
wanglongjuan/wlj-study
python-example/1/jacobi/jacobi_test.py
jacobi_test.py
py
194
python
en
code
0
github-code
21
[ { "api_name": "numpy.array", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "jacobi.jacobi", "line_number": 9...
13070470984
import gspread import os credentials_path = './media/json/qlash-bot-c0a45565e4f0-google-api.json' gc = gspread.service_account(filename=credentials_path) async def writeall(ctx): sheet = gc.open("Registrations").sheet1 colA = "A" colB = "B" int = 2 for member in ctx.guild.members: row = str...
lorycontixd/qlashbot
iqloudy/modules/google/library.py
library.py
py
1,057
python
en
code
0
github-code
21
[ { "api_name": "gspread.service_account", "line_number": 4, "usage_type": "call" } ]
3799961561
from django import template register = template.Library() CENSORED = [ 'ово', ] @register.filter() def censor(value): if isinstance(value, str): for word in CENSORED: if word in value: value = value.replace(word, word[:1] + '**') return value
ap4u7/D6
NewsPortal/news/templatetags/custom_filters.py
custom_filters.py
py
300
python
en
code
0
github-code
21
[ { "api_name": "django.template.Library", "line_number": 3, "usage_type": "call" }, { "api_name": "django.template", "line_number": 3, "usage_type": "name" } ]
36768122915
###################################################################################################################### # normalize, resample and chop all medley db files while retaining the directory structure # elapsed time ca 24m. #######################################################################################...
conceptacid/mir3
data_chop_medley_db.py
data_chop_medley_db.py
py
3,587
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 21, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path",...
34738571535
from flask import Flask, request from flask_restful import Resource,Api app = Flask(__name__) api = Api(app) #creating in memory list users = [] class User(Resource): def get(self,name): #loop through the users list and match the name given in the url with users list for user in users: ...
spalaios/bon_premium
code/app.py
app.py
py
1,155
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask_restful.Api", "line_number": 6, "usage_type": "call" }, { "api_name": "flask_restful.Resource", "line_number": 13, "usage_type": "name" }, { "api_name": "flask.request.get_...
35720453992
from qutip import * import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation, writers import matplotlib as mpl MAX_J = 50 Λ = 25 ΔE = 0 N = 100 D = 0.0 t_max = 3.5 Δt = 0.01 t_max = np.pi * t_max / np.sqrt(1 + Λ) # Normalization Δt = np.pi * Δt / np.sqrt(1 + Λ) t = np.arange...
lytex/Quantum-catastrophes
quantum.py
quantum.py
py
1,146
python
en
code
1
github-code
21
[ { "api_name": "numpy.pi", "line_number": 16, "usage_type": "attribute" }, { "api_name": "numpy.sqrt", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 17, "usage_type": "attribute" }, { "api_name": "numpy.sqrt", "line_number"...
19738085215
import cv2 import numpy as np from skimage.exposure import rescale_intensity def searchRightSide(bloc, img, row, col, bindex, searchspace, dmeasure, errors): begin = max(col-1, bindex) end = min(img.shape[1]-bindex, col + searchspace) for j in range(begin, end): bl = img[row - bindex : ...
Arajinzz/disparity_test
disp.py
disp.py
py
1,843
python
en
code
0
github-code
21
[ { "api_name": "numpy.argmin", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.float", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.argmin", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_nu...
36287390230
import pickle import argparse import os import torch import mmcv from tools import evaluate from mmcv.runner import load_checkpoint, parallel_test, obj_from_dict from mmanomaly.models.ano_pred_cvpr2018_model import APCModel from mmcv.parallel import scatter, collate, MMDataParallel from mmanomaly.datasets.transform i...
xyty-citibank/anomaly-detection
tools/inference.py
inference.py
py
3,883
python
en
code
1
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 31, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 32, "usage_type": "attribute" }, { "api_name": "mmcv.Config.f...
11855128898
#! /usr/bin/env python3 import re from common import * from dataclasses import dataclass @dataclass class CleanupRange: head1: int tail1: int head2: int tail2: int @property def wholly_contained(self) -> bool: first = self.head1 <= self.head2 <= self.tail2 <= self.tail1 seco...
wcraigtrader/advent-of-code-2022
src/day04/puzzle04.py
puzzle04.py
py
1,215
python
en
code
0
github-code
21
[ { "api_name": "re.split", "line_number": 32, "usage_type": "call" }, { "api_name": "dataclasses.dataclass", "line_number": 9, "usage_type": "name" } ]
20717635178
import os import shutil from tensorboardX import SummaryWriter import sys sys.path.append("..") from main import args def set_writer(writer_path): if os.path.exists(writer_path): shutil.rmtree(writer_path) else: os.mkdir(writer_path) print('==> Writer saved to {}'.format(writer_path)) ...
delian11/ADDL
utils/set_path.py
set_path.py
py
1,970
python
en
code
6
github-code
21
[ { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number...
34877297617
import json, requests, itertools, collections, os, traceback, copy,time from bs4 import BeautifulSoup from Orchestrator.settings import WAPPALIZE_KEY from .. import constants from ..slack import slack_sender from ..mongo import mongo from ..redmine import redmine from datetime import datetime from ...objects.vulnerabil...
badBounty/Orchestrator
Orchestrator/OrchestratorApp/src/security/libraries_scan.py
libraries_scan.py
py
5,748
python
en
code
1
github-code
21
[ { "api_name": "mongo.mongo.find_last_version_of_librarie", "line_number": 15, "usage_type": "call" }, { "api_name": "mongo.mongo", "line_number": 15, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 23, "usage_type": "call" }, { "api_name": "requ...
26622578000
import torch import torch.nn as nn import numpy as np def reg_l1_loss(pred, target, mask): """ compute l1_loss :param pred: b c h w :param target: b c h w :param mask: b h w :return: """ # # pred = pred.permute(0,2,3,1) # # (b h w) to (b h w 1) to (b h w 2) ...
chgex/PSNet
ICSNet/model/loss.py
loss.py
py
5,778
python
en
code
1
github-code
21
[ { "api_name": "torch.unsqueeze", "line_number": 21, "usage_type": "call" }, { "api_name": "torch.unsqueeze", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.pow", "line_number": 52, "usage_type": "call" }, { "api_name": "torch.clamp", "line_num...
37124093300
import threading from collections import namedtuple, defaultdict from functools import reduce import deuces RoundSummary = namedtuple('RoundSummary', 'hands_played board players winners blinds') evaluator = deuces.Evaluator() def distribute_pot(players, board): players = set(players)...
liona24/pokergame
src/pokergame/poker.py
poker.py
py
9,113
python
en
code
0
github-code
21
[ { "api_name": "collections.namedtuple", "line_number": 7, "usage_type": "call" }, { "api_name": "deuces.Evaluator", "line_number": 10, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 17, "usage_type": "call" }, { "api_name": "deuces...
26992603561
from sklearn.metrics import f1_score, precision_score, recall_score import numpy as np from nltk import tokenize as nltk_token import operator import re import random from collections import Counter import json def get_batches(data, batch_size, pad_idx, hate=None, offensive=None, SGT=None): batches = [] for id...
aidamd/HateSpeech
nn.py
nn.py
py
6,144
python
en
code
0
github-code
21
[ { "api_name": "sklearn.metrics.f1_score", "line_number": 34, "usage_type": "call" }, { "api_name": "sklearn.metrics.precision_score", "line_number": 35, "usage_type": "call" }, { "api_name": "sklearn.metrics.recall_score", "line_number": 36, "usage_type": "call" }, { ...
27709862646
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMainWindow from PyQt5.QtGui import QIcon import sys import a import b class Ui_Dialog(object): def __init__(self, a): self.a = a def setupUi(self, Dialog): Dialog.setObjectName("Dialog") self.icon0 = QtGui.QPix...
AhmetFurkanDEMIR/DEncrypt-21
main.py
main.py
py
4,162
python
en
code
24
github-code
21
[ { "api_name": "PyQt5.QtGui.QPixmap", "line_number": 18, "usage_type": "call" }, { "api_name": "PyQt5.QtGui", "line_number": 18, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QPushButton", "line_number": 19, "usage_type": "call" }, { "api_name": "PyQt5.QtW...
22525089215
# coding: utf-8 # ## Bio Homework 3 # # ### Sepehr Torabparhiz # ### 93100774 # ### Q1: BWT # coding: utf-8 # ## Bio Homework 3 # # ### Sepehr Torabparhiz # ### 93100774 # ### Q1: BWT # coding: utf-8 # ## Bio Homework 3 # # ### Sepehr Torabparhiz # ### 93100774 # ### Q1: BWT # coding: utf-8 # ## Bio Home...
errantsky/bioinformatics-assignments
hw3/bwt.py
bwt.py
py
4,043
python
en
code
0
github-code
21
[ { "api_name": "functools.cmp_to_key", "line_number": 115, "usage_type": "call" }, { "api_name": "functools.cmp_to_key", "line_number": 142, "usage_type": "call" } ]
749213811
import pathlib import pandas # type: ignore class Dataset: def __init__(self): self.dataset = pandas.read_csv(str(pathlib.Path(__file__).parent) + '/dataset.csv', names=['personagem_1', 'personagem_2', 'interacoes', 'livro']) def add(self, source: str, target:...
Rodrigosis/meli-challenge
src/infra/dataset.py
dataset.py
py
684
python
pt
code
1
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.concat", "line...
5096073501
import argparse import os from typing import List import mlflow import mltable import numpy as np from sklearn.impute import SimpleImputer from sklearn.model_selection import GridSearchCV from sklearn.pipeline import Pipeline, make_pipeline from sklearn.preprocessing import StandardScaler from sklearn.svm import SVR ...
marvinbuss/enterprise-ml
code/ml/train/main.py
main.py
py
5,761
python
en
code
1
github-code
21
[ { "api_name": "numpy.ones", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 26, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 17, "usage_type": "name" }, { "api_name": "argparse.Namespace", "line_...
43713794280
from django.urls import path, include from . import views urlpatterns = [ path('', views.getSubjects, name='Get-Subjects'), path('add/', views.addSubject, name='Add-Subject'), path('addAgeCategory/', views.addAgeCategory, name='Add-Age-Category'), path('ageCategory/', views.getAgeCategories, name='Ge...
danushkan2002/GlobalVison
api/subjects/urls.py
urls.py
py
1,343
python
en
code
0
github-code
21
[ { "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": 9, "usage_type": "call" }, { "api_name": "django.urls.path", ...
7519491897
#!/usr/bin/env python3 import sys import numpy from keras.models import Sequential from keras.layers import Dense from keras.layers import Dropout from keras.layers import LSTM from keras.callbacks import ModelCheckpoint from keras.utils import np_utils def extract_vocab(raw_text): chars = sorted(list(set(raw_tex...
proycon/nlpsandbox
lstmrnn.py
lstmrnn.py
py
3,458
python
en
code
2
github-code
21
[ { "api_name": "numpy.reshape", "line_number": 28, "usage_type": "call" }, { "api_name": "keras.utils.np_utils.to_categorical", "line_number": 32, "usage_type": "call" }, { "api_name": "keras.utils.np_utils", "line_number": 32, "usage_type": "name" }, { "api_name":...
30982976457
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requires = [ 'schematics', 'jsonschema==2.6.0' ] test_requires = requires + [ 's...
openprocurement/schematics-flexible
setup.py
setup.py
py
1,625
python
en
code
0
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 26, "usage_type": "call" } ]
32287535170
import pocs from lib import config import re import requests from bs4 import BeautifulSoup import urllib3 from colorama import init urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) init(autoreset=False) # 定义类 名称不可改变,且需要继承父类Pocs class POC(pocs.Pocs): def __init__(self): ''' ...
haochen1204/FrostBlade
FrostBlade/pocs/scanner/致远oa/致远oa登录绕过_文件上传漏洞.py
致远oa登录绕过_文件上传漏洞.py
py
2,494
python
en
code
2
github-code
21
[ { "api_name": "urllib3.disable_warnings", "line_number": 8, "usage_type": "call" }, { "api_name": "urllib3.exceptions", "line_number": 8, "usage_type": "attribute" }, { "api_name": "colorama.init", "line_number": 9, "usage_type": "call" }, { "api_name": "pocs.Pocs...
39717290961
from django.urls import path from .views import * app_name = 'photo_gallery' urlpatterns = [ path('', RetriveAllImagesView.as_view()), path('tag/<str:tag>/', RetriveEventImagesView.as_view()), path('<int:pk>/', RetriveImagesViewByID.as_view()), ]
dev-great/Llona_Musik_DB
photo_gallery/urls.py
urls.py
py
260
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" } ]
38453824771
import warnings from dataclasses import dataclass from typing import Callable, Dict, Union, List import numpy as np from .modelspec import Parameter, ParameterSet from .util import ReprMixin, _slsqp_epsilon from importlib.util import find_spec @dataclass class Configuration(ReprMixin): """ Configuration for...
m-guggenmos/remeta
remeta/configuration.py
configuration.py
py
30,674
python
en
code
14
github-code
21
[ { "api_name": "util.ReprMixin", "line_number": 13, "usage_type": "name" }, { "api_name": "modelspec.ParameterSet", "line_number": 246, "usage_type": "name" }, { "api_name": "modelspec.ParameterSet", "line_number": 247, "usage_type": "name" }, { "api_name": "typing...
43893631461
"""add_purpose_to_user Revision ID: 7386d3b3e545 Revises: 955c667efc65 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '7386d3b3e545' down_revision = '955c667efc65' TABLE = 'auth_user' COL = 'purpose' def upgrade(): op.add_column( TABLE, ...
wazo-platform/wazo-auth
wazo_auth/database/alembic/versions/7386d3b3e545_add_purpose_to_user.py
7386d3b3e545_add_purpose_to_user.py
py
651
python
en
code
7
github-code
21
[ { "api_name": "alembic.op.add_column", "line_number": 20, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 20, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Text", ...
27858345175
from django.db import models from django.contrib.auth.models import Group class Evento(models.Model): titulo = models.CharField(max_length=30) fecha_inicio = models.DateField() fecha_termino = models.DateField() descripcion = models.TextField(max_length=255, blank=True) segmento = models.Ma...
MattKRZ/CER3-Agenda-USM
core/models.py
models.py
py
1,082
python
en
code
1
github-code
21
[ { "api_name": "django.db.models.Model", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 4, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 5, "usage_type": "call" }, { "api_name": "...
33129994668
from aws_cdk import ( aws_ec2 as ec2, ) from constructs import Construct class VPC(Construct): def __init__(self, scope: Construct, id_: str, cidr: str) -> None: super().__init__(scope, id_) self.vpc = ec2.Vpc( self, "VPC", max_azs=2, cidr=cidr...
aws-samples/aws-swagger-ui
networking/vpc.py
vpc.py
py
1,015
python
en
code
7
github-code
21
[ { "api_name": "constructs.Construct", "line_number": 7, "usage_type": "name" }, { "api_name": "constructs.Construct", "line_number": 9, "usage_type": "name" }, { "api_name": "aws_cdk.aws_ec2.Vpc", "line_number": 12, "usage_type": "call" }, { "api_name": "aws_cdk.a...
20392567684
import torch.nn as nn import torch from torch.nn.modules.loss import L1Loss ## Adversarial network called FedADG class c_network(torch.nn.Module): def __init__(self): # Various initializations super(c_network, self).__init__() self.device = torch.device('cuda' if torch.cuda...
PotSergione/MLDL23-FL-project
models/FedADG.py
FedADG.py
py
3,991
python
en
code
0
github-code
21
[ { "api_name": "torch.nn", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.cuda", "l...
33298114288
import discord import asyncio import os client = discord.Client() token = "ODg5MTE5ODg1OTk5ODkwNTIy.YUcnaw.a99z-_2MIJwy4u933tR7mlbNYcg" @client.event async def on_ready(): print(client.user.name) print("성공적으로 봇이 실행되었습니다") game = discord.Game('오아앙') await client.change_presence(status=d...
errors2134/asdf
main.py
main.py
py
1,576
python
en
code
0
github-code
21
[ { "api_name": "discord.Client", "line_number": 5, "usage_type": "call" }, { "api_name": "discord.Game", "line_number": 14, "usage_type": "call" }, { "api_name": "discord.Status", "line_number": 15, "usage_type": "attribute" }, { "api_name": "discord.Embed", "l...
2366812949
from sys import stdin as s from collections import deque s=open("input.txt","rt") n,k= map(int,s.readline().split()) list1=list(map(str,s.readline())) dq=deque() dq_max=deque() for i in list1: dq.append(int(i)) while len(dq)<=n and len(dq)!=0: if len(dq_max)==0: dq_max.append(dq.pop()) e...
heekyoung2000/jungle-algorithm
second/stack/2812_ag.py
2812_ag.py
py
522
python
en
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 4, "usage_type": "name" }, { "api_name": "sys.stdin.readline", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 6, "usage_type": "name" }, { "api_name": "sys.stdin.readline", "line_nu...
34466354303
# -*- coding: utf-8 -*- """ Diese Datei sollte nicht verändert werden und wird von uns gestellt und zurückgesetzt. Funktionen zum Laden und Speichern der Dateien """ __author__ = "Maurice Rohr und Christoph Reich" from typing import List, Tuple import csv import scipy.io as sio import numpy as np import os ### Achtu...
ChristophReich1996/ECG_Classification
wettbewerb.py
wettbewerb.py
py
3,941
python
de
code
35
github-code
21
[ { "api_name": "os.path.exists", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path", "line_number": 36, "usage_type": "attribute" }, { "api_name": "typing.List", "line_number": 38, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line_num...
26556608531
import matplotlib.pyplot as plt import spacepy.datamodel import matplotlib.gridspec as gridspec import dateutil.parser import numpy as np from datetime import datetime fDir = '/home/mike/FIREBIRD/Datafiles/FU_3/hires/level2/' fName = 'FU3_Hires_2015-02-02_L2.txt' hr = spacepy.datamodel.readJSONheadedASCII(fDir + fName...
mshumko/bouncing_microburst
event0/compare_sur_col_detectors.py
compare_sur_col_detectors.py
py
1,126
python
en
code
0
github-code
21
[ { "api_name": "spacepy.datamodel.datamodel.readJSONheadedASCII", "line_number": 10, "usage_type": "call" }, { "api_name": "spacepy.datamodel.datamodel", "line_number": 10, "usage_type": "attribute" }, { "api_name": "spacepy.datamodel", "line_number": 10, "usage_type": "na...
70525494454
from django.conf.urls import patterns, include, url from photolog.views import HomeView, PhotologDetailView, PhotologAsGalleryDetailView, \ PhotoCommentsView, NeedLoginView urlpatterns = patterns('', url(r'^$', HomeView.as_view(), name='home'), url(r'^p/(?P<pk>\d+)/$', PhotologDetai...
leench/photolog
photolog/urls.py
urls.py
py
1,006
python
en
code
0
github-code
21
[ { "api_name": "django.conf.urls.patterns", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "photolog.views.HomeView.as_view", "line_number": 7, "usage_type": "call" }, { "api_n...
26717026508
import datetime as dt import matplotlib.pyplot as plt from matplotlib import style import pandas as pd import pandas_datareader.data as web import os import csv #------------------------------------------------------------------------------------------------------ #----------------------------------------------------...
mattrdurante/ratebeer
Stock Analysis.py
Stock Analysis.py
py
2,198
python
en
code
0
github-code
21
[ { "api_name": "os.chdir", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.style.use", "line_number": 22, "usage_type": "call" }, { "api_name": "matplotlib.style", "line_number": 22, "usage_type": "name" }, { "api_name": "datetime.datetime", ...
20598430601
import vk_api, json, requests, traceback from vk_api.bot_longpoll import VkBotEventType vk_session = vk_api.VkApi(token='token') vk = vk_session.get_api() longpoll = vk_api.bot_longpoll.VkBotLongPoll(vk_session, id, wait=25) while True: try: for event in longpoll.listen(): obj = event.object...
yar314/Vk_schedule_bot
sendbot.py
sendbot.py
py
991
python
en
code
0
github-code
21
[ { "api_name": "vk_api.VkApi", "line_number": 4, "usage_type": "call" }, { "api_name": "vk_api.bot_longpoll.VkBotLongPoll", "line_number": 6, "usage_type": "call" }, { "api_name": "vk_api.bot_longpoll", "line_number": 6, "usage_type": "attribute" }, { "api_name": "...
41621781284
from django.urls import path from . import views # from knox import views as knox_views urlpatterns = [ path('home/', views.home, name = 'home'), path('stocks', views.stock_details.as_view(), name = 'stock_detail'), path('setting_nse', views.setting_nse.as_view(), name = 'setting_nse'),...
agpatel111/stock-django
nse_app/urls.py
urls.py
py
1,118
python
en
code
0
github-code
21
[ { "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": 10, "usage_type": "call" }, { "api_name": "django.urls.path", ...
37477631758
# -*- coding: utf-8 -*- import scrapy import re from scrapy.exceptions import CloseSpider from company.database.DBHelper import DBHelper from scrapy.http import Request from company.items import CompanyItem from urllib.parse import quote,unquote import json class TianyanchaSpider(scrapy.Spider): name = 'tianyan...
czliuming/company
company/spiders/tianyancha.py
tianyancha.py
py
4,989
python
en
code
0
github-code
21
[ { "api_name": "scrapy.Spider", "line_number": 14, "usage_type": "attribute" }, { "api_name": "company.database.DBHelper.DBHelper.query_location", "line_number": 25, "usage_type": "call" }, { "api_name": "company.database.DBHelper.DBHelper", "line_number": 25, "usage_type"...
73353338294
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ #from time import sleep import string import collections import matplotlib.pyplot as plt f = open(r'C:\Users\user\Desktop\Alice.txt','r', encoding='utf8') a = [] b= [] for line in f.readlines(): res = line.replace('\n', ''...
CFP106022212/10720PHYS290000
Zipf's Law.py
Zipf's Law.py
py
651
python
en
code
0
github-code
21
[ { "api_name": "string.punctuation", "line_number": 16, "usage_type": "attribute" }, { "api_name": "collections.Counter", "line_number": 22, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.loglog", "line_number": 30, "usage_type": "call" }, { "api_name": "...
72405302134
# -*- coding: utf-8 -*- #!/usr/local/bin/python import os import xlrd from xlutils.copy import copy import xlwt import re import urllib.request as ur import requests import urllib import json from xlwt.Workbook import Workbook import xlwt from csv2excel import csv_to_xls import information from xlwt imp...
nickcafferry/Application-Chemical-Engineer
data/分析报告转化配方表算法/转化算法.py
转化算法.py
py
31,367
python
en
code
1
github-code
21
[ { "api_name": "xlwt.XFStyle", "line_number": 20, "usage_type": "call" }, { "api_name": "xlwt.Font", "line_number": 22, "usage_type": "call" }, { "api_name": "xlwt.Borders", "line_number": 26, "usage_type": "call" }, { "api_name": "xlwt.Alignment", "line_number...
7437713120
from app import app, db from flask import render_template, request, redirect, flash, url_for from app.forms import LoginForm, RegisterForm, EditProfileForm from app.models import User, Post from flask_login import current_user, login_user, logout_user, login_required from werkzeug.urls import url_parse from datetime im...
kirillsCode/PyFlask
app/routes.py
routes.py
py
3,010
python
en
code
0
github-code
21
[ { "api_name": "flask_login.current_user.is_authenticated", "line_number": 12, "usage_type": "attribute" }, { "api_name": "flask_login.current_user", "line_number": 12, "usage_type": "name" }, { "api_name": "flask_login.current_user.last_seen", "line_number": 13, "usage_ty...
24730555658
# Claire Peters, October 2019 # Script feeds multiple directories of recorded audio files through Google # Cloud's Speech-to-Text API to produce searchable .txt transcripts. import argparse import datetime import io import os import sys from google.cloud import speech_v1p1beta1 as speech from google.cloud.speech_v1p1b...
claire-peters/analysistools
masstranscription.py
masstranscription.py
py
3,629
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.fromtimestamp", "line_number": 18, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 18, "usage_type": "attribute" }, { "api_name": "os.path.getmtime", "line_number": 18, "usage_type": "call" }, { "api_name"...
18587521021
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This includes tests for the Distance class and related calculations """ import numpy as np import pytest from numpy import testing as npt from astropy import units as u from astropy.coordinates import CartesianRepresentation, Distance, Latitude, Long...
astropy/astropy
astropy/coordinates/tests/test_distance.py
test_distance.py
py
10,222
python
en
code
4,015
github-code
21
[ { "api_name": "astropy.coordinates.Distance", "line_number": 32, "usage_type": "call" }, { "api_name": "astropy.units.parsec", "line_number": 32, "usage_type": "attribute" }, { "api_name": "astropy.units", "line_number": 32, "usage_type": "name" }, { "api_name": "...