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
19040678594
from django.urls import path from . import views urlpatterns=[ #Function Based View #http://127.0.0.1:8000/employee/employee_cr/ path('employee_cr/',views.Employee_cr), #http://127.0.0.1:8000/employee/employee_rud/1 path('employee_rud/<pk>',views.Employee_rud,name='employee_rud'), #Class Base...
vjvijaykumarvj/company_project
nondrf_root/CRUD_app/urls.py
urls.py
py
605
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "django.urls.path", ...
31791329611
""" author : Lee Sang Min github : https://github.com/sangm1n e-mail : dltkd96als@naver.com title : ํšŒ์‚ฌ์— ์žˆ๋Š” ์‚ฌ๋žŒ description : Dictionary """ import sys from collections import defaultdict input = sys.stdin.readline N = int(input()) dic = defaultdict(int) for _ in range(N): name, inout = map(str, input().split()) ...
sangm1n/problem-solving
BOJ/7785.py
7785.py
py
561
python
en
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 12, "usage_type": "attribute" }, { "api_name": "collections.defaultdict", "line_number": 15, "usage_type": "call" } ]
5550425262
import numpy as np import pickle import sys from sklearn.linear_model import LogisticRegression from sklearn.model_selection import cross_validate models_path = "models" def get_model_path(label_name): return models_path + "/" + "model_" + label_name + ".pkl" def get_history_path(label_name): return models...
juananpe/forum40
backend/classification/classifier.py
classifier.py
py
3,333
python
en
code
0
github-code
21
[ { "api_name": "sklearn.linear_model.LogisticRegression", "line_number": 28, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 43, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 56, "usage_type": "call" }, { "api_name": "numpy...
30570045496
import time import types from traceback import format_exc from typing import Type, Optional, Union, Tuple import attr from jsonmodels import models from requests.structures import CaseInsensitiveDict from six import string_types from apiserver import database from apiserver.config_repo import config from apiserver.ut...
allegroai/clearml-server
apiserver/service_repo/apicall.py
apicall.py
py
21,332
python
en
code
334
github-code
21
[ { "api_name": "attr.ib", "line_number": 23, "usage_type": "call" }, { "api_name": "attr.ib", "line_number": 24, "usage_type": "call" }, { "api_name": "attr.validators.in_", "line_number": 27, "usage_type": "call" }, { "api_name": "attr.validators", "line_numbe...
38606842734
from http import HTTPStatus from fastapi import Depends, HTTPException, Query, Request from fastapi.templating import Jinja2Templates from fastapi.responses import HTMLResponse from lnbits.core.crud import update_payment_status from lnbits.core.models import User from lnbits.core.views.api import api_payment from lnb...
lnbits/lnurldevice
views.py
views.py
py
1,888
python
en
code
3
github-code
21
[ { "api_name": "fastapi.templating.Jinja2Templates", "line_number": 15, "usage_type": "call" }, { "api_name": "fastapi.Request", "line_number": 19, "usage_type": "name" }, { "api_name": "lnbits.core.models.User", "line_number": 19, "usage_type": "name" }, { "api_na...
21418194743
from loguru import logger from twisted.internet.defer import Deferred from twisted.internet.protocol import ReconnectingClientFactory from twisted.internet.tcp import Connector from twisted.python.failure import Failure from sibi.decorators import append, publish, request, resolve from sibi.exceptions import IBExcepti...
manuelfedele/sibi
sibi/ib_factory.py
ib_factory.py
py
9,782
python
en
code
1
github-code
21
[ { "api_name": "twisted.internet.protocol.ReconnectingClientFactory", "line_number": 21, "usage_type": "name" }, { "api_name": "sibi.ibapi.client.EClient", "line_number": 21, "usage_type": "name" }, { "api_name": "sibi.ibapi.wrapper.EWrapper", "line_number": 21, "usage_typ...
38613306807
import sqlite3 import os filename = "testing.db" # Delete existing databases # check if file exists if os.path.isfile(filename): # delete file os.remove(filename) # connecting to the database conn = sqlite3.connect('testing.db') # Prompt the user to set a password for the database password = input("Ent...
WhipAndLash/BaseChecking
database.py
database.py
py
1,413
python
en
code
0
github-code
21
[ { "api_name": "os.path.isfile", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.remove", "line_number": 11, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_numbe...
41784297545
from typing import List import pandas as pd import plotnine as pn from application.constants import DATA_DIR, RESULTS_DIR from application.main_experiment.eval.noise_eval import ( aggregate_performance_across_tasks, aggregate_performance_across_tasks_no_merging, aggregated_table_to_latex, rename_easy_...
HLasse/data-centric-synthetic-data
src/application/main_experiment/eval/distributions_significance/label_noise_summary_table.py
label_noise_summary_table.py
py
6,121
python
en
code
1
github-code
21
[ { "api_name": "typing.List", "line_number": 21, "usage_type": "name" }, { "api_name": "data_centric_synth.experiments.models.IMPLEMENTED_DATA_CENTRIC_METHODS", "line_number": 21, "usage_type": "name" }, { "api_name": "data_centric_synth.experiments.models.get_default_synthetic_mo...
25635221488
from django.test import TestCase from .models import Course, Student, Register from django.contrib.auth.models import User # Create your tests here. class ModelsTestCase(TestCase): def setUp(self): course1 = Course.objects.create( course_code="CN1", course_name="A", s...
6310682619/cn331-as2
reg/registrar/test_models.py
test_models.py
py
1,088
python
en
code
0
github-code
21
[ { "api_name": "django.test.TestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "models.Course.objects.create", "line_number": 9, "usage_type": "call" }, { "api_name": "models.Course.objects", "line_number": 9, "usage_type": "attribute" }, { "api_nam...
74970671731
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
GoodnessEzeokafor/building-api-with-django-rest
main/urls.py
urls.py
py
2,720
python
en
code
1
github-code
21
[ { "api_name": "rest_framework.routers.DefaultRouter", "line_number": 27, "usage_type": "call" }, { "api_name": "rest_framework.routers", "line_number": 27, "usage_type": "name" }, { "api_name": "main.endpoints.PaidOrderLineViewSet", "line_number": 28, "usage_type": "attri...
6182136878
from flask import Blueprint, jsonify, request from flask_cors import CORS from functools import reduce from sqlalchemy import func, or_ from server.models.Properties import Property, Price from server.util.instances import db from server.util.helpers import (no_of_Beds, get_areas, get_...
preciousidam/analysis-backend
server/routes/statistics.py
statistics.py
py
2,933
python
en
code
0
github-code
21
[ { "api_name": "flask.Blueprint", "line_number": 11, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 23, "usage_type": "call" }, { "api_name": "flask.request....
72809157494
import cv2 import numpy as np from matplotlib import pyplot as plt from copy import deepcopy # 1 I = cv2.imread("./anhthi/Coins.jpg") # cv2.imshow("Image", I) # 2. chuyแปƒn แบฃnh qua gray Ig = np.zeros((I.shape[0], I.shape[1]), dtype='uint8') for i in range(0, I.shape[0]): for j in range(0, I.shape[1]): Ig[i]...
trongthanhqvo/xulyanh
de7.py
de7.py
py
3,379
python
vi
code
1
github-code
21
[ { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.Sobel", "line_number": 21, ...
25375101267
from django.db.models.signals import m2m_changed, post_save, pre_save, pre_delete from django.dispatch import receiver from django.utils.text import slugify from transliterate import translit from itertools import product from unidecode import unidecode from .models import Product, ProductModification, Image, Category,...
zharuk/django-deva7
deva7km/catalog/signals.py
signals.py
py
9,017
python
ru
code
0
github-code
21
[ { "api_name": "models.ProductModification.objects.filter", "line_number": 15, "usage_type": "call" }, { "api_name": "models.ProductModification.objects", "line_number": 15, "usage_type": "attribute" }, { "api_name": "models.ProductModification", "line_number": 15, "usage_...
23391199277
import pymongo as pm from bson.json_util import loads, dumps, SON import config # DB Model class dataBase(object): CONNECTION_STRING = config.Config.MONGO_URI DATABASE = None COLLECTION = None #Init connection @staticmethod def initialize(): client = pm.MongoClient(dataBase.CONNECTI...
Krystian-P/Day-Event_Storage
Main/app/model.py
model.py
py
2,004
python
en
code
0
github-code
21
[ { "api_name": "config.Config", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pymongo.MongoClient", "line_number": 17, "usage_type": "call" }, { "api_name": "bson.json_util.loads", "line_number": 33, "usage_type": "call" }, { "api_name": "bson.json_...
27206049855
import logging from dataclasses import dataclass from typing import Dict, List import numpy as np import torch from torch.utils.data.dataset import Dataset from torch.nn.utils.rnn import pad_sequence from transformers import PreTrainedTokenizer from span_masking import ParagraphInfo, PairWithSpanMaskingScheme logg...
ahoho/conditional-mlm
data.py
data.py
py
8,374
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.utils.data.dataset.Dataset", "line_number": 17, "usage_type": "name" }, { "api_name": "transformers.PreTrainedTokenizer", "line_number": 23, "usage_type": "name" }, { ...
2162591013
import streamlit as st import webvtt import os # import openai from io import StringIO import tiktoken from langchain.document_loaders import UnstructuredFileLoader from langchain.chains.summarize import load_summarize_chain from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.chat_models i...
slevin48/openai
summary/summarize_chain.py
summarize_chain.py
py
2,795
python
en
code
1
github-code
21
[ { "api_name": "streamlit.set_page_config", "line_number": 12, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 14, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 17, "usage_type": "attribute" }, { "api_name": "streamlit.s...
28718362472
import pytest import os import shutil import json import contextlib import socket import tornado from github import Github from util import list_installed_modules, get_config_path, load_config, write_config, remove_module_files, determine_free_port from github_access import list_modules, remove_filename_from_path, clon...
Smunfr/sse-platform-test
test_platform.py
test_platform.py
py
9,501
python
en
code
0
github-code
21
[ { "api_name": "os.path.isdir", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 21, "usage_type": "call" }, { "api_name": "json.dump", "line_number":...
20359432178
#!/usr/bin/env python2 import ast import base64 import errno import grp import os import os.path import pwd import re import shutil import socket import subprocess import sys import yaml from charmhelpers.contrib.charmsupport import nrpe from charmhelpers.core.hookenv import ( close_port, config as orig_confi...
PietroPasotti/apache2-charm
hooks/hooks.py
hooks.py
py
39,843
python
en
code
0
github-code
21
[ { "api_name": "re.split", "line_number": 61, "usage_type": "call" }, { "api_name": "subprocess.call", "line_number": 63, "usage_type": "call" }, { "api_name": "subprocess.Popen", "line_number": 70, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line...
17686180112
import json from datetime import datetime from hashlib import sha224 as hash_ from werkzeug.wrappers import Response timefmt = '%Y-%m-%d_%H:%M:%S.%f' # content { <collection> { <hash> : <json resource>, ...} ... } collections = {} def home(req): return Response('Temp Root Response') def content(req, collectio...
jessebmiller/JBMPub
model/api/controllers.py
controllers.py
py
1,182
python
en
code
1
github-code
21
[ { "api_name": "werkzeug.wrappers.Response", "line_number": 14, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 22, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 23, "usage_type": "call" }, { "api_name": "json.dumps", "li...
10464853686
import cv2 as cv import numpy as np def searchTemplate(template,img): flattenTemplate = np.array(template).flatten() for i in range(len(img)-len(template)): for j in range(len(img[0])-len(template[0])): return cap = cv.VideoCapture('Taiwan.mp4') roi = None template = None while(cap.isOpen...
MouraYuri/ObjectDetection-TemplateMatching
templateMatching.py
templateMatching.py
py
1,362
python
en
code
1
github-code
21
[ { "api_name": "numpy.array", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 20, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "li...
25566839171
import uuid from language import Language DEFAULT_DATA = { "cards": [], "id": uuid.uuid4().hex, "name": "Invalid list", "icon": "default.png" } class CardList: def __init__(self, filename: str, language: Language, json_data=None, name=None): self.filename = filename self.language...
Kage0x3B/tangocards
src/main/python/card_list.py
card_list.py
py
1,635
python
en
code
0
github-code
21
[ { "api_name": "uuid.uuid4", "line_number": 7, "usage_type": "call" }, { "api_name": "language.Language", "line_number": 14, "usage_type": "name" }, { "api_name": "uuid.uuid4", "line_number": 20, "usage_type": "call" } ]
11016949280
#!/usr/bin/python3 import sys import subprocess import tempfile if len(sys.argv) != 3: print(f'Usage: {sys.argv[0]} [ghidraLocation] [firmwareImage]') sys.exit(0) filename = sys.argv[2] ghidraDir = sys.argv[1] def getEndianness(filename): print('Detecting endianess...') binwalkOutput = subprocess.ru...
infobyte/cve-2022-27255
analysis/analyse_firmware.py
analyse_firmware.py
py
3,489
python
en
code
263
github-code
21
[ { "api_name": "sys.argv", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 11, ...
72232839733
from __future__ import print_function from hyperopt import Trials, STATUS_OK, tpe from hyperas import optim from hyperas.distributions import choice, uniform # Import required libraries import pandas as pd import numpy as np import sklearn import time from sklearn.model_selection import train_test_split # Keras spec...
EvoArt/MachineFlow
src/learning/DeepLearningTuning.py
DeepLearningTuning.py
py
4,206
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 35, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 48, "usage_type": "call" }, { "api_name": "keras.utils.to_categorical", "line_number": 51, "usage_type": "call" }, { ...
6140659850
from bs4 import BeautifulSoup import requests import re class Scrape: def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.13 Safari/537.36", "Referer": "http://tools.iedb.org/bcell/" ...
ImLuFish/ScrapeProject
main.py
main.py
py
1,555
python
en
code
0
github-code
21
[ { "api_name": "requests.Session", "line_number": 18, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 20, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 37, "usage_type": "call" }, { "api_name": "re.compile", ...
26202297870
import os import logging from logging import StreamHandler from socket import gethostname def get_secret(key, required=True): secret = os.environ.get(key) if secret is None and required: raise KeyError("Missing secret {}".format(key)) return secret BASE_URL = "localhost:5000" PROTOCOL = "http" HOS...
renfredxh/snueue
snueue/config/base.py
base.py
py
1,603
python
en
code
2
github-code
21
[ { "api_name": "os.environ.get", "line_number": 7, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 7, "usage_type": "attribute" }, { "api_name": "socket.gethostname", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.INFO", "l...
17452774191
import spacy def find_recursive(token, dep, chunks): children = token.children spans = [] for c in children: if c.dep_ == dep: for chunk in chunks: if c in chunk: spans.append(chunk.string) break spans.extend(find_recurs...
LukasRepos/LiveBot
Chatty/cognitive/NLP/svoExtraction.py
svoExtraction.py
py
3,263
python
en
code
0
github-code
21
[ { "api_name": "spacy.util.filter_spans", "line_number": 43, "usage_type": "call" }, { "api_name": "spacy.util", "line_number": 43, "usage_type": "attribute" } ]
34261206832
import sys from collections import deque dx = [-1, 1, 0, 0] dy = [0, 0, -1, 1] def bfs(i, j): if matrix[i][j] == 0: return 0 queue = deque() queue.append((i, j)) matrix[i][j] = 0 while queue: x, y = queue.popleft() for i in range(4): nx = x + dx[i] ny = y + dy[i] if nx < 0 o...
deepredpark/algorithm
BOJ/dfs_bfs/p1012.py
p1012.py
py
830
python
en
code
0
github-code
21
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.stdin.readline", "line_number": 26, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 26, "usage_type": "attribute" }, { "api_name": "sys.stdin.readlin...
41979314652
import click import csv import random from Bio import SeqIO from Bio.Seq import Seq def short_formula(dna_seq): """ Melting temperature calculation for a sequence strictly shorter than 14 nucleotides """ dna_seq = dna_seq.upper() nA = dna_seq.count("A") nC = dna_seq.count("C") ...
TechnocultureResearch/binfutils
Padlock_Probe_miRNA/Padlock_Probe_Designer.py
Padlock_Probe_Designer.py
py
5,503
python
en
code
1
github-code
21
[ { "api_name": "random.choice", "line_number": 75, "usage_type": "call" }, { "api_name": "csv.DictReader", "line_number": 88, "usage_type": "call" }, { "api_name": "Bio.SeqIO.parse", "line_number": 93, "usage_type": "call" }, { "api_name": "Bio.SeqIO", "line_nu...
25013987592
from cryptography.fernet import Fernet import csv def spread_list(inlist): """ Function to spread list values left to right. Used to deal with implicit multiple headers pf multi Index csv. ["","value1","","","value2",""] ==> ["","value1","value1","value1","value2","value2"] """ outlist = [] ...
muhammadusmannaeem/CSV-data-Encrypter
main.py
main.py
py
7,263
python
en
code
0
github-code
21
[ { "api_name": "cryptography.fernet.Fernet.generate_key", "line_number": 22, "usage_type": "call" }, { "api_name": "cryptography.fernet.Fernet", "line_number": 22, "usage_type": "name" }, { "api_name": "csv.reader", "line_number": 31, "usage_type": "call" }, { "api...
15341786021
from __future__ import annotations from typing import Any, Generator, TYPE_CHECKING from clovars.abstract import CellNode from clovars.utils import PathCreatorMixin, QuietPrinterMixin from clovars.simulation import TreatmentDrawer, TreeDrawer2D, TreeDrawer3D if TYPE_CHECKING: import pandas as pd from clovars...
jfaccioni/clovars
clovars/simulation/view/simulation_viewer.py
simulation_viewer.py
py
8,163
python
en
code
0
github-code
21
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 9, "usage_type": "name" }, { "api_name": "clovars.utils.QuietPrinterMixin", "line_number": 14, "usage_type": "name" }, { "api_name": "clovars.utils.PathCreatorMixin", "line_number": 14, "usage_type": "name" }, { ...
26982354740
from flask import Flask from flask_bootstrap import Bootstrap from flask_mail import Mail from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_pagedown import PageDown from flask_debugtoolbar import DebugToolbarExtension # from celery import Celery from config import config, Config import ...
cuhkshenzhen/taxi
taximap/app/__init__.py
__init__.py
py
2,850
python
en
code
0
github-code
21
[ { "api_name": "flask_debugtoolbar.DebugToolbarExtension", "line_number": 17, "usage_type": "call" }, { "api_name": "flask_bootstrap.Bootstrap", "line_number": 18, "usage_type": "call" }, { "api_name": "flask_mail.Mail", "line_number": 19, "usage_type": "call" }, { ...
4698278992
import argparse import subprocess import os parser = argparse.ArgumentParser() parser.add_argument('--cell', type=str, default="K562") parser.add_argument('--root', type=str, default="./") parser.add_argument('--update', action="store_true") args = parser.parse_args() standard_parameters = "--cutholes 1500 --singl...
organic-chemistry/repli1D
src/repli1d/whole_pipeline_extra.py
whole_pipeline_extra.py
py
3,022
python
en
code
3
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 64, "usage_type": "call" }, { "api_name": "os.path", "line_number": 64, "usage_type": "attribute" }, { "api_name": "subprocess.Popen",...
22805984397
#----------imports----------# # from imu_ad import IMUAttitudeDetermination import imu_ad import RPi.GPIO import smbus import math import numpy as np import time # import scipy.integrate as si import matplotlib.pyplot as plt import matplotlib.animation as animation import operator as op # from mpl_toolkits.mplot3d i...
afarah2002/PiRocket
archives/onboard_test/imu_old/imu_display.py
imu_display.py
py
1,729
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 23, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 23, "usage_type": "name" }, { "api_name": "imu_ad.IMUAttitudeDetermination", "line_number": 37, "usage_type": "call" }, { "api_na...
4918366894
from nose.tools import assert_equals class IFrameElementsTest(object): def test_can_work_on_iframes(self): """can work on iframes and switch back to the page""" with self.browser.get_iframe('iframemodal') as frame: value = frame.find_by_tag('h1').first.value assert_equals(...
rodrigomanhaes/splinter
tests/iframes.py
iframes.py
py
458
python
en
code
null
github-code
21
[ { "api_name": "nose.tools.assert_equals", "line_number": 10, "usage_type": "call" }, { "api_name": "nose.tools.assert_equals", "line_number": 12, "usage_type": "call" } ]
35878332696
import numpy as np import matplotlib.pyplot as plt from scipy.signal import correlate, convolve2d from scipy.ndimage import median_filter from iconfuv.misc import size_equalizer, liner, orientation_finder, get_br, shiftappend, correlation_coefficient from iconfuv.destarring.nn_models import unet_v1 from iconfuv.data im...
UIUC-SINE/icon-fuv
python3/iconfuv/destarring/methods.py
methods.py
py
7,095
python
en
code
0
github-code
21
[ { "api_name": "iconfuv.destarring.nn_models.unet_v1", "line_number": 10, "usage_type": "name" }, { "api_name": "iconfuv.data.unet_v1_path", "line_number": 10, "usage_type": "name" }, { "api_name": "torch.load", "line_number": 14, "usage_type": "call" }, { "api_nam...
33739580862
#!/usr/bin/env python from obspy.core import Stream, read, UTCDateTime import glob import operator import numpy as np from matplotlib.mlab import csd from obspy.signal.invsim import paz_to_freq_resp from obspy.signal.spectral_estimation import get_nlnm, get_nhnm import matplotlib.pyplot as plt from math import pi impo...
reanthony-usgs/Raspberry_Shakes
Figure5b_Local_Event_Comparison.py
Figure5b_Local_Event_Comparison.py
py
4,147
python
en
code
5
github-code
21
[ { "api_name": "matplotlib.rc", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.rc", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.rc", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.rc", "line_n...
41001418780
""" Tests for PyDEns-module. """ import os import warnings from glob import glob import pytest BAD_PREFIXES = ['get_ipython', 'plt', 'axes', 'fig.', 'fig,', 'ipyw', 'interact('] NOTEBOOKS = glob(os.path.join(os.path.dirname(__file__), '../../tutorials/*.ipynb')) @pytest.mark.slow @pytest.mark.parame...
analysiscenter/pydens
pydens/tests/pydens_test.py
pydens_test.py
py
1,237
python
en
code
264
github-code
21
[ { "api_name": "glob.glob", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_numbe...
2000157877
#create map #We cut the 90x60 cells screen into a 3x3 grid of 30x20 cells rectangles #In each rectangle, we randomly draw a room import random as rd import numpy as np import pygame as pg #### CONSTANTS ###### W, H = 10, 10 # Cell width and height X, Y = 90 , 60 # nb of cells horizontally and vertically #I chose 90, ...
antoinelii/roguegame
map.py
map.py
py
6,520
python
en
code
0
github-code
21
[ { "api_name": "random.randint", "line_number": 31, "usage_type": "call" }, { "api_name": "random.sample", "line_number": 32, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 51, "usage_type": "call" }, { "api_name": "random.randint", "lin...
41982975743
import boto3 import time import threading import sys ec2_client = boto3.client('ec2', region_name='us-east-1') ec2_resource = boto3.resource('ec2', region_name='us-east-1') msgCount = 1 threshold = 0 exit = 0 AMI='ami-042e8287309f5df03' def getInstancesStates(stoppedInstances, runningInstances): for instance in e...
yhs97/AWS-AutoScaling
WebTier/Controller.py
Controller.py
py
3,189
python
en
code
0
github-code
21
[ { "api_name": "boto3.client", "line_number": 6, "usage_type": "call" }, { "api_name": "boto3.resource", "line_number": 7, "usage_type": "call" }, { "api_name": "boto3.resource", "line_number": 58, "usage_type": "call" }, { "api_name": "time.sleep", "line_numbe...
35987189012
import pygame #Arquivo que reune funรงรตes utilizadas em todos os niveis, para poupar cรณdigo repetido #Codigo da quebra do laser def laser_break(self): #Codigo para a remoรงรฃo dos LASER disparados, feito com auxilio do chatGPT para criar a base e pensar a lรตgica. #Basicamente ao remover a arma que dispara o laser...
insper-classroom/devlife-23-1-projeto-pygame-gustavoc_sarti
functions.py
functions.py
py
7,819
python
pt
code
0
github-code
21
[ { "api_name": "pygame.sprite.groupcollide", "line_number": 10, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pygame.sprite.groupcollide", "line_number": 26, "usage_type": "call" }, { "api_name...
71818463094
import logging import click import click_log from poultry import readline_dir from sqlalchemy.dialects import postgresql as pg from sqlalchemy.exc import ProgrammingError from . import model from .features import basic_features, lv_features try: import psycopg2 except ImportError: # Fall back to psycopg2c...
henryj885/flock
flock/__main__.py
__main__.py
py
4,806
python
en
code
0
github-code
21
[ { "api_name": "psycopg2cffi.compat.register", "line_number": 20, "usage_type": "call" }, { "api_name": "psycopg2cffi.compat", "line_number": 20, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 22, "usage_type": "call" }, { "api_name": "sq...
25879917342
import subprocess import sys from typing import Iterable, List, Optional, Tuple from autohooks.api import error, ok, out from autohooks.api.git import get_staged_status, stash_unstaged_changes from autohooks.api.path import match from autohooks.config import Config DEFAULT_INCLUDE: Tuple[str] = ("*.py",) DEFAULT_ARGU...
greenbone/autohooks-plugin-mypy
autohooks/plugins/mypy/mypy.py
mypy.py
py
2,589
python
en
code
0
github-code
21
[ { "api_name": "typing.Tuple", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 11, "usage_type": "name" }, { "api_name": "autohooks.config.Config", "line_number": 23, "usage_type": "name" }, { "api_name": "typing.Iterable", ...
26637106780
import cv2 as cv capture = cv.VideoCapture(0) #cv.imshow(capture) #change res only work for live video capture.set(3,320) capture.set(4,240) #frame capture while capture.isOpened(): isTrue,frame = capture.read() cv.imshow('Video',frame) if cv.waitKey(1) & 0xFF == ord('q') : break capture.rele...
aluruhariharan/aluruhariharan
change_resol.py
change_resol.py
py
351
python
en
code
0
github-code
21
[ { "api_name": "cv2.VideoCapture", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.destroyAllWindows", "l...
31905942533
import urllib from lxml import etree class Spider(object): def __init__(self): self.tiebaName = "java" self.beginPage = 1 self.endPage = 3 self.url = "http://tieba.baidu.com/f?" self.ua_header = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537....
Gsl201600/XYPythonTest
XYTieBaSpider.py
XYTieBaSpider.py
py
2,743
python
en
code
0
github-code
21
[ { "api_name": "urllib.parse.urlencode", "line_number": 18, "usage_type": "call" }, { "api_name": "urllib.parse", "line_number": 18, "usage_type": "attribute" }, { "api_name": "urllib.request.Request", "line_number": 24, "usage_type": "call" }, { "api_name": "urlli...
17369814684
import shodan from elasticsearch import Elasticsearch from elasticsearch.client import IndicesClient from utils.color import Colors import logging logging.basicConfig(level=logging.ERROR) def search (api=None, dork=None, limit=None, offset=None) : data = [] try: api = shodan.Shodan(api) res = api.search(dor...
jimywork/stretcher
utils/elastic.py
elastic.py
py
2,665
python
en
code
94
github-code
21
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.ERROR", "line_number": 8, "usage_type": "attribute" }, { "api_name": "shodan.Shodan", "line_number": 16, "usage_type": "call" }, { "api_name": "shodan.APIError", ...
37761776461
#! /usr/bin/python3 from .common import MessageBox from mathutils import Vector, Matrix, Euler from math import pi, ceil from . import common import logging log = logging.getLogger('bpy.ops.import_mesh.bmd.jnt1') class Jnt1Header: size = 24 def __init__(self): # GENERATED! pass def LoadData(self,...
niacdoial/blemd
Jnt1.py
Jnt1.py
py
8,566
python
en
code
28
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "common.GLOBALS", "line_number": 81, "usage_type": "attribute" }, { "api_name": "math.pi", "line_number": 92, "usage_type": "name" }, { "api_name": "math.pi", "line_numb...
36671121425
import subprocess import sys import os import json import argparse from paramiko import SSHClient from scp import SCPClient #script input arguments parser = argparse.ArgumentParser(description="") parser.add_argument("cfg_filename" , help="Path to the input configuration file") parser.add_argument("--saveRatioPlot",...
llunerti/hnlTreeAnalyzer
python/make_dataVSmc_comparison.py
make_dataVSmc_comparison.py
py
8,779
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_n...
38969508449
from pyvx.backend import * from pyvx.nodes import * from collections import defaultdict from itertools import combinations class OptimizedGraph(CoreGraph): def optimize(self): self.identify_consumers() self.identify_relations() self.merge_elementwise_nodes() self.ded_code_removal() ...
hakanardo/pyvx
old/pyvx/optimize.py
optimize.py
py
3,188
python
en
code
10
github-code
21
[ { "api_name": "collections.defaultdict", "line_number": 14, "usage_type": "call" } ]
28741289342
# views.py from django.contrib.auth import login, authenticate from .forms import CustomUserCreationForm, CustomAuthenticationForm from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponseRedirect from django.urls import reverse from .models import CustomUser, Like from djang...
zyivan356/Bauminder
datingapp/views.py
views.py
py
2,274
python
en
code
0
github-code
21
[ { "api_name": "django.contrib.auth.models.User", "line_number": 11, "usage_type": "name" }, { "api_name": "django.contrib.auth.get_user_model", "line_number": 11, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects.exclude", "line_number": 14, "...
13878111293
import json import sys def parse(fname): with open(fname) as f: log = json.loads(f.read()) total_moves, total_time = 0, 0 total_games = 0 max_gen = 0 for gen in log: max_gen = int(gen['session gen']) for game in gen['results']: total_games += 1 tim...
williamh890/checkers-ai
checkers-ai/log_parse.py
log_parse.py
py
680
python
en
code
0
github-code
21
[ { "api_name": "json.loads", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 29, "usage_type": "attribute" } ]
30424494881
import os.path as osp from os import listdir import glob import os import torch import numpy as np from torch_geometric.data import Data import networkx as nx from networkx.convert_matrix import from_numpy_matrix import multiprocessing from torch_sparse import coalesce from torch_geometric.utils import remove_self_lo...
zhangyubrain/DGCN
utils/construct_graph.py
construct_graph.py
py
10,851
python
en
code
6
github-code
21
[ { "api_name": "torch.cumsum", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.from_numpy", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.bincount", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.cat", "line_nu...
71640546612
#!/usr/bin/python3 """Check if there are voxels in the 'other' mask (e.g. lesion) that don't overlap the 'container' mask (e.g. prostate). """ import argparse import numpy as np import matplotlib.pyplot as plt import dwi.files import dwi.mask import dwi.util def parse_args(): """Parse command-line arguments."...
HACKMESEU/DicomBrowser
dwilib/tools/check_mask_overlap.py
check_mask_overlap.py
py
3,001
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 19, "usage_type": "call" }, { "api_name": "dwi.files.files.read_pmap", "line_number": 33, "usage_type": "call" }, { "api_name": "dwi.files.files", "line_number": 33, "usage_type": "attribute" }, { "api_name":...
73029632693
import logging from ..utils import get_subclasses logger = logging.getLogger(__name__) ############################################################################### class Backend: """ Base class for all tensor operation backends. Examples of backends are Keras, Theano, TensorFlow, etc. """ ###################...
LiuFang816/SALSTM_py_data
python/deepgram_kur/kur-master/kur/backend/backend.py
backend.py
py
11,674
python
en
code
9
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 4, "usage_type": "call" }, { "api_name": "utils.get_subclasses", "line_number": 212, "usage_type": "call" } ]
24551859136
import requests import json def fetch(action, url, query): return json.loads(requests.request(action, url, params = query).text) class Util: def __init__(self, api_key, api_token): self.key = str(api_key) self.token = str(api_token) def fetch(self, action, url, query = { }): query...
BaumGmbH/python-projects
TrelloAPI/API Test/util.py
util.py
py
1,147
python
en
code
0
github-code
21
[ { "api_name": "json.loads", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.request", "line_number": 5, "usage_type": "call" } ]
7068949177
import json from django.contrib.auth import update_session_auth_hash from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core import serializers from django.http import JsonResponse, HttpResponse from django.shortcuts import render, redirect from core.models...
jdmmiranda307/PI
professor/views.py
views.py
py
7,601
python
en
code
0
github-code
21
[ { "api_name": "django.shortcuts.render", "line_number": 16, "usage_type": "call" }, { "api_name": "core.models.Professor.objects.get", "line_number": 32, "usage_type": "call" }, { "api_name": "core.models.Professor.objects", "line_number": 32, "usage_type": "attribute" ...
11345769414
import random import csv import uuid import psycopg2 from psycopg2 import sql from faker import Faker connection = psycopg2.connect( host="localhost", database="postgres", user="postgres", password="root" ) fake = Faker('id_ID') def generate_user(): # Generate users dummy data records = 100...
KyrieCettyara/Relational-Database-Pacmann-Mobil-Bekas
generate_dummy.py
generate_dummy.py
py
5,116
python
en
code
0
github-code
21
[ { "api_name": "psycopg2.connect", "line_number": 9, "usage_type": "call" }, { "api_name": "faker.Faker", "line_number": 16, "usage_type": "call" }, { "api_name": "csv.DictReader", "line_number": 27, "usage_type": "call" }, { "api_name": "random.choice", "line_...
19232314100
import os, sys from flask import Flask, request import json import requests from airtable import Airtable #CUSTOM from utils import KNOWLEDGE_NEURAL , KNOWLEDGE_COLOR, base_key, table_name app = Flask(__name__) @app.route('/', methods=['GET']) def verify(): # Webhook verification if request.args.get("hub.mode")...
SamJ0282/ImageServiceBot
app.py
app.py
py
11,419
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 15, "usage_type": "attribute" }, { "api_name": "flask.requ...
9728229462
from torchvision import transforms from easydl import ImageAugmentationConfig resnet_mean = [0.485, 0.456, 0.406] resnet_std = [0.229, 0.224, 0.225] def make_transform_train_v1(image_size=224): return transforms.Compose([ transforms.RandomResizedCrop(image_size), transforms.RandomHorizontalFlip()...
xiaonanzzz/easy-deep-learning-pytorch
easydl/image_transform.py
image_transform.py
py
1,566
python
en
code
1
github-code
21
[ { "api_name": "torchvision.transforms.Compose", "line_number": 9, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 9, "usage_type": "name" }, { "api_name": "torchvision.transforms.RandomResizedCrop", "line_number": 10, "usage_type": "call" ...
21249410694
from setuptools import setup, find_packages exec(open('plottools/version.py').read()) with open("README.md", "r") as fh: long_description = fh.read() setup( name='plottools', version=__version__, author='Jan Benda', author_email="jan.benda@uni-tuebingen.de", description='Simplify production o...
bendalab/plottools
setup.py
setup.py
py
979
python
en
code
5
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 8, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 26, "usage_type": "call" } ]
22970521029
from odoo import models, fields, api, _ from odoo.exceptions import ValidationError import re import locale import logging _logger = logging.getLogger(__name__) class BaseInformation(models.AbstractModel): _name = "vnitpro.base.information" _order = 'activate desc, code asc' code = fields.Char('Code', si...
tu2305/VNITPro_erp
vnitpro_base/models/base.py
base.py
py
1,828
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "odoo.models.AbstractModel", "line_number": 9, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 9, "usage_type": "name" }, { "api_name": "odoo.fields...
75197613493
import sys from collections import deque input = sys.stdin.readline dx = [1, -1, 0, 0] dy = [0, 0, 1, -1] n, m = map(int, input().split()) grid = list(list(map(int, input().rstrip())) for _ in range(n)) walls = [] for i in range(n): for j in range(m): if grid[i][j] == 1: walls.append((i, j)) ...
keeeeeey/baekjoon_algorithm
level23(DFS, BFS)/๋ฒฝ ๋ถ€์ˆ˜๊ณ  ์ด๋™ํ•˜๊ธฐ.py
๋ฒฝ ๋ถ€์ˆ˜๊ณ  ์ด๋™ํ•˜๊ธฐ.py
py
964
python
en
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 4, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 18, "usage_type": "call" } ]
2561151997
#!/usr/bin/env python3 import numpy as np from scipy.linalg import norm import pandas as pd import dogs import scipy import scipy.io import matplotlib.pyplot as plt from matplotlib.pyplot import cm ''' This script shows the Delta DOGS Adaptive K main code. Contributors: Shahrouz Ryan Alimo, Muhan Zhao Modified: Oct. ...
deltadogs/DOGS-python
DeltaDOGS_AdaptiveK.py
DeltaDOGS_AdaptiveK.py
py
6,577
python
en
code
3
github-code
21
[ { "api_name": "scipy.linalg.norm", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.multiply", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_num...
31783507185
"""Platform to locally control Tuya-based fan devices.""" import logging from functools import partial import voluptuous as vol from homeassistant.components.fan import ( DOMAIN, SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM, SPEED_OFF, SUPPORT_OSCILLATE, SUPPORT_SET_SPEED, FanEntity, ) from .co...
kvazis/homeassistant
custom_components/localtuya/fan.py
fan.py
py
4,724
python
en
code
259
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 26, "usage_type": "call" }, { "api_name": "voluptuous.Optional", "line_number": 32, "usage_type": "call" }, { "api_name": "const.CONF_FAN_SPEED_CONTROL", "line_number": 32, "usage_type": "argument" }, { "api_name":...
4370924822
import pyttsx3 print("Welcome to RoboSpeaker Programm....") engine = pyttsx3.init() engine.say("Ram Ram bhai Saryaa Nu") engine.runAndWait() engine.say("Let's start") engine.runAndWait() while True: a = input("What you want me to Speak: ") if a == "q": engine.say("Bye Bye") engine.runAndWait() ...
anandgopalyadav/Text_to_Speak----RoboSpeaker
Source_file.py
Source_file.py
py
379
python
en
code
0
github-code
21
[ { "api_name": "pyttsx3.init", "line_number": 3, "usage_type": "call" } ]
71270894773
import requests with open('็ŸฅไนŽcookie') as f: cookie = f.read() headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36', 'cookie': cookie } url = 'https://www.zhihu.com/people/xiao-feng-can-yue-23-1' r = requests.get(url, head...
Bruceey/Spider_Learning
16ใ€ไฟกๆฏๆ ก้ชŒๅ็ˆฌ่™ซ/cookie้ชŒ่ฏ/Test03_็ŸฅไนŽ็™ปๅฝ•_ๅˆฉ็”จcookieๅ€ผ.py
Test03_็ŸฅไนŽ็™ปๅฝ•_ๅˆฉ็”จcookieๅ€ผ.py
py
350
python
en
code
1
github-code
21
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" } ]
42956500102
import socket import select import queue import sys import os import re import datetime # create UDP socket server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) server.setblocking(0) # Socket Select lists inputs = [server] outputs = [] # Server Address H2 server_ip = sys.argv[1] server_port = ...
Shaun7heSheep/computerNetwork
sor-server.py
sor-server.py
py
17,312
python
en
code
1
github-code
21
[ { "api_name": "socket.socket", "line_number": 10, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 10, "usage_type": "attribute" }, { "api_name": "socket.SOCK_DGRAM", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sys.argv", ...
32102005782
from typing_extensions import Self import psycopg2 sql_select_qry = (""" SELECT fhp.policy_number, fhp.issue_date, fhp.status, fhp.policy_type, fhfh.funeral_home_name, fhfh.funeral_home_location, fhfh.fh_state, fha.agt_first_name,fha.agt_last_name,fhp.pfa, fhp.growth,fhpi.pi_first_name,fhpi.pi_last_na...
katiebell0190/rapidraccoon
prj_menu_class_dev.py
prj_menu_class_dev.py
py
2,976
python
en
code
0
github-code
21
[ { "api_name": "psycopg2.connect", "line_number": 32, "usage_type": "call" }, { "api_name": "psycopg2.DatabaseError", "line_number": 47, "usage_type": "attribute" }, { "api_name": "psycopg2.connect", "line_number": 57, "usage_type": "call" }, { "api_name": "psycopg...
23295593987
#!/usr/bin/env python import dateutil.parser import dateutil.tz import feedparser import re from datetime import datetime, timedelta from joblist import JobList class FilterException(Exception): pass class IndeedJobList(JobList): '''Joblist class for Indeed This joblist is for the indeed.com rss feed. I...
keisetsu/joblist
indeed.py
indeed.py
py
5,528
python
en
code
0
github-code
21
[ { "api_name": "joblist.JobList", "line_number": 14, "usage_type": "name" }, { "api_name": "datetime.timedelta", "line_number": 81, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 82, "usage_type": "call" }, { "api_name": "datetime.dat...
17198068859
import pyttsx3 import datetime #pip install datetime import speech_recognition as sr #pip install speechRecognition import wikipedia#pip install wikipedia import webbrowser import smtplib engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') #print(voices[0].id) engine.setProperty('voice'...
suprabhu77/jarvis-using-python-and-passwordgenerator
jar.py
jar.py
py
2,687
python
en
code
3
github-code
21
[ { "api_name": "pyttsx3.init", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "attribute" }, { "api_name": "speech_reco...
24078437877
import matplotlib.pyplot as plt import matplotlib.image as mpimg # ๅพ…้ข„ๆต‹ๅ›พ็‰‡ test_img_path = ['E:\\Paddle\\Paddle-3\\test\\1.jpg'] img = mpimg.imread(test_img_path[0]) # ๅฑ•็คบๅพ…้ข„ๆต‹ๅ›พ็‰‡ plt.figure(figsize=(10,10)) plt.imshow(img) plt.axis('off') plt.show() with open('test/test.txt', 'r') as f: test_img_pa...
lx88888/PaddlePaddle
Paddle-4/1.py
1.py
py
847
python
en
code
4
github-code
21
[ { "api_name": "matplotlib.image.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.image", "line_number": 6, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 9, "usage_type": "call" }, { "api_name": "matplo...
71904056692
import re import os, os.path from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord import subprocess import pandas import io import pymongo from scipy.cluster.hierarchy import linkage, cut_tree from scipy.spatial.distance import squareform def fasta2json(fasta_seq, fasta_file=""): with...
Augustpan/Bioman
bioman.py
bioman.py
py
8,011
python
en
code
0
github-code
21
[ { "api_name": "io.BytesIO", "line_number": 15, "usage_type": "call" }, { "api_name": "Bio.SeqIO.parse", "line_number": 16, "usage_type": "call" }, { "api_name": "Bio.SeqIO", "line_number": 16, "usage_type": "name" }, { "api_name": "io.TextIOWrapper", "line_num...
40019566088
import numpy as np import cv2 as cv import face_recognition video_capture = cv.VideoCapture(0, cv.CAP_DSHOW) # Haar cascade face recognition haar_cascade = cv.CascadeClassifier('haarcascade_frontalface_default.xml') face_recognizer = cv.face.LBPHFaceRecognizer_create() face_recognizer.read('face_trained.yml') people ...
andreearacovita/face-recognition
face-recognition.py
face-recognition.py
py
3,487
python
en
code
0
github-code
21
[ { "api_name": "cv2.VideoCapture", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.CAP_DSHOW", "line_number": 5, "usage_type": "attribute" }, { "api_name": "cv2.CascadeClassifier", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.face.LBPHF...
19473025978
import os import json import datetime import numpy as np import pandas as pd import tensorflow as tf from scipy import sparse from sklearn.model_selection import KFold from public import * class _AssistDataProcessor: def __init__(self, userLC, problemLC, timeLC, drop_duplicates = True, remove_nan_skills = True, da...
hyLiu1994/KnowledgeModels
DataProcessor/AssistDataProcessor.py
AssistDataProcessor.py
py
7,860
python
en
code
3
github-code
21
[ { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 24, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 2...
29899756583
#!/usr/bin/python3 import argparse import sys from multiprocessing import Process, Pipe import Cryptodome.Random.random as random from Cryptodome.Cipher import AES NAME="MASTER" def log(message): return NAME + (7-len(NAME))*" "+": "+message # -- ะŸะตั€ะตะธะฝะธั†ะธะฐะปะธะทะฐั†ะธั ะบะพะผะฐะฝะดั‹ print ะดะปั multiprocessing -- def print...
IKVSI/cryptopopov
Task17/main.py
main.py
py
4,731
python
en
code
0
github-code
21
[ { "api_name": "sys.stdout.write", "line_number": 16, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 16, "usage_type": "attribute" }, { "api_name": "sys.stdout.flush", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.stdout", "l...
5549152976
#!/usr/bin/env python from setuptools import setup, find_packages install_requires = [ 'sockjs-tornado==1.0.0', 'tornado==3.2.2', 'wsgiref==0.1.2', 'argparse', 'umysql==2.61', ] setup( name='thunderpush', version='0.9.7', author='Krzysztof Jagiello', author_email='balonyo@gmail.com...
thedeadofblackfire/livepush
setup.py
setup.py
py
987
python
en
code
0
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 12, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 18, "usage_type": "call" } ]
25572864595
#%% import PyPDF2 import os import sys import timeit import re import pandas as pd def test_path(): if os.getcwd()[-6:] == "python": os.chdir("..") sys.path.append("./python") print(os.getcwd()) #%% def count_keywords(file_name, return_data_frame=True): file_path = os.path.join("data", "core_p...
graebnerc/DegrowthTwinProblem
python/FullText-PostDevelopment-Search.py
FullText-PostDevelopment-Search.py
py
2,796
python
en
code
0
github-code
21
[ { "api_name": "os.getcwd", "line_number": 10, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 12, ...
36649095621
import pygame import pymunk import pymunk.pygame_util import math import random from settings import WIDTH, HEIGHT class Ball(): def __init__(self, space): self.image = pygame.image.load("Assets/Image/ball.png").convert_alpha() self.body = None self.shape = None self.newBall(space)...
DucAnh1053/HeadSoccerGame
ball.py
ball.py
py
1,932
python
en
code
0
github-code
21
[ { "api_name": "pygame.image.load", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 11, "usage_type": "attribute" }, { "api_name": "settings.WIDTH", "line_number": 15, "usage_type": "name" }, { "api_name": "settings.HEIGHT", ...
71398017012
# -*- coding: utf-8 -*- """ Created on Mon Nov 22 16:24:01 2021 @author: ows18 Script for formatting the BR and BDP results as columns that can be copy-pasted into the excel spreadhseet with the combined results. NOTE: Excel spreadsheet musty be closed to update it. """ import numpy as np import pickle im...
Next-Generation-Neural-Interfaces/Hardware-efficient-MUA-compression
Analyse results/integrate_BR_and_BDP_results_into_excel.py
integrate_BR_and_BDP_results_into_excel.py
py
10,428
python
en
code
0
github-code
21
[ { "api_name": "numpy.array", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 24, "usage_type": "call" }, { "api_name": "re.search", "line_number": ...
37161220590
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import jsonify from flask_bootstrap import Bootstrap from flask_restful import Api from Application.app import flask_app from Library.db_model import DBModelFactory, DBModel from Library.extensions import orm from Library.OrmModel.User import User from Applicati...
zuiwan/CodingHub
Application/api.py
api.py
py
2,475
python
en
code
1
github-code
21
[ { "api_name": "Application.app.flask_app", "line_number": 39, "usage_type": "name" }, { "api_name": "Application.Contacts.Contacts.ContactsView", "line_number": 39, "usage_type": "argument" }, { "api_name": "Application.User.User.UserView", "line_number": 39, "usage_type"...
6489351102
from transformers import AutoTokenizer, AutoModelForSequenceClassification from datasets import load_dataset from transformers import TrainingArguments, Trainer import numpy as np import evaluate tokenizer = AutoTokenizer.from_pretrained( "Hello-SimpleAI/chatgpt-detector-roberta") model = AutoModelForSequenceClass...
afroz-al/AuthentiCheck
train.py
train.py
py
1,944
python
en
code
0
github-code
21
[ { "api_name": "transformers.AutoTokenizer.from_pretrained", "line_number": 7, "usage_type": "call" }, { "api_name": "transformers.AutoTokenizer", "line_number": 7, "usage_type": "name" }, { "api_name": "transformers.AutoModelForSequenceClassification.from_pretrained", "line_n...
32657646805
"""Spider to srape products from https://www.mrporter.com/en-us/. The following categories are supported: - Clothing - Shoes - Accessories (incl. bags) """ import scrapy from ..items import ProductItem from ..loaders.mrporter import MrportertLoader class MrporterSpider(scrapy.Spider): """Spider to...
FSDL-Fashion/fashion_img_search
scraping/scraping/spiders/mrporter.py
mrporter.py
py
1,786
python
en
code
3
github-code
21
[ { "api_name": "scrapy.Spider", "line_number": 16, "usage_type": "attribute" }, { "api_name": "loaders.mrporter.MrportertLoader", "line_number": 43, "usage_type": "call" }, { "api_name": "items.ProductItem", "line_number": 43, "usage_type": "call" } ]
72076217013
from __future__ import absolute_import, unicode_literals import celery app = celery.Celery('tasks', backend='redis', broker='redis://192.168.1.106:6379') app.conf.update( result_expires=3600, ) @app.task def first(): print("hello world") @app.task def add(x, y): return x + y
SoyM/ros-tool
celery_test.py
celery_test.py
py
299
python
en
code
0
github-code
21
[ { "api_name": "celery.Celery", "line_number": 5, "usage_type": "call" } ]
20600170951
from flask import Flask, redirect, render_template import poomsae, wod app = Flask(__name__) @app.route('/wod') def workout(): workouts = wod.get_workout() return render_template('wod.html', workouts=workouts) @app.route('/poom') @app.route('/poom/<int:max_poomsae>') def show_poomsae(max_poomsae=8): po...
gugi9000/taekwon
app.py
app.py
py
859
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "wod.get_workout", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 10, "usage_type": "call" }, { "api_name": "poomsae.poomsae_list"...
25357282700
from django import forms from django.contrib.auth.models import User from .models import Balance, SendFund, RequestFund from django.contrib import messages class SendFundForm(forms.ModelForm): class Meta: model = SendFund fields = ("sender", "receiver", "sender_currency", "receiver_currency", "amo...
akoredehundeyin/Web-App---Payment-App
transfer/forms.py
forms.py
py
3,418
python
en
code
0
github-code
21
[ { "api_name": "django.forms.ModelForm", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 7, "usage_type": "name" }, { "api_name": "models.SendFund", "line_number": 9, "usage_type": "name" }, { "api_name": "django.forms.Te...
3579303553
from __future__ import division import torch import math import random from PIL import Image, ImageOps, ImageEnhance import numpy as np import torchvision from torchvision import datasets, models, transforms from torchvision.transforms import functional as F import torch.utils.data as data import matplotlib.pyplot as...
adityassrana/multimodal-learning
RGBDutils.py
RGBDutils.py
py
14,526
python
en
code
2
github-code
21
[ { "api_name": "os.listdir", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path", "line_number": 41, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number...
30047453813
import sys sys.path.append('QtProperty') sys.path.append('libqt5') from PyQt5.QtWidgets import QApplication, QLineEdit from PyQt5.QtCore import ( QTranslator, QVariant, QDate, QTime, QDateTime, Qt, QLocale, QPoint, QPointF, QSize, QSizeF, QRect, QRectF ...
ElCapor/bloxlib-examples
test.py
test.py
py
8,049
python
en
code
14
github-code
21
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_numbe...
35911468031
# coding=utf-8 from selenium.webdriver import ActionChains import time from db.ora.oradao import Oradao from util.initialize import Initialize from util.ranchar import ranNo __author__ = 'Maggie' class BoInitialize(Initialize): # ๅˆๅง‹ๅŒ–member่ฝฌๆขไธบdict def __init__(self, type=None): member_sql = ''' ...
regend/redriver
util/boInitialize.py
boInitialize.py
py
3,012
python
en
code
0
github-code
21
[ { "api_name": "util.initialize.Initialize", "line_number": 11, "usage_type": "name" }, { "api_name": "db.ora.oradao.Oradao", "line_number": 27, "usage_type": "call" }, { "api_name": "util.ranchar.ranNo", "line_number": 31, "usage_type": "call" }, { "api_name": "se...
74433877811
import argparse import torch import numpy as np from dataset import Dataset from model import DemParModel, EqualOddModel from trainer import Trainer from utils import gen_dataclasses def get_parser(): parser = argparse.ArgumentParser(description="Benchmarking Differentially Private Fair Deep Learning") parser...
Eponeshnikov/DPFairDeepLearning
run_training.py
run_training.py
py
14,105
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "utils.gen_dataclasses", "line_number": 170, "usage_type": "call" }, { "api_name": "dataset.Dataset", "line_number": 171, "usage_type": "call" }, { "api_name": "torch...
17495542593
#!/usr/bin/env python # To # By Yusuke Satoh # On import os import sys import itertools import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from mpl_toolkits.basemap import Basemap from matplotlib.ticker import PercentFormatter import ca...
yusuke61/tfe_scripts
scripts/estimate_effective_non-corr_time.py
estimate_effective_non-corr_time.py
py
13,117
python
en
code
2
github-code
21
[ { "api_name": "utiltools.get_region_info", "line_number": 31, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 34, "usage_type": "call" }, { "api_name": "os.path", "line_number": 34, "usage_type": "attribute" }, { "api_name": "os.path.join", ...
18354117879
# coding: utf-8 # An example using startStreams import numpy as np import cv2 import sys, time from pylibfreenect2 import Freenect2, SyncMultiFrameListener from pylibfreenect2 import FrameType, Registration, Frame try: from pylibfreenect2 import OpenCLPacketPipeline pipeline = OpenCLPacketPipeline() except: ...
AtsushiHashimoto/KinectOnTheCeiling
PoseEstimation/Script/Preprocessing/RealData/kinect_io.py
kinect_io.py
py
1,200
python
en
code
0
github-code
21
[ { "api_name": "pylibfreenect2.OpenCLPacketPipeline", "line_number": 13, "usage_type": "call" }, { "api_name": "pylibfreenect2.CpuPacketPipeline", "line_number": 16, "usage_type": "call" }, { "api_name": "pylibfreenect2.Freenect2", "line_number": 20, "usage_type": "call" ...
7997523813
import cv2 import time import numpy as np #set camera cap = cv2.VideoCapture(1) #path to output video file output = 'video.avi' #set fps fps = 20 #set codec of output video fourcc = cv2.VideoWriter_fourcc(*'XVID') writer = None (h, w) = (None, None) while True: _, frame = cap.read() if ...
arnon2020/OpenCV-video-record
Record_fullframe.py
Record_fullframe.py
py
586
python
en
code
0
github-code
21
[ { "api_name": "cv2.VideoCapture", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.VideoWriter_fourcc", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.VideoWriter", "line_number": 24, "usage_type": "call" }, { "api_name": "cv2.imshow", ...
18940788040
# Library imports import streamlit as st import os from langchain.llms.openai import OpenAI from langchain.prompts import PromptTemplate from langchain.chains import LLMChain from langchain.tools import DuckDuckGoSearchRun # Function to generate Video Scripts def generate_video_script(prompt, video_length, creativit...
suvofalcon/Generative-AI
ZEN-MASTER/pages/4_Video_Script_Writer.py
4_Video_Script_Writer.py
py
2,900
python
en
code
0
github-code
21
[ { "api_name": "langchain.prompts.PromptTemplate", "line_number": 15, "usage_type": "call" }, { "api_name": "langchain.prompts.PromptTemplate", "line_number": 21, "usage_type": "call" }, { "api_name": "langchain.llms.openai.OpenAI", "line_number": 27, "usage_type": "call" ...
1953341117
import pyglet, math from pyglet.window import key import resources, physicalobject sensor_length = 1000 class Sensor: def __init__(self, angle): self.dx = math.cos(angle) self.dy = math.sin(angle) self.val = sensor_length class Vehicle(physicalobject.PhysicalObject): def __init__(self, *args, ...
Heagan/maze
Maze/vehicle.py
vehicle.py
py
1,781
python
en
code
0
github-code
21
[ { "api_name": "math.cos", "line_number": 9, "usage_type": "call" }, { "api_name": "math.sin", "line_number": 10, "usage_type": "call" }, { "api_name": "physicalobject.PhysicalObject", "line_number": 14, "usage_type": "attribute" }, { "api_name": "resources.car_ima...
42583924347
import pytest from pandas import DataFrame SAMPLE_CONFIG = {} SAMPLE_RESULT_DATA = [ {"table_name": "my_table", "count": 10}, {"table_name": "my_table", "count": 10}, ] @pytest.fixture def module_under_test(): from data_validation.result_handlers import text return text def test_import(module_un...
majacQ/professional-services-data-validator
tests/unit/result_handlers/test_text.py
test_text.py
py
739
python
en
code
null
github-code
21
[ { "api_name": "data_validation.result_handlers.text", "line_number": 17, "usage_type": "name" }, { "api_name": "pytest.fixture", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 27, "usage_type": "call" } ]
71541886773
import game_data import art import random import os print(art.logo) option_a = random.choice(game_data.data) option_b = random.choice(game_data.data) score = 0 user_guess = '' while True: print('') if score == 0 else print(f'You are correct ! Current score: {score}') print(f'Compare A: ' + option_a['name'] + '...
arjun-14/100-days-of-python
day 014/higher_lower.py
higher_lower.py
py
1,182
python
en
code
1
github-code
21
[ { "api_name": "art.logo", "line_number": 6, "usage_type": "attribute" }, { "api_name": "random.choice", "line_number": 7, "usage_type": "call" }, { "api_name": "game_data.data", "line_number": 7, "usage_type": "attribute" }, { "api_name": "random.choice", "lin...
39237190521
# -*- coding: utf-8 -*- """ UDP server implemented as the low-level python code here. This script is used in connection with the LabVIEW code for sending / receiving commands and, moreover, images. This script is used for testing of capabilities of entire image transfer. """ # %% Imports import socket import time impo...
sklykov/sup_lv_proj
LV_Py_img_tr/scripts/UDP_Py_unified.py
UDP_Py_unified.py
py
6,149
python
en
code
0
github-code
21
[ { "api_name": "socket.socket", "line_number": 35, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 35, "usage_type": "attribute" }, { "api_name": "socket.SOCK_DGRAM", "line_number": 35, "usage_type": "attribute" }, { "api_name": "numpy.zeros"...
34172436827
import sys import subprocess import utils from utils import TraceImporter import struct # Functors used for evaluation purposes class EvalFunctors: def __init__(self, ProbabilityMap, noEdgeProbability, Mapping, entryTemplate, tracerProcess, traceImpoter): self.ProbabilityMap = ProbabilityMap self....
bitdefender/distributed.tracer
river.genetic/genetic_code/functors.py
functors.py
py
5,779
python
en
code
4
github-code
21
[ { "api_name": "utils.getNextEntryFromStream", "line_number": 49, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 119, "usage_type": "call" } ]
1123013611
# deepsea-ai, Apache-2.0 license # Filename: config/config.py # Description: Configuration helper to setup defaults and fetch cloud configuration import string import boto3 from configparser import ConfigParser import datetime as dt import os import botocore from botocore.exceptions import ClientError from pathlib i...
mbari-org/deepsea-ai
deepsea_ai/config/config.py
config.py
py
10,725
python
en
code
1
github-code
21
[ { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.abspath", "line...
39374673641
## 1. Introduction ## import csv filename = "top100.csv" def read_data(filename): f = open(filename, 'r') data_list = list(csv.reader(f)) # return data_list[1: len(data_list)] return data_list def extract_column(data_list, column): extract_me = [] for data in data_list[1:len(data_list)]: ...
amarlearning/kaggle-machine-learning
Data Science Practice/Iterations and List Comprehensions-300.py
Iterations and List Comprehensions-300.py
py
3,725
python
en
code
1
github-code
21
[ { "api_name": "csv.reader", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 45, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 50, "usage_type": "call" }, { "api_name": "collections.Counter...
40402783578
from typing import List import cv2 import numpy as np import time class ImageProcessing: # CONFIG MINLINELENGTH = 300 MAXLINEGAP = 5 SCALEPERCENT = 50 # ENVIRONNEMENT SETTINGS DEBUG = False def legend(image, width, height): cv2.putText(image, "Cars", (width, height), cv2.FONT...
simonbt6/image-processing-lib
processing.py
processing.py
py
6,412
python
en
code
0
github-code
21
[ { "api_name": "cv2.putText", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.FONT_HERSHEY_SIMPLEX", "line_number": 17, "usage_type": "attribute" }, { "api_name": "time.time", "line_number": 21, "usage_type": "call" }, { "api_name": "time.time", "...