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
14186262586
import json from sksurv.functions import StepFunction from sksurv.linear_model import CoxPHSurvivalAnalysis from sksurv.metrics import concordance_index_censored from sksurv.nonparametric import nelson_aalen_estimator, kaplan_meier_estimator from core.cox_wrapper import CoxFairBaseline from core.drawing import draw_po...
DanilaEremenko/SurvBeX
main_run_synth_data_explainers.py
main_run_synth_data_explainers.py
py
10,714
python
en
code
0
github-code
6
[ { "api_name": "numpy.ndarray", "line_number": 24, "usage_type": "attribute" }, { "api_name": "core.cox_generator.CoxGenerator", "line_number": 25, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 26, "usage_type": "call" }...
34197446896
#!/bin/python import sys import os import time import datetime import hashlib from os import walk import mysql.connector from sys import argv import json import boto3 from botocore.exceptions import ClientError import requests from requests.exceptions import HTTPError game_client = argv[1] target_dir = argv[2] backof...
vlad-solomai/viam_automation
automation_gambling/deploy_game_client/deploy_game_client.py
deploy_game_client.py
py
8,482
python
en
code
1
github-code
6
[ { "api_name": "sys.argv", "line_number": 17, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 18, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 19, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 20, "usa...
40696737073
import asyncio import importlib from abc import ABC, abstractmethod from functools import partial from typing import Any, Awaitable, Callable, Dict, List, Union ParamValueT = Union[str, int, float, bool, List[Union[str, int, float, bool]]] ExecutorFuncT = Callable[[Dict[str, ParamValueT]], Awaitable[Dict[str, Any]]] ...
magma/magma
orc8r/gateway/python/magma/magmad/generic_command/command_executor.py
command_executor.py
py
2,311
python
en
code
1,605
github-code
6
[ { "api_name": "typing.Union", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number"...
5759883314
# -*- coding: utf-8 -*- """ Editor de Spyder Este es un archivo temporal """ import numpy as np import matplotlib.pyplot as plt from sklearn import svm #%% np.random.seed(5) X = np.r_[np.random.randn(20,2)-[2,2],np.random.randn(20,2)+[2,2]] Y = [0]*20+[1]*20 plt.scatter(X[:,0],X[:,1],c=Y) plt.show(...
OscarFlores-IFi/CDINP19
code/p18.py
p18.py
py
902
python
es
code
0
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.r_", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.random.randn"...
8927043584
from collections import OrderedDict from concurrent import futures import six from nose import tools from tornado import gen from tornado import testing as tt import tornado.concurrent from flowz.artifacts import (ExtantArtifact, DerivedArtifact, ThreadedDerivedArtifact, WrappedArtifact,...
ethanrowe/flowz
flowz/test/artifacts/artifacts_test.py
artifacts_test.py
py
8,314
python
en
code
2
github-code
6
[ { "api_name": "tornado.testing.AsyncTestCase", "line_number": 18, "usage_type": "attribute" }, { "api_name": "tornado.testing", "line_number": 18, "usage_type": "name" }, { "api_name": "collections.OrderedDict", "line_number": 25, "usage_type": "call" }, { "api_na...
37588584638
from sqlalchemy import TypeDecorator from sqlalchemy.types import VARCHAR from sqlalchemy import dialects from sqlalchemy.dialects import postgresql, mysql import json from typing import Union, Optional DialectType = Union[postgresql.UUID, VARCHAR] ValueType = Optional[Union[dict, str]] class JSON(TypeDecorator): ...
infrascloudy/gandalf
gandalf/database/json_type.py
json_type.py
py
1,390
python
en
code
0
github-code
6
[ { "api_name": "typing.Union", "line_number": 8, "usage_type": "name" }, { "api_name": "sqlalchemy.dialects.postgresql.UUID", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sqlalchemy.dialects.postgresql", "line_number": 8, "usage_type": "name" }, { ...
20600597111
import functools import os import google.protobuf.json_format from synthtool.protos.preconfig_pb2 import Preconfig PRECONFIG_ENVIRONMENT_VARIABLE = "SYNTHTOOL_PRECONFIG_FILE" PRECONFIG_HELP = """ A json file containing a description of prefetch sources that this synth.py may us. See preconfig.proto for detail abou...
googleapis/google-cloud-java
owl-bot-postprocessor/synthtool/preconfig.py
preconfig.py
py
777
python
en
code
1,781
github-code
6
[ { "api_name": "os.environ.get", "line_number": 23, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 23, "usage_type": "attribute" }, { "api_name": "synthtool.protos.preconfig_pb2.Preconfig", "line_number": 25, "usage_type": "call" }, { "api_name"...
4369034891
# coding: utf-8 import pandas as pd import xgboost as xgb from sklearn.preprocessing import LabelEncoder import numpy as np train_df = pd.read_csv('../data/train.csv') test_df = pd.read_csv('../data/test.csv') # ๅกซๅ……็ฉบๅ€ผ๏ผŒ็”จไธญไฝๆ•ฐๅกซๅ……ๆ•ฐๅ€ผๅž‹็ฉบๅ€ผ๏ผŒ็”จไผ—ๆ•ฐๅกซๅ……ๅญ—็ฌฆๅž‹็ฉบๅ€ผ from sklearn.base import TransformerMixin class DataFrameIm...
Gczaizi/kaggle
Titanic/XGBoost/XGBoost.py
XGBoost.py
py
1,786
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.base.TransformerMixin", "line_number": 16, "usage_type": "name" }, { "api_name": "pandas....
12998412388
import uuid from django.db import models from django.conf import settings User = settings.AUTH_USER_MODEL # Create your models here. class PlanCharge(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) tier = models.IntegerField() charge_id = models.CharField(max_len...
kapphire/99typos-server
plan/models.py
models.py
py
585
python
en
code
0
github-code
6
[ { "api_name": "django.conf.settings.AUTH_USER_MODEL", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 5, "usage_type": "name" }, { "api_name": "django.db.models.Model", "line_number": 8, "usage_type": "attribute" }, ...
42124061830
import requests import os from django.http import HttpResponse from django.conf import settings class ProductClient: global host def __init__(self): global host print("came inside product constructor") if os.getenv("PRODUCT_HOST") != "": host = os.getenv("PRODUCT_HOST") ...
Robinrrr10/storeorderui
client/productClient.py
productClient.py
py
738
python
en
code
0
github-code
6
[ { "api_name": "os.getenv", "line_number": 11, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 12, "usage_type": "call" }, { "api_name": "django.conf.settings.PRODUCT_HOST", "line_number": 13, "usage_type": "attribute" }, { "api_name": "django.con...
29778129362
from flask import Flask, render_template, request, url_for import y_u_so_stupid as fle import json app = Flask(__name__) correctAnswer = '' score = 0 highscore = 0 @app.route('/') def play(): global correctAnswer q = json.loads(fle.getRandomQuestion()) question = q['question'] choices...
asav13/PRLA-Verk5
part2/y_u_so_stupid_SERVER.py
y_u_so_stupid_SERVER.py
py
1,208
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 15, "usage_type": "call" }, { "api_name": "y_u_so_stupid.getRandomQuestion", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.render_te...
49613121
from collections import deque, defaultdict import random class RandomizedSet: def __init__(self): self.vec = deque() self.hash_map = defaultdict(int) def insert(self, val: int) -> bool: if val in self.hash_map: return False self.vec.append(val) s...
code-cp/leetcode
solutions/380/main.py
main.py
py
1,102
python
en
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 6, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 7, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 35, "usage_type": "call" } ]
3954866418
# -*- coding: utf-8 -*- """view module prilog application * view function, and run Flask """ from glob import glob from flask import Flask, render_template, request, session, redirect, jsonify import os import re import json import urllib.parse import subprocess import time as tm import analyze as al import c...
Neilsaw/PriLog_web
app.py
app.py
py
21,596
python
en
code
30
github-code
6
[ { "api_name": "configparser.ConfigParser", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path", "line_number": 33, "usage_type": "attribute" }, { "api_name": "os.mkdir", ...
75093396986
from pubnub.callbacks import SubscribeCallback from pubnub.enums import PNStatusCategory from pubnub.pnconfiguration import PNConfiguration from pubnub.pubnub import PubNub from pprint import pprint from dotenv import load_dotenv import os EVENT_UPLOADED_MESSAGE = "message_uploaded" load_dotenv() UUID = os.getenv("...
deibid/radio-azar
my_modules/PubNubClient.py
PubNubClient.py
py
2,682
python
en
code
1
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 14, "usage_type": "call" }, { "api_name": "pubnub.pnconfiguration.PNConfiguration", "line_number": 18, "usage_type": "call" }, { "api_name": "p...
42572073330
import abc import collections from typing import List, Callable, Optional, OrderedDict, Tuple import pandas as pd class PreProcessingBase: def __init__(self, df: pd.DataFrame, actions: Optional[OrderedDict[Callable, Tuple]] = None): self._df = df self._actions = ...
gilcaspi/COVID-19-Vaccinations
data_processing/preprocessing/pre_processing_base.py
pre_processing_base.py
py
791
python
en
code
0
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 10, "usage_type": "attribute" }, { "api_name": "typing.Optional", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.OrderedDict", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Calla...
5500500071
import time import base64 from google.cloud import pubsub_v1 from google.oauth2 import service_account project_id = "<gcp_project_id>" topic_name = "<topic_name>" credentials = service_account.Credentials.from_service_account_file("<gcp_Service_account_file_path>") print(credentials) publisher = pubsub_v1.PublisherC...
natsu1628/hackathons
ML/GCP-python-ML2/to_pubsub.py
to_pubsub.py
py
1,772
python
en
code
1
github-code
6
[ { "api_name": "google.oauth2.service_account.Credentials.from_service_account_file", "line_number": 9, "usage_type": "call" }, { "api_name": "google.oauth2.service_account.Credentials", "line_number": 9, "usage_type": "attribute" }, { "api_name": "google.oauth2.service_account", ...
7807070088
import logging from copy import deepcopy from itertools import permutations import numpy as np from scipy.special import softmax from scipy.stats import entropy def true_entropy(team_generator, batch_predict, num_items: int, num_selections: int): P_A = np.zeros((num_selections, num_items)) # basically P(A^i_j) ...
nianticlabs/metagame-balance
src/metagame_balance/entropy_fns.py
entropy_fns.py
py
3,539
python
en
code
3
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 11, "usage_type": "call" }, { "api_name": "itertools.permutations", "line_number": 18, "usage_type": "call" }, { "api_name": "scipy.special.softmax", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.zeros"...
28398915179
import datetime import termux from sync.misc.Config import config from sync.misc.Logger import logger class Notification: __instance__ = None def __init__(self): self.sync_all = {} self.watchers = {} self.global_status = "Active" now_date = datetime.datetime.now() se...
dpjl/termux-sync
sync/misc/Notification.py
Notification.py
py
3,522
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 41, "usage_type": "call" }, { "api_name": "da...
11579230306
import sklearn import cv2 import pandas as pd import numpy as np import math from sklearn.cluster import KMeans from sklearn.metrics import silhouette_samples, silhouette_score from collections import Counter from scipy.spatial import distance_matrix from scipy.sparse.csgraph import shortest_path class ImageClassifie...
elraffray/pyImage
imageclassifier.py
imageclassifier.py
py
6,442
python
en
code
0
github-code
6
[ { "api_name": "cv2.COLOR_BGR2HSV", "line_number": 18, "usage_type": "attribute" }, { "api_name": "cv2.COLOR_BGR2LAB", "line_number": 19, "usage_type": "attribute" }, { "api_name": "cv2.COLOR_BGR2HLS", "line_number": 20, "usage_type": "attribute" }, { "api_name": "...
24102936874
from helpers import ReadLines from typing import Tuple, List class DayFive(ReadLines): def __init__( self, file_path="/home/jonathan/projects/2020-advent-of-code/five/input.txt" ): super().__init__(file_input=file_path) self.seat_ids = sorted( [DayFive.identify_seat(seat_co...
jonodrew/2020-advent-of-code
five/five.py
five.py
py
1,952
python
en
code
0
github-code
6
[ { "api_name": "helpers.ReadLines", "line_number": 5, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_nu...
70945120828
# ํ˜•ํƒœ์†Œ ๋ถ„์„ from konlpy.tag import Okt from docutils.parsers.rst.directives import encoding okt = Okt() #result = okt.pos('๊ณ ์ถ” ๋“ฑ ๋งค์šด์Œ์‹์„ ์˜ค๋žซ๋™์•ˆ ๋„ˆ๋ฌด ๋งŽ์ด ๋จน์—ˆ์„ ๊ฒฝ์šฐ ์ธ์ง€๋Šฅ๋ ฅ๊ณผ ๊ธฐ์–ต๋ ฅ์„ ์ €ํ•˜์‹œํ‚ฌ ์œ„ํ—˜์ด ๋†’๋‹ค๋Š” ์—ฐ๊ตฌ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์™”๋‹ค.') #result = okt.morphs('๊ณ ์ถ” ๋“ฑ ๋งค์šด์Œ์‹์„ ์˜ค๋žซ๋™์•ˆ ๋„ˆ๋ฌด ๋งŽ์ด ๋จน์—ˆ์„ ๊ฒฝ์šฐ ์ธ์ง€๋Šฅ๋ ฅ๊ณผ ๊ธฐ์–ต๋ ฅ์„ ์ €ํ•˜์‹œํ‚ฌ ์œ„ํ—˜์ด ๋†’๋‹ค๋Š” ์—ฐ๊ตฌ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์™”๋‹ค.') #result = okt.nouns('๊ณ ์ถ” ๋“ฑ ๋งค์šด์Œ์‹์„ ์˜ค๋žซ๋™์•ˆ ๋„ˆ...
kangmihee/EX_python
py_morpheme/pack/morp1.py
morp1.py
py
2,358
python
ko
code
0
github-code
6
[ { "api_name": "konlpy.tag.Okt", "line_number": 5, "usage_type": "call" }, { "api_name": "urllib.parse.quote", "line_number": 15, "usage_type": "call" }, { "api_name": "urllib.parse", "line_number": 15, "usage_type": "name" }, { "api_name": "urllib.request.urlopen"...
27094908089
import pandas as pd import random from tqdm.auto import tqdm tqdm.pandas() import re from tqdm import tqdm import numpy as np import cv2 from albumentations import ( Compose, OneOf, Normalize, Resize, HorizontalFlip, VerticalFlip, Rotate, RandomRotate90, CenterCrop ) from albumentations.pytorch import ToTensorV...
phelchegs/bms-molecular-translation
InChI/InChI_preprocessing.py
InChI_preprocessing.py
py
7,948
python
en
code
1
github-code
6
[ { "api_name": "tqdm.auto.tqdm.pandas", "line_number": 4, "usage_type": "call" }, { "api_name": "tqdm.auto.tqdm", "line_number": 4, "usage_type": "name" }, { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "re.findall", "line_...
36040675316
import typing from datetime import datetime, timedelta import arrow from ParadoxTrading.Utils.DataStruct import DataStruct DATETIME_TYPE = typing.Union[str, datetime] class SplitAbstract: def __init__(self): self.cur_bar: DataStruct = None self.cur_bar_begin_time: DATETIME_TYPE = None s...
ppaanngggg/ParadoxTrading
ParadoxTrading/Utils/Split.py
Split.py
py
9,614
python
en
code
51
github-code
6
[ { "api_name": "typing.Union", "line_number": 8, "usage_type": "attribute" }, { "api_name": "datetime.datetime", "line_number": 8, "usage_type": "name" }, { "api_name": "ParadoxTrading.Utils.DataStruct.DataStruct", "line_number": 13, "usage_type": "name" }, { "api_...
70488593467
import csv import functools import json import math import random def cycle_call_parametrized(string_q: int, left_b: int, right_b: int): def cycle_call(func): # print(f'LALA') def wrapper_(*args, **kwargs): # creating a csv-file: generate_csv(string_q, left_b, right_b) ...
LocusLontrime/Python
Dive_into_python/HomeWork9/Decorators.py
Decorators.py
py
1,807
python
en
code
1
github-code
6
[ { "api_name": "csv.reader", "line_number": 17, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 35, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 50, "usage_type": "call" }, { "api_name": "csv.QUOTE_MINIMAL", "line_number"...
39426129134
''' Strategy to be backtested. ''' import backtrader as bt # Create a Stratey class TestStrategy(bt.Strategy): ''' Base class to be subclassed for user defined strategies. ''' # Moving average parameters params = (('pfast',2),('pslow',184),) def __init__(self): self.dataclose = self.datas[0...
Kyle-sn/PaperStreet
python/backtest/strategy.py
strategy.py
py
2,714
python
en
code
1
github-code
6
[ { "api_name": "backtrader.Strategy", "line_number": 6, "usage_type": "attribute" }, { "api_name": "backtrader.indicators.MovingAverageSimple", "line_number": 22, "usage_type": "call" }, { "api_name": "backtrader.indicators", "line_number": 22, "usage_type": "attribute" ...
37612660256
from django.shortcuts import render from .models import * import cv2 import numpy as np from pytesseract import * pytesseract.tesseract_cmd="C:/Program Files/Tesseract-OCR/tesseract.exe" def main(request): return render(request,'main.html') def maintest(request): return render(request,'maintest.html')...
YounngR/Graduation-work
DB/views.py
views.py
py
1,680
python
en
code
0
github-code
6
[ { "api_name": "pytesseract.tesseract_cmd", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 17, "usage_type": "call" }, { "api...
37585700958
import tkinter as tk from tkinter import * from tkinter import ttk from tkinter.messagebox import showinfo import tkinter.font as tkFont import sqlite3, time, datetime, random name_of_db = 'inventory_master.db' my_conn = sqlite3.connect(name_of_db) cdb = my_conn.cursor() def create_table(): cdb.exec...
InfoSoftBD/Python
CustomerUpdate.py
CustomerUpdate.py
py
9,946
python
en
code
2
github-code
6
[ { "api_name": "sqlite3.connect", "line_number": 9, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 26, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 45, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": ...
24829002801
import pygame pygame.init() pygame.display.set_caption("WannabePong") size = 800, 600 screen = pygame.display.set_mode(size) width, height = size speed = [1, 1] bgc = 255, 255, 255 fontControls = pygame.font.SysFont("monospace", 16) font = pygame.font.SysFont("monospace", 26) fontCount = pygame.font.SysFont("monospa...
vsanjorge/localMultiplayerPong
main.py
main.py
py
3,327
python
en
code
0
github-code
6
[ { "api_name": "pygame.init", "line_number": 3, "usage_type": "call" }, { "api_name": "pygame.display.set_caption", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pygame.displa...
27923745620
from sklearn.model_selection import train_test_split from tensorflow.keras.layers import Dense from keras.utils import np_utils from tensorflow.keras.models import Sequential import matplotlib.pyplot as plt from scipy.io import loadmat import numpy as np def display(i): img = X[i] plt.title('Example'...
ankitlohiya212/basic-ml-problems
Basic ML problems/Mnist.py
Mnist.py
py
2,107
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.title", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 11, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.imshow", "line_number": 12, "usage_type": "call" }, { "api_name": "ma...
26057428953
import re import requests from bs4 import BeautifulSoup URL = "https://sourcesup.renater.fr/scm/viewvc.php/rec/2019-CONVECS/REC/" page = requests.get(URL) soup = BeautifulSoup(page.content, "html.parser") for link in soup.find_all('a', href=True): print(link['href']) if 'name' in link: print(link['nam...
philzook58/egglog-rec
scraper.py
scraper.py
py
711
python
en
code
1
github-code
6
[ { "api_name": "requests.get", "line_number": 6, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 8, "usage_type": "call" }, { "api_name": "re.search", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_numbe...
9224589864
from prediction.M2I.predictor import M2IPredictor import numpy as np import math import logging import copy import random import time import interactive_sim.envs.util as utils import plan.helper as plan_helper import agents.car as car S0 = 2 T = 0.25 #1.5 # reaction time when following DELTA = 4 # the power term in...
Tsinghua-MARS-Lab/InterSim
simulator/plan/env_planner.py
env_planner.py
py
107,809
python
en
code
119
github-code
6
[ { "api_name": "math.atan2", "line_number": 39, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 44, "usage_type": "call" }, { "api_name": "math.atan2", "line_number": 50, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 56, ...
14839954104
from PyQt5 import QtCore, QtGui, QtWidgets, uic import sys from AssignmentCategoryDict import AssignmentCategoryDict from Assignment import Assignment import uuid class EditCategories(object): def __init__(self, course, reload_gradesheet): col_headers = ['Category Name', 'Drop Count'] self.ECate...
meeksjt/SuperTeacherGradebook499
src/EditCategories.py
EditCategories.py
py
5,236
python
en
code
1
github-code
6
[ { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 13, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets", "line_number": 13, "usage_type": "name" }, { "api_name": "PyQt5.uic.loadUi", "line_number": 14, "usage_type": "call" }, { "api_name": "PyQt5.uic", ...
40327690661
from pyecharts import options as opts from typing import Any,Optional from pyecharts.charts import Radar import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from easy_pyechart import constants,baseParams,radar_base_config,round_radar_base_config class eRadar(): def...
jayz2017/easy_pyechart.py
easy_pyechart/easy_radar.py
easy_radar.py
py
1,470
python
en
code
1
github-code
6
[ { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number...
23775563757
import flask import grpc import search_pb2_grpc as pb2_grpc import search_pb2 as pb2 import redis import json from google.protobuf.json_format import MessageToJson from flask import request, jsonify app = flask.Flask(__name__) app.config["DEBUG"] = True class SearchClient(object): """ Client for...
manfruta/Sistemas-Tarea1
cliente_app.py
cliente_app.py
py
1,587
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "grpc.insecure_channel", "line_number": 22, "usage_type": "call" }, { "api_name": "search_pb2_grpc.SearchStub", "line_number": 25, "usage_type": "call" }, { "api_name": "search_p...
44407917630
''' Created on 16/ago/2011 @author: Marco ''' from reportlab.pdfgen import canvas from reportlab.lib.units import cm from math import sqrt import ModelsCache import Configuration class PdfStructure(object): ''' classdocs ''' __markerList = [] __modelsCache = ModelsCache.ModelsCache() @...
mziccard/RuneTagDrawer
PdfStructure.py
PdfStructure.py
py
3,883
python
en
code
3
github-code
6
[ { "api_name": "ModelsCache.ModelsCache", "line_number": 18, "usage_type": "call" }, { "api_name": "reportlab.pdfgen.canvas.Canvas", "line_number": 32, "usage_type": "call" }, { "api_name": "reportlab.pdfgen.canvas", "line_number": 32, "usage_type": "name" }, { "ap...
32802770666
from elasticsearch import Elasticsearch, helpers import csv import json import time mvar = "clara" matching_query = { "query_string": { "query": mvar } } def main(): #sundesh es = Elasticsearch(host = "localhost", port = 9200) #anagn...
d4g10ur0s/InformationRetrieval_21_22
save_books.py
save_books.py
py
627
python
en
code
0
github-code
6
[ { "api_name": "elasticsearch.Elasticsearch", "line_number": 15, "usage_type": "call" }, { "api_name": "csv.DictReader", "line_number": 18, "usage_type": "call" }, { "api_name": "elasticsearch.helpers.bulk", "line_number": 22, "usage_type": "call" }, { "api_name": ...
21546390354
import re from collections import Counter, defaultdict from itertools import combinations from typing import Dict, List, Tuple, Set import numpy as np from helper import load_input def create_input(): '''Extract puzzle input and transform''' # creates pattern for extracting replcements pattern = r"(\w+)...
rick-62/advent-of-code
advent_of_code_2015/solutions/day19.py
day19.py
py
2,647
python
en
code
0
github-code
6
[ { "api_name": "helper.load_input", "line_number": 17, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 20, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 21, "usage_type": "call" }, { "api_name": "typing.List", ...
38649682103
import http import requests import telegram from flask import Blueprint, Response, request from sqlalchemy_utils import create_database, database_exists from config import BUILD_NUMBER, DATABASE_URL, REBASE_URL, VERSION from .bot import dispatcher from .db import db, test_db from .utils import log routes = Blueprin...
andrewscwei/python-telegram-bot-starter-kit
app/routes.py
routes.py
py
1,370
python
en
code
1
github-code
6
[ { "api_name": "flask.Blueprint", "line_number": 14, "usage_type": "call" }, { "api_name": "sqlalchemy_utils.database_exists", "line_number": 19, "usage_type": "call" }, { "api_name": "config.DATABASE_URL", "line_number": 19, "usage_type": "argument" }, { "api_name...
16098965612
from django.urls import path from card import views urlpatterns = [ path('create/', views.CreateFlashCardView.as_view(), name="create-flash-card"), path('update/<id>/', views.UpdateFlashCardView.as_view(), name="update-flash-card"), path('dalete/<id>/', views.DeleteFlashCardView.as_view(), name="delete-fl...
leonardo0231/flash-card
card/urls.py
urls.py
py
428
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "card.views.CreateFlashCardView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "card.views.CreateFlashCardView", "line_number": 6, "usage_type": "attribute" }, ...
39697340199
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits import mplot3d # plots intensity time series for MDRE model def plotIntensity (): # index boundaries for time 3D plot nStart = 0 nEnd = 10000 with open("time_series.txt", "r") as file: lines = file.readlines() time = [] int...
sir-aak/microscopically-derived-rate-equations
plotscripts/mdre_plotscript_intensity_inversion.py
mdre_plotscript_intensity_inversion.py
py
3,810
python
en
code
1
github-code
6
[ { "api_name": "numpy.array", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 41, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
17324365412
from motor import motor_asyncio from .model import Guild import os class Database: def __init__(self, *, letty): self.letty = letty self.connection = motor_asyncio.AsyncIOMotorClient(os.environ['DB_URL']) self.db = db = self.connection[os.environ['DB_NAME']] self.guild = db.guilds ...
WhyNoLetty/Letty
database/base.py
base.py
py
890
python
en
code
7
github-code
6
[ { "api_name": "motor.motor_asyncio.AsyncIOMotorClient", "line_number": 8, "usage_type": "call" }, { "api_name": "motor.motor_asyncio", "line_number": 8, "usage_type": "name" }, { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name"...
15152787587
# -*- coding: utf-8 -* #่ฏฅ็จ‹ๅบ็”จไบŽๆจกๅž‹ๆต‹่ฏ• import os import torch import numpy as np import torch.nn as nn from evaluation import HKOEvaluation from ium_data.bj_iterator import BJIterator if __name__ == "__main__": #ๆœ€ไฝณ็š„ๆจกๅž‹ test_model = torch.load('./checkpoints/trained_model_12000.pkl' ) test_model.eval() ...
LiangHe77/UNet_v1
test.py
test.py
py
1,817
python
en
code
0
github-code
6
[ { "api_name": "torch.load", "line_number": 13, "usage_type": "call" }, { "api_name": "ium_data.bj_iterator.BJIterator", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.from_numpy", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.cat...
29821357591
import docker class MicroDockerClient: def __init__(self, micro_configuration): self.client = docker.from_env() self.config = micro_configuration def pull(self): self.client.images.pull(self.config.image_name) def run(self): self.client.containers.run( self.confi...
alichamouda/micro-cd
micro_docker_client.py
micro_docker_client.py
py
713
python
en
code
0
github-code
6
[ { "api_name": "docker.from_env", "line_number": 5, "usage_type": "call" } ]
13020029275
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn import ensemble def data_accuracy(predictions, real): """ Check the accuracy of the estimated prices """ # This will be a list, the ith element of this list will be abs(prediction[i] - real[i])/rea...
V1K1NGbg/House-Price-Prediction-Project
testing.py
testing.py
py
2,216
python
en
code
0
github-code
6
[ { "api_name": "numpy.percentile", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.average", "line_number": 24, "usage_type": "call" }, { "api_name": "sklearn.ensemble.GradientBoostingRegressor", "line_number": 29, "usage_type": "call" }, { "api_nam...
34652323206
# Subgroup enumeration for cyclic, dicyclic, and tricyclic integer groups. # PM Larsen, 2019 # # The theory implemented here is described for two-dimensional groups in: # Representing and counting the subgroups of the group Z_m x Z_n # Mario Hampejs, Nicki Holighaus, Lรกszlรณ Tรณth, and Christoph Wiesmeyr # Jo...
pmla/evgraf
evgraf/subgroup_enumeration.py
subgroup_enumeration.py
py
6,050
python
en
code
13
github-code
6
[ { "api_name": "numpy.diag", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.prod", "line_number": 3...
33225197622
# -*- coding: utf-8 -*- """ #+begin_org * *[Summary]* :: A =CmndLib= for providing currents configuration to CS-s. #+end_org """ ####+BEGIN: b:py3:cs:file/dblockControls :classification "cs-u" """ #+begin_org * [[elisp:(org-cycle)][| /Control Parameters Of This File/ |]] :: dblk ctrls classifications=cs-u #+BEGIN_SRC...
bisos-pip/currents
py3/bisos/currents/currentsConfig.py
currentsConfig.py
py
33,875
python
en
code
0
github-code
6
[ { "api_name": "typing.Dict", "line_number": 41, "usage_type": "attribute" }, { "api_name": "typing.Any", "line_number": 41, "usage_type": "attribute" }, { "api_name": "bisos.b.subProc.WOpW", "line_number": 116, "usage_type": "call" }, { "api_name": "bisos.b.subPro...
28153506484
import json import numpy as np def load_json(file_path : str) -> dict: """ Loads .json file types. Use json python library to load a .json file. Parameters ---------- file_path : string Path to file. Returns ------- json file : dictionary .json dictionary file. ...
jm1261/PeakFinder
src/fileIO.py
fileIO.py
py
4,274
python
en
code
0
github-code
6
[ { "api_name": "json.load", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.genfromtxt", "line_number": 50, "usage_type": "call" }, { "api_name": "numpy.genfromtxt", "line_number": 55, "usage_type": "call" }, { "api_name": "numpy.generic", "line...
12858137004
""" We are given a directed graph. We are given also a set of pairs of vertices. Find the shortest distance between each pair of vertices or -1 if there is no path connecting them. On the first line, you will get N, the number of vertices in the graph. On the second line, you will get P, the number of pairs between whi...
dandr94/Algorithms-with-Python
04. Minimum-spanning-tree-and-Shortest-path-in-Graph/02. Exercise/01. distance_between_vertices.py
01. distance_between_vertices.py
py
2,005
python
en
code
0
github-code
6
[ { "api_name": "typing.Dict", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 25, "usage_type": "name" }, { "api_name": "typing.List", "line_number": ...
73952557948
import os today = '02-06-19_' import numpy as np import treecorr def parse_args(): import argparse parser = argparse.ArgumentParser(description='Produce Tau correlations, i.e correlation among galaxies and reserved stars') parser.add_argument('--metacal_cat', #default='/home2/d...
des-science/Y3_shearcat_tests
alpha-beta-eta-test/code/essentials/taus.py
taus.py
py
7,792
python
en
code
1
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 55, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 55, "usage_type": "attribute" }, { "api_name": "os.path.expandus...
23525022654
from matplotlib import pyplot as plt import numpy as np import collections import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms import matplotlib.pyplot as plt # Get cpu or gpu device for training. device = "cuda" if torch.cuda.is_a...
lewiis252/machine_learning
cifar10_nn.py
cifar10_nn.py
py
7,791
python
en
code
0
github-code
6
[ { "api_name": "torch.cuda.is_available", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torchvision.datasets.CIFAR10", "line_number": 37, "usage_type": "call" }, { "api_name": "...
23048935694
from sqlalchemy.orm import Session from .. import models, schemas from fastapi.encoders import jsonable_encoder def get_score(db: Session): score = db.query(models.Score).first() if not score: new_score = create_score() db.add(new_score) db.commit() db.refresh(new_score) ...
hooglander/fastapi-get-and-post
app/repository/score.py
score.py
py
873
python
en
code
0
github-code
6
[ { "api_name": "sqlalchemy.orm.Session", "line_number": 6, "usage_type": "name" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 17, "usage_type": "name" }, { "api_name": "fastapi.encoders.jsonable_encoder", "line_number": 25, "usage_type": "call" } ]
71968698427
import torch.nn as nn from collections import OrderedDict from graph_ter_seg.tools import utils class EdgeConvolution(nn.Module): def __init__(self, k, in_features, out_features): super(EdgeConvolution, self).__init__() self.k = k self.conv = nn.Conv2d( in_features * 2, out_f...
gyshgx868/graph-ter
graph_ter_seg/models/layers.py
layers.py
py
2,158
python
en
code
56
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
12805757281
import os import cv2 import matplotlib.pyplot as plt import numpy as np import random import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers Datadirectory = "train\\" Classes = ["0", "1", "2", "3", "4", "5", "6"] img_size = 224 training_data = [] counter = 0 def createtrainingset()...
Mudaferkaymak/Detecting-Faces-and-Analyzing-Them-with-Computer-Vision
Detecting-Faces-and-Analyzing-Them-with-Computer-Vision/training_themodel.py
training_themodel.py
py
1,867
python
en
code
1
github-code
6
[ { "api_name": "os.path.join", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 22, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": ...
21840251334
"""Order views module""" from django_filters.rest_framework import DjangoFilterBackend from rest_framework import filters from rest_framework import status as st from rest_framework import generics from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer from rest_framework.parsers import JSONParser from...
GunGalla/order-flow-test
orders/views.py
views.py
py
2,855
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.generics.ListCreateAPIView", "line_number": 18, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 18, "usage_type": "name" }, { "api_name": "order_flow.settings.DEBUG", "line_number": 22, "usage_type": "name...
15047866942
# from __future__ import absolute_import import torch import torch.nn as nn import onnx from typing import List, Dict, Union, Optional, Tuple, Sequence import copy from .util import* from torch.autograd import Variable class onnxTorchModel(nn.Module): def __init__(self,onnx_model: onnx.ModelProto,cfg:dict): ...
diamour/onnxQuanter
onnx_torch_engine/converter.py
converter.py
py
16,899
python
en
code
1
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 10, "usage_type": "name" }, { "api_name": "onnx.ModelProto", "line_number": 11, "usage_type": "attribute" } ]
75188719226
# ์ดˆ๊ธฐ ๊ฑฐ๋ฆฌ๋ฅผ 1๋กœ ์ง€์ • # ๊ฐ€๊นŒ์šด ๊ณณ๋ถ€ํ„ฐ ์ˆ˜ํ–‰ํ•˜๋Š” bfs์ด๊ธฐ์— ์ด๋ฏธ ์ตœ๋‹จ๊ฑฐ๋ฆฌ๊ฐ€ ๊ธฐ๋ก๋œ ๊ฒฝ์šฐ์—๋Š” ๊ฑฐ๋ฆฌ๊ฐ€ ๊ฐฑ์‹ ๋˜์ง€ ์•Š๋„๋ก ์„ค์ • from collections import deque def bfs(x, y): # ํ ๊ตฌํ˜„์„ ์œ„ํ•ด deque ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ queue = deque() # ์ดˆ๊ธฐ ์ขŒํ‘œ ์„ค์ • queue.append((x, y)) # ํ๊ฐ€ ๋นŒ ๋•Œ๊นŒ์ง€ ๋ฐ˜๋ณต while queue: x, y = queue.popleft() # ํ˜„์žฌ ์œ„์น˜์—์„œ 4๊ฐ€์ง€ ๋ฐฉํ–ฅ์œผ๋กœ ์œ„์น˜ ํ™•์ธ ...
zacinthepark/Problem-Solving-Notes
na/02/DFS-BFS/๋ฏธ๋กœํƒˆ์ถœ.py
๋ฏธ๋กœํƒˆ์ถœ.py
py
1,348
python
ko
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 8, "usage_type": "call" } ]
41152326339
from tkinter import * from datetime import datetime, timedelta import tkinter as tk from tkinter import Entry, Label, StringVar, ttk, Checkbutton, Button, messagebox import numpy as np import pandas as pd def generarCodigo(texto): sumar = 0 codigo = texto[:3] if texto[len(texto) // 2] == " ": suma...
Moisesmp75/TkinterForms
Trabajo2/Biblioteca.py
Biblioteca.py
py
23,516
python
es
code
0
github-code
6
[ { "api_name": "tkinter.ttk.Frame", "line_number": 44, "usage_type": "call" }, { "api_name": "tkinter.ttk", "line_number": 44, "usage_type": "name" }, { "api_name": "tkinter.Entry", "line_number": 46, "usage_type": "call" }, { "api_name": "tkinter.Entry", "line...
15362206849
from generator import Generator from discriminator import Discriminator from speaker_encoder import SPEncoder import torch import torch.nn.functional as F import os from os.path import join, basename, exists import time import datetime import numpy as np from tqdm import tqdm import numpy as np import copy class Solve...
Mortyzhou-Shef-BIT/DYGANVC
solver.py
solver.py
py
12,824
python
en
code
null
github-code
6
[ { "api_name": "torch.device", "line_number": 52, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 52, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 52, "usage_type": "attribute" }, { "api_name": "torch.optim.Adam...
17536523132
import pystan import stan_utility import matplotlib import matplotlib.pyplot as plot ################################################## ##### Simulate data and write to file ################################################## model = stan_utility.compile_model('gen_data.stan') fit = model.sampling(seed=194838, algorit...
MiyainNYC/Rose
stan/wimlds/1/lin_regr.py
lin_regr.py
py
3,574
python
en
code
0
github-code
6
[ { "api_name": "stan_utility.compile_model", "line_number": 10, "usage_type": "call" }, { "api_name": "pystan.stan_rdump", "line_number": 16, "usage_type": "call" }, { "api_name": "pystan.read_rdump", "line_number": 23, "usage_type": "call" }, { "api_name": "stan_u...
16351053586
from bs4 import BeautifulSoup as bs import requests from cardBeta import CardBeta from cardWitj import CardWitj urls = { 'beta': 'https://beta.gouv.fr/recrutement/developpement?', 'witj': 'https://www.welcometothejungle.com/fr/companies/communaute-beta-gouv/jobs' } divs = {'beta': 'fr-card__body', 'wi...
apimobi/witj-beta-replit
crawler.py
crawler.py
py
1,963
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 25, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 27, "usage_type": "call" }, { "api_name": "cardWitj.CardWitj", "line_number": 38, "usage_type": "call" }, { "api_name": "cardBeta.CardBeta", ...
25070502975
import pydoc import logging from typing import Generic, Type, Optional, Union, TypeVar, Any, NamedTuple from django.db import models from django.conf import settings from django.forms.models import model_to_dict from rest_framework import serializers logger = logging.getLogger(__name__) T = TypeVar("T") class Abstra...
danh91/purplship
server/modules/core/purplship/server/serializers/abstract.py
abstract.py
py
8,956
python
en
code
null
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_number": 10, "usage_type": "call" }, { "api_name": "typing.NamedTuple", "line_number": 21, "usage_type": "name" }, { "api_name": "typing.Any", "l...
5769042811
import hashlib import json import os import pathlib import shutil import subprocess from typing import Mapping, Any, List class RunException(Exception): pass class ExecuteException(Exception): pass class style: reset = 0 bold = 1 dim = 2 italic = 3 underline = 4 blink = 5 rblink =...
Abdullahjavednesar/lpython
compiler_tester/tester.py
tester.py
py
9,744
python
en
code
null
github-code
6
[ { "api_name": "hashlib.sha224", "line_number": 50, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 52, "usage_type": "call" }, { "api_name": "os.path", "line_number": 52, "usage_type": "attribute" }, { "api_name": "os.path.splitext", "...
14956977226
import argparse import os from scipy.interpolate import griddata import numpy as np from tqdm import tqdm import cv2 import scipy.ndimage as sp import matplotlib.pyplot as plt from matplotlib import cm, patches # Argument Parser parser = argparse.ArgumentParser(description="Time-series Heatmap Generator") parser.add_a...
raghavauppuluri13/robot-palpation
rpal/scripts/visualize_heatmap.py
visualize_heatmap.py
py
2,568
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.loadtxt", ...
26113397145
__authors__ = ["T. Vincent"] __license__ = "MIT" __date__ = "08/09/2017" import weakref from silx.gui import qt from silx.gui.icons import getQIcon from .. import actions class ViewpointToolButton(qt.QToolButton): """A toolbutton with a drop-down list of ways to reset the viewpoint. :param parent: See :cl...
silx-kit/silx
src/silx/gui/plot3d/tools/ViewpointTools.py
ViewpointTools.py
py
1,903
python
en
code
106
github-code
6
[ { "api_name": "silx.gui.qt.QToolButton", "line_number": 13, "usage_type": "attribute" }, { "api_name": "silx.gui.qt", "line_number": 13, "usage_type": "name" }, { "api_name": "silx.gui.qt.QMenu", "line_number": 24, "usage_type": "call" }, { "api_name": "silx.gui.q...
31108358568
import tushare as ts import pandas as pd #ๅฝ“ๅˆ—ๅคชๅคšๆ—ถ๏ผŒๆ˜พ็คบไธๆข่กŒ pd.set_option('expand_frame_repr',False) #ๆ˜พ็คบๆ‰€ๆœ‰็š„ๅˆ— pd.set_option('display.max_columns', None) ''' Created on 2020ๅนด12ๆœˆ24ๆ—ฅ @author: My ''' ts.set_token('b869861b624139897d87db589b6782ca0313e0e9378b2dd73a4baff5') pro=ts.pro_api() #data = pro.stock_basic(exchange=''...
geekzhp/zhpLiangHua
tmp/tushareStudy.py
tushareStudy.py
py
1,356
python
en
code
0
github-code
6
[ { "api_name": "pandas.set_option", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.set_option", "line_number": 8, "usage_type": "call" }, { "api_name": "tushare.set_token", "line_number": 16, "usage_type": "call" }, { "api_name": "tushare.pro_api",...
41969655941
import cv2 as cv src = cv.imread("./img_input/266679.png") #่ฏปๅ–ๅ›พ็‰‡ # ๆ–ฐๅปบไธ€ไธช็ช—ๅฃๅนถๅฑ•็คบ cv.namedWindow("input image", cv.WINDOW_AUTOSIZE) cv.imshow("input image", src) cv.waitKey(0) cv.destroyAllWindows() print("hello")
RMVision/study-opencv
chapter01/test.py
test.py
py
237
python
zh
code
1
github-code
6
[ { "api_name": "cv2.imread", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.namedWindow", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.WINDOW_AUTOSIZE", "line_number": 6, "usage_type": "attribute" }, { "api_name": "cv2.imshow", "li...
3709328599
import os from cloudservice import add_file, add_dir, get_dir_subs, get_root_dir_id from pathlib import Path import pandas as pd def test(): uploadfile(os.path.join('ๆˆ‘ๆ–‡ไปถๅคน', 'test1.docx'), dirid=39, projid=36) print() def create_dir_test(): add_dir('addsub', 39, 36) def uploadfile(fpath, dirid, projid)...
pengyang486868/PY-read-Document
batch_upload.py
batch_upload.py
py
3,549
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "cloudservice.add_dir", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.split", "lin...
75226774588
import logging from kiteconnect import KiteConnect import datetime import pymongo instrument_token = "738561" from_date = "2021-04-01" to_date = "2021-06-30" interval = '5minute' logging.basicConfig(level=logging.DEBUG) api_key = "kpgos7e4vbsaam5x" api_secret = "t9092opsldr1huxk1bgopmitovurftto" reque...
prashanth470/trading
source/sample.py
sample.py
py
1,284
python
en
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 11, "usage_type": "attribute" }, { "api_name": "kiteconnect.KiteConnect", "line_number": 18, "usage_type": "call" }, { "api_name": "pymong...
10958770997
import os import csv import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from torch.utils.data import Dataset, DataLoader from torchvision.io import read_image import torchvision.datasets as datasets import torchvision.transforms as transforms from torchvision.io import rea...
K-kiron/animal-detect
Helpers/AWA2_Dataloader.py
AWA2_Dataloader.py
py
7,864
python
en
code
1
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 19, "usage_type": "call" }, { "api_name": "os.listdir", "line...
23850509915
from datasets import load_dataset,load_metric from transformers import AutoTokenizer,AutoModelForSeq2SeqLM,Seq2SeqTrainingArguments,DataCollatorForSeq2Seq,Seq2SeqTrainer import numpy as np metric=load_metric("BLEU.py") max_input_length = 64 max_target_length = 64 src_lang = "zh" tag_lang = "en" model_path = "...
Scpjoker/NLP-Course-Homework-2022
translate.py
translate.py
py
2,866
python
en
code
1
github-code
6
[ { "api_name": "datasets.load_metric", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.count_nonzero", "line_number": 46, "usage_type": "call" }, { "api_name": "numpy.mean", ...
20463208050
from collections import defaultdict d = defaultdict(int) n = int(input()) for _ in range(n): d[input()] += 1 allwords = list(d) allwords_str = d.values() listofx = [] for x in allwords_str: listofx.append(str(x)) print(len(allwords)) print(" ".join(listofx)) # This line is the same as the above block > print(...
Ronen-EDH/Code-exercises
Python/Hackerrank/Hackrank_wordorder.py
Hackrank_wordorder.py
py
361
python
en
code
0
github-code
6
[ { "api_name": "collections.defaultdict", "line_number": 2, "usage_type": "call" } ]
24150027900
from fastapi import FastAPI, APIRouter,status, Request from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates from fastapi.responses import HTMLResponse from services.connectionHobolink import Connection from routers import login app=FastAPI(title="WeatherStation") #routers app.inc...
AlvaroCoder/WeatherStation
main.py
main.py
py
1,214
python
en
code
0
github-code
6
[ { "api_name": "fastapi.FastAPI", "line_number": 8, "usage_type": "call" }, { "api_name": "routers.login.router", "line_number": 11, "usage_type": "attribute" }, { "api_name": "routers.login", "line_number": 11, "usage_type": "name" }, { "api_name": "fastapi.static...
73400221629
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/...
PolarisXQ/Polaris-NoteBook
source/conf.py
conf.py
py
1,924
python
en
code
0
github-code
6
[ { "api_name": "recommonmark.parser.CommonMarkParser", "line_number": 62, "usage_type": "name" } ]
34572128931
import random,server,time,istatistik,settings import sqlite3 as sql server_list=server.Server() patlayan_power=6.5;kartopu_power=7;oyuk_power=2 _35power=10;_25power=9;_15power=5 def randomplayer(): global first,two while True: first=random.choice(server_list) two=random.choice(server_li...
zeminkat/Game
savas.py
savas.py
py
11,157
python
en
code
0
github-code
6
[ { "api_name": "server.Server", "line_number": 3, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 9, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_n...
40070373372
import boto3 import json from tqdm import tqdm dynamodb = boto3.resource('dynamodb',region_name='us-east-2') table = dynamodb.Table('FSBP_tree') print(table.creation_date_time) ''' with open('/hdd/c3s/data/aws_data/breach_compilation-pw_tree_1000000.json') as f: data = json.load(f) with table.batch_writer() as bat...
lucy7li/compromised-credential-checking
perfomance_simulations/fsbp/save_amazon.py
save_amazon.py
py
793
python
en
code
6
github-code
6
[ { "api_name": "boto3.resource", "line_number": 4, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 22, "usage_type": "call" } ]
33381013184
from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import path, include from django.contrib.auth import views as auth_views from polls.views import ( RegistrationView, CreateBoardView, BoardDetailView, BoardDeleteView, CreateList...
destinymalone/projectmanagement-capstone
mysite/urls.py
urls.py
py
1,486
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 22, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 22, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 22, "usage_type": "name" }, { "api_name": "...
2665829226
from heatSink import HeatSink from waterPipes import WaterPipes from solarPanel import SolarPanel from system import System import matplotlib.pyplot as plt flow_rates = [0.00025, 0.0005, 0.001, 0.002, 0.003, 0.005] panel_temp = [] no_pipes = [] inlet_temp = 30 for f in flow_rates: temps = [] pipes = [] f...
southwelljake/HeatSinkModelling
src/comparePipes.py
comparePipes.py
py
1,260
python
en
code
0
github-code
6
[ { "api_name": "heatSink.HeatSink", "line_number": 17, "usage_type": "call" }, { "api_name": "solarPanel.SolarPanel", "line_number": 18, "usage_type": "call" }, { "api_name": "waterPipes.WaterPipes", "line_number": 19, "usage_type": "call" }, { "api_name": "system....
12483812629
import numpy as np import matplotlib.pyplot as plt from scipy.constants import degree from FallingCat import FallingCat JI = 0.25 alpha = 30*degree plt.figure(figsize=(5,7)) c = FallingCat(JI, alpha) t = c.theta/degree psi = c.lean()/degree gamma = c.bend()/degree phi = c.twist()/degree print(phi[-1]) print((c.alpha...
tt-nakamura/cat
fig2.py
fig2.py
py
660
python
en
code
0
github-code
6
[ { "api_name": "scipy.constants.degree", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 9, "usage_type": "name" }, { "api_name": "Fallin...
26664284885
import json import logging import os from http.client import HTTPConnection from pathlib import Path from typing import Dict, Any from mmcc_framework import DictCallback, Framework from mmcc_framework.nlu_adapters import NluAdapter from tuning.mmcc_config.callbacks import my_callbacks from tuning.types import Pipelin...
DEIB-GECO/DSBot
DSBot/tuning/mmcc_integration.py
mmcc_integration.py
py
4,842
python
en
code
0
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 15, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_nu...
1904177195
from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware import json, os app = FastAPI() app.add_middleware( CORSMiddleware, allow_origins=['*'], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get('/contents/{page_id}/{content_id}') a...
tetla/knowledge-reader
backend/offdemy-api.py
offdemy-api.py
py
1,203
python
en
code
0
github-code
6
[ { "api_name": "fastapi.FastAPI", "line_number": 5, "usage_type": "call" }, { "api_name": "fastapi.middleware.cors.CORSMiddleware", "line_number": 8, "usage_type": "argument" }, { "api_name": "os.path.exists", "line_number": 20, "usage_type": "call" }, { "api_name"...
25814131906
import errno from flask import current_app, request, render_template from flask.views import MethodView from werkzeug.exceptions import Forbidden, NotFound from ..constants import COMPLETE, FILENAME, LOCKED, TYPE from ..utils.date_funcs import delete_if_lifetime_over from ..utils.http import redirect_next_referrer fr...
bepasty/bepasty-server
src/bepasty/views/modify.py
modify.py
py
1,929
python
en
code
162
github-code
6
[ { "api_name": "flask.views.MethodView", "line_number": 14, "usage_type": "name" }, { "api_name": "flask.render_template", "line_number": 16, "usage_type": "call" }, { "api_name": "constants.FILENAME", "line_number": 16, "usage_type": "name" }, { "api_name": "utils...
40155982512
# -*- coding: utf-8 -*- """ This module contains functions for losses of various types: soiling, mismatch, snow cover, etc. """ import numpy as np import pandas as pd from pvlib.tools import cosd def soiling_hsu(rainfall, cleaning_threshold, tilt, pm2_5, pm10, depo_veloc={'2_5': 0.004, '10': 0.0009},...
Samuel-psa/pvlib-python
pvlib/losses.py
losses.py
py
2,997
python
en
code
null
github-code
6
[ { "api_name": "pandas.Timedelta", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.maximum", "line_number": 73, "usage_type": "call" }, { "api_name": "pvlib.tools.cosd", "line_number": 74, "usage_type": "call" }, { "api_name": "numpy.cumsum", "l...
34248836732
import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker as ticker plt.style.use("bmh") def exact(r1, r2, w): return 2 * np.sqrt(w/np.pi) * np.exp(- w * (r1 * r1 + r2 * r2)) def fmt(x, pos): a, b = '{:.1e}'.format(x).split('e') b = int(b) return r'${} \times 10^{{{}}}$'.format(...
evenmn/Master-thesis
scripts/plot_exact_tb.py
plot_exact_tb.py
py
1,391
python
en
code
4
github-code
6
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 5, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 5, "usage_type": "name" }, { "api_name"...
70398650747
"""utilities for generation of CTRMs Author: Keisuke Okumura Affiliation: TokyoTech & OSX """ from __future__ import annotations import numpy as np from numba import f8, jit from ..environment import Instance from ..roadmap import TimedNode, TimedRoadmap from ..roadmap.utils import valid_move @jit(f8[:](f8[:, :], ...
omron-sinicx/ctrm
src/ctrm/roadmap_learned/utils.py
utils.py
py
5,210
python
en
code
21
github-code
6
[ { "api_name": "numpy.ndarray", "line_number": 17, "usage_type": "attribute" }, { "api_name": "numpy.sum", "line_number": 18, "usage_type": "call" }, { "api_name": "numba.jit", "line_number": 16, "usage_type": "call" }, { "api_name": "numba.f8", "line_number": ...
28663549378
# Please develop your ingestion service in Python. You may select the delivery format (e.g., Jupyter # Notebook, containerized microservice). For this exercise, you may assume that a scheduling service # to regularly invoke your ingestion is provided. # Where and how you process the data is at your discretion. import ...
madelinepet/take_home_assignment
assignment.py
assignment.py
py
7,586
python
en
code
0
github-code
6
[ { "api_name": "os.mkdir", "line_number": 26, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number": 27, "usage_type": "call" }, { "api_name": "mappings.event_root_codes", "line_number": 34, "usage_type": "argument" }, { "api_name": "mappings.event_base_c...
24168209609
#!/usr/bin/env python ''' summarise slurm job details Usage: summarise.py --files slurm-*.log > summary.tsv Time is in hours. Memory is in GB. ''' #(venv_somatic_2) spartan-login1 18:48:20 msi-evaluation$ sacct -j 18860471 --format="JobName,CPUTime,MaxRSS,Elapsed,MaxVMSize,Timelimit" # JobName CPUTime ...
supernifty/slurm_util
summarise.py
summarise.py
py
2,901
python
en
code
0
github-code
6
[ { "api_name": "logging.warn", "line_number": 40, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 44, "usage_type": "call" }, { "api_name": "sys.stdout.write", "line_number": 46, "usage_type": "call" }, { "api_name": "sys.stdout", "line_num...
22682272557
# -*- coding: utf-8 -*- """ Created on Wed May 12 04:34:12 2021 @author: Zakaria """ import pandas as pd data = pd.read_csv('prediction_de_fraud_2.csv') caracteristiques = data.drop('isFraud', axis=1).values cible = data['isFraud'].values from sklearn.preprocessing import LabelEncoder LabEncdr_X...
Baxx95/6-10-Programmes-Data-Science-SL-Random_Forest_Classifier
Random_Forest_Classifier.py
Random_Forest_Classifier.py
py
961
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 18, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 26, "usage_type": "call" }...
29186498876
import numpy import multiprocessing as mp import scipy.fftpack as fft import scipy.signal as signal import h5py from .utilities import working_dir from .stationbandpass import lofar_station_subband_bandpass def fir_filter_coefficients(num_chan, num_taps, cal_factor=1./50.0): ''' Compute FIR filter coefficient...
brentjens/software-correlator
softwarecorrelator/stationprocessing.py
stationprocessing.py
py
11,844
python
en
code
4
github-code
6
[ { "api_name": "scipy.signal.firwin", "line_number": 39, "usage_type": "call" }, { "api_name": "scipy.signal", "line_number": 39, "usage_type": "name" }, { "api_name": "numpy.arange", "line_number": 41, "usage_type": "call" }, { "api_name": "numpy.array", "line...
7796988085
import xml.dom.minidom import string; import logging; def LoadSession(system, FileName): Logger = logging.getLogger("PPLT"); Logger.debug("Try to load Session from %s"%FileName); doc = xml.dom.minidom.parse(FileName); dev_tag = doc.getElementsByTagName("Devices")[0]; sym_tag = doc.getElementsByTag...
BackupTheBerlios/pplt-svn
PPLT/PPLT/LoadSession.py
LoadSession.py
py
2,939
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "xml.dom.minidom.dom.minidom.parse", "line_number": 8, "usage_type": "call" }, { "api_name": "xml.dom.minidom.dom", "line_number": 8, "usage_type": "attribute" }, { "api_nam...
13610828545
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initial'), ('learn', '0003_project_photo'), ] operations = [ migrations.Create...
klebercode/sofia
sofia/apps/learn/migrations/0004_auto_20141215_1723.py
0004_auto_20141215_1723.py
py
1,769
python
en
code
0
github-code
6
[ { "api_name": "django.db.migrations.Migration", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.migrations.CreateModel", "line_number": 16, "usage_type": "call" }, ...
38474579179
import argparse import regex as re from pathlib import Path from textwrap import dedent import yaml from .validator import run_sigma_validator from clint.textui import colored, puts import logging STANDARD_YAML_PATH = Path(__file__).resolve().parent.parent / Path('CCCS_SIGMA.yml') SIGMA_FILENAME_REGEX = r'(\.yaml|\.ym...
CybercentreCanada/pysigma
pysigma/validator_cli.py
validator_cli.py
py
13,374
python
en
code
7
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "regex.compile", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser"...
8677677831
import xarray as xr import xesmf as xe import pandas as pd import datetime import os first_date = '2021-01-01' last_date = '2022-12-31' lonmin,lonmax = 360-90,360-69 latmin,latmax = -40,-15 variables = [ 'surf_el', 'water_temp', 'salinity', 'water_u', 'water_v'] renamedict = {'surf_el':'zos', ...
lucasglasner/DOWNLOADSCRIPTS
HYCOM/download_hycom_hindcast.py
download_hycom_hindcast.py
py
2,754
python
en
code
0
github-code
6
[ { "api_name": "xarray.open_dataset", "line_number": 35, "usage_type": "call" }, { "api_name": "pandas.Timedelta", "line_number": 40, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 40, "usage_type": "call" }, { "api_name": "pandas.date_r...
21645750883
#Tutorial de Umbral OpenCV import cv2 import numpy as np img = cv2.imread('Pagina.jpg') #Imagen a escala de grises grayscaled = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) #Umbral de 10 retval, threshold = cv2.threshold(img, 12, 255, cv2.THRESH_BINARY) #Umbral en escala de grises retval, threshold2 = cv2.threshold(grayscale...
Deniry/Practicas_OpenCV
Practica5.py
Practica5.py
py
666
python
en
code
0
github-code
6
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 8, "usage_type": "attribute" }, { "api_name": "cv2.threshold", "lin...
38785952057
import cv2 as cv import sys img = cv.imread("Photos/cat_large.jpg") print(img.shape) cv.imshow("Cat", img) def rescale(frame, scale=0.75): width = frame.shape[1] * scale height = frame.shape[0] * scale dimensions = (int(width), int(height)) new_frame = cv.resize(frame, dimensions, interpolation=cv....
adamferencz/opencv-course-ghb
rescale.py
rescale.py
py
446
python
en
code
0
github-code
6
[ { "api_name": "cv2.imread", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.INTER_AREA", "line_number": 15...
1922022592
from sklearn import preprocessing import pandas as pd import numpy as np import pickle data_path = './data/STT.csv' window = 15 def normalize(df): min_max_scaler = preprocessing.MinMaxScaler() df['open'] = min_max_scaler.fit_transform(df.open.values.reshape(-1, 1)) df['close'] = min_max_scaler.fit_transf...
sinlin0908/ML_course
hw4/prepro.py
prepro.py
py
1,925
python
en
code
0
github-code
6
[ { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.preprocessing", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 32, "usage_type": "call" }, { "api_name": "...
41584679238
# ์œˆ๋„์šฐ์—์„œ๋Š” ํ•œ๊ธ€ ์ธ์ฝ”๋”ฉ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. # ํ•œ๊ธ€ ์ธ์ฝ”๋”ฉ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๋ฉด # Message.log(message_type="info", msg="๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ–ˆ์Šต๋‹ˆ๋‹ค.") # ์œ„์˜ ์ฝ”๋“œ ๋ถ€๋ถ„์˜ msg๋ฅผ ์˜์–ด๋กœ ์ˆ˜์ •ํ•ด์„œ ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”. import json import sys from eliot import Message, start_action, to_file, write_traceback import requests # ๋กœ๊ทธ ์ถœ๋ ฅ์„ ํ‘œ์ค€ ์ถœ๋ ฅ์œผ๋กœ ์„ค์ •(ํ„ฐ๋ฏธ๋„์— ์ถœ๋ ฅํ•˜๊ธฐ) to_file(sys.stdout) # ํฌ๋กค๋ง ๋Œ€์ƒ...
JSJeong-me/2021-K-Digital-Training
Web_Crawling/python-crawler/chapter_5/sample_eliot.py
sample_eliot.py
py
1,833
python
ko
code
7
github-code
6
[ { "api_name": "eliot.to_file", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 13, "usage_type": "attribute" }, { "api_name": "eliot.start_action", "line_number": 23, "usage_type": "call" }, { "api_name": "eliot.start_action",...
23748260373
import os import sys from functools import partial from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * from toolBar import ToolBar from Canvas.canvas import Canvas import cv2 import numpy as np from grab_cut import Grab_cut from choiceDiaGen import ChoiceDiaGen from choiceDiaStyle imp...
kisstherain8677/Image_generate
app.py
app.py
py
19,181
python
en
code
3
github-code
6
[ { "api_name": "toolBar.ToolBar", "line_number": 48, "usage_type": "call" }, { "api_name": "zoomWidget.ZoomWidget", "line_number": 137, "usage_type": "call" }, { "api_name": "Canvas.canvas.Canvas", "line_number": 139, "usage_type": "call" }, { "api_name": "functool...
24916898593
import time from datetime import datetime from bluepy.btle import BTLEDisconnectError from miband import miband from ibmcloudant.cloudant_v1 import CloudantV1 from ibm_cloud_sdk_core.authenticators import IAMAuthenticator from ibmcloudant.cloudant_v1 import CloudantV1, Document import os from dotenv import load_dotenv ...
Rushour0/MSIT-The-New-Normal-Submission
WebVersions/web_v1/cloudant-module.py
cloudant-module.py
py
2,911
python
en
code
1
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 15, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 16, "usage_type": "call" }, { "api_name": "os.getenv", "line_number":...
19218028573
from rest_framework import serializers from api.v1.auth.schemas import LanguageChoiceField, TimeZoneNameChoiceField from users.models import User class CurrentUserOutputSchema(serializers.ModelSerializer): language_code = LanguageChoiceField() time_zone = TimeZoneNameChoiceField() class Meta: mo...
plathanus-tech/django_boilerplate
src/api/v1/users/schemas.py
schemas.py
py
591
python
en
code
2
github-code
6
[ { "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.v1.auth.schemas.LanguageChoiceField", "line_number": 8, "usa...
42156059489
import pytest import responses from repositories.app import APP @pytest.fixture def client(): with APP.test_client() as client: APP.extensions["cache"].clear() yield client @responses.activate def test_get_repo(client): url = f"https://api.github.com/repos/owner/repo" response = { ...
lukaszmenc/get-repository-data
tests/test_app.py
test_app.py
py
1,667
python
en
code
0
github-code
6
[ { "api_name": "repositories.app.APP.test_client", "line_number": 9, "usage_type": "call" }, { "api_name": "repositories.app.APP", "line_number": 9, "usage_type": "name" }, { "api_name": "repositories.app.APP.extensions", "line_number": 10, "usage_type": "attribute" }, ...