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
42800140665
import database import utils from datetime import datetime followup_msg_template = "Hey, it's Noki. If you want an update on {{1}}, please reply with the phrase *{{2}}*" noki_number = '16462170881' def followup(status='active'): result = database.get_valid_followups(status) user_followup_map = {} for ro...
Columbia-DESDR/desdr-survey-tool
followup_job.py
followup_job.py
py
2,196
python
en
code
0
github-code
97
[ { "api_name": "database.get_valid_followups", "line_number": 11, "usage_type": "call" }, { "api_name": "database.get_deployment_by_name", "line_number": 19, "usage_type": "call" }, { "api_name": "utils.send_message", "line_number": 31, "usage_type": "call" }, { "a...
70874956479
import logging import os import boto3 import azure.functions as func def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processing a S123 Submit.') ses_iam_sk = os.environ['ses_iam_sk'] ses_iam_ak = os.environ['ses_iam_ak'] recipients = [''] ...
EsriPS/ArcGIS-Blog-Samples
Integrating Azure Functions with ArcGIS/HTTP Trigger/EmailHTTPTrigger/__init__.py
__init__.py
py
1,421
python
en
code
2
github-code
97
[ { "api_name": "azure.functions.HttpRequest", "line_number": 7, "usage_type": "attribute" }, { "api_name": "azure.functions", "line_number": 7, "usage_type": "name" }, { "api_name": "logging.info", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ...
73459535678
import json import os def load_json(path, default=None): if os.path.exists(path): with open(path, 'r', encoding='utf8') as io: data = json.load(io) else: data = default return data def save_json(path, data): with open(path, 'w', encoding='utf8') as io: json.dump(...
HsOjo/HomeWorkSystem
common.py
common.py
py
360
python
en
code
0
github-code
97
[ { "api_name": "os.path.exists", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 8, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 17,...
14885862797
#------------------------------------------------------------------------------------------------------------------------------------------------------------ # WIECLAW Manon # TP IA # 31.03.2023 #Script permettant de générer un exécutable à partir d'un modèle de régression linéaire. #------------------------------...
ManonWieclaw/IA-SystemesEmbarques
TP1/transpile_simple_linearmodel.py
transpile_simple_linearmodel.py
py
1,916
python
en
code
0
github-code
97
[ { "api_name": "joblib.load", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 55, "usage_type": "call" }, { "api_name": "os.path", "line_number": 55, "usage_type": "attribute" }, { "api_name": "os.remove", "line_number"...
2902483000
def predict(sehir_ad,lat,lon): import requests import pandas as pd from datetime import datetime import calendar import numpy as np import matplotlib.pyplot as plt import seaborn as sns from astral import LocationInfo from astral.location import Location from astropy import coord...
talhauyanik/solar_dash
weather.py
weather.py
py
20,478
python
en
code
0
github-code
97
[ { "api_name": "datetime.datetime.now", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 15, "usage_type": "name" }, { "api_name": "calendar.timegm", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.date...
26318863104
"""Drop tip in place command request, result, and implementation models.""" from __future__ import annotations from pydantic import Field, BaseModel from typing import TYPE_CHECKING, Optional, Type from typing_extensions import Literal from .pipetting_common import PipetteIdMixin from .command import AbstractCommandIm...
Opentrons/opentrons
api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py
drop_tip_in_place.py
py
2,253
python
en
code
363
github-code
97
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 10, "usage_type": "name" }, { "api_name": "typing_extensions.Literal", "line_number": 14, "usage_type": "name" }, { "api_name": "pipetting_common.PipetteIdMixin", "line_number": 17, "usage_type": "name" }, { "ap...
74553705599
from collections import deque def solution(ingredient): q = deque() result = 0 for i in ingredient: q.append(i) if len(q) >= 4: if q[-1] == 1 == q[-4] and q[-2] == 3 and q[-3] == 2: for i in range(4): q.pop() ...
lmj00/programmers
프로그래머스/unrated/133502. 햄버거 만들기/햄버거 만들기.py
햄버거 만들기.py
py
371
python
en
code
0
github-code
97
[ { "api_name": "collections.deque", "line_number": 4, "usage_type": "call" } ]
13289073334
# If An error is raised,,,, then Increase the "sleep time" as the internet speed may be slower enough.... # Importing Important Modules from bs4 import BeautifulSoup as soup from selenium import webdriver import time import requests # creating the instance of web driver & Sending the url request dri...
Raju055/Scrap_Linkedin_connections_email-13-02-2020
linked_in_email_scrap.py
linked_in_email_scrap.py
py
2,525
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 13, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 17, "usage_type": "call" }, { "api_name": "time.sleep", ...
12415307536
import pygame from Konstanten import * # Textobjekt erstellen mit Farbe und Schriftart def text_objects(text, font): text_surface = font.render(text, True, (255, 255, 255)) return text_surface def button(text, x, y, width_btn, height_btn, active_color, inactive_color, screen, action=None): mouse = pyga...
mvtmm/spaceInvaders
Buttons.py
Buttons.py
py
1,111
python
en
code
0
github-code
97
[ { "api_name": "pygame.mouse.get_pos", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.mouse", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pygame.mouse.get_pressed", "line_number": 14, "usage_type": "call" }, { "api_name": "pygam...
23949992649
# -*- coding: utf-8 -*- ''' Color-based object detection in python Created by Maxim Mikhaylov, 2018 ''' import cv2 import numpy as np from coords import toInt, add from sys import argv def pick_color(event,x,y,flags,param): if event == 0: global img print(cv2.cvtColor(img, cv2.COLOR_BGR2HSV)[y][x]) color = cv...
sasha-3/wro-wind
Color_find.py
Color_find.py
py
6,344
python
ru
code
0
github-code
97
[ { "api_name": "cv2.cvtColor", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2HSV", "line_number": 16, "usage_type": "attribute" }, { "api_name": "cv2.cvtColor", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2HSV", ...
24108449704
from django.urls import reverse from django import forms from django.http import HttpResponseRedirect from django.shortcuts import render # Create your views here. # tasks = [] # it will use client side validation, server will no nothing about this, this thing is solely done webpage itself. class NewTaskForm(forms.For...
AnshumanSinghh/Django
website/task/views.py
views.py
py
2,224
python
en
code
0
github-code
97
[ { "api_name": "django.forms.Form", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 9, "usage_type": "name" }, { "api_name": "django.forms.CharField", "line_number": 10, "usage_type": "call" }, { "api_name": "django.forms...
20696625865
import os import sys import numpy as np import pandas as pd from keras.models import load_model sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import embedding import prepare_data import matplotlib.pyplot as plt from matplotlib.pyplot import figure from train_bow import make_matrix import ...
moh833/VQA
Evaluation/evaluate_COCO-QA.py
evaluate_COCO-QA.py
py
2,781
python
en
code
0
github-code
97
[ { "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.dirname", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number...
11022877543
#! /usr/bin/python2 # -*- coding: utf-8; -*- # # (c) 2013 booya (http://booya.at) # # This file is part of the OpenGlider project. # # OpenGlider is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version ...
booya-at/OpenGlider
openglider/lines/elements.py
elements.py
py
13,599
python
en
code
60
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_num...
14950667588
import esper import pygame from code.settings import * from code.timer import * from code.components.deck import * from code.components.map import * from code.components.sprite import * from code.components.ui import * from code.systems.animation import * from code.systems.input import * from code.systems.rendering imp...
sterco-raro/ld51
code/worlds/demo.py
demo.py
py
5,669
python
en
code
0
github-code
97
[ { "api_name": "esper.World", "line_number": 134, "usage_type": "call" }, { "api_name": "pygame.display.get_surface", "line_number": 137, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 137, "usage_type": "attribute" }, { "api_name": "pygame....
72714866238
"""Modifies the formatting of API documentation.""" from typing import Sequence, Tuple, List, Dict, Type, Union, Optional import docutils.nodes import docutils.parsers.rst.states import sphinx.addnodes import sphinx.application import sphinx.domains import sphinx.domains.python import sphinx.ext.napoleon from sphinx.l...
ep-infosec/50_google_tensorstore
docs/tensorstore_sphinx_material/sphinx_material/apidoc_formatting.py
apidoc_formatting.py
py
9,935
python
en
code
0
github-code
97
[ { "api_name": "typing.List", "line_number": 16, "usage_type": "name" }, { "api_name": "docutils.nodes.nodes", "line_number": 16, "usage_type": "attribute" }, { "api_name": "docutils.nodes", "line_number": 16, "usage_type": "name" }, { "api_name": "sphinx.addnodes....
39629989120
from re import S import requests import time from bs4 import BeautifulSoup #using https://www.islamicfinder.org/widgets/#prayertimeswidget Prayer_time_based_on_country_URL = 'https://www.islamicfinder.org/prayer-widget/248946/shafi/4/0/18.5/19.0' while True: html_request = requests.get(Prayer_time_based_on_countr...
DePackage/PrayerWidget
scrapper.py
scrapper.py
py
2,971
python
en
code
0
github-code
97
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 11, "usage_type": "call" }, { "api_name": "re.S", "line_number": 43, "usage_type": "name" }, { "api_name": "time.gmtime", "line_number": ...
41775514332
import re from abc import ABC, abstractclassmethod, abstractmethod from dataclasses import dataclass import numpy as np import requests from at2p_app.domain.common.error import WeatherError from at2p_app.domain.entities.place import Place from at2p_app.domain.value_objects.temperature import Temperature from at2p_app....
cbbowman/a-time-to-plant
at2p/at2p_app/data_source/weather_source.py
weather_source.py
py
2,818
python
en
code
1
github-code
97
[ { "api_name": "abc.ABC", "line_number": 15, "usage_type": "name" }, { "api_name": "at2p_app.domain.entities.place.Place", "line_number": 17, "usage_type": "name" }, { "api_name": "abc.abstractclassmethod", "line_number": 19, "usage_type": "name" }, { "api_name": "...
274183577
import logging from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from starlette.requests import Request from uvicorn import run from config import Config logger = logging.getLogger(__name__) app = FastAPI() app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_me...
SVerstov/gpt_api_repeater
api/main.py
main.py
py
711
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "fastapi.FastAPI", "line_number": 12, "usage_type": "call" }, { "api_name": "starlette.middleware.cors.CORSMiddleware", "line_number": 15, "usage_type": "argument" }, { "ap...
71208300159
from collections import deque def solution(r, o): N = len(r) M = len(r[0]) l = deque([r[i][0] for i in range(N)]) m = deque([deque(r[i][1:M - 1]) for i in range(N)]) rt = deque([r[i][M - 1] for i in range(N)]) for op in o: if op == 'ShiftRow': l.appendleft(l.pop()) ...
d982h8st7/Solving-Algorithm
프로그래머스/lv4/118670. 행렬과 연산/행렬과 연산.py
행렬과 연산.py
py
649
python
en
code
1
github-code
97
[ { "api_name": "collections.deque", "line_number": 6, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 7, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 8, "usage_type": "call" } ]
18357574030
""" Quality Threshold Clustering L. J. Heyer, S. Kruglyak and S. Yooseph, Exploring Expression Data: Identification and Analysis of Coex-pressed Genes Genome Research, Vol. 9, No. 11, 1999, pp. 1106-1115. F. Comitani @2017 """ import numpy as np def qualityThreshold(sample, cutoff=5, PBC=False, netHeight=0, net...
mbenhaddou/lightSOM
lightSOM/clustering/qualityThreshold.py
qualityThreshold.py
py
4,383
python
en
code
3
github-code
97
[ { "api_name": "numpy.min", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 50, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 53, ...
20799001967
from django.conf.urls.defaults import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'MetaMagazine.views.hom...
IvanAlegre/MetaMagazine
urls.py
urls.py
py
1,879
python
en
code
0
github-code
97
[ { "api_name": "django.contrib.admin.autodiscover", "line_number": 6, "usage_type": "call" }, { "api_name": "django.contrib.admin", "line_number": 6, "usage_type": "name" }, { "api_name": "django.conf.urls.defaults.patterns", "line_number": 8, "usage_type": "call" }, {...
17083175766
import numpy as np import tensorflow as tf from keras import backend as K from tqdm import tqdm trained_gan_path = "./../data/model/trained_gan.ckpt.meta" rna_vocab = {"A":0, "C":1, "G":2, "U":3, "*":4} rev_rna_vocab = {v:k for k,v in rna_vocab.items()} ''' load t...
ciceklab/RNAGEN
analysis/generate.py
generate.py
py
1,957
python
en
code
3
github-code
97
[ { "api_name": "keras.backend.get_session", "line_number": 19, "usage_type": "call" }, { "api_name": "keras.backend", "line_number": 19, "usage_type": "name" }, { "api_name": "tensorflow.train.import_meta_graph", "line_number": 20, "usage_type": "call" }, { "api_na...
10655668332
# -*- coding: utf-8 -*- __author__ = 'nothi' from os.path import join from tornado.web import RequestHandler from web.service.book_service import BookService from web.service.comment_service import CommentService from web.settings import * class BookDetailController(RequestHandler): def initialize(self): ...
yzx930420/orcinus_price
web/controller/book_detail_controller.py
book_detail_controller.py
py
1,164
python
en
code
1
github-code
97
[ { "api_name": "tornado.web.RequestHandler", "line_number": 11, "usage_type": "name" }, { "api_name": "web.service.book_service.BookService", "line_number": 13, "usage_type": "call" }, { "api_name": "web.service.comment_service.CommentService", "line_number": 14, "usage_ty...
22440746597
import ipdb import sys, os.path, ast import inspect, typing, pybx import dataclasses, enum class ModuleDef: def __init__(self, name): self.name = name self.interfaces = [] self.structs = {} # struct name -> struct def self.enums = [] self.struct_order = [] # struct names ...
asmirnov69/pybx
src/libpybx-py/pybx_parser.py
pybx_parser.py
py
8,189
python
en
code
0
github-code
97
[ { "api_name": "dataclasses.is_dataclass", "line_number": 57, "usage_type": "call" }, { "api_name": "inspect.isclass", "line_number": 60, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 60, "usage_type": "attribute" }, { "api_name": "inspect.iscla...
44664044441
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tasting', '0006_tastingcategory_singulartitle'), ] operations = [ migrations.AddField( model_name='whisky', ...
aroquemaurel/Cuis-In
cuisin/tasting/migrations/0007_auto_20151228_1114.py
0007_auto_20151228_1114.py
py
634
python
en
code
0
github-code
97
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.AddField", "line_number": 14, "usage_type": "call" }, { ...
38885047502
import flet as ft def main(page: ft.Page): page.theme = ft.Theme(color_scheme_seed=ft.colors.YELLOW) rail = ft.NavigationRail( selected_index=0, label_type=ft.NavigationRailLabelType.ALL, # extended=True, min_width=100, min_extended_width=400, leading=ft.Floatin...
birdcagedout/QRTicket2
NavigationRailTest.py
NavigationRailTest.py
py
1,454
python
en
code
0
github-code
97
[ { "api_name": "flet.Page", "line_number": 3, "usage_type": "attribute" }, { "api_name": "flet.Theme", "line_number": 4, "usage_type": "call" }, { "api_name": "flet.colors", "line_number": 4, "usage_type": "attribute" }, { "api_name": "flet.NavigationRail", "li...
26332622454
"""HTTP request and response models for /health endpoints.""" import typing from pydantic import BaseModel, Field from opentrons_shared_data.deck.dev_types import RobotModel from robot_server.service.json_api import BaseResponseBody class HealthLinks(BaseModel): """Useful server links.""" apiLog: str = Field...
Opentrons/opentrons
robot-server/robot_server/health/models.py
models.py
py
3,663
python
en
code
363
github-code
97
[ { "api_name": "pydantic.BaseModel", "line_number": 8, "usage_type": "name" }, { "api_name": "pydantic.Field", "line_number": 11, "usage_type": "call" }, { "api_name": "pydantic.Field", "line_number": 15, "usage_type": "call" }, { "api_name": "pydantic.Field", ...
14558258422
# -*- coding: utf-8 -*- import sys import xml.etree.ElementTree as ET from lib import SuggestionCompleter, SuggestionNetworkModel from PyQt5.QtCore import Qt, QUrl, QUrlQuery from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply from PyQt5.QtWidgets import QApplication, QLineEdit class SearchSuggestionModel(Su...
eyllanesc/QtExamples
others/customcompleter/google_search.py
google_search.py
py
1,566
python
en
code
50
github-code
97
[ { "api_name": "lib.SuggestionNetworkModel", "line_number": 12, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.QUrl", "line_number": 14, "usage_type": "call" }, { "api_name": "PyQt5.QtCore.QUrlQuery", "line_number": 15, "usage_type": "call" }, { "api_name": "P...
70747684160
import pandas as panda from openpyxl import Workbook from openpyxl.drawing.image import Image import os import shutil import os.path import openpyxl from openpyxl import load_workbook from openpyxl.drawing.image import Image import tkinter as tk from tkinter import filedialog """This program is to pull certain photos...
cihanandac/PhotoCarry
PhotoCarry.py
PhotoCarry.py
py
3,459
python
en
code
0
github-code
97
[ { "api_name": "tkinter.Tk", "line_number": 26, "usage_type": "call" }, { "api_name": "tkinter.filedialog.askdirectory", "line_number": 31, "usage_type": "call" }, { "api_name": "tkinter.filedialog", "line_number": 31, "usage_type": "name" }, { "api_name": "tkinter...
5359682371
import site import sys import os from backend import install as backend_install from setuptools import setup '''Setuptools installer. This script will be called by pip when: - We want to create a distributable (sdist) tar.gz - We want to build the C extension (build and build_ext) - We want to install PyCOMPSs (instal...
bsc-wdc/compss
builders/specs/pip/pyCOMPSsResources/setup.py
setup.py
py
4,859
python
en
code
39
github-code
97
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_number": 2...
71298156800
import sys, os, io, atexit input = lambda: sys.stdin.readline().rstrip('\r\n') stdout = io.BytesIO() sys.stdout.write = lambda s: stdout.write(s.encode("ascii")) atexit.register(lambda: os.write(1, stdout.getvalue())) # 221001 17404 rgb거리 2 # 정답코드 N = int(input()) rgb = [list(map(int, input().split())...
Bluuubery/Problem_Solving
백준/Gold/17404. RGB거리 2/RGB거리 2.py
RGB거리 2.py
py
828
python
en
code
2
github-code
97
[ { "api_name": "sys.stdin.readline", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "io.BytesIO", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.stdout", "line_numb...
34143206926
# 导入手写字体加载器 from sklearn.datasets import load_digits from sklearn.cross_validation import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.svm import LinearSVC from sklearn.metrics import classification_report ''' 博文:http://www.cnblogs.com/Lin-Yi/p/8970520.html 支持向量机 根据训练样本的分布,搜索所有可能的线性分...
linyi0604/MachineLearning
01_监督学习_分类预测/02_(支持向量机分类器)手写数字识别.py
02_(支持向量机分类器)手写数字识别.py
py
2,529
python
zh
code
89
github-code
97
[ { "api_name": "sklearn.datasets.load_digits", "line_number": 22, "usage_type": "call" }, { "api_name": "sklearn.cross_validation.train_test_split", "line_number": 29, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 38, "usage_t...
2884406281
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt import cv2 from dataclasses import dataclass from typing import Any, List @dataclass class Filter: psi: float filter: Any def gabor_patch(size, psi): theta = 0.0 sigma = 4.0 lambd = 31 kern = cv2.getGaborKernel( (size,...
ratheile/fs19-optical-illusions
Experiments/gabor.py
gabor.py
py
945
python
en
code
0
github-code
97
[ { "api_name": "typing.Any", "line_number": 12, "usage_type": "name" }, { "api_name": "dataclasses.dataclass", "line_number": 9, "usage_type": "name" }, { "api_name": "cv2.getGaborKernel", "line_number": 18, "usage_type": "call" }, { "api_name": "cv2.CV_32F", "...
17589732406
#!/usr/bin/python3 """ Export all photos to specified directory using album names as folders If file has been edited, also export the edited version, otherwise, export the original version This will result in duplicate photos if photo is in more than album """ import os.path import pathlib import sys i...
cchanify/pic-reader
exportdir.py
exportdir.py
py
2,402
python
en
code
0
github-code
97
[ { "api_name": "os.path.path.expanduser", "line_number": 31, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 31, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 31, "usage_type": "name" }, { "api_name": "os.path.path.expand...
26685816717
import os from tkinter import * from tkinter import messagebox import tkinter as tk import numpy from tkinter import * import json import asyncio import websockets import threading class WebSocketThread (threading.Thread): global buttons,clicked,count,root '''WebSocketThread will make websocket run in an a ne...
Nickhil1737/project-sudoK
archive/tictaclient.py
tictaclient.py
py
7,482
python
en
code
1
github-code
97
[ { "api_name": "threading.Thread", "line_number": 13, "usage_type": "attribute" }, { "api_name": "threading.Thread.__init__", "line_number": 19, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 19, "usage_type": "attribute" }, { "api_name": ...
8035204790
from absl import app, flags from mlperf_logging import mllog import os flags.DEFINE_multi_float('lr_rates', None, 'lr rates') flags.DEFINE_multi_float('lr_boundaries', None, 'learning rate boundaries') flags.DEFINE_float('l2_strength', None, 'weight decay') f...
mlcommons/training_results_v0.7
Intel/benchmarks/minigo/8-nodes-32s-cpx-tensorflow/parse_flags_train.py
parse_flags_train.py
py
2,155
python
en
code
58
github-code
97
[ { "api_name": "absl.flags.DEFINE_multi_float", "line_number": 5, "usage_type": "call" }, { "api_name": "absl.flags", "line_number": 5, "usage_type": "name" }, { "api_name": "absl.flags.DEFINE_multi_float", "line_number": 7, "usage_type": "call" }, { "api_name": "a...
10904286167
import cv2 vidcap = cv2.VideoCapture('BadApple.mp4') success,image = vidcap.read() count = 0 AsciVid = [] while success: image = cv2.resize(image,(150,50)) chars = [] for i in image: for j in i: if(sum(j)<191): chars.append(' ') elif (sum(j)<382): ...
thesrsakabuvttchi/BadAppleASCII
GetPics.py
GetPics.py
py
713
python
en
code
0
github-code
97
[ { "api_name": "cv2.VideoCapture", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 10, "usage_type": "call" } ]
11605746659
from flask import Flask, request, render_template, jsonify from chatbot.chatbot import get_response, predict_class import json app= Flask(__name__) intents = json.loads(open('Project/chatbot/intents.json').read()) @app.route('/', methods=['GET', 'POST']) def home(): chatbot_response = '' if request.meth...
Ammar-Asim-23/chatbot-python-sayabidevs-week-1
Project/app.py
app.py
py
610
python
en
code
1
github-code
97
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 13, "usage_type": "attribute" }, { "api_name": "flask.request", "l...
37851011421
import json import os import subprocess import multiprocessing from datetime import datetime from multiprocessing import Manager from typing import Dict, Tuple import logging def send_disc(packet, nc_command): echo_command = "echo " + "\"" + packet + "\"" + " | " + nc_command os.system(echo_command) def sen...
sertayy/University_Projects
bogazici/CMPE487 | Applied Computer Networks/NetcatChat/chat.py
chat.py
py
5,432
python
en
code
0
github-code
97
[ { "api_name": "os.system", "line_number": 13, "usage_type": "call" }, { "api_name": "os.system", "line_number": 18, "usage_type": "call" }, { "api_name": "os.system", "line_number": 22, "usage_type": "call" }, { "api_name": "typing.Tuple", "line_number": 25, ...
19694665506
from pathlib import Path from urllib.request import urlopen, Request import click import yaml # Default site configs from GitHub DEFAULT_SITE_CONFIGS = ( "https://raw.githubusercontent.com/EGI-Foundation/fedcloud-catchall-operations/master/sites/100IT.yaml", "https://raw.githubusercontent.com/EGI-Foundation/f...
tdviet/fedcloudclient-old
fedcloudclient/sites.py
sites.py
py
8,262
python
en
code
0
github-code
97
[ { "api_name": "pathlib.Path.home", "line_number": 48, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 48, "usage_type": "name" }, { "api_name": "urllib.request.Request", "line_number": 65, "usage_type": "call" }, { "api_name": "urllib.request....
31798758902
import os import cv2 as cv import json import requests import pandas as pd class BaselineFunctions: @staticmethod def load_all_images_of_folder(folder): images = [] file_names = [] for file_name in os.listdir(folder): img = cv.imread(os.path.join(folder, file_name)) ...
gematik/NfcLocalization-Android
baselineFunctions.py
baselineFunctions.py
py
4,494
python
en
code
1
github-code
97
[ { "api_name": "os.listdir", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, ...
655170964
import spacy import requests def main(): nlp = spacy.load('en_core_web_md') nlp.add_pipe('entityLinker', last=True) #question = input('Please ask a question:\n') parse = nlp("What movie won best picture in the 2020 Academy Awards?") for sent in parse.sents: sent._.linkedEntities.pretty_pri...
ErikbStorm/LangTech
qualifier.py
qualifier.py
py
1,906
python
en
code
0
github-code
97
[ { "api_name": "spacy.load", "line_number": 6, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 27, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 41, "usage_type": "call" } ]
3514522640
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import load_iris iris = load_iris() def short(x): if x < 0.6: return -(x/0.6)+1 else: return 0 def medium(x): if x < 0.6: return x/0.6 else: return (x-1)/(0.6-1) def tall(x): if x > 0.6: ...
LtnPjk/DVA427
Assignment2/main2.py
main2.py
py
1,700
python
en
code
0
github-code
97
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 5, "usage_type": "call" } ]
33065990996
import logging import jsonpickle from core.EmailEnvelope import EmailEnvelope from core.filtering.filters.PastFilter import PastFilter from typing import Sequence class AIFilter(PastFilter): checks: Sequence[str] = ["get_count_urls", "get_count_images", "get_from_return_path", "get_from_reply_to", ...
sing-group/LiSB
core/filtering/filters/AIFilter.py
AIFilter.py
py
2,097
python
en
code
0
github-code
97
[ { "api_name": "core.filtering.filters.PastFilter.PastFilter", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Sequence", "line_number": 9, "usage_type": "name" }, { "api_name": "jsonpickle.decode", "line_number": 27, "usage_type": "call" }, { "api_...
13285057210
import sqlite3 import time import random import json import requests try: import telepot except(ImportError, IOError): print('not found a telegram api - require telepot' + '\n' 'run command: "pip install telepot"') exit('Closing...') token = input('Введите ваш токен ключ: ') """создание шабло...
0xlek/python_telegram_bot
bot.py
bot.py
py
2,615
python
ru
code
0
github-code
97
[ { "api_name": "sqlite3.connect", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 24, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 25, "usage_type": "call" }, { "api_name": "telepot.glance", "line_nu...
27002010074
import unittest import requests from pyapp import data_collection from pyapp import data_obj class TestDatapublish(unittest.TestCase): def setUp(self): # creating fake data node = data_obj.Node() node.course_name = 'test_course' node.node_label = 'test_node_name' node.gpu_ty...
ucsd-ets/GPU_Stats_Collector
tests/test_data_publish.py
test_data_publish.py
py
1,286
python
en
code
0
github-code
97
[ { "api_name": "unittest.TestCase", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pyapp.data_obj.Node", "line_number": 9, "usage_type": "call" }, { "api_name": "pyapp.data_obj", "line_number": 9, "usage_type": "name" }, { "api_name": "pyapp.data_col...
23842502907
from os.path import expanduser import torch from joblib import Memory def torch_cached(func): mem = Memory(expanduser('~/cache')) def cached_func(*args, **kwargs): def false_func(*processed_args, **processed_kwargs): return func(*args, **kwargs) processed_args = [] for ar...
arthurmensch/online_sinkhorn
onlikhorn/cache.py
cache.py
py
755
python
en
code
13
github-code
97
[ { "api_name": "joblib.Memory", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.expanduser", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.Tensor", "line_number": 15, "usage_type": "attribute" }, { "api_name": "torch.Tensor", "...
25315858902
import random import json class car(object): def __init__(self, hp, wd, price, seats, running, dtp, type, v_engine, engine_type, years, fuel_economy, acceleration, top_speed, v_trunk, box): self.hp=hp self.wd=wd self.price=price self.seats=seats sel...
andrey11obuhov/car-buying
car.py
car.py
py
2,364
python
en
code
2
github-code
97
[ { "api_name": "random.randint", "line_number": 32, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 33, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 34, "usage_type": "call" }, { "api_name": "random.randint", "lin...
29155575656
# common import threading # selenium from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from crawler_log import * class Sem(): def __init__(self, num = 2): self.sem = threading.Semaphore(value = num) self.flag = False def init(self, num): ...
HNTMY/cnkiCrawler
src/commontools.py
commontools.py
py
1,631
python
en
code
0
github-code
97
[ { "api_name": "threading.Semaphore", "line_number": 10, "usage_type": "call" }, { "api_name": "threading.Semaphore", "line_number": 14, "usage_type": "call" }, { "api_name": "selenium.webdriver.ChromeOptions", "line_number": 23, "usage_type": "call" }, { "api_name...
24493918718
from __future__ import absolute_import from concurrent import futures import time import json import functools import grpc from coconut import registry from coconut.rpc_server import Runner from coconut.protos.runner import runner_pb2_grpc from coconut.protos.tasks import task_pb2 from coconut.backend import Backend...
importcjj/python-coconut
coconut/coconut.py
coconut.py
py
3,461
python
en
code
0
github-code
97
[ { "api_name": "coconut.utils.get_lan_ip", "line_number": 35, "usage_type": "call" }, { "api_name": "coconut.registry.Consul", "line_number": 41, "usage_type": "call" }, { "api_name": "coconut.registry", "line_number": 41, "usage_type": "name" }, { "api_name": "coc...
72782399038
from anndata import AnnData import numpy as np from gssnng.smoothing import get_smoothing_matrix from scipy import sparse def test_get_smoothing_matrix(): """ assert the the rows of the smoothing matrix are normalized to 1 """ ncells = 4 ngenes = 3 adjacency = np.array([ [0, 0.1, 0, 0]...
IlyaLab/gssnng
gssnng/test/test_smoothing.py
test_smoothing.py
py
1,377
python
en
code
8
github-code
97
[ { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "anndata.AnnData", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random.rand", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random", "lin...
74243646397
from pyspark.sql import SparkSession from datetime import datetime import sys import configparser import pyspark.sql.functions as F from pyspark.sql.types import * import pandas as pd config = configparser.ConfigParser() config.read('/app/mount/parameters.conf') data_lake_name=config.get("general","data_lake_name") da...
pdefusco/CDE119_ACE_WORKSHOP
cde_spark_jobs/05_PySpark_Iceberg_Incremental_Report.py
05_PySpark_Iceberg_Incremental_Report.py
py
5,796
python
en
code
1
github-code
97
[ { "api_name": "configparser.ConfigParser", "line_number": 9, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder.appName", "line_number": 19, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder", "line_number": 19, "usage_type": "at...
11606252376
import numpy as np from scipy import stats import seaborn as sns import statsmodels.stats.api as sms """ Bir fabrikada rassal olarak seçilen 100 ürünün ortalama ağırlığı 1040 gr, std sapması 25 gr olarak bulunmuştur. Bu fabrikada üretilen tüm ürünlerin ortalama oğırlıkları %95 güven ile kaçtır? """ n = 100 ...
htcSnmz/statistics_and_probability
confidence_interval_for_mean.py
confidence_interval_for_mean.py
py
3,292
python
tr
code
0
github-code
97
[ { "api_name": "scipy.stats.norm.interval", "line_number": 15, "usage_type": "call" }, { "api_name": "scipy.stats.norm", "line_number": 15, "usage_type": "attribute" }, { "api_name": "scipy.stats", "line_number": 15, "usage_type": "name" }, { "api_name": "numpy.sqr...
22801564364
from os import path, listdir, pardir from pathlib import Path def table_of_contents(): content = "" for dir in [p for p in listdir() if path.isdir(p) and not p.startswith(".")]: content += f"- [{dir}]({dir})\n" for file in [dir+"/"+p for p in listdir(dir) if p.endswith(".c")]: pdf =...
KrazyManJ/Curriculum-Challenges
README.py
README.py
py
1,153
python
en
code
0
github-code
97
[ { "api_name": "os.listdir", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "name" }, { "api_name": "os.listdir", "line_number": 8, ...
200014853
from lib import util from lib.targetop import TargetOp CS = "CS" SCK = "SCK" SI = "SI" SO = "SO" HOLD = "HOLD" WP = "WP" SIZE = 512 CHUNK = 64 Tcss = Tcsd = 500e-9 Tsu = 50e-9 Thd = 100e-9 Ths = 200e-9 Thi = Tlo = 475e-9 Twc = 5e-3 READ = "0000a011 aaaaaaaa" # iiiiiiii*[0,512] WRITE = "0000a010 aaaaaaaa" # ddddd...
ntki/nops
lib/target/ee25lc040.py
ee25lc040.py
py
3,109
python
en
code
1
github-code
97
[ { "api_name": "lib.util.cmd", "line_number": 51, "usage_type": "call" }, { "api_name": "lib.util", "line_number": 51, "usage_type": "name" }, { "api_name": "lib.util.cmd", "line_number": 74, "usage_type": "call" }, { "api_name": "lib.util", "line_number": 74, ...
21040028658
#!/usr/bin/env python #-*- coding:utf-8 -*- import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.font_manager as fm import matplotlib as mpl mpl.rcParams['axes.unicode_minus'] = False ## 한글 폰트 path = "/home/gsdc/.fonts/NanumGothicCoding.ttf" font_name = fm.FontPropertie...
geonmo/GSDCSchool_XRootD_Scripts
utils/loadOutput.py
loadOutput.py
py
882
python
en
code
3
github-code
97
[ { "api_name": "matplotlib.rcParams", "line_number": 11, "usage_type": "attribute" }, { "api_name": "matplotlib.font_manager.FontProperties", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.font_manager", "line_number": 16, "usage_type": "name" }, ...
29928342798
from urllib.request import urlopen from urllib.error import HTTPError from bs4 import BeautifulSoup def get_title(url): try: html = urlopen(url) except HTTPError as e: print("We can't take a page") return None try: bsObj = BeautifulSoup(html.read(), "html.parser") ...
IrNV/web_scraping
projects from book/base_examples/first scraper.py
first scraper.py
py
598
python
en
code
0
github-code
97
[ { "api_name": "urllib.request.urlopen", "line_number": 8, "usage_type": "call" }, { "api_name": "urllib.error.HTTPError", "line_number": 9, "usage_type": "name" }, { "api_name": "bs4.BeautifulSoup", "line_number": 14, "usage_type": "call" } ]
27438341574
import pygame import events from scores import Scores from hero import Hero from sound import bg_music from pearl import Pearl import background as bg def run(): pygame.init() pygame.display.set_caption("Underwater Adventure") window = pygame.display.set_mode((bg.WIDTH, bg.HEIGHT)) clock = pygame.ti...
YauheniLashko/Hackathon2
main.py
main.py
py
1,333
python
en
code
0
github-code
97
[ { "api_name": "pygame.init", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.display.set_caption", "line_number": 14, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pygame.dis...
36179967276
"""SIMD-oriented Fast Mersenne Twister 19937 Pseudo Random Number Generator""" from __future__ import annotations import numpy as np from ..compilation import ( optional_jitclass, optional_ir_function, array_type, ) from ..options import USE_NUMBA def sfmt_shuffle(state: np.ndarray): """SFMT shufflin...
Lincoln-LM/numba_pokemon_prngs
numba_pokemon_prngs/mersenne_twister/sfmt.py
sfmt.py
py
11,749
python
en
code
0
github-code
97
[ { "api_name": "numpy.ndarray", "line_number": 13, "usage_type": "attribute" }, { "api_name": "options.USE_NUMBA", "line_number": 123, "usage_type": "name" }, { "api_name": "llvmlite.ir.IntType", "line_number": 128, "usage_type": "call" }, { "api_name": "llvmlite.i...
4269164403
import inspect import re from fastapi import FastAPI from fastapi.openapi.utils import get_openapi from fastapi.routing import APIRoute from fastapi_jwt_auth import AuthJWT from starlette.middleware.cors import CORSMiddleware from app.api.api import api_routers from app.config.settings import Settings app = FastAPI(...
AndreyMatyanov/fastapi-social-network
app/main.py
main.py
py
2,236
python
en
code
0
github-code
97
[ { "api_name": "app.api.api", "line_number": 13, "usage_type": "name" }, { "api_name": "fastapi.FastAPI", "line_number": 13, "usage_type": "call" }, { "api_name": "app.api.api.add_middleware", "line_number": 23, "usage_type": "call" }, { "api_name": "starlette.midd...
29101108538
import time import grpc from concurrent import futures import addreply_pb2, addreply_pb2_grpc import comment class addreplyservice(addreply_pb2_grpc.addreplyServicer): def add(self, request, ctx): message = comment.addreply(request.token, request.news_id, request.comment_id, request.content) ...
QHX1998/SE-project-part
评论区接口/addreply_server.py
addreply_server.py
py
794
python
en
code
0
github-code
97
[ { "api_name": "addreply_pb2_grpc.addreplyServicer", "line_number": 7, "usage_type": "attribute" }, { "api_name": "comment.addreply", "line_number": 9, "usage_type": "call" }, { "api_name": "grpc.server", "line_number": 13, "usage_type": "call" }, { "api_name": "co...
28459495200
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Feb 16 09:23:16 2019 @author: rushikeshtapdiya """ from __future__ import print_function import keras from keras.preprocessing.image import ImageDataGenerator from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flat...
rushibot/MachineLearning
untitled4.py
untitled4.py
py
1,385
python
en
code
0
github-code
97
[ { "api_name": "keras.preprocessing.image.ImageDataGenerator", "line_number": 24, "usage_type": "call" } ]
21108852278
import tensorflow as tf from tensorflow import keras import numpy as np import matplotlib.pyplot as plt # import fashion MNIST dataset fashion_mnist = keras.datasets.fashion_mnist (train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data() # Class names class_names = ['T-shirt/top', 'Trouse...
Gracejwu27/Game
Basic_Classification.py
Basic_Classification.py
py
3,925
python
en
code
0
github-code
97
[ { "api_name": "tensorflow.keras.datasets", "line_number": 8, "usage_type": "attribute" }, { "api_name": "tensorflow.keras", "line_number": 8, "usage_type": "name" }, { "api_name": "tensorflow.keras.Sequential", "line_number": 37, "usage_type": "call" }, { "api_nam...
21446339628
import json from logging import getLogger from time import sleep from celery import task, current_task from celery.result import AsyncResult from configobj import ConfigObj from django import template from django.contrib.auth.decorators import login_required from django.db import connection from django.http import Htt...
menkyukaiden/vxstream
streamer/app/views.py
views.py
py
7,156
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 19, "usage_type": "call" }, { "api_name": "django.template.Library", "line_number": 21, "usage_type": "call" }, { "api_name": "django.template", "line_number": 21, "usage_type": "name" }, { "api_name": "django.temp...
32502516781
from collections import Counter grocery_list = [] while True: try: item = input("") grocery_list.append(item.lower()) except EOFError: break # Count the occurences of each item item_counts = Counter(grocery_list) # Sort the items aphabetically and convert them to uppercase sorted_ite...
Eskabore/cs50p-2023
CS50p/week4/grocery/grocery.py
grocery.py
py
517
python
en
code
0
github-code
97
[ { "api_name": "collections.Counter", "line_number": 13, "usage_type": "call" } ]
19638409462
import sqlite3 import json from datetime import datetime from pathlib import Path from pprint import pprint pprint(f"=== Running: 3_insert_db.py ===") # Files sqlite_path = Path("./src/Backend/db.sqlite3") data_file = Path("./src/ETL/data/_data.json") # Load JSON with data_file.open(mode="r+b") as f: data = json....
dejse/dj-unijobs2
src/ETL/3_insert_db.py
3_insert_db.py
py
1,636
python
en
code
0
github-code
97
[ { "api_name": "pprint.pprint", "line_number": 7, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 11, "usage_type": "call" }, { "api_name": "json.load", "line_number":...
38417616962
from celery.decorators import task from celery.utils.log import get_task_logger from time import sleep from apps.authentication.celery.send_mail import send_confirmation_email logger = get_task_logger(__name__) @task(name='send_notification_task') def send_notification_task(user, seconds): is_task_completed = ...
Alymbekov/AvitoKg
apps/authentication/tasks.py
tasks.py
py
570
python
en
code
0
github-code
97
[ { "api_name": "celery.utils.log.get_task_logger", "line_number": 8, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 15, "usage_type": "call" }, { "api_name": "apps.authentication.celery.send_mail.send_confirmation_email", "line_number": 21, "usage_type"...
23634135461
import pygame import random import math from enemy import EnemyClass def show_score(score): font = pygame.font.Font(pygame.font.get_default_font(), 32) scoreX, scoreY = 10, 10 s, rect = text_objects(f"Score : {str(score)}", font, WHITE) screen.blit(s, (scoreX, scoreY)) def show_over(score): over...
anarghya-das/Space-Invader
main.py
main.py
py
10,474
python
en
code
2
github-code
97
[ { "api_name": "pygame.font.Font", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pygame.font.get_default_font", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.fo...
1024284726
import subprocess from contextlib import contextmanager from datetime import datetime try: from itertools import filterfalse except ImportError: from itertools import ifilterfalse as filterfalse import pandas as pd from bokeh.models import ColumnDataSource from bokeh.palettes import Paired from bokeh.plotting...
msalvaris/gpu_monitor
gpumon/file/gpu_logger.py
gpu_logger.py
py
3,706
python
en
code
157
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 21, "usage_type": "name" }, { "api_name": "dateti...
13692624496
import json Inf = float('inf') with open('stationGraph.json', 'r') as f: stationGraph=json.load(f) ''' adj: stationGraph src: startStation dst: finalStation n: total station number dist: distance from startStation to the nowStation ''' def dijstra(srcStation='2737', w_choice=0): distance = {} book ...
shengwenyuan/swymap
algorithms.py
algorithms.py
py
1,313
python
en
code
0
github-code
97
[ { "api_name": "json.load", "line_number": 5, "usage_type": "call" } ]
37888916211
import threading from turbogears import config from turbogears.visit.api import Visit, BaseVisitManager from fedora.client import FasProxyClient from fedora import _, __version__ import logging log = logging.getLogger("turbogears.identity.jsonfasvisit") class JsonFasVisitManager(BaseVisitManager): ''' This...
davidhrbac/cnucnu
fedora/tg/visit/jsonfasvisit2.py
jsonfasvisit2.py
py
4,676
python
en
code
3
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "turbogears.visit.api.BaseVisitManager", "line_number": 13, "usage_type": "name" }, { "api_name": "turbogears.config.get", "line_number": 17, "usage_type": "call" }, { "api...
7863456397
"""Kraken client is a growing client support kraken.com API ## Getting kraken clientn Kraken client is available from `j.clients.kraken` ``` JS-NG> k1 = j.clients.kraken.get("k1") ``` ## Getting a pair price Here we try to get the value...
threefoldtech/js-sdk
jumpscale/clients/kraken/kraken.py
kraken.py
py
2,295
python
en
code
14
github-code
97
[ { "api_name": "jumpscale.clients.base.Base", "line_number": 34, "usage_type": "name" }, { "api_name": "jumpscale.core.base.fields.String", "line_number": 35, "usage_type": "call" }, { "api_name": "jumpscale.core.base.fields", "line_number": 35, "usage_type": "name" }, ...
73354893438
import re, collections from matplotlib import pyplot as plt def get_vocab(filename): """ :param filename: 文件地址,需要切好词,空格隔开 :return: dic :{ 'str str .. </w>' : 频率int } """ vocab = collections.defaultdict(int) class_num_list = [] with open(filename, 'r', encoding='utf-8') as fhand: ...
YiandLi/BPE_split
get_BPE_tgt.py
get_BPE_tgt.py
py
3,912
python
en
code
0
github-code
97
[ { "api_name": "collections.defaultdict", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 20, "usage_type": "call" }, { "api_name": "re.escape", "line_number": 35, "usage_type": "call" }, { "api_name": "re.compile",...
22629947778
from django.urls import path from . import views urlpatterns = [ # See documentation here https://docs.djangoproject.com/en/4.1/topics/http/urls/ # users path('user', views.userRouter, name='createUser'), # POST path('user/<int:id>', views.userRouter, name='userRouter'), # GET, PUT, DEL path('u...
MaxEdwards20/Auto-Shop
backend/DjangoServer/autoshop/urls.py
urls.py
py
2,892
python
en
code
0
github-code
97
[ { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 11, "usage_type": "call" }, { "api_name": "django.urls.path", ...
73939489597
#!/usr/bin/env python3 """The main app. Contains all the stacks.""" # Standard library imports # - # Related third party imports # - # Local application/library specific imports from aws_cdk import core from config import Config from log_group_permissions_demo.log_group_permissions_demo_stack import LogGroupPermissi...
donkersgoed/log_group_permissions_demo
app.py
app.py
py
525
python
en
code
0
github-code
97
[ { "api_name": "config.Config", "line_number": 15, "usage_type": "call" }, { "api_name": "aws_cdk.core.App", "line_number": 17, "usage_type": "call" }, { "api_name": "aws_cdk.core", "line_number": 17, "usage_type": "name" }, { "api_name": "log_group_permissions_dem...
11729268811
from django.shortcuts import render, redirect, get_object_or_404 from django.core.paginator import Paginator from django.http import HttpResponse from django.http import HttpResponseRedirect from fashion.models import FashionPost, FashionComment from .forms import FashionCommentFrom from django.urls import reverse fro...
rafi7050/Online-News-portal
fashion/views.py
views.py
py
4,634
python
en
code
1
github-code
97
[ { "api_name": "fashion.models.FashionPost.objects.filter", "line_number": 18, "usage_type": "call" }, { "api_name": "fashion.models.FashionPost.objects", "line_number": 18, "usage_type": "attribute" }, { "api_name": "fashion.models.FashionPost", "line_number": 18, "usage_...
22034319912
from typing import Optional from reconcile.gql_definitions.common.app_interface_state_settings import ( AppInterfaceStateConfigurationV1, query, ) from reconcile.utils import gql def get_app_interface_state_settings() -> Optional[AppInterfaceStateConfigurationV1]: """Returns App Interface Settings""" ...
app-sre/qontract-reconcile
reconcile/typed_queries/app_interface_state_settings.py
app_interface_state_settings.py
py
479
python
en
code
25
github-code
97
[ { "api_name": "reconcile.utils.gql.get_api", "line_number": 12, "usage_type": "call" }, { "api_name": "reconcile.utils.gql", "line_number": 12, "usage_type": "name" }, { "api_name": "reconcile.gql_definitions.common.app_interface_state_settings.query", "line_number": 13, ...
5496033047
import os import numpy as np import random import torch import torch.nn as nn import torchvision import torchvision.transforms as transforms from torch import optim from torch.autograd import Variable from torch.backends import cudnn from torch.utils import data from ConvNeuralNetModel import ConvNeuralNet data_dir = ...
SavyaSaachiVerma/MP3
OldModels/main_old.py
main_old.py
py
5,047
python
en
code
0
github-code
97
[ { "api_name": "torchvision.transforms.Compose", "line_number": 24, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 24, "usage_type": "name" }, { "api_name": "torchvision.transforms.RandomCrop", "line_number": 25, "usage_type": "call" }, ...
32272718067
import logging import os import random from argparse import ArgumentParser import nltk import numpy as np import torch from helpers import summarize, summarize_text, test_rouge from model import (ALTERNATE_CHECKPOINT_NAME, BERT_BASE_CHECKPOINT_NAME, CHECKPOINT_DIR, ExtSummarizer) nltk.download("pu...
stephanieeechang/tos-summary
src/main.py
main.py
py
6,138
python
en
code
1
github-code
97
[ { "api_name": "nltk.download", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "model.CHECKPOINT_DIR.exists", "line_number": 18, "usage_type": "call" }, { "api_name": "model.CHE...
71974744319
from django.db.models.base import ModelBase from django.db import models from django.conf import settings # This exports model base with overridden Meta class that allows to specify schema and table for MSSQL support # Uses string injection hack as a work-around to enable access to tables under different sch...
cliftontc/django-mssql-schema
MSSQLDatabaseModel.py
MSSQLDatabaseModel.py
py
2,059
python
en
code
0
github-code
97
[ { "api_name": "django.db.models.base.ModelBase", "line_number": 11, "usage_type": "name" }, { "api_name": "django.db.models.Model", "line_number": 56, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 56, "usage_type": "name" } ]
69892773439
import networkx as nx import osmnx as ox import json import numpy as np import math import os from typing import NoReturn ############################################## # utils ############################################## def digit_to_hour_min(number: int, new_start_time: int) -> int: hours = number // 100 ...
johnsonafool/agent-routine
path.py
path.py
py
8,354
python
en
code
0
github-code
97
[ { "api_name": "math.radians", "line_number": 31, "usage_type": "call" }, { "api_name": "math.radians", "line_number": 32, "usage_type": "call" }, { "api_name": "math.radians", "line_number": 33, "usage_type": "call" }, { "api_name": "math.radians", "line_numbe...
21251637471
from collections import deque n = int(input()) road = deque() for i in range(n): details = [int(x) for x in input().split()] road.append(details) for b in range(n): current_fuel = 0 complete_tour = True for detail in road: petrol = detail[0] distance = detail[1] curren...
dandr94/SoftUni-Python
python_tasks/03. Python-Advanced/1.0. List_as_stacks_and_queues/Exer/5. truck_tour.py
5. truck_tour.py
py
559
python
en
code
0
github-code
97
[ { "api_name": "collections.deque", "line_number": 5, "usage_type": "call" } ]
37012282869
#!/usr/bin/env python3 import socket from http.server import BaseHTTPRequestHandler, HTTPServer from time import sleep import threading class Tello: def __init__(self, debug=True): self.INTERVAL = 0.2 self.log = [] self.debug = debug local_ip = "" local_port = 8890 ...
FEUP-ESOF-2020-21/open-cx-t1g3-pantufas
droneyourfood/dyf_server.py
dyf_server.py
py
2,936
python
en
code
1
github-code
97
[ { "api_name": "socket.socket", "line_number": 18, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 18, "usage_type": "attribute" }, { "api_name": "socket.SOCK_DGRAM", "line_number": 18, "usage_type": "attribute" }, { "api_name": "threading.Th...
5317363291
import requests import xmltodict def convert_xml(): r = requests.get('http://www.w3schools.com/xml/cd_catalog.xml') response = xmltodict.parse(r.text) ret = [] for p in response['CATALOG']['CD']: ret.append(p['TITLE']) return ret if __name__ == '__main__': print(convert_xml())
viollarr/cursoaulahu
cursoaulahu/w3c.py
w3c.py
py
314
python
en
code
0
github-code
97
[ { "api_name": "requests.get", "line_number": 6, "usage_type": "call" }, { "api_name": "xmltodict.parse", "line_number": 7, "usage_type": "call" } ]
21550840749
# !usr/bin/python3 # -*- encoding=utf-8 -*- # author: makerchen # time: 2021-04-29 import requests from urllib.parse import urlencode import os from hashlib import md5 # from multiprocessing.pool import Pool def get_page(): headers = { 'Host':'www.toutiao.com', 'referer':'https://www.toutiao.com/search/?keyword...
MakerChen66/Python3Spider
网络爬虫进阶实战/今日头条/toutiao_images_ajax.py
toutiao_images_ajax.py
py
2,568
python
en
code
0
github-code
97
[ { "api_name": "urllib.parse.urlencode", "line_number": 37, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 39, "usage_type": "call" }, { "api_name": "requests.ConnectionError", "line_number": 44, "usage_type": "attribute" }, { "api_name": "os....
42251838049
"""Change Datatype Category Revision ID: 90e2ed2f3f94 Revises: f543a2c9464d Create Date: 2020-10-23 04:12:53.427280 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '90e2ed2f3f94' down_revision = 'f543a2c9464d' branch_labels = None depends_on = None def upgrad...
SharonFaith/one-minute-pitch
migrations/versions/90e2ed2f3f94_change_datatype_category.py
90e2ed2f3f94_change_datatype_category.py
py
824
python
en
code
0
github-code
97
[ { "api_name": "alembic.op.add_column", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.String"...
42370501981
import web import os import tempfile from . import require_login, render, get_session from settings import BASE_DIR UPLOAD_SCRIPT = BASE_DIR + "/load_warehouse_data.py" class BulkUpload: @require_login def GET(self): params = web.input(page=1, ed="", d_id="") edit_val = params.ed sessi...
sekiskylink/llinpro
web/app/controllers/bulkupload_handler.py
bulkupload_handler.py
py
1,425
python
en
code
1
github-code
97
[ { "api_name": "settings.BASE_DIR", "line_number": 6, "usage_type": "name" }, { "api_name": "web.input", "line_number": 12, "usage_type": "call" }, { "api_name": "web.input", "line_number": 22, "usage_type": "call" }, { "api_name": "tempfile.NamedTemporaryFile", ...
2178821973
import yaml """ This file handles the configuration file loading and parsing """ def merge_dicts(main: dict, second: dict): """ Merges two dicts into main Args: main (dict): The target dict second (dict): The dict to be added to main """ for key, value in second.items(): ...
tgauweiler/ace
loader.py
loader.py
py
1,253
python
en
code
0
github-code
97
[ { "api_name": "yaml.load", "line_number": 46, "usage_type": "call" }, { "api_name": "yaml.YAMLError", "line_number": 48, "usage_type": "attribute" } ]
25087157829
import numpy as np import random import regresspy from sklearn import linear_model import time X = np.array([[i] for i in range(-100, 100)]) y = np.array([2*i + 18 + random.uniform(-1, 1) for i in range(-100, 100)]) model = regresspy.LinearRegression(max_iters = 100000, tolerance = 1e-10) sklearn_model = linear_mode...
Arnav-MaIhotra/Linear-Regression
main.py
main.py
py
1,148
python
en
code
0
github-code
97
[ { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 8, "usage_type": "call" }, { "api_name": "random.uniform", "line_number": 8, "usage_type": "call" }, { "api_name": "regresspy.LinearRegression", ...
2934257326
from django.shortcuts import render, get_list_or_404, get_object_or_404 from .forms import RegisterForm from .models import Mobile from .filters import MobileFilter def home(request): queryset = Mobile.objects.all() object_list = queryset context = { "object_list": queryset, "title" : "lis...
rajshiv169/Mobile
src/intern/common/views.py
views.py
py
1,177
python
en
code
0
github-code
97
[ { "api_name": "models.Mobile.objects.all", "line_number": 7, "usage_type": "call" }, { "api_name": "models.Mobile.objects", "line_number": 7, "usage_type": "attribute" }, { "api_name": "models.Mobile", "line_number": 7, "usage_type": "name" }, { "api_name": "djang...
70879482240
#web_get_page3.py #version in rpi4gb #from web_get_page2.py #last modified #5/1/2022 commented line in webpage: Estimated yearly percentage of deaths if the year has this number of deaths every day #10/7/2021 added page states_vaccines_by_Deaths_As_percent_of Population_2019.html #10/5/2021 added vac functions from de...
wildgrok/raspberrypi
web_get_page3.py
web_get_page3.py
py
13,217
python
en
code
0
github-code
97
[ { "api_name": "datetime.date.today", "line_number": 54, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 54, "usage_type": "attribute" }, { "api_name": "datetime.date.today", "line_number": 67, "usage_type": "call" }, { "api_name": "datetime.d...
23753934612
#!/usr/bin/env python # import the necessary packages from __future__ import print_function from std_msgs.msg import String from sensor_msgs.msg import Image from kinect_node.msg import objects_detected from cv_bridge import CvBridge, CvBridgeError import numpy as np import imutils import cv2 import serial import ros...
lkshay/Obstacle-Avoidance-using-LiDAR-and-Kinect
kinect_node/scripts/kinect2.py
kinect2.py
py
4,277
python
en
code
6
github-code
97
[ { "api_name": "numpy.random.uniform", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 26, "usage_type": "attribute" }, { "api_name": "cv2.dnn.readNetFromCaffe", "line_number": 34, "usage_type": "call" }, { "api_name": "cv2.d...
73172053120
import os import copy # External modules # ================ from PyQt5.QtCore import pyqtSignal, pyqtSlot, pyqtProperty from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile # DICE modules # ============ from core.foamapp import FoamApp from core.dice.vis import STLLoader, FoamMeshLoader from core....
fbob/dice-dev
apps/OpenFOAM_230/Preprocessing/cfMesh/app.py
app.py
py
12,319
python
en
code
4
github-code
97
[ { "api_name": "core.foamapp.FoamApp", "line_number": 23, "usage_type": "name" }, { "api_name": "modules.surfaceGenerateBoundingBox.SurfaceGenerateBoundingBox", "line_number": 23, "usage_type": "name" }, { "api_name": "modules.object_refinements.ObjectRefinements", "line_numbe...
73860449600
# This is the new version from April 30th import pygame as pg import sys from level import Level from button import Button # initial set-up pg.init() pg.display.set_caption('Farming Tales') clock = pg.time.Clock() screen = pg.display.set_mode((1300,800)) level = Level() # Game loop run = True wh...
amisha1816/Semester-Capstone-Project
main.py
main.py
py
851
python
en
code
0
github-code
97
[ { "api_name": "pygame.init", "line_number": 10, "usage_type": "call" }, { "api_name": "pygame.display.set_caption", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pygame.tim...
15078090199
import os import logging import requests import vk_api from urllib.parse import urljoin from telegram import Update from telegram.ext import Updater, CommandHandler, CallbackContext PORT = int(os.environ.get("PORT", 5000)) TOKEN = os.environ["TOKEN"] NAME = os.environ["NAME"] VK_USERNAME = os.environ["VK_USERNAME"] ...
JunkieStyle/telestyle_bot
main.py
main.py
py
2,492
python
en
code
2
github-code
97
[ { "api_name": "os.environ.get", "line_number": 11, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.environ", "line...
1744798538
import os from flask import Flask, request, render_template, redirect from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy_cockroachdb import run_transaction from sqlalchemy.orm.exc import NoResultFound from markupsafe import Markup from flask_pagedown import PageDown import ma...
VineethRaghavan/rekt
main.py
main.py
py
3,371
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 18, "usage_type": "call" }, { "api_name": "flask_pagedown.PageDown", "line_number": 19, "usage_type": "call" }, { "api_name": "flask_limiter.Limiter", "line_number": 20, "usage_type": "call" }, { "api_name": "flask_limit...
20897321386
from django.test import Client, TestCase from django.urls import reverse from posts.constans import POSTS_ON_PAGE from posts.models import Group, Post, User # Persistent url INDEX_URL = reverse('index') GROUP_SLUG = 'test_group' AUTHOR_USERNAME = 'test_user' # url dependent on constant test data GROUP_URL = reverse(...
RomanK74/hw05_final
posts/tests/test_paginator.py
test_paginator.py
py
1,697
python
en
code
0
github-code
97
[ { "api_name": "django.urls.reverse", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.reverse", "line_number": 13, "usage_type": "call" }, { "api_name": "django.urls.reverse", "line_number": 15, "usage_type": "call" }, { "api_name": "django.tes...
716344205
from collections import namedtuple import pytest from django.test import override_settings from django.views import View from shared.common.views import MockEnabledProxyView class MockRequest: def __init__(self, method): self.method = method ViewCallInfo = namedtuple( "ViewCallInfo", ["class_name"...
City-of-Helsinki/yjdh
backend/shared/shared/common/tests/test_mock_enabled_proxy_view.py
test_mock_enabled_proxy_view.py
py
9,273
python
en
code
7
github-code
97
[ { "api_name": "collections.namedtuple", "line_number": 15, "usage_type": "call" }, { "api_name": "django.views.View", "line_number": 20, "usage_type": "name" }, { "api_name": "shared.common.views.MockEnabledProxyView", "line_number": 53, "usage_type": "call" }, { ...
7919093635
# Day 19: 30 days of python programming # importing required libraries import re, json, csv '''Write a function which count number of lines and number of words in a text. All the files are in the data folder: a) Read obama_speech.txt file and count number of lines and words b) Read michelle_obama_speech.txt file an...
lukmanaj/30DaysOfPython
day_019_File_handling/file_handling_day_19_exercises.py
file_handling_day_19_exercises.py
py
10,097
python
en
code
0
github-code
97
[ { "api_name": "re.sub", "line_number": 19, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 56, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 104, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 128, ...
11350393073
import os, re, sys, time, errno, configparser import cv2 def save_all_frames(video_path, dir_path, basename, ext='png'): cap = cv2.VideoCapture(video_path) if not cap.isOpened(): return os.makedirs(dir_path, exist_ok=True) base_path = os.path.join(dir_path, basename) digit = len(str(int(c...
VoyagerYoshida/Scraping
convert_video_to_frames.py
convert_video_to_frames.py
py
1,138
python
en
code
0
github-code
97
[ { "api_name": "cv2.VideoCapture", "line_number": 6, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number":...