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
35608141070
r""" Geophysical Electromagnetic modelling ===================================== In this example we use `pyfftlog` to obtain time-domain EM data from frequency-domain data and vice versa. We do this by using analytical halfspace solution in both domains, and comparing the transformed responses to the true result. The ...
prisae/pyfftlog
examples/geophysical_em.py
geophysical_em.py
py
5,105
python
en
code
19
github-code
18
[ { "api_name": "numpy.logspace", "line_number": 29, "usage_type": "call" }, { "api_name": "empymod.analytical", "line_number": 68, "usage_type": "call" }, { "api_name": "empymod.analytical", "line_number": 71, "usage_type": "call" }, { "api_name": "numpy.log10", ...
25866967640
from __future__ import print_function import client import numpy as np import wx import subprocess import shutil import time import range as Range import takeoff import datetime import argparse #select the UI abstract superclass to derive from UI=client.AbstractmatplotlibUI # Derive the demo-specific GUI class from t...
EPCCed/wee_archie
windtunnel/windtunnel_ui.py
windtunnel_ui.py
py
22,059
python
en
code
5
github-code
18
[ { "api_name": "client.AbstractmatplotlibUI", "line_number": 14, "usage_type": "attribute" }, { "api_name": "datetime.datetime", "line_number": 29, "usage_type": "attribute" }, { "api_name": "wx.BoxSizer", "line_number": 46, "usage_type": "call" }, { "api_name": "w...
7905587644
from itertools import chain from flask_restful import Resource from flask import request from pylon.core.tools import log from tools import api_tools class ProjectAPI(api_tools.APIModeHandler): def get(self, project_id, prompt_name): return self.module.get_versions_by_prompt_name(project_id, prompt_name...
RavshanovUsmonbek/prompts
api/v1/versions.py
versions.py
py
1,286
python
en
code
null
github-code
18
[ { "api_name": "tools.api_tools.APIModeHandler", "line_number": 9, "usage_type": "attribute" }, { "api_name": "tools.api_tools", "line_number": 9, "usage_type": "name" }, { "api_name": "flask.request.json", "line_number": 15, "usage_type": "attribute" }, { "api_nam...
31391019903
import pytest @pytest.mark.parametrize( ('page', 'result'), [ ('/', 200), ('/about', 200), ('/output_model', 200), ('/api/', 200), ('/api/docs', 200), ('/api/v1/model', 200), ('/api/v1/model?reach=4&hours=20', 200) ] ) def test_pages(client, page, re...
trhoang2368/flagging
tests/test_site.py
test_site.py
py
792
python
en
code
null
github-code
18
[ { "api_name": "pytest.mark.parametrize", "line_number": 4, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 4, "usage_type": "attribute" } ]
7639390525
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import StandardScaler from sklearn.ensemble import IsolationForest # 1. Importar los datos df_new = pd.read_csv('tracking_data11.csv') # 2. Filtrar IDs que han aparecido al menos 2 segundos (60 frames para un video de 30...
pabloriascos/TFM
Isolation_Forest.py
Isolation_Forest.py
py
1,833
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 25, "usage_type": "call" }, { "api_name": "sklearn.ensemble.IsolationForest", "line_number": 29, "usage_type": "call" }, { ...
14468716726
#!/usr/bin/env python """ Output the CSV data (console) which shows some typical domain configuration errors (when we can connect website.name but can't www.website.name or https://website.name) Ignores the domain name if all variants are failed (assuming the wrong domain) Configuration: check local.env.sample file """...
AusDTO/disco_crawl
post_domain_aliases/process_domain_aliases.py
process_domain_aliases.py
py
3,176
python
en
code
1
github-code
18
[ { "api_name": "os.environ.get", "line_number": 23, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 24, "usage_type": "call" }, { "api_name": "os.environ", "line_...
36458936794
#!/usr/bin/env python3 """ => Help: this script scrapes a days' directory for subscriber amount for channels. The default is to scrape the current day infodate. An argument (--daysbefore=<n>) may be used to achieve a number of days in the past. Example: #thisscript --daysbefore=2 will scrape the day befor...
alclass/scrapingYTMembershipNumbersSwDv
upd_subscribers_scrape_to_db.py
upd_subscribers_scrape_to_db.py
py
2,938
python
en
code
0
github-code
18
[ { "api_name": "datetime.date.today", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 21, "usage_type": "attribute" }, { "api_name": "datetime.timedelta", "line_number": 32, "usage_type": "call" }, { "api_name": "models.scra...
37679761182
import unittest from compare_all import compare_all from utils import fact, broken_fact from math import factorial class TestCompareAll(unittest.TestCase): def test_compare_all_fact(self): self.assertEqual( compare_all(fact, factorial, [0, 1, 5]), [True, True, True] ) ...
Kehrlann/python-functions
test_compare_all.py
test_compare_all.py
py
538
python
en
code
0
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "attribute" }, { "api_name": "compare_all.compare_all", "line_number": 11, "usage_type": "call" }, { "api_name": "utils.fact", "line_number": 11, "usage_type": "argument" }, { "api_name": "math.fac...
40485151250
import sys import numpy import random ''' WRITE YOUR CODE BELOW. ''' from numpy import zeros, float32 # pgmpy͏︆͏󠄃͏󠄌͏󠄍͏󠄂͏️͏︆͏︌͏󠄀 import pgmpy from pgmpy.models import BayesianModel from pgmpy.factors.discrete import TabularCPD from pgmpy.inference import VariableElimination #You are not allowed to use following s...
rsomann/Bayesian-Networks-Simulation
submission.py
submission.py
py
15,080
python
en
code
0
github-code
18
[ { "api_name": "pgmpy.models.BayesianModel", "line_number": 25, "usage_type": "call" }, { "api_name": "pgmpy.factors.discrete.TabularCPD", "line_number": 50, "usage_type": "call" }, { "api_name": "pgmpy.factors.discrete.TabularCPD", "line_number": 51, "usage_type": "call" ...
23243703848
import json import os import argparse from collections import defaultdict def main(args): queries = [] with open(args.input_file, 'r') as f: for line in f: queries.append(json.loads(line)) clusters_by_engine = defaultdict(lambda : defaultdict(list)) for i, q in enumera...
FMInference/DejaVu
Decentralized_FM_alpha/scripts/a100_inf_scripts/split_queries.py
split_queries.py
py
2,614
python
en
code
86
github-code
18
[ { "api_name": "json.loads", "line_number": 11, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path", "line_...
39719666024
import numpy as np from gym import error try: import mujoco_py except ImportError as e: raise error.DependencyNotInstalled("{}. (HINT: you need to install mujoco_py, and also perform the setup instructions here: https://github.com/openai/mujoco-py/.)".format(e)) def robot_get_obs(sim): """Returns all joi...
AI4Finance-Foundation/FinRL-Tutorials
DQN-DDPG_Stock_Trading/gym/envs/robotics/utils.py
utils.py
py
3,693
python
en
code
599
github-code
18
[ { "api_name": "gym.error.DependencyNotInstalled", "line_number": 7, "usage_type": "call" }, { "api_name": "gym.error", "line_number": 7, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.array", ...
40725930632
import numpy as np import matplotlib.pyplot as plt def tanh(x): return np.tanh(x) def relu(x): return np.maximum(x, 0) def sigmoid(x): return 1/(1 + np.exp(-x)) def derivative_tanh(x): return (1 - np.power(x, 2)) def derivative_relu(x): return np.array(x > 0, dtype = np.float32) def initialize...
Coding-Lane/L2-Regularization
model_utils.py
model_utils.py
py
3,786
python
en
code
4
github-code
18
[ { "api_name": "numpy.tanh", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.maximum", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.exp", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.power", "line_number": 14,...
3703785950
import scrapy from scrapy.loader import ItemLoader from apomio.items import ApomioItem class ApomioSpider(scrapy.Spider): name = "apomio" productXPZN = {} def start_requests(self): urlstem = 'https://www.apomio.de/suche?query=' pzns = [ '171865', '1587486', ...
bobby096310/scrapy-project
apomio/spiders/apomio_spider.py
apomio_spider.py
py
2,384
python
en
code
0
github-code
18
[ { "api_name": "scrapy.Spider", "line_number": 5, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 23, "usage_type": "call" }, { "api_name": "scrapy.loader.ItemLoader", "line_number": 40, "usage_type": "call" }, { "api_name": "apomio.item...
29872929262
import sys sys.stdin = open('등산로.txt', 'r') from collections import deque def dig(r, c, dig_t): queue = deque([[r, c, 1, dig_t, MAP[r][c], [r, c]]]) max_lv = 0 while queue: ny, nx, lv, dig, h, visited = queue.popleft() max_lv = max(max_lv, lv) for i in range(4): ty, tx ...
essk13/Algorithm
01_problem/python/2021/09/0923/등산로 조성.py
등산로 조성.py
py
1,750
python
en
code
0
github-code
18
[ { "api_name": "sys.stdin", "line_number": 2, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 7, "usage_type": "call" } ]
7072080208
import pandas as pd from urllib.parse import urlparse from tld import get_tld import re from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score url_list=pd.read_csv('malicious_phish.csv') url_list.loc[651191,'url']='...
Jai11Saxena/Malicious-url-with-spoof-page-detection-
malicious url detection/main.py
main.py
py
4,678
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "re.search", "line_number": 41, "usage_type": "call" }, { "api_name": "re.search", "line_number": 51, "usage_type": "call" }, { "api_name": "urllib.parse.urlparse", "line...
32012587540
from itertools import combinations from collections import defaultdict def solution(infos, querys): answer = [] # 딕셔너리 초기화 info_dict = defaultdict(list) # 각각의 요소 딕셔너리에 넣기 (마지막값은 score) for info in infos: temp = info.split(" ") key = temp[0:-1] score = int(temp[-1]) #...
saehyen/Python_algorithm
RankingSearch/RankingSearch2.py
RankingSearch2.py
py
1,698
python
ko
code
5
github-code
18
[ { "api_name": "collections.defaultdict", "line_number": 7, "usage_type": "call" }, { "api_name": "itertools.combinations", "line_number": 15, "usage_type": "call" } ]
32936319921
from django.shortcuts import render # Create your views here. from rest_framework import generics from quiz.serializers import CategorySerializer, QuestionSerializer, QuizSerializer from .models import Options, Category, Question, Quiz from django_filters.rest_framework import DjangoFilterBackend ### search filter ...
tariksitki/Cohort-11-Django-Class-Notes
Quiz_App_Session_22/quiz/views.py
views.py
py
1,717
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.generics.ListAPIView", "line_number": 15, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 15, "usage_type": "name" }, { "api_name": "models.Category.objects.all", "line_number": 16, "usage_type": "call" ...
29079900951
from wiki_requests import get_topic_page import re from bs4 import BeautifulSoup as BS def get_topic_words(topic): html_content = get_topic_page(topic) more_link_word = get_some_more_links_word(html_content) if len(more_link_word): #Ограничение тремя ссылками, чтобы быстрее было for word ...
GrishinAnton/python-start
OOP-course/requestWiki/main.py
main.py
py
1,629
python
ru
code
0
github-code
18
[ { "api_name": "wiki_requests.get_topic_page", "line_number": 6, "usage_type": "call" }, { "api_name": "wiki_requests.get_topic_page", "line_number": 13, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 15, "usage_type": "call" }, { "api_name": "b...
8929630194
from django.urls import path from .views import * urlpatterns = [ path('login/', login_user, name='login'), path('register/', register_user, name='register'), path('redirect-user/base-location/', redirect_origin, name='redirect_origin'), path('logout/', logout_user, name='logout'), # Staff Area ...
jahir-raihan/E-Commerce-Project
Site BackEnd/E_Commerce_site/user/urls.py
urls.py
py
1,922
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", ...
8731874852
from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404, redirect from django.urls import reverse from Polls.models import Simulacao_cenarios from Polls.portfolio import calculaPortfolio from Polls.security import checkAccess from Polls.simulation import calculaSimulacoes fro...
deguedess/ipaa_new
IPAA_APP/Polls/views.py
views.py
py
10,594
python
pt
code
0
github-code
18
[ { "api_name": "django.shortcuts.redirect", "line_number": 19, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 25, "usage_type": "call" }, { "api_name": "forms.RegisterUserForm", "line_number": 31, "usage_type": "call" }, { "api_name...
22544454572
""" How do we call other functions from `main`? The important case is when this function wants to say or do anything on behalf of the bot. We call such functions "Routines", and to call them, you need to use `yield Subroutine`. In the following example, we call `questionnaire` subroutine and then get the returned valu...
okulovsky/kaia
demos/eaglesong/example_02_questionnaire_1.py
example_02_questionnaire_1.py
py
1,184
python
en
code
4
github-code
18
[ { "api_name": "datetime.datetime.now", "line_number": 34, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 34, "usage_type": "name" } ]
272543002
import yfinance as yf stock_pair = [] def checar_precos(): first_pair = [] second_pair = [] for i in range(0, len(stock_pair),1): if i == 0: ticker = yf.Ticker(stock_pair[i]) price = ticker.info['regularMarketPrice'] name = ticker.info['symbol'] fi...
joaoxfernando/AlertaSpread
checa_precos.py
checa_precos.py
py
1,367
python
pt
code
0
github-code
18
[ { "api_name": "yfinance.Ticker", "line_number": 12, "usage_type": "call" }, { "api_name": "yfinance.Ticker", "line_number": 18, "usage_type": "call" } ]
25575156516
''' Link : https://www.acmicpc.net/problem/14891 Difficulty : GOLD-5 Category : 구현, 시뮬레이션 Title : 톱니바퀴 ''' import sys from collections import deque # 데이터 입력 gearStatusList = list() for i in range(4): gearStatusList.append(deque(list(sys.stdin.readline().rstrip()))) K = int(sys.stdin.readline()....
devju94/baekjoon-solutions
solutions/g5_14891.py
g5_14891.py
py
2,412
python
ko
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.stdin.readline", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 15, "usage_type": "attribute" }, { "api_name": "sys.stdin.readlin...
75133725799
""" Library to provide many functions for loading, manipulating, rotating, cropping, etc. on volumetric data in Numpy format. Also functions for loading from NiFTi. """ from __future__ import print_function import numpy as np import copy import os, sys, shutil, glob from skimage.transform import resize, rescale import...
jcausey-astate/ai_campus_kits19
kits_volume_utils.py
kits_volume_utils.py
py
27,144
python
en
code
3
github-code
18
[ { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_number": 60, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_number": 62, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_numbe...
16108430600
import pygame class Paddle: WHITE = (255,255,255) VEL = 6 def __init__(self, x, y, width, height, velocity = VEL, color = WHITE): self.x = self.original_x = x self.y = self.original_y = y self.width = width self.height = height self.color = color self.velo...
Dense18/Pong
Paddle.py
Paddle.py
py
682
python
en
code
0
github-code
18
[ { "api_name": "pygame.draw.rect", "line_number": 16, "usage_type": "call" }, { "api_name": "pygame.draw", "line_number": 16, "usage_type": "attribute" } ]
9805001850
import numpy as np import cv2 image = cv2.imread("images/minMax.jpg", cv2.IMREAD_GRAYSCALE) if image is None: raise Exception("영상파일 읽기 오류") min_val, max_val, a, b = cv2.minMaxLoc(image) ratio = 255 / (max_val - min_val) dst = np.round((image - min_val) * ratio).astype('uint8') min_dst, max_dst, c, d = cv2....
nahyeongjin1/PoseEstimation
CHAPTER05/11.image_min_max.py
11.image_min_max.py
py
570
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.IMREAD_GRAYSCALE", "line_number": 4, "usage_type": "attribute" }, { "api_name": "cv2.minMaxLoc", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.round", "li...
15535506242
import os from datetime import datetime from Settings.AppInfo import AppInfo from PyUtils.DirUtils import DirUtils from Settings.ProfileManager import ProfileManager class ReportAudioDetails: HTML_REPORT_HEADER = """<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8...
AndersonPaschoalon/CKsQuestDialogManager
Gui/ReportAudioDetails.py
ReportAudioDetails.py
py
9,193
python
en
code
3
github-code
18
[ { "api_name": "os.getcwd", "line_number": 143, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 146, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 146, "usage_type": "name" }, { "api_name": "PyUtils.DirUtils...
4376003675
# %% import pandas as pd from PIL import Image # %% bb_box = pd.read_csv("/home/jongwook95.lee/vision/Slive/ScaledYOLOv4-yolov4-csp/our_data/head-export.csv") bb_box.head() category_dict = dict() category_dict['person'] = 0 category_dict['safehat'] = 1 # %% for image_name in list(set(bb_box['image'])): temp_bb_...
ollehJW/scaled_yolov4
preprocessing.py
preprocessing.py
py
1,354
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 19, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 19, "usage_type": "name" } ]
4005730454
import itertools from absl.testing import parameterized import numpy as np from tensorflow.core.framework import full_type_pb2 from tensorflow.python import tf2 from tensorflow.python.eager import backprop from tensorflow.python.eager import context from tensorflow.python.eager import def_function from tensorflow.pyt...
tensorflow/tensorflow
tensorflow/python/ops/weak_tensor_math_ops_test.py
weak_tensor_math_ops_test.py
py
34,989
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.python.ops.weak_tensor_test_util.convert_to_input_type", "line_number": 29, "usage_type": "attribute" }, { "api_name": "tensorflow.python.ops.weak_tensor_test_util", "line_number": 29, "usage_type": "name" }, { "api_name": "tensorflow.python.ops.weak_ten...
70985162599
# -*- coding: utf-8 -*- import threading import time from enum import Enum, unique from urllib.parse import urlparse from lxml import etree from tempfile import NamedTemporaryFile from pathlib import Path from pathvalidate import sanitize_filename from PySide6.QtCore import QObject from scihub_eva.globals.preferenc...
leovan/SciHubEVA
scihub_eva/api/scihub_api.py
scihub_api.py
py
11,778
python
en
code
941
github-code
18
[ { "api_name": "enum.Enum", "line_number": 22, "usage_type": "name" }, { "api_name": "enum.unique", "line_number": 21, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 31, "usage_type": "name" }, { "api_name": "enum.unique", "line_number": 30, ...
70878216039
import numpy as np import nibabel as nib import os import glob import pandas as pd import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt class Evaluate: def __init__(self, conf): self.config = conf def get_whole_tumor_mask(self, data): return data > 0 def get_tumor_cor...
fragalassi/ot_da_v0
training_testing/evaluate.py
evaluate.py
py
3,230
python
en
code
1
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.logical_or", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_...
3738053864
""" This script summarized DE results. """ import numpy as np import pandas as pd import session_info from pyhere import here from functools import lru_cache from scipy.stats import mannwhitneyu @lru_cache() def get_annotation(feature, tissue): """ Get the annotation file based on feature and tissue. """ ...
LieberInstitute/sex_differences_sz
interaction_sex_sz/by_sex_sz/tissue_comparison/summary_table/_h/generate_summary.py
generate_summary.py
py
7,893
python
en
code
2
github-code
18
[ { "api_name": "pyhere.here", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 21, "usage_type": "call" }, { "api_name": "functools.lru_cache", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
34984703884
# Nikko Rush # 7/11/17 import matplotlib.pyplot as plt # Plot the Time Series for the given idea def plot_idea_timeseries(idea_name, idea_numbers, ts_matrix): ts_data = ts_matrix[idea_numbers[idea_name]] start = 1980 end = 2015 plt.plot(ts_data) plt.show() def show_time_series(idea_numbers, t...
nwrush/Visualization
Visualizer/frames/TimeSeriesVisualizer.py
TimeSeriesVisualizer.py
py
879
python
en
code
11
github-code
18
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 14, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 15, "usage_type": "call" }, { "api_name": "matpl...
37965336870
import requests from PIL import Image from io import BytesIO from urllib.robotparser import RobotFileParser from json import load from os.path import exists import logging robots = RobotFileParser() robots.set_url("https://www.unsplash.com/robots.txt") robots.read() logging.basicConfig( format="%(asctime)...
RitamDey/Everything
python/scraping/Unsplash/spider.py
spider.py
py
1,150
python
en
code
1
github-code
18
[ { "api_name": "urllib.robotparser.RobotFileParser", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 16, "usage_type": "attribute" }, { "api_nam...
42730620852
import os from datetime import datetime, timedelta import numpy as np import pdb import pandas as pd import plotly.express as px import streamlit as st from src.frontend import get_config, get_kds from src.frontend import create_gsheets_database_connection, run_query conn = create_gsheets_database_connection() dirn...
carlosbrown2/league-valorant-frontend
pages/1 Players.py
1 Players.py
py
7,931
python
en
code
0
github-code
18
[ { "api_name": "src.frontend.create_gsheets_database_connection", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_...
407441293
from typing import List from copy import deepcopy class Side(object): def __init__(self, height: int, width: int): self.__array = [[0 for i in range(width)] for k in range(height)] @property def value(self) -> List[List[int]]: return self.__array @property def width(self) -> int...
andrii-z4i/iqfit
python/src/models.py
models.py
py
7,023
python
en
code
1
github-code
18
[ { "api_name": "typing.List", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 29, "usage_type": "name" }, { "api_name": "copy.deepcopy", "line_number": 36, "usage_type": "call" }, { "api_name": "typing.List", "line_number"...
16944877864
from django.urls import include, path app_name = "api" # urls from apps urlpatterns = [ path(r'menu/', include('backend.menu.urls')), path(r'feedback/', include('backend.feedback.urls')), path(r'cart/', include('backend.cart.urls')), path(r'booking/', include('backend.booking.urls')), # path(r'a...
Samir-E/project_o
config/api_router.py
api_router.py
py
446
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.include", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.includ...
74011959079
# _*_ coding: utf-8 _*_ ''' Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as a separator for each node, and , as a separator for node label and each neighbor of the node. As an example, consid...
buhuipao/LeetCode
2017/graph/clone_graph.py
clone_graph.py
py
2,100
python
en
code
2
github-code
18
[ { "api_name": "collections.deque", "line_number": 44, "usage_type": "call" } ]
7346831506
import cv2 as cv import numpy as np import matplotlib.pyplot as plt import tensorflow as tf img = cv.imread(r"C:\Users\danie\Desktop\Python Practice\pythonProject\Lib\20.jpeg") mnist = tf.keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data() #mnist= the stock dataset of handwritten d...
Danimal94/Daniels-Random-Code
test.py
test.py
py
2,523
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "tensorflow.keras", "line_number": 8, "usage_type": "attribute" }, { "api_name": "tensorflow.keras.utils.normalize", "line_number": 12, "usage_type": "call" }, { "api_name": "tenso...
36802210377
import json from types import MethodType from browser import document, html, ajax, window # type: ignore import data from data import START_POS, SCALE, PIXELS, Ability, abilities def factory_activate_abl(box): ability_id = box.id.lstrip('box-') div = box.parent spec_id = div.id.lstrip('options-') s...
kakxow/cd_planner
static/scripts/script.py
script.py
py
15,757
python
en
code
0
github-code
18
[ { "api_name": "browser.document", "line_number": 14, "usage_type": "name" }, { "api_name": "browser.document", "line_number": 30, "usage_type": "name" }, { "api_name": "data.specs", "line_number": 48, "usage_type": "attribute" }, { "api_name": "browser.document", ...
70883551079
import os import shutil import uuid import zipfile from executeAutoTranslater import autoTranslate from magicBeing import * def makeZip(sourceDir, outFilename): zipf = zipfile.ZipFile(outFilename, "w", 8) pre_len = len(os.path.dirname(sourceDir)) for parent, dirnames, filenames in os.walk(sourceDir): ...
EillesWan/RDTM-DevelopmentTools
自动更新exe指令格式/updateFunction.py
updateFunction.py
py
1,815
python
en
code
1
github-code
18
[ { "api_name": "zipfile.ZipFile", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.walk", "line_numb...
8395251034
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 22 23:35:10 2020 @author: hao """ import pandas as pd import os import matplotlib.pyplot as plt import numpy as np from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import itertools from sklearn.metrics imp...
wenhaohsu/undergrade
sleep_data_process/logistic_2stage.py
logistic_2stage.py
py
6,621
python
en
code
0
github-code
18
[ { "api_name": "pandas.plotting.register_matplotlib_converters", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.cm", "line_number": 43, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 43, "usage_type": "name" },...
13518891244
import os import time from os import walk from os.path import exists from tkinter import filedialog from openpyxl import Workbook from tkinter import * def time_measurement_decorator(some_function): def wrapper(*args, **kwargs): start = time.time() result = some_function(*args, **kwargs) e...
Sunzheini/dir_walker
main.py
main.py
py
4,139
python
en
code
1
github-code
18
[ { "api_name": "time.time", "line_number": 12, "usage_type": "call" }, { "api_name": "time.time", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 68, "usage_type": "call" }, { "api_name": "os.remove", "line_number": 69,...
72234962919
import os from celery import Celery from celery.schedules import crontab # set the default Django settings module for the 'celery' program. # prod settings os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings_docker_prod") # dev settings - only for development # os.environ.setdefault("DJANGO_SETTINGS_MODUL...
gorgeous-george/smart_tracker
tracker_core/core/celery.py
celery.py
py
1,259
python
en
code
0
github-code
18
[ { "api_name": "os.environ.setdefault", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "celery.Celery", "line_number": 15, "usage_type": "call" }, { "api_name": "celery.schedules.cr...
31201463673
from django.template import RequestContext from dj_node.nodes.db import Db from dj_node.nodes.node import NodeTemplate, Node, perm_check from dj_node.nodes.utils import Utils class FormNode(Node): x_template = "form/form.html" x_template_html = "form/z_form.html" x_process_get = False x_submit = "Subm...
jackyu-it/dj_node
nodes/form.py
form.py
py
2,871
python
en
code
0
github-code
18
[ { "api_name": "dj_node.nodes.node.Node", "line_number": 7, "usage_type": "name" }, { "api_name": "dj_node.nodes.node.perm_check", "line_number": 13, "usage_type": "call" }, { "api_name": "dj_node.nodes.node.NodeTemplate.fallback_template", "line_number": 42, "usage_type":...
28111043650
# -*- coding: UTF-8 -*- import SamplingFrameArray, GetSingleFrameSampling, RegionMap from CryptoAlgorithms import HashBySha1 from GlobalData import MagicNum class GetVideoSampling: def __init__(self,filename,framenum,gt,X,x0,u): self.__fnum = framenum self.__gt = gt self.__X = X sel...
oneApple/ContentThreadPool
VideoSampling/GetVideoSampling.py
GetVideoSampling.py
py
2,610
python
en
code
2
github-code
18
[ { "api_name": "wx.CallAfter", "line_number": 20, "usage_type": "call" }, { "api_name": "wx.lib.pubsub.Publisher", "line_number": 20, "usage_type": "call" }, { "api_name": "GlobalData.CommonData.ViewPublisherc", "line_number": 20, "usage_type": "attribute" }, { "ap...
15528671043
from os import getenv from subprocess import run from pathlib import Path HOME_DIR = getenv('HOME') class GoogleDriveHandler: def __init__(self, local_root: str = f"{HOME_DIR}/GoogleDrive", drive_binary: str = f"{HOME_DIR}/bin/go/packages/bin/drive", default_ti...
technion-nlp-lab/utils
GoogleDriveHandler.py
GoogleDriveHandler.py
py
2,045
python
en
code
0
github-code
18
[ { "api_name": "os.getenv", "line_number": 6, "usage_type": "call" }, { "api_name": "subprocess.run", "line_number": 23, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 45, "usage_type": "call" } ]
5244607359
from django.core.paginator import Paginator from django.http import Http404 from django.contrib.auth.decorators import permission_required, login_required from django.contrib.auth.views import redirect_to_login from django.shortcuts import render_to_response, get_object_or_404 from django.template.context import Reques...
kmshi/miroguide
channelguide/notes/views.py
views.py
py
2,014
python
en
code
1
github-code
18
[ { "api_name": "django.http.Http404", "line_number": 17, "usage_type": "name" }, { "api_name": "django.shortcuts.get_object_or_404", "line_number": 18, "usage_type": "call" }, { "api_name": "channelguide.channels.models.Channel", "line_number": 18, "usage_type": "argument"...
30528675769
# -*- coding: utf-8 -*- import re import scrapy from ..items import NoticeItem class NoticeSpider(scrapy.Spider): name = 'notice' # 声明请求链接和对应的解析函数 def start_requests(self): yield scrapy.Request(url='http://www.jwc.sjtu.edu.cn/xwtg/tztg.htm', callback=self.parseNewJwc) yield scrapy.Reque...
greenhandatsjtu/SJTU-bulletin
crawler/crawler/spiders/notice_spider.py
notice_spider.py
py
4,717
python
en
code
0
github-code
18
[ { "api_name": "scrapy.Spider", "line_number": 9, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 14, "usage_type": "call" }, { "api_name": "scrapy.Request", "line_number": 15, "usage_type": "call" }, { "api_name": "scrapy.Request", ...
74735239080
import tkinter as tk from tkinter import ttk from utils.deserializeData import * from utils.downloadTxtData import * from utils.safeDataToJson import saveAs from utils.readPlayerFile import * def on_selected_server(event): selected_server_value = combo_box_servers.get() label_server.config(text=f"Selected serv...
regenmantel/ds-info
gui/createGUI.py
createGUI.py
py
2,132
python
en
code
0
github-code
18
[ { "api_name": "utils.safeDataToJson.saveAs", "line_number": 19, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 26, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 32, "usage_type": "call" }, { "api_name": "tkinter.ttk.Comb...
31327371744
from django.db.models.signals import pre_save, post_save, post_delete from django.contrib.auth.models import User from django.dispatch import receiver from .models import Profile, FriendRequestNotification # def upadateUser(sender, instance, **kwargs): # user = instance # if user.email != '': # user.u...
Chris-turina/Golf-App
backend/base/signals.py
signals.py
py
1,770
python
en
code
1
github-code
18
[ { "api_name": "models.Profile.objects.create", "line_number": 18, "usage_type": "call" }, { "api_name": "models.Profile.objects", "line_number": 18, "usage_type": "attribute" }, { "api_name": "models.Profile", "line_number": 18, "usage_type": "name" }, { "api_name...
23537529940
import pygame class Button(): def __init__(self,screen,settings,message): self.screen = screen self.screen_rect = self.screen.get_rect() self.settings = settings self.rect = pygame.Rect(0,0,settings.button_width,settings.button_height) self.rect.center = self.screen_rect.cen...
Accelerator19/Mine
外星人入侵游戏/button.py
button.py
py
806
python
en
code
0
github-code
18
[ { "api_name": "pygame.Rect", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.font.SysFont", "line_number": 10, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 10, "usage_type": "attribute" } ]
15903092052
from flask import Flask, request, Blueprint from library.ap.controller import applicant from extension import db, ma from model import Applicant, results import os def create_db(app): if not os.path.exists("appli/appli.db"): db.create_all(app=app) print("Tao DB!") def create_app(config_file="con...
DuongNguyen162/test1
library/__init__.py
__init__.py
py
546
python
en
code
0
github-code
18
[ { "api_name": "os.path.exists", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "extension.db.create_all", "line_number": 10, "usage_type": "call" }, { "api_name": "extension.db", ...
6506916595
from .EL_model import EL import argparse from config import el_model_config, neo4j_config from utils import merge_arg_and_config, convert_config_paths, Neo4jGraph def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--train_file', default='input/data/el/train.txt', help='EL模型训练集路径') p...
EndlessCG/FengxianQA
models/EL/EL_main.py
EL_main.py
py
945
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "config.el_model_config.get", "line_number": 12, "usage_type": "call" }, { "api_name": "config.el_model_config", "line_number": 12, "usage_type": "name" }, { "api_name...
42010346282
import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.preprocessing import PolynomialFeatures from sklearn.ensemble import RandomForestRegressor from sklearn.svm import SVR from preprocess import load, preprocess from config import config_rf, config_svr, config_xgb from xgboost impor...
paskag/g_research_crypto_forecast
machine_learning/train.py
train.py
py
2,208
python
en
code
0
github-code
18
[ { "api_name": "sklearn.ensemble.RandomForestRegressor", "line_number": 14, "usage_type": "call" }, { "api_name": "config.config_rf", "line_number": 14, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 21, "usage_type": "call" ...
1360526957
import pyglet from pyglet import shapes from planets import Planet from gravity import Gravity from spaceship import Spaceship # Create window window = pyglet.window.Window(1200, 1000) label = pyglet.text.Label('Gravity', font_name='Times New Roman', font_size=36,...
Lucas-Froguel/Gravity-and-NEAT
gravity/main.py
main.py
py
2,657
python
en
code
0
github-code
18
[ { "api_name": "pyglet.window.Window", "line_number": 10, "usage_type": "call" }, { "api_name": "pyglet.window", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pyglet.text.Label", "line_number": 12, "usage_type": "call" }, { "api_name": "pyglet.text...
9603763031
import cv2 import mediapipe as mp import numpy as np # import HandTrackingModule as htm # import fingerCounter as fc mp_drawing = mp.solutions.drawing_utils mp_pose = mp.solutions.pose #Calculating Angles def calculate_angle(a,b,c): a = np.array(a) b = np.array(b) c = np.array(c) radians = n...
Anukriti2001/Anukriti
FitTrack.py
FitTrack.py
py
5,091
python
en
code
0
github-code
18
[ { "api_name": "mediapipe.solutions", "line_number": 6, "usage_type": "attribute" }, { "api_name": "mediapipe.solutions", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.arr...
30422474644
# This is a sample Python script. import copy import random import matplotlib.pyplot as plt import math import itertools class City: def __init__(self, num): self.x = random.randint(1, 100) self.y = random.randint(1, 100) self.number = num self.visited = 0 def generateCity(ran):...
Daannko/traveling-salesman-problem
main.py
main.py
py
3,691
python
en
code
0
github-code
18
[ { "api_name": "random.randint", "line_number": 12, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 13, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 26, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_num...
16558335626
# coding: utf8 import pytest import os import shutil @pytest.fixture(params=[ 'group_image', 'individual_image' ]) def cli_commands(request): if request.param == 'group_image': cnn_input = [ 'train', 'image', 'cnn', 'data/dataset/random_example', ...
2018luyi/AD-DL
clinicadl/tests/test_interpret.py
test_interpret.py
py
1,751
python
en
code
null
github-code
18
[ { "api_name": "pytest.fixture", "line_number": 8, "usage_type": "call" }, { "api_name": "os.system", "line_number": 65, "usage_type": "call" }, { "api_name": "os.system", "line_number": 66, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number":...
9462772061
import operator from abc import abstractmethod, ABC from typing import Optional, Callable import tensorflow as tf from tensorflow.keras import activations from tensorflow.keras.layers import BatchNormalization, Layer from tensorflow.keras.regularizers import Regularizer from ..layers import op_dim_selector class Id...
AndreaFalanti/popnas
src/models/operators/layers/common.py
common.py
py
11,543
python
en
code
2
github-code
18
[ { "api_name": "tensorflow.keras.layers.Layer", "line_number": 13, "usage_type": "name" }, { "api_name": "tensorflow.identity", "line_number": 21, "usage_type": "call" }, { "api_name": "tensorflow.keras.layers.Layer", "line_number": 55, "usage_type": "name" }, { "a...
29123188503
import os from timer import timeit from collections import defaultdict, deque stardate = 14 dataname = f"dec{stardate}.txt" # dataname = f"dec{stardate}_test.txt" curdir = os.path.dirname(os.path.abspath(__file__)) filename = f'{curdir}\\{dataname}' data = [_.strip() for _ in open(filename, 'r').readlines()] if not da...
jhogstrom/adventofcode
2021/dec14.py
dec14.py
py
2,801
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "collections.defaultdict", ...
33984604923
"""Module for copying files from/to Google Cloud Storage""" from ..utils import CLIRunner from .common import Copier, DataUrlType, Resource class GCSCopier(Copier, CLIRunner): """Copier, that is capable of copying to/from Google Cloud Storage""" def _ensure_can_execute(self) -> None: if not ( ...
neuro-inc/neuro-extras
neuro_extras/data/gcs.py
gcs.py
py
1,131
python
en
code
4
github-code
18
[ { "api_name": "common.Copier", "line_number": 6, "usage_type": "name" }, { "api_name": "utils.CLIRunner", "line_number": 6, "usage_type": "name" }, { "api_name": "common.DataUrlType.LOCAL_FS", "line_number": 11, "usage_type": "attribute" }, { "api_name": "common.D...
72686201319
from django.urls import path from student import views urlpatterns = [ path('login', views.Login.as_view()), path('register', views.Register.as_view()), path('planned', views.PlannedCourses.as_view()), path('planned/<uuid:course_id>', views.PlannedCourseDetail.as_view()), path('completed', views.Co...
BYUCS452S2020/GradPlan
api/student/urls.py
urls.py
py
428
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "student.views.Login.as_view", "line_number": 5, "usage_type": "call" }, { "api_name": "student.views.Login", "line_number": 5, "usage_type": "attribute" }, { "api_name": "st...
40738422893
""" This class contains an instance of the sql alchemy database connection pool and methods for saving and deleting data in the database """ import logging from app import db logger = logging.getLogger(__name__) def save_record(record): """ This function saves data to the db if transaction is successful....
brayoh/bucket-list-api
app/common/db/__init__.py
__init__.py
py
679
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "app.db.session.add", "line_number": 14, "usage_type": "call" }, { "api_name": "app.db.session", "line_number": 14, "usage_type": "attribute" }, { "api_name": "app.db", ...
20994376959
import sys import traceback # import pyccl as ccl import pickle import camb import jax.numpy as jnp # sys.path.insert(0,'../skylens/') from distributed import LocalCluster from dask.distributed import Client # we already had this above # http://distributed.readthedocs.io/en/latest/_modules/distributed/worker.html ...
sukhdeep2/skylens_lite
tests/Minimal_test_all.py
Minimal_test_all.py
py
6,722
python
en
code
0
github-code
18
[ { "api_name": "importlib.reload", "line_number": 22, "usage_type": "attribute" }, { "api_name": "jax.numpy.arange", "line_number": 45, "usage_type": "call" }, { "api_name": "jax.numpy", "line_number": 45, "usage_type": "name" }, { "api_name": "jax.numpy.int32", ...
35151212200
#Script para definição e estilização do gráfico de linhas "normal" #Important modules import matplotlib.pyplot as plt #Values for y and x axis input_value = [1, 2, 3, 4, 5] squares = [1, 4, 9, 16, 25] plt.style.use("seaborn") fig, ax = plt.subplots() ax.plot(input_value,squares, linewidth=3) #Set th...
Tiago851/Data-Visualization
mpl_squares.py
mpl_squares.py
py
571
python
pt
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 10, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_na...
39377686495
from sqlalchemy.orm import Session import pyotp from backend.app.models import user_model as models from backend.app.models import candidate as candidate_models from backend.app.schemas import schemas from backend.app.utils.security import pwd_context async def get_user(db: Session, user_id: int): return db.quer...
paritoshtripathi935/RefineYourHire
backend/app/utils/crud.py
crud.py
py
2,681
python
en
code
3
github-code
18
[ { "api_name": "sqlalchemy.orm.Session", "line_number": 10, "usage_type": "name" }, { "api_name": "backend.app.models.user_model.User", "line_number": 11, "usage_type": "attribute" }, { "api_name": "backend.app.models.user_model", "line_number": 11, "usage_type": "name" ...
74554052199
from clients.Service import Service from database.session import session from database.models import Cotizacion, Vendedor, Boleta, Bodega, Producto import bcrypt, json, os, jwt, datetime from time import sleep class Add_product(Service): def __init__(self): print("Servicio de Añadir Producto") supe...
Joacker/Arqui_SW
backend/addproduct.py
addproduct.py
py
5,461
python
es
code
0
github-code
18
[ { "api_name": "clients.Service.Service", "line_number": 7, "usage_type": "name" }, { "api_name": "database.session.session", "line_number": 15, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 17, "usage_type": "call" }, { "api_name": "jwt.decode...
5979275860
from urllib.request import * #导入所有的request,urllib相当于一个文件夹,用到它里面的方法request # from lxml import etree #调用包 # import pickle # # import time # arr = [] #定义一个空数组,用来添加爬出的数据 # url = "https://movie.douban.com/top250?start=" #豆瓣top250网址 # urls = [ url+str(i) for i in range(0,250,25)] #每次步进值25,总共250个,爬取十次 # def aa(link)...
aloneindefeat/pachong
豆瓣电影top250/爬取豆瓣.py
爬取豆瓣.py
py
4,433
python
en
code
0
github-code
18
[ { "api_name": "pickle.load", "line_number": 51, "usage_type": "call" }, { "api_name": "fake_useragent.UserAgent", "line_number": 56, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 82, "usage_type": "call" }, { "api_name": "pickle.load", "l...
10686294441
#!/usr/bin/env python #TODO: try matplotlib instead of tkinter # renamed in python3 try: import tkinter as tk except: import Tkinter as tk from PIL import Image import sys import time from Queue import Queue, Empty import threading import rospy import numpy as np # messages from exercise3.msg import local_m...
joeski1/Robotics
exercise3/old/broken/map_viewer_tk.py
map_viewer_tk.py
py
3,720
python
en
code
0
github-code
18
[ { "api_name": "Queue.Queue", "line_number": 26, "usage_type": "call" }, { "api_name": "Tkinter.Tk", "line_number": 30, "usage_type": "call" }, { "api_name": "Tkinter.Canvas", "line_number": 33, "usage_type": "call" }, { "api_name": "Tkinter.PhotoImage", "line_...
33857131298
# -*- coding: utf-8 -*- """ Created on Fri Dec 27 15:58:13 2013 Esqueleto de agente usando los servicios web de Flask /comm es la entrada para la recepcion de mensajes del agente /Stop es la entrada que para el agente Tiene una funcion AgentBehavior1 que se lanza como un thread concurrente Asume que el agente de re...
nicoeft/ECSDI
src/Agentes/AgenteVendedorExterno.py
AgenteVendedorExterno.py
py
7,608
python
es
code
1
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 37, "usage_type": "call" }, { "api_name": "AgentUtil.Logging.config_logger", "line_number": 45, "usage_type": "call" }, { "api_name": "socket.gethostname", "line_number": 48, "usage_type": "call" }, { "api_na...
23871218982
""" Module contains job to run policy evaluation with replay mappers. """ import argparse import dataclasses import logging import random from typing import Any, Mapping, Optional, Sequence, Tuple import ray import daaf from daaf import expconfig, progargs, utils from daaf.policyeval import evaluation @dataclasse...
guidj/rl-daaf
src/daaf/policyeval/evaljob.py
evaljob.py
py
5,250
python
en
code
0
github-code
18
[ { "api_name": "typing.Optional", "line_number": 32, "usage_type": "name" }, { "api_name": "dataclasses.dataclass", "line_number": 19, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 44, "usage_type": "call" }, { "api_name": "ray.init", "li...
30581036624
from azure.cognitiveservices.search.imagesearch.models import Images, ImageType, ImageSize import traceback import os import urllib.request as url_req import json from util.logs import get_logger from util.parallel import parallel_download LOGGER = get_logger("BING_IMG_LOADER") from data.loader import Loader subscr...
mmarashan/MosaicPhotica
data/loader_impl/bing_impl/bing_loader.py
bing_loader.py
py
2,144
python
en
code
0
github-code
18
[ { "api_name": "util.logs.get_logger", "line_number": 10, "usage_type": "call" }, { "api_name": "data.loader.Loader", "line_number": 20, "usage_type": "name" }, { "api_name": "azure.cognitiveservices.search.imagesearch.ImageSearchAPI", "line_number": 31, "usage_type": "cal...
9906328941
import sys from random import randint, choice from PySide6 import QtCore, QtGui, QtWidgets from PySide6.QtWidgets import QApplication, QMainWindow, QLabel from PySide6.QtCore import Qt, QPoint, QRect from PySide6.QtGui import QPainter, QPixmap, QPen, QColor, QBrush class MainWindow(QMainWindow): def __init__(self)...
jgorman3691/PySide6-Learning-GUIs
Bitmap Graphics/qrectapp.py
qrectapp.py
py
2,235
python
en
code
0
github-code
18
[ { "api_name": "PySide6.QtWidgets.QMainWindow", "line_number": 9, "usage_type": "name" }, { "api_name": "PySide6.QtWidgets.QLabel", "line_number": 13, "usage_type": "call" }, { "api_name": "PySide6.QtGui.QPixmap", "line_number": 14, "usage_type": "call" }, { "api_n...
14663082841
from celery import shared_task # from friender.celery import app from .models import UserRating import requests import base64 from django.core.files.base import ContentFile @shared_task def add(x, y): return x + y @shared_task def mul(x, y): return x * y @shared_task def generate_photo(user_id,rating,descri...
DenisListapad94/friender
friender/arrangement/tasks.py
tasks.py
py
657
python
en
code
0
github-code
18
[ { "api_name": "celery.shared_task", "line_number": 9, "usage_type": "name" }, { "api_name": "celery.shared_task", "line_number": 13, "usage_type": "name" }, { "api_name": "requests.post", "line_number": 19, "usage_type": "call" }, { "api_name": "base64.b64decode",...
3364423795
from sys import path path.append('..') import logging import unittest from unittest.mock import patch from gerrit import GerritAPI from mock import Response logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.DEBUG) class TestGerritAPI(unittest.TestCase): def setUp(self): ...
UnCommitted/nectar-doco-bot
script/tests/test_gerrit.py
test_gerrit.py
py
1,037
python
en
code
0
github-code
18
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "name" }, { "api_name": "logging.basicConfig", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_...
20720354736
# Databricks notebook source # MAGIC %md # MAGIC ##### Welcome to Azurelib Academy By Deepak Goyal # MAGIC ##### You can master the Databricks here: <a href='https://adeus.azurelib.com' target='_blank'>www.adeus.azurelib.com</a> # MAGIC ##### Author of this blog: Arud Seka Berne S <a href="https://www.linkedin.com/in/...
azurelib-academy/azure-databricks-pyspark-examples
91. Cast Pyspark Dataframe Column/Cast Pyspark Dataframe Column - Notebook.py
Cast Pyspark Dataframe Column - Notebook.py
py
3,471
python
en
code
0
github-code
18
[ { "api_name": "pyspark.sql.session.SparkSession.builder.master", "line_number": 26, "usage_type": "call" }, { "api_name": "pyspark.sql.session.SparkSession.builder", "line_number": 26, "usage_type": "attribute" }, { "api_name": "pyspark.sql.session.SparkSession", "line_number...
40041314697
import json import os import datetime from flask import Blueprint from flask import flash from flask import redirect from flask import render_template from flask import url_for from flask import current_app from flask import request from flask_login import current_user from flask_login import login_required from flask_...
linkolearn/linkolearn
linkolearn/modules/box__default/auth/view.py
view.py
py
6,332
python
en
code
1
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "line_number": 30, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 30, "usage_type": "call" }, { "api_name": "json.load", "line_nu...
26759216431
import speech_recognition as sr from playsound import playsound def listen(): rec = sr.Recognizer() mic = sr.Microphone() playsound('./Resources/beep-08b.mp3') vocal = recognize_speech_from_mic(rec, mic) if vocal["error"]: print("ERROR: {}".format(vocal["error"])) return comma...
TKing321/Assistant
Command.py
Command.py
py
1,535
python
en
code
0
github-code
18
[ { "api_name": "speech_recognition.Recognizer", "line_number": 6, "usage_type": "call" }, { "api_name": "speech_recognition.Microphone", "line_number": 7, "usage_type": "call" }, { "api_name": "playsound.playsound", "line_number": 8, "usage_type": "call" }, { "api_...
23236037351
from django.shortcuts import render, redirect from accounts.forms import UserRegistrationForm # Create your views here. def view_user_register(request): if request.user.is_authenticated: return redirect('view_all_blogs') form= UserRegistrationForm() if request.method== "POST": form= User...
amewzzz/webpro_2
accounts/views.py
views.py
py
520
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.redirect", "line_number": 10, "usage_type": "call" }, { "api_name": "accounts.forms.UserRegistrationForm", "line_number": 11, "usage_type": "call" }, { "api_name": "accounts.forms.UserRegistrationForm", "line_number": 13, "usage_type": "cal...
24229198973
import ROSE as R import jsonHandler import utils import matplotlib.pyplot as plt import matplotlib.image as img import open3d as o3d import numpy as np import yaml from PIL import Image import math class ROSE: def __init__(self, settings, params, vis): self.__roseMap = "input/input_map.png" self._...
larssonjohan/MastersThesis
ROSE3D/pgmROSE.py
pgmROSE.py
py
5,781
python
en
code
0
github-code
18
[ { "api_name": "jsonHandler.JSON", "line_number": 18, "usage_type": "call" }, { "api_name": "utils.nestedDict", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 68, "usage_type": "call" }, { "api_name": "numpy.bool8", "line_...
26278548575
# https://py.checkio.org/mission/three-points-circle from math import acos, degrees, sqrt from itertools import combinations def calculate_length(p, q): return sqrt((q[0] - p[0]) ** 2 + (q[1] - p[1]) ** 2) def calcuate_angles(a, b, c): # Law of cosines: https://en.wikipedia.org/wiki/Law_of_cosines cos_a...
seanmcerlean/personal-projects
checkio_solutions/electronic_station/three_points_circle.py
three_points_circle.py
py
4,215
python
en
code
0
github-code
18
[ { "api_name": "math.sqrt", "line_number": 7, "usage_type": "call" }, { "api_name": "math.degrees", "line_number": 14, "usage_type": "call" }, { "api_name": "math.acos", "line_number": 14, "usage_type": "call" }, { "api_name": "math.degrees", "line_number": 15,...
36759444933
from typing import Union import dearpygui.dearpygui as dpg from src.shared.pages.base import BasePage class App: histories: list[Union[int, str]] def __init__(self): self.histories = [] def goto(self, page: BasePage): if len(self.histories) > 0: dpg.configure_item(self.hist...
DuckyMomo20012/email-remote-access
src/serverApp/app.py
app.py
py
1,334
python
en
code
0
github-code
18
[ { "api_name": "typing.Union", "line_number": 9, "usage_type": "name" }, { "api_name": "src.shared.pages.base.BasePage", "line_number": 14, "usage_type": "name" }, { "api_name": "dearpygui.dearpygui.configure_item", "line_number": 16, "usage_type": "call" }, { "api...
4441798286
from discord.ext import commands import asyncio import traceback import discord import textwrap from contextlib import redirect_stdout import io import subprocess # to expose to the eval command import datetime from collections import Counter class EvalCMD(commands.Cog): def __init__(self, bot): self.bot...
Smudge-Studios/HypixelBot
commands/owner/eval.py
eval.py
py
3,015
python
en
code
2
github-code
18
[ { "api_name": "discord.ext.commands.Cog", "line_number": 14, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 14, "usage_type": "name" }, { "api_name": "asyncio.create_subprocess_shell", "line_number": 23, "usage_type": "call" }, { ...
34212531239
import io import sys _INPUT = """\ 4 90 180 45 195 """ sys.stdin = io.StringIO(_INPUT) n = int(input()) a = list(map(int, input().split())) li = [] li.append(360) cnt = 0 for i in range(n): cnt += a[i] tmp = cnt // 360 if tmp: ans = cnt - tmp*360 li.append(ans) else: li.appen...
kkchart9/atcoder
Day_dir/1208.py
1208.py
py
425
python
en
code
0
github-code
18
[ { "api_name": "sys.stdin", "line_number": 8, "usage_type": "attribute" }, { "api_name": "io.StringIO", "line_number": 8, "usage_type": "call" } ]
74957803881
#6987 월드컵 import sys from itertools import combinations cases = list(combinations(range(6), 2)) available = [] result = "" def bt(idx): global r if idx == len(cases): for t in table: if t.count(0) != 3: r = 0 return r = 1 return a, b = ...
SunEom/CodingTest
Python/CodingTest/Level/Gold IV/6987.py
6987.py
py
844
python
en
code
0
github-code
18
[ { "api_name": "itertools.combinations", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.stdin.readline", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 30, "usage_type": "attribute" } ]
14582175619
import tkinter as tk from tkinter import ttk import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg as fgc class lineaApp(): def __init__(self): #Set root up self.root = tk.Tk() self.root.geometry('770x570+600+20') self.root.title('LINEA RECT...
roque76/Parc_POO
Linea.py
Linea.py
py
7,382
python
en
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 9, "usage_type": "call" }, { "api_name": "tkinter.Frame", "line_number": 13, "usage_type": "call" }, { "api_name": "tkinter.ttk.Label", "line_number": 16, "usage_type": "call" }, { "api_name": "tkinter.ttk", "line_num...
31797123925
from visualising.global_variables import Button, events_handler, render_text import pygame as pg if not pg.get_init(): pg.init() def draw_connections(surface, state, lines): if state != 'test_page': return surface for line in lines: pg.draw.line(surface, (240, 185, 153), line[0], line[1])...
automik/Net_Building
visualising/test_page.py
test_page.py
py
762
python
en
code
0
github-code
18
[ { "api_name": "pygame.get_init", "line_number": 4, "usage_type": "call" }, { "api_name": "pygame.init", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.draw.line", "line_number": 12, "usage_type": "call" }, { "api_name": "pygame.draw", "line_nu...
32143278403
import re import time import os import json # TODO: improve performance by detecting appropriate markers in file # TODO: include <<NOWA TRASA>> (new route) in stop exceptions parsing # KURS SKRÓCONY - taki który kończy trasę na wcześniejszym przystanku # TRASA SKRÓCONA - to to samo? AUX_PARSNG = True # Routes ROUTE_...
1116574/ztm-warsaw-timetable-parser
parser_old.py
parser_old.py
py
11,193
python
en
code
1
github-code
18
[ { "api_name": "re.search", "line_number": 101, "usage_type": "call" }, { "api_name": "re.search", "line_number": 131, "usage_type": "call" }, { "api_name": "re.search", "line_number": 157, "usage_type": "call" }, { "api_name": "re.search", "line_number": 166, ...
27188992348
from rockIT.forms import NewAlbum, NewPodcast from rockIT.models import Profile from django.shortcuts import redirect, render from django.contrib.auth.models import User from django.contrib import messages from .models import * import uuid from django.conf import settings from django.core.mail import send_mail from dja...
print-Sathvik/Rock-N-Roll-public
rockIT/views.py
views.py
py
13,563
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 21, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 17, "usage_type": "name" }, { "api_name": "django.http.JsonResponse", "line_number": 28, "usage_type": "call" ...
26953281179
"""This module contains utilities to handle atlases in Clinica. An atlas is currently defined by its name and a set of labels in a template space. This current implementation has some drawbacks: - Atlas is misleading: it is only a set of labels in a template space - This implementation can not handle case where parce...
aramis-lab/clinica
clinica/utils/atlas.py
atlas.py
py
12,628
python
en
code
196
github-code
18
[ { "api_name": "abc.ABCMeta", "line_number": 48, "usage_type": "attribute" }, { "api_name": "abc.abstractmethod", "line_number": 51, "usage_type": "attribute" }, { "api_name": "nibabel.load", "line_number": 59, "usage_type": "call" }, { "api_name": "abc.abstractmet...
40067434598
from rest_framework import serializers from API.models import Planet from API.serializers import ResidentSerializer class PlanetSerializer(serializers.ModelSerializer): residentes = ResidentSerializer(source='residents', many=True, read_only=True) class Meta: model = Planet fields = '__a...
JemPak/Prueba-Gearplug
star_wars/API/serializers/PlanetSerializer.py
PlanetSerializer.py
py
406
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 7, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 7, "usage_type": "name" }, { "api_name": "API.serializers.ResidentSerializer", "line_number": 8, "usage_ty...
28301727159
from django.conf.urls import patterns, url from .views import (profile_detail, profile_followings, profile_followers, profile_follow, user_arguments, user_contributed_arguments) urlpatterns = patterns( '', url(r'^(?P<username>[A-Za-z0-9-_]+)/$', profile_detail, name='api-pr...
tunavargi/arguman.org
web/api/v1/users/urls.py
urls.py
py
962
python
en
code
null
github-code
18
[ { "api_name": "django.conf.urls.patterns", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "views.profile_detail", "line_number": 9, "usage_type": "argument" }, { "api_name": "...
75058439719
from __future__ import unicode_literals import csv, datetime from FinanceDBAPI import FinanceDB def import_holiday_type(filename, db): with open(filename) as f: types = list(csv.reader(f)) for k, v in enumerate(types): if k == 0: continue item = db.Holiday_type(type_id = v[...
deerlux/finance_crawl
import_holidays.py
import_holidays.py
py
988
python
en
code
0
github-code
18
[ { "api_name": "csv.reader", "line_number": 8, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 27, "usage_type": "call" }, { "api_name": "datetime.datetime", ...
21683006274
"""second Migration Revision ID: 2ed0b0185558 Revises: 31755de8d846 Create Date: 2019-02-28 09:16:31.699123 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2ed0b0185558' down_revision = '31755de8d846' branch_labels = None depends_on = None def upgrade(): ...
mukasine/pitch
migrations/versions/2ed0b0185558_second_migration.py
2ed0b0185558_second_migration.py
py
1,725
python
en
code
0
github-code
18
[ { "api_name": "alembic.op.create_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
31090086846
import numpy as np import math import matplotlib.pyplot as plt from Lattice_Class import Lattice_Class from matplotlib import colors cross_sections = np.array([5,10,15,20,25,30,40,50,75,100,130,170,200,300]) gradients = [] error_on_grad = [] plt.rcParams['figure.figsize'] = (16, 10) plt.rcParams['font.size']...
phicks21/bacteriophage-spread
plotter3.py
plotter3.py
py
1,218
python
en
code
0
github-code
18
[ { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 10, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_name": "matplotl...
12319022129
"""Extract dates and URLs from Markdown files.""" from pathlib import Path from typing import Optional import dateutil.parser import markdown from bs4 import BeautifulSoup # List of URLs considered stable and thus ignored STABLE_URLS: tuple[str, ...] = ( # archive.org snapshots "web.archive.org/web/", # ...
sbaack/archive-md-urls
src/archive_md_urls/scan_md.py
scan_md.py
py
4,756
python
en
code
6
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 55, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 55, "usage_type": "name" }, { "api_name": "markdown.core", "line_number": 86, "usage_type": "attribute" }, { "api_name": "markdown.Markdown", ...
26556229198
from datetime import datetime, timedelta from queue import Queue from threading import Thread from time import sleep from typing import Callable from PyQt5.QtWidgets import QLabel from persiantools.jdatetime import JalaliDateTime from tinydb import TinyDB import app.Logging.app_provider.admin.MersadLogging ...
siavashvampire/python
app/LineMonitoring/app_provider/admin/main.py
main.py
py
8,896
python
en
code
0
github-code
18
[ { "api_name": "PyQt5.QtWidgets.QLabel", "line_number": 28, "usage_type": "name" }, { "api_name": "queue.Queue", "line_number": 29, "usage_type": "name" }, { "api_name": "app.LineMonitoring.cronjob.cronjob.Cronjob", "line_number": 30, "usage_type": "name" }, { "api...
32459331808
import flask from flask import jsonify import sqlite3 DATABASE = './database.db' def get_db(): db = getattr(flask, '_database', None) if db is None: db = flask._database = sqlite3.connect(DATABASE) return db def query_db(query, args=(), one=False): cur = get_db().execute(query, args) rv =...
jorgemacias2/python_projects
api/api.py
api.py
py
1,161
python
en
code
0
github-code
18
[ { "api_name": "flask._database", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sqlite3.connect", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 19, "usage_type": "call" }, { "api_name": "flask.jsonify", ...
70790412200
import os import re from time import sleep from copy import deepcopy import numpy as onp import pandas as pd import jax.numpy as np from jax.config import config from jax import ops from scipy.optimize import minimize from tqdm import tqdm from gzbuilder_analysis.fitting.reparametrization import from_reparametrization ...
tingard/gzbuilder_results
fit_models.py
fit_models.py
py
6,017
python
en
code
0
github-code
18
[ { "api_name": "jax.config.config.update", "line_number": 20, "usage_type": "call" }, { "api_name": "jax.config.config", "line_number": 20, "usage_type": "name" }, { "api_name": "pandas.read_pickle", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.a...