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
73921921384
import pandas as pd import sys, os, MySQLdb import pandas as pd import numpy as np from collections import defaultdict import click db = MySQLdb.connect(host="localhost", user=os.environ["DATAVIVA2_DB_USER"], passwd=os.environ["DATAVIVA2_DB_PW"], db=os.environ["DATAVI...
vamsijkrishna/dataviva-scripts
scripts/rais_new/helpers/csv2hdf.py
csv2hdf.py
py
3,228
python
en
code
0
github-code
36
[ { "api_name": "MySQLdb.connect", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.environ", "line_...
3592670664
from fastapi import APIRouter, Depends, HTTPException from sqlalchemy.orm import Session from typing import List from db.database import get_db from security.auth import oauth2_scheme, get_current_user from . import schemas, crud router = APIRouter() @router.post("/news/add") async def add_new(title: str, desc: st...
ostrekodowanie/Synapsis
backend/api/news/routes.py
routes.py
py
1,024
python
en
code
0
github-code
36
[ { "api_name": "fastapi.APIRouter", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 14, "usage_type": "name" }, { "api_name": "fastapi.Depends", "line_number": 14, "usage_type": "call" }, { "api_name": "db.database....
35919708000
import difflib import redis from pymongo import MongoClient client = MongoClient('mongodb+srv://Alex:goit123@utcluster.zrkwr.mongodb.net/myFirstDatabase?retryWrites=true&w=majority') def add(): name = input('Enter name: ') if db.ContactBook.find_one({'name': name}): print(f"The record with name '{na...
AlexUtchenko/goit-python
WEB10/PA_Mongo_Redis_Nodic.py
PA_Mongo_Redis_Nodic.py
py
4,975
python
en
code
0
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 6, "usage_type": "call" }, { "api_name": "redis.StrictRedis", "line_number": 67, "usage_type": "call" }, { "api_name": "difflib.get_close_matches", "line_number": 81, "usage_type": "call" }, { "api_name": "redis....
37630155256
#!/usr/bin/env python from net import * import csv import cv2 from cv_bridge import CvBridge, CvBridgeError import os import numpy as np from PIL import Image import tensorflow as tf from skimage import color import time import rospy from cone_detection.msg import Label #Init ros. rospy.init_node('local_network_test...
ProjectARCConeDetection/cone_detection
neural_net/local_network_test.py
local_network_test.py
py
3,822
python
en
code
1
github-code
36
[ { "api_name": "rospy.init_node", "line_number": 18, "usage_type": "call" }, { "api_name": "rospy.get_param", "line_number": 20, "usage_type": "call" }, { "api_name": "rospy.get_param", "line_number": 21, "usage_type": "call" }, { "api_name": "rospy.get_param", ...
39453776358
from functools import reduce class Solution: def multiply(self, num1: str, num2: str) -> str: sumList = [] i = 0 for a in num1[::-1]: inta = int(a) snum = 0 tempSingleList = [] for b in num2[::-1]: intb = int(b) ...
haodongxi/leetCode
43.py
43.py
py
1,429
python
en
code
0
github-code
36
[ { "api_name": "functools.reduce", "line_number": 22, "usage_type": "call" } ]
44217228363
""" @author: Miguel Taibo Martínez Date: Nov 2021 """ import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import gpflow import pandas as pd import sobol_seq from gpflow.utilities import print_summary from frontutils import get_pareto_undominated_by class frontGP(object): def __init__(se...
MiguelTaibo/DashboardMOO
streamlit-front/frontGP.py
frontGP.py
py
8,161
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.append", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.append", "line_number"...
4224070148
import os import argparse import gzip import sys import time import numpy as np from multiprocessing import Pool from contextlib import closing import csv import tensorflow as tf from six.moves import urllib bin_freq = 23 spect_width = bin_freq # Don't add one pixel of zeros on either side of the image window_size = ...
KaranKash/DigitSpeak
untrained/load_data.py
load_data.py
py
5,542
python
en
code
2
github-code
36
[ { "api_name": "tensorflow.gfile.Exists", "line_number": 37, "usage_type": "call" }, { "api_name": "tensorflow.gfile", "line_number": 37, "usage_type": "attribute" }, { "api_name": "tensorflow.gfile.MakeDirs", "line_number": 38, "usage_type": "call" }, { "api_name"...
3826160034
"""empty message Revision ID: 14c462e99a28 Revises: 630e94f464d4 Create Date: 2021-09-16 16:48:21.728550 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '14c462e99a28' down_revision = '630e94f464d4' branch_labels = None depends_on = None def upgrade(): # ...
knedgen/flaskwebsiteproject
migrations/versions/14c462e99a28_.py
14c462e99a28_.py
py
649
python
en
code
0
github-code
36
[ { "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.Text", ...
19102436100
# _*_ coding: utf-8 _*_ from pycse import regress import numpy as np time=np.array([0.0,50.0,100.0,150.0,200.0,250.0,300.0]) Ca=np.array([50.0,38.0,30.6,25.6,22.2,19.5,17.4])*1e-3 T=np.column_stack([time**0,time,time**2,time**3,time**4]) alpha=0.05 p,pint,se=regress(T,Ca,alpha) print(pint) # new one ...
ruanyangry/pycse-data_analysis-code
PYSCE-code/58.py
58.py
py
1,483
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.column_stack", "line_number": 9, "usage_type": "call" }, { "api_name": "pycse.regress", "line_num...
37084706650
import asyncio import aiohttp from aiohttp import ClientSession from utils import page_status import time from selenium import webdriver from selenium.webdriver.chrome.service import Service from fake_useragent import UserAgent from selenium.webdriver.common.by import By class PriseParser: ATB_regular_divclass = ...
Sautenko-Andrey/OOP-and-other
selenium_python/chrome_driver/simple_try.py
simple_try.py
py
2,459
python
en
code
0
github-code
36
[ { "api_name": "selenium.webdriver.ChromeOptions", "line_number": 19, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 19, "usage_type": "name" }, { "api_name": "fake_useragent.UserAgent", "line_number": 20, "usage_type": "call" }, { "api_...
33227873422
import urllib.request import sys import time from os import path from os import popen import argparse def arguments(): """Parse the arguments.""" parser = argparse.ArgumentParser() parser.add_argument('URL', help="URL of the file", default=None, type=str) parser.add_argument('...
TrendingTechnology/QuickWall
QuickWall/download.py
download.py
py
4,652
python
en
code
null
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "os.popen", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 70, "usage_type": "call" }, { "api_name": "os.path", "line_nu...
37000566143
from itertools import product from messenger import * def _write_matrix(builder, matrix): # Write as column major for col, row in product(range(4), range(4)): # Float here since ShuffleLog stores matrices as float builder.add_float(matrix[row][col]) class ShuffleLogAPI: _MSG_QUERY_ENVIRONM...
recordrobotics/Jetson2023
borrowed/TagTracker-master/src/shufflelog_api.py
shufflelog_api.py
py
2,316
python
en
code
0
github-code
36
[ { "api_name": "itertools.product", "line_number": 6, "usage_type": "call" } ]
26164662406
import lpips import numpy import torch import json from skimage.metrics import structural_similarity as ssim class ImageMetrics: @staticmethod def __l2__metric__tensor(first_image: torch.Tensor, second_image: torch.Tensor, range=255.): return ImageMetrics.__l2_metric__numpy(first_image.numpy(), second_...
dinogrgic1/real-time-video-upscale-master-thesis
models/ImageMetrics.py
ImageMetrics.py
py
4,275
python
en
code
0
github-code
36
[ { "api_name": "torch.Tensor", "line_number": 9, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "line_number": 13, "usage_type": "attribute" }, { "api_name": "lpips.l2", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.ndarray", "lin...
3801917693
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from collections import namedtuple import inspect ControllableAttributeConfig = namedtuple("ControllableAttributeConfig", "driven_attribute ignored_attributes facemodel_param_name facemodel_param_value facemodel_param_value_other") class ...
microsoft/ConfigNet
confignet/metrics/controllability_metric_configs.py
controllability_metric_configs.py
py
4,045
python
en
code
104
github-code
36
[ { "api_name": "collections.namedtuple", "line_number": 6, "usage_type": "call" }, { "api_name": "inspect.getmembers", "line_number": 11, "usage_type": "call" }, { "api_name": "inspect.isroutine", "line_number": 11, "usage_type": "call" } ]
27596382692
import matplotlib.pyplot as plot import gradientDescent as gd import loadData as data import numpy as np def plotConvergence(J_history): plot.figure() plot.plot(range(len(J_history)), J_history, 'bo') plot.title(r'Convergence of J($\theta$)') plot.xlabel('Number of iterations') plot.ylabel(r'J($\th...
mirfanmcs/Machine-Learning
Supervised Learning/Linear Regression/Linear Regression with One Variable/Python/plotConvergence.py
plotConvergence.py
py
578
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 8, "usage_type": "call" }, { "api_name": "matplo...
75143366504
import cv2 from model import FacialKeypointModel import numpy as np import pandas as pd from matplotlib.patches import Circle facec = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') model = FacialKeypointModel("KeyPointDetector.json", "weights.hdf5") font = cv2.FONT_HERSHEY_SIMPLEX class VideoCamera(obje...
kartikprabhu20/FacialKeypoints
.ipynb_checkpoints/camera-checkpoint.py
camera-checkpoint.py
py
1,990
python
en
code
0
github-code
36
[ { "api_name": "cv2.CascadeClassifier", "line_number": 7, "usage_type": "call" }, { "api_name": "model.FacialKeypointModel", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.FONT_HERSHEY_SIMPLEX", "line_number": 9, "usage_type": "attribute" }, { "api_na...
39114860473
""" The basic framework of the Iterative Closest Points Matching is provided by Albert-Ludwigs-Universität Freiburg, the course Introduction to Mobile Robotics (engl.) - Autonomous Mobile Systems Lecturer: Prof. Dr. Wolfram Burgard, Dr. Michael Tangermann, Dr. Daniel Büscher, Lukas Luft Co-organizers: Marina Kollmitz, ...
SiweiGong/mobile_robot_framework
icp_matching.py
icp_matching.py
py
4,026
python
en
code
1
github-code
36
[ { "api_name": "matplotlib.pyplot.cla", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 13, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.scatter", "line_number": 14, "usage_type": "call" }, { "api_name": "mat...
12134276149
import logging from rest_framework import viewsets, mixins, serializers, generics from apps.proceso.models.forms.campo import Campo from .campo_validation_view import CampoValidationSerializer from .validation_view import ValidationSerializer log = logging.getLogger(__name__) class CampoSerializer(serializers.ModelS...
vitmaraliaga/TesisDgiService
apis/proceso_api/viewsets/forms/campo_view.py
campo_view.py
py
1,852
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 10, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 10, "usage_type": "name" }...
21172342682
from __future__ import absolute_import import json from keshihua.celery import app from datetime import datetime from demo.pachong import new_job from demo.graph import avg_salary,lan_fre,bar_job,job_cate,jieba_count # 数据更新 @app.task def start_get_data(): print('正在获取并更新数据...') count=new_job() print('处理专业薪...
junhqin/SH-Internship-KSH
CeleryTask/task.py
task.py
py
1,085
python
en
code
1
github-code
36
[ { "api_name": "demo.pachong.new_job", "line_number": 12, "usage_type": "call" }, { "api_name": "demo.graph.avg_salary", "line_number": 14, "usage_type": "call" }, { "api_name": "demo.graph.lan_fre", "line_number": 16, "usage_type": "call" }, { "api_name": "demo.gr...
1021808135
import cv2 import numpy as np import os import pyrealsense2 as rs # Ім'я каталогу, в якому будуть зберігатися зображення save_dir = "path/to/save/directory" # Ініціалізація камери pipeline = rs.pipeline() config = rs.config() config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30) config.enable_stream(rs....
Roman212Koval/Dual-channel_CNN
make_dataset.py
make_dataset.py
py
1,838
python
uk
code
1
github-code
36
[ { "api_name": "pyrealsense2.pipeline", "line_number": 10, "usage_type": "call" }, { "api_name": "pyrealsense2.config", "line_number": 11, "usage_type": "call" }, { "api_name": "pyrealsense2.stream", "line_number": 12, "usage_type": "attribute" }, { "api_name": "py...
36121022223
import os from pathlib import Path from forte.data.base_pack import PackType from forte.evaluation.base import Evaluator from forte.data.extractor.utils import bio_tagging from ft.onto.base_ontology import Sentence, Token, EntityMention def _post_edit(element): if element[0] is None: return "O" return...
asyml/forte
examples/tagging/evaluator.py
evaluator.py
py
3,552
python
en
code
230
github-code
36
[ { "api_name": "forte.data.extractor.utils.bio_tagging", "line_number": 18, "usage_type": "call" }, { "api_name": "forte.evaluation.base.Evaluator", "line_number": 46, "usage_type": "name" }, { "api_name": "forte.data.base_pack.PackType", "line_number": 56, "usage_type": "...
19139046842
import sys import pathlib # base.pyのあるディレクトリの絶対パスを取得 current_dir = pathlib.Path(__file__).resolve().parent # モジュールのあるパスを追加 sys.path.append(str(current_dir) + "/../") import pandas as pd import numpy as np from mylib.address import Address from mylib.mypandas import MyPandas as mp import pandas as pd import time ...
sunajpdev/estates_appsheet
tool/estate_csv_setting.py
estate_csv_setting.py
py
1,145
python
en
code
0
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_n...
5780964210
from pygame import Surface, image, mixer import os from engine.common.validated import ValidatedDict from engine.common.constants import LogConstants from engine.common.logger import LogManager class AssetManager: ''' Asset loaders, renderers, transformers and more! ''' asset_prefix = "./engine/assets...
Based-Games/BasedEngine
engine/common/asset.py
asset.py
py
2,000
python
en
code
0
github-code
36
[ { "api_name": "engine.common.validated.ValidatedDict", "line_number": 14, "usage_type": "name" }, { "api_name": "engine.common.logger.LogManager", "line_number": 14, "usage_type": "name" }, { "api_name": "os.path.exists", "line_number": 29, "usage_type": "call" }, { ...
73037188583
# example URL(postgres): postgresql://username:password@host:port/database_name (postgresql://postgres:postgres@localhost:5432/mydatabase) import pandas as pd import json import sqlalchemy as sql from sqlalchemy import create_engine from sqlalchemy_utils import create_database, database_exists class DatabaseHandler: ...
Christian125px/team_project2
src/database_handler.py
database_handler.py
py
3,270
python
en
code
0
github-code
36
[ { "api_name": "sqlalchemy.create_engine", "line_number": 27, "usage_type": "call" }, { "api_name": "sqlalchemy_utils.database_exists", "line_number": 28, "usage_type": "call" }, { "api_name": "sqlalchemy_utils.create_database", "line_number": 29, "usage_type": "call" },...
9571125723
#!/usr/bin/env python import os, subprocess, sys, pwd, grp, stat import socket, requests, json, yaml, time, logging, re, argparse import paramiko from pprint import pprint _api = 'https://foobar.ru/api/' user, group = pwd.getpwuid(os.getuid()).pw_name, grp.getgrgid(pwd.getpwuid(os.getuid()).pw_gid).gr_name def get_h...
ttymonkey/python
file_sync/sync.py
sync.py
py
7,025
python
en
code
0
github-code
36
[ { "api_name": "pwd.getpwuid", "line_number": 9, "usage_type": "call" }, { "api_name": "os.getuid", "line_number": 9, "usage_type": "call" }, { "api_name": "grp.getgrgid", "line_number": 9, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 14, ...
13617657820
import unittest from datetime import datetime from pathlib import Path from we1s_chomp import db, model class TestModel(unittest.TestCase): def setUp(self): self.dirpath = Path("test/data") def test_source(self): # Create source. source = model.Source( name="we1s", ...
seangilleran/we1s_chomp
test/test_model.py
test_model.py
py
3,618
python
en
code
1
github-code
36
[ { "api_name": "unittest.TestCase", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "we1s_chomp.model.Source", "line_number": 15, "usage_type": "call" }, { "api_name": "we1s_chomp...
37683812851
from django.conf.urls import url, include from .views import TopicDetailView, QuestionDetailView, TopicListView urlpatterns = [ url(r'^$', TopicListView.as_view(), name='topic-list'), url(r'^(?P<pk>\d+)/', include([ url('^$', TopicDetailView.as_view(), name='topic-detail'), url(r'^question-(?P...
unixander/TestsApp
apps/questions/urls.py
urls.py
py
401
python
en
code
0
github-code
36
[ { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "views.TopicListView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "views.TopicListView", "line_number": 6, "usage_type": "name" }, { "api_name": "dja...
42939386801
import os.path as osp import numpy as np import torch import torch.utils.data as Data from PIL import Image __all__ = ['CUB_200_2011'] class CUB_200_2011(Data.Dataset): def __init__(self, root_dir, phase='train', transform=None): super(CUB_200_2011, self).__init__() assert phase in ('train', 'va...
SmallHedgehog/ZeroShotLearning
dataset/CUB_200_2011.py
CUB_200_2011.py
py
3,311
python
en
code
2
github-code
36
[ { "api_name": "torch.utils.data.Dataset", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.utils.data", "line_number": 11, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path",...
12027951137
from solid import ( part, sphere, cube, translate, hull, ) from solid.utils import right from utils import render_to_openscad def main(): # -> Example 1 ex1 = part() ex1.add(translate((0, 0, 0))( cube((5, 5, 5), center=False) )) ex1.add(translate((0, 10, 0))( c...
cr8ivecodesmith/py3dp_book
solid_/hull_.py
hull_.py
py
1,566
python
en
code
4
github-code
36
[ { "api_name": "solid.part", "line_number": 15, "usage_type": "call" }, { "api_name": "solid.translate", "line_number": 16, "usage_type": "call" }, { "api_name": "solid.cube", "line_number": 17, "usage_type": "call" }, { "api_name": "solid.translate", "line_num...
24327828185
import os, socket from time import time import numpy as np import tensorflow as tf tf_float_prec = tf.float64 from pdb import set_trace as st #from keras import backend as K from keras.layers.core import Dense, Activation, Dropout from keras.layers.recurrent import LSTM as LSTM_LAYER #from keras.models import Sequenti...
mattweiss/public
deeplearning/networks/lstm_tf.py
lstm_tf.py
py
11,298
python
en
code
0
github-code
36
[ { "api_name": "tensorflow.float64", "line_number": 5, "usage_type": "attribute" }, { "api_name": "socket.gethostname", "line_number": 19, "usage_type": "call" }, { "api_name": "matplotlib.use", "line_number": 27, "usage_type": "call" }, { "api_name": "dovebirdia.d...
21142071947
from torch_geometric.nn.conv import MessagePassing from torch_geometric.nn.dense.linear import Linear from torch_geometric.typing import Adj, OptPairTensor, OptTensor, Size from torch_geometric.utils.repeat import repeat import torch from torch_sparse import SparseTensor from torch import Tensor, nn from torch.nn impor...
wi-re/spheric_density_demo
rbfConv.py
rbfConv.py
py
24,177
python
en
code
2
github-code
36
[ { "api_name": "typing.Any", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 18, "usage_type": "argument" }, { "api_name": "math.sqrt", "line_number": 19, "usage_type": "call" }, { "api_name": "typing.Any", "line_number":...
37215946531
from django.core.management.base import BaseCommand from academ.models import Apartment, Building, ImageGallery import json import os from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile def check_apartment(building): """ Проверка на наличие квартир в базе. Если к...
pepegaFace/freedom
freedom/academ/management/commands/content_generator.py
content_generator.py
py
4,319
python
en
code
1
github-code
36
[ { "api_name": "academ.models.Apartment.objects.filter", "line_number": 17, "usage_type": "call" }, { "api_name": "academ.models.Apartment.objects", "line_number": 17, "usage_type": "attribute" }, { "api_name": "academ.models.Apartment", "line_number": 17, "usage_type": "n...
21167613561
from application import app from flask import render_template from application.models import * from flask_restplus import Api, Resource, fields from flask.ext.restplus.reqparse import RequestParser from flask.ext.restplus.inputs import date api = Api(app, version='1.0', title='ElesVotam API') ns = api.namespace('elesv...
okfn-brasil/elesvotam
application/manager.py
manager.py
py
4,853
python
pt
code
0
github-code
36
[ { "api_name": "flask_restplus.Api", "line_number": 8, "usage_type": "call" }, { "api_name": "application.app", "line_number": 8, "usage_type": "argument" }, { "api_name": "flask.ext.restplus.reqparse.RequestParser", "line_number": 11, "usage_type": "call" }, { "ap...
5743766982
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer class Vader: def __init__(self): self.analyzer = SentimentIntensityAnalyzer() def AnalyzeSentence(self, sentence): vs = self.analyzer.polarity_scores(sentence) if(vs['compound'] >= 0):#.05): return 1 ...
rafaatsouza/ufmg-practical-assignments
natural-language-processing/final-assignment/source/Vader.py
Vader.py
py
781
python
en
code
1
github-code
36
[ { "api_name": "vaderSentiment.vaderSentiment.SentimentIntensityAnalyzer", "line_number": 5, "usage_type": "call" } ]
40152772858
"""Display a rotomap.""" import enum import functools import sys import cv2 import numpy import mel.lib.common import mel.lib.fullscreenui import mel.lib.image import mel.rotomap.detectmoles import mel.rotomap.mask import mel.rotomap.moles import mel.rotomap.tricolour DEFAULT_MASKER_RADIUS = 200 _WHITE = (255, 255...
aevri/mel
mel/rotomap/display.py
display.py
py
24,857
python
en
code
8
github-code
36
[ { "api_name": "cv2.circle", "line_number": 26, "usage_type": "call" }, { "api_name": "cv2.rectangle", "line_number": 41, "usage_type": "call" }, { "api_name": "cv2.line", "line_number": 59, "usage_type": "call" }, { "api_name": "mel.lib.common.lib", "line_numb...
13989773677
# -*- coding: utf-8 -*- import time import numpy from ntplib import NTPClient from .base import Utils, MultiTasks from .task import IntervalTask from .future import ThreadPool from hagworm.extend.error import NTPCalibrateError from hagworm.extend.interface import TaskInterface class _Interface(TaskInterface): ...
wsb310/hagworm
hagworm/extend/asyncio/ntp.py
ntp.py
py
4,131
python
en
code
13
github-code
36
[ { "api_name": "hagworm.extend.interface.TaskInterface", "line_number": 16, "usage_type": "name" }, { "api_name": "ntplib.NTPClient", "line_number": 65, "usage_type": "call" }, { "api_name": "future.ThreadPool", "line_number": 68, "usage_type": "call" }, { "api_nam...
17041944520
import numpy as np import typing import random import string import os import pickle import inspect import time # time stamp + line numbers def write_log(file, timestamp, function_name, input_ids=[], output_ids=[], frame=None, args=None): # if function_name == '__getitem__': # handle edge case # return ...
j2zhao/DSClean
ds_clean/logged_array.py
logged_array.py
py
11,555
python
en
code
0
github-code
36
[ { "api_name": "inspect.stack", "line_number": 18, "usage_type": "call" }, { "api_name": "inspect.getframeinfo", "line_number": 20, "usage_type": "call" }, { "api_name": "random.SystemRandom", "line_number": 52, "usage_type": "call" }, { "api_name": "string.ascii_l...
19102323120
# _*_ coding: utf-8 _*_ import numpy as np n1=30 #students in class A x1=78.0 #average grade in class A s1=10.0 #std dev of exam grade in class A n2=25 #students in class B x2=85.0 #average grade in class B s2=15.0 #std dev of exam grade in class B # the standard ...
ruanyangry/pycse-data_analysis-code
PYSCE-code/40.py
40.py
py
851
python
en
code
0
github-code
36
[ { "api_name": "numpy.sqrt", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.abs", "line_number": 25, "usage_type": "call" }, { "api_name": "scipy.stats.distributions.t.ppf", "line_number": 35, "usage_type": "call" }, { "api_name": "scipy.stats.dist...
72694605863
import requests from datetime import datetime from helpers.db import ExchangeRateDb class RetrieveHourlyCryptoToUSDData: def __init__(self): self.db_path = 'helpers/cryptocurrency_exchange_rate.db' self.db = ExchangeRateDb(self.db_path) self.currency = None def insert_data_...
madeleinema-cee/walletwatch_python_backend
update/generic_retrieve_exchange_rate_class.py
generic_retrieve_exchange_rate_class.py
py
635
python
en
code
0
github-code
36
[ { "api_name": "helpers.db.ExchangeRateDb", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 13, "usage_type": "name" } ]
9367032792
import time import argparse import numpy as np import torch from deeprobust.graph.defense import GCN, ProGNN from deeprobust.graph.data import Dataset, PrePtbDataset from deeprobust.graph.utils import preprocess, encode_onehot, get_train_val_test # Training settings parser = argparse.ArgumentParser() parser.add_argume...
ChandlerBang/Pro-GNN
save_splits.py
save_splits.py
py
3,762
python
en
code
249
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 44, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 44, "usage_type": "attribute" }, { "api_name": "torch...
70040826024
from django.db import models class IterFieldsValuesModel(models.Model): def __iter__(self): for field_name in self._meta.fields: value = getattr(self, field_name.name) yield (field_name.name, value) class Meta: abstract = True
luke9642/Poll
questionnaire/models/iter_fields_values_model.py
iter_fields_values_model.py
py
289
python
en
code
0
github-code
36
[ { "api_name": "django.db.models.Model", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 4, "usage_type": "name" } ]
7285626466
# -*- coding: utf-8 -*- from datetime import datetime from dateutil.parser import parse import os import json from pyramid.view import view_config from pyramid.security import remember from pyramid.httpexceptions import HTTPFound from pyramid.security import ( Allow, Everyone, ) from pyramid.view import...
cati-neuroimaging/casa_cloud
casa_cloud/views.py
views.py
py
5,714
python
en
code
1
github-code
36
[ { "api_name": "models.LocalPorts", "line_number": 39, "usage_type": "call" }, { "api_name": "models.Machines", "line_number": 40, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 54, "usage_type": "call" }, { "api_name": "os.path", "line_...
32352103733
from service_app.logger import get_logger from scrapers_app.constants import * from lxml import html import requests import copy import re logger = get_logger(__name__) # аттрибут == элемент class ZaraItemInfoScraper: NAME = "name" SIZES_ON_SITE = "sizes_on_site" COLORS_ON_SITE = "colors_on_site" PR...
Radislav123/discount_waiter
scrapers_app/scrapers/zara_item_info_scraper.py
zara_item_info_scraper.py
py
3,298
python
en
code
0
github-code
36
[ { "api_name": "service_app.logger.get_logger", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 60, "usage_type": "call" }, { "api_name": "lxml.html.fromstring", "line_number": 62, "usage_type": "call" }, { "api_name": "lxml.h...
43535999214
""" Very simple Flask web site, with one page displaying a course schedule. """ import flask from flask import render_template from flask import request from flask import url_for from flask import jsonify # For AJAX transactions import json import logging # Date handling import arrow # Replacement for datetime, ba...
RedMustard/proj3-ajax
app.py
app.py
py
3,951
python
en
code
null
github-code
36
[ { "api_name": "flask.Flask", "line_number": 28, "usage_type": "call" }, { "api_name": "uuid.uuid4", "line_number": 32, "usage_type": "call" }, { "api_name": "CONFIG.DEBUG", "line_number": 33, "usage_type": "attribute" }, { "api_name": "logging.DEBUG", "line_nu...
35917171486
import ipywidgets as widgets # Measured in g/cm^3 MATERIAL_DENSITIES = { "Aluminium": 2.7, "Egetræ": 0.85, "Granit": 2.650, "Vand": 1.00, "Uran": 18.70, "Magnesium": 1.74, "Messing": 8.40, "Candy floss": 0.059, } MaterialDropDown = widgets.Dropdown( options=[(f"{name} ({value} g/...
EmilLytthansBoesen/source
opgave_2/user_interface.py
user_interface.py
py
882
python
en
code
0
github-code
36
[ { "api_name": "ipywidgets.Dropdown", "line_number": 17, "usage_type": "call" }, { "api_name": "ipywidgets.FloatSlider", "line_number": 23, "usage_type": "call" }, { "api_name": "ipywidgets.FloatSlider", "line_number": 36, "usage_type": "call" } ]
5667898056
from flask import Flask, request, jsonify from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from flask_restful import Resource, Api import sqlite3 as lite app = Flask(__name__) api = Api(app) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///covid.db' app.config['SQLALCHEMY_TRACK_MODI...
joshloo/iot-pandemic-stack
web-database/flaskapp.py
flaskapp.py
py
3,161
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask_restful.Api", "line_number": 9, "usage_type": "call" }, { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 12, "usage_type": "call" }, { "api_name": "flask_marshma...
15185050967
"""Extraction.""" import json import logging import time from pathlib import Path from typing import Any, List import numpy as np import pandas as pd import requests from bs4 import BeautifulSoup, SoupStrainer from requests.exceptions import HTTPError DATA_DIR = "/opt/airflow/data" IMDB_TABLES = ["title.basics", "tit...
albutz/de-movies
dags/extract.py
extract.py
py
6,534
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 41, "usage_type": "call" }, { "api_name": "requests.exceptions.HTTPError", "line_number": 61, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 64, "usage_type": "call" }, { "api_name": "logging.error",...
11194234055
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Use this to execute the differential kinematics controller in our kinecontrol paper. ''' from __future__ import print_function import Sofa import math import sys, os import time import logging import datetime import numpy as np from utils import * from config import *...
robotsorcerer/superchicko
sofa/python/kinecontrol/single_controller.py
single_controller.py
py
5,485
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 22, "usage_type": "call" }, { "api_name": "math.cos", "line_number": 37, "usage_type": "call" }, { "api_name": "math.sin", "line_number": 37, "usage_type": "call" }, { "api_name": "math.sin", "line_number": 38,...
19279623611
import tensorflow as tf import numpy as np import random from agents.AbstractAgent import AbstractAgent from minigames.utils import state_of_marine, move_to_position from utils.select_algorithm import choose_algorithm from utils.replay_buffer import UniformBuffer class Agent(AbstractAgent): def __init__(self, en...
ericPrimelles/RLProject
agents/Agent.py
Agent.py
py
4,824
python
en
code
0
github-code
36
[ { "api_name": "agents.AbstractAgent.AbstractAgent", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_number": 18, "usage_type": "call" }, { "api_name": "tensorfl...
5547518029
""" Tests for voting 10/07/2021. """ import pytest from scripts.vote_2021_10_07 import (start_vote) from utils.config import ldo_token_address, lido_dao_acl_address, lido_dao_token_manager_address PURCHASE_CONTRACT_PAYOUT_ADDRESS = '0x689E03565e36B034EcCf12d182c3DC38b2Bb7D33' payout_curve_rewards = { 'amount': ...
lidofinance/scripts
archive/tests/xtest_2021_10_07.py
xtest_2021_10_07.py
py
4,121
python
en
code
14
github-code
36
[ { "api_name": "utils.config.ldo_token_address", "line_number": 67, "usage_type": "argument" }, { "api_name": "pytest.fixture", "line_number": 64, "usage_type": "call" }, { "api_name": "utils.config.lido_dao_acl_address", "line_number": 73, "usage_type": "argument" }, ...
18878055040
# -*- coding: utf-8 -*- from __future__ import unicode_literals try: from imp import reload except ImportError: from importlib import reload from django.core.urlresolvers import resolve, reverse from django.http import Http404 from django.test import override_settings from django.utils.translation import ove...
aldryn/aldryn-faq
aldryn_faq/tests/test_views.py
test_views.py
py
7,363
python
en
code
5
github-code
36
[ { "api_name": "test_base.AldrynFaqTest", "line_number": 23, "usage_type": "name" }, { "api_name": "django.core.urlresolvers.resolve", "line_number": 39, "usage_type": "call" }, { "api_name": "views.FaqByCategoryView.as_view", "line_number": 42, "usage_type": "call" }, ...
37442560200
"""estres forms""" from django import forms from estres.models import * class EstresForm(forms.ModelForm): class Meta: model = EstresModel fields = [ "numero_escenarios", "horizonte_riesgo", "fechacorte", "info_merca...
adandh/Bedu_RiesgosSeguros
estres/forms.py
forms.py
py
1,467
python
en
code
0
github-code
36
[ { "api_name": "django.forms.ModelForm", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 8, "usage_type": "name" }, { "api_name": "django.forms.TextInput", "line_number": 32, "usage_type": "call" }, { "api_name": "django....
36121100233
import logging import os from time import time from abc import abstractmethod, ABC from pathlib import Path from typing import Any, Iterator, Optional, Union, List, Dict, Set from forte.common.configuration import Config from forte.common.exception import ProcessExecutionException from forte.common.resources import Re...
asyml/forte
forte/data/base_reader.py
base_reader.py
py
14,338
python
en
code
230
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 24, "usage_type": "call" }, { "api_name": "forte.pipeline_component.PipelineComponent", "line_number": 27, "usage_type": "name" }, { "api_name": "forte.data.base_pack.PackType", "line_number": 27, "usage_type": "name" },...
8891981416
from os import access from tkinter import image_names import cv2 import dropbox import time import random start_time=time.time() def take_snapshot(): number = random.randint(0,100) videoCaptureObject=cv2.VideoCapture(0) result=True while(result): ret,frame=videoCaptureObject.read()...
ARYAN0021/PythonProjectsFinal
SecurityWebCam.py
SecurityWebCam.py
py
1,223
python
en
code
0
github-code
36
[ { "api_name": "time.time", "line_number": 7, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_numb...
30864450241
import torch from torch.utils.data import Dataset import numpy as np from pathlib import Path from synthesizer.utils.text import text_to_sequence class SynthesizerDataset(Dataset): def __init__(self, metadata_fpath: Path, mel_dir: Path, embed_dir: Path, hparams): print("Using inputs from:\n\t%s\n...
IronIron2121/not_i
modules/synthesizer/synthesizer_dataset.py
synthesizer_dataset.py
py
4,028
python
en
code
0
github-code
36
[ { "api_name": "torch.utils.data.Dataset", "line_number": 8, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 9, "usage_type": "name" }, { "api_name": "numpy.load", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.float32", "l...
74123444263
#!/usr/bin/env python """Test `crtm_api` module.""" from crtm_poll import crtm_api from aiohttp import ClientSession from aioresponses import aioresponses import os import pytest class TestAPI: def test_can_log_fetch(self, tmpdir): fetch_path = 'fetch_log' file = tmpdir.join(fetch_path) ...
cgupm/crtm_poll
tests/test_stop_times.py
test_stop_times.py
py
1,317
python
en
code
0
github-code
36
[ { "api_name": "crtm_poll.crtm_api.stop_times.fetch_log", "line_number": 17, "usage_type": "call" }, { "api_name": "crtm_poll.crtm_api.stop_times", "line_number": 17, "usage_type": "attribute" }, { "api_name": "crtm_poll.crtm_api", "line_number": 17, "usage_type": "name" ...
21186201558
from datetime import datetime import pytest from model_bakery import baker from mytodo.models import Tarefa from mytodo.services import tarefa_service def test_should_get_tarefa_as_pending(db): my_tarefa = baker.make(Tarefa, description='Create an ansible deploy script', due_to=datetime.now()) assert my_ta...
JonathansManoel/todolist
mytodo/tests/test_tarefa_status.py
test_tarefa_status.py
py
1,160
python
en
code
0
github-code
36
[ { "api_name": "model_bakery.baker.make", "line_number": 11, "usage_type": "call" }, { "api_name": "mytodo.models.Tarefa", "line_number": 11, "usage_type": "argument" }, { "api_name": "model_bakery.baker", "line_number": 11, "usage_type": "name" }, { "api_name": "d...
75287915945
from PyQt5.QtWidgets import QLabel,QLineEdit,QPushButton,QMessageBox,QWidget,QApplication,QMainWindow,QTextEdit from PyQt5.QtGui import QFont import sys,time getter=str() getter2=str() class FirstWindow(QWidget): def __init__(self): super().__init__() self.setGeometry(200, 100, 500, 500) ...
Golibbek0414/PYTHON
imtihonga.py/class1.py
class1.py
py
3,837
python
en
code
0
github-code
36
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 11, "usage_type": "name" }, { "api_name": "PyQt5.QtGui.QFont", "line_number": 18, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QLabel", "line_number": 20, "usage_type": "call" }, { "api_name": "PyQt...
40533943010
import io import os.path import pickle import json import time from threading import Thread from googleapiclient.discovery import build from googleapiclient.http import MediaIoBaseDownload from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request import _G # Goole Drive ...
ken1882/pyclip_analyze_repeater
datamanager.py
datamanager.py
py
2,333
python
en
code
0
github-code
36
[ { "api_name": "_G.GDriveService.files", "line_number": 25, "usage_type": "call" }, { "api_name": "_G.GDriveService", "line_number": 25, "usage_type": "attribute" }, { "api_name": "_G.GDriveService.files", "line_number": 26, "usage_type": "call" }, { "api_name": "_...
1312451969
"""changing viewer layer names Revision ID: 99ebe4492cee Revises: b0b51fd07bfa Create Date: 2023-06-12 15:34:29.609937 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '99ebe4492cee' down_revision = 'b0b51fd07bfa' branch_labels = None depends_on = None def upg...
seung-lab/AnnotationFrameworkInfoService
migrations/versions/99ebe4492cee_changing_viewer_layer_names.py
99ebe4492cee_changing_viewer_layer_names.py
py
1,039
python
en
code
1
github-code
36
[ { "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"...
31462474999
# Python built-in modules and packages from dataclasses import dataclass from typing import Dict, List, Union, Tuple # --- Useful type hints --- TableName = str DatafieldName = str PacketType = str PacketData = Union[int, str, float] Packet = Dict[DatafieldName, PacketData] Message = Dict[str, List[Packet]] RowDB = L...
PerKjelsvik/iof
src/backend/dbmanager/msgconversion.py
msgconversion.py
py
3,037
python
en
code
1
github-code
36
[ { "api_name": "typing.Union", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.List", "line_number":...
28247026448
import datetime import time from playsound import playsound # using deffunction set the alarm-time def set_alarm(alarm_time): while True: current_time = datetime.datetime.now().strftime("%H:%M:%S") if current_time == alarm_time: print("It's an alarm time") print("Play the al...
Madhusudhan178/Alarm_clock-py
alarm_clock.py
alarm_clock.py
py
1,033
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 8, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 8, "usage_type": "attribute" }, { "api_name": "playsound.playsound", "line_number": 12, "usage_type": "call" }, { "api_name": "time.s...
24975211817
import os from setuptools import setup, find_packages from version import get_git_version def files(folder, exclude=[]): found_files = [] for root, dirs, files in os.walk(folder): for f in files: if not any(("%s/%s" % (root, f)).startswith(e) for e in exclude): found_files...
opennode/opennode-console
setup.py
setup.py
py
1,732
python
en
code
13
github-code
36
[ { "api_name": "os.walk", "line_number": 9, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_number": 35, "usage_type": "call" }, { "api_name": "version.get_git_version", "line_number": 37, "usage_type": "call" }, { "api_name": "setuptools.find_packa...
28092663576
from statistics import mean n, x = (map(int, input().split())) ar = [] for i in range(x): ar.append(list(map(float, input().split()))) s = zip(*ar) for i in s: print (mean(i))
Avani18/Hackerrank-Python
11. Built-Ins/Zipped.py
Zipped.py
py
188
python
en
code
0
github-code
36
[ { "api_name": "statistics.mean", "line_number": 12, "usage_type": "call" } ]
74261408425
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import time import random from twisted.internet import task from twisted.internet.protocol import DatagramProtocol from demo.main import reactor from demo.proto import ProtocolParser tasks = {} finished_tasks = {} class ClientProtoc...
frad00r4/demo_project
demo/modules/client.py
client.py
py
2,553
python
en
code
0
github-code
36
[ { "api_name": "twisted.internet.protocol.DatagramProtocol", "line_number": 18, "usage_type": "name" }, { "api_name": "time.time", "line_number": 23, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 23, "usage_type": "call" }, { "api_name": "d...
28856814409
from __future__ import print_function, absolute_import import sys import PyQt4.QtGui as QtGui import PyQt4.QtScript as QtScript from PyQt4.QtCore import SIGNAL app = QtGui.QApplication(sys.argv) from qtreactor import pyqt4reactor pyqt4reactor.install() class DoNothing(object): def __init__(self): sel...
ghtdak/qtreactor
qtreactor/gtrial.py
gtrial.py
py
969
python
en
code
50
github-code
36
[ { "api_name": "PyQt4.QtGui.QApplication", "line_number": 9, "usage_type": "call" }, { "api_name": "PyQt4.QtGui", "line_number": 9, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "qtreactor.pyqt4reacto...
40961303379
# coding: utf-8 import argparse import importlib.util import inspect import os from datetime import datetime problemas = [] def problema(mensaje, *args): problemas.append(mensaje.format(*args)) def validar_tiempo(inicio, fin, tope, mensaje): diferencia = (fin - inicio).total_seconds() if diferencia > ...
ucse-ia/ucse_ia
2019/probar_entrega1.py
probar_entrega1.py
py
9,466
python
es
code
5
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 34, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 34, "usage_type": "name" }, { "api_name": "importlib.util.util.spec_from_file_location", "line_number": 36, "usage_type": "call" }, { ...
17233286907
import argparse import torch import torch.nn as nn import numpy as np import os import pickle from data_loader import get_loader from build_vocab import Vocabulary from model import EncoderCNN, DecoderRNN from torch.nn.utils.rnn import pack_padded_sequence from torchvision import transforms # Device configuration de...
vshantam/ImageCaptioning
train.py
train.py
py
2,842
python
en
code
4
github-code
36
[ { "api_name": "torch.device", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.exists",...
19368162206
#! /usr/bin/python2.7 import rospy import datetime import geometry_msgs.msg CMD_VEL_TOPIC = "/cmd_vel" def main(): rospy.init_node("drive_forward_node") drive_speed = rospy.get_param("~drive_speed") drive_time = rospy.get_param("~drive_time") twist_publisher = rospy.Publisher(CMD_VEL_TOPIC, geometry_...
slensgra/robotic-perception-systems-assignment-1
src/drive_forward_node.py
drive_forward_node.py
py
1,349
python
en
code
0
github-code
36
[ { "api_name": "rospy.init_node", "line_number": 9, "usage_type": "call" }, { "api_name": "rospy.get_param", "line_number": 10, "usage_type": "call" }, { "api_name": "rospy.get_param", "line_number": 11, "usage_type": "call" }, { "api_name": "rospy.Publisher", ...
32788623389
import wx import re import Wammu import Wammu.Events import Wammu.Utils import Wammu.Paths from Wammu.Locales import StrConv, ugettext as _ import wx.lib.mixins.listctrl COLUMN_INFO = { 'info': ( ( _('Name'), _('Value') ), ( ...
gammu/wammu
Wammu/Browser.py
Browser.py
py
19,382
python
en
code
63
github-code
36
[ { "api_name": "Wammu.Locales.ugettext", "line_number": 15, "usage_type": "call" }, { "api_name": "Wammu.Locales.ugettext", "line_number": 16, "usage_type": "call" }, { "api_name": "Wammu.Locales.ugettext", "line_number": 26, "usage_type": "call" }, { "api_name": "...
20163912786
from django.db import models from django.contrib.auth.models import User # Crear Modelos class Mueble(models.Model): nombre=models.CharField(max_length=40) modelo=models.CharField(max_length=150) descripcion=models.CharField(max_length=250) precio=models.FloatField(default='') imagen=models.ImageFi...
gonzalezmirko/Proyecto-Final-Coder
Proyecto/core/models.py
models.py
py
2,980
python
es
code
0
github-code
36
[ { "api_name": "django.db.models.Model", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 5, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 6, "usage_type": "call" }, { "api_name": "...
10211953658
from collections import defaultdict import time import os #This class represents a directed graph using adjacency list representation class Graph: def __init__(self,vertices): self.V = vertices self.graph = defaultdict(list) self.file = open("Result1.txt","a") # function to add ...
MuhammadAliAhson/Connected_Components_Graphs
Code_To_Find_Connected_Nodes_1.py
Code_To_Find_Connected_Nodes_1.py
py
4,926
python
en
code
5
github-code
36
[ { "api_name": "collections.defaultdict", "line_number": 8, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 157, "usage_type": "call" }, { "api_name": "os.system", "line_number": 160, "usage_type": "call" }, { "api_name": "time.sleep", "line_...
34892117243
from django.contrib import admin from .models import Product, Order, OrderProduct class ProductAdmin(admin.ModelAdmin): list_display = ('name', 'price', 'quantity', 'product_image') list_filter = ('price', 'quantity') search_fields = ('name', 'price') class OrderAdmin(admin.ModelAdmin): list_display...
rustamovilyos/raw_materials
app/admin.py
admin.py
py
817
python
en
code
1
github-code
36
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 5, "usage_type": "name" }, { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 11, "usage_type": "attribute" ...
13483897568
import bpy from bpy import context import sys import os from os.path import exists from os.path import splitext fileArgument = sys.argv[-1] print("\r\n") print("Looking for FBX file " + fileArgument + " in working directory:") print(os.getcwd()) filename = splitext(fileArgument)[0] if exists(filename + ".fbx"): ...
lmsorenson/PyGeometry
create_scene_from_fbx.py
create_scene_from_fbx.py
py
3,235
python
en
code
4
github-code
36
[ { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.splitext", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.exists", "line_nu...
30553351838
''' statistics.minutes delayed.weather: number of minutes delayed (per month) caused by significant meteorological conditions that, in the judgment of the carrier, delays or prevents the operation of a flight. ''' ''' In de opdracht willen ze dat we list_of_airports twee keer gaan gebruiken... Dit kan...
puppy1004/School-Python
School/Oefentoets2/opgave_2.py
opgave_2.py
py
1,623
python
nl
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 19, "usage_type": "call" }, { "api_name": "pprint.pprint", "line_number": 29, "usage_type": "call" }, { "api_name": "pprint.pprint", "line_number": 36, "usage_type": "call" } ]
7994328417
import pymongo myclient = pymongo.MongoClient("mongodb://localhost:27017/") products_db = myclient["products"] branches_db = myclient["branches"] order_management_db = myclient["order_management"] # branches = { # 1: {"name":"Katipunan","phonenumber":"09179990000"}, # 2: {"name":"Tomas Morato","phonenumber":...
mjimlee/Flask-ecommerce
digitalcafe/database.py
database.py
py
1,431
python
en
code
0
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 3, "usage_type": "call" } ]
27977157667
import os from django.core.exceptions import ValidationError def validate_recording_file_extension(value): # [0] returns path+filename, [1] returns the extension extension = os.path.splitext(value.name)[1] # Add/Remove from the valid music file extensions as you see fit valid_extensions = ['.mp3','.o...
Trainzack/MarkTime
MarkTimeSite/MarkTimeApp/validators.py
validators.py
py
443
python
en
code
0
github-code
36
[ { "api_name": "os.path.splitext", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.core.exceptions.ValidationError", "line_number": 12, "usage_type": "call" } ]
30349073082
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('paper', '0010_auto_20160131_0616'), ] operations = [ migrations.AddField( model_name='paper', name='...
sychen1121/paper_label
website/paper/migrations/0011_paper_time_final.py
0011_paper_time_final.py
py
414
python
en
code
0
github-code
36
[ { "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" }, { ...
73103994024
import datetime import jwt from api import app, db from sqlalchemy.dialects.postgresql import UUID from sqlalchemy import text as sa_text from sqlalchemy_utils.types.password import PasswordType class User(db.Model): id = db.Column(UUID(as_uuid=True), primary_key=True, server_default=sa_text("uuid_generate_v4()")...
Basile-Lequeux/PerfectTripApi
api/models/User.py
User.py
py
1,587
python
en
code
0
github-code
36
[ { "api_name": "api.db.Model", "line_number": 9, "usage_type": "attribute" }, { "api_name": "api.db", "line_number": 9, "usage_type": "name" }, { "api_name": "api.db.Column", "line_number": 10, "usage_type": "call" }, { "api_name": "api.db", "line_number": 10, ...
34954108287
import logging import apache_beam as beam from etl_operations.models.remittances import RemittanceSchema from etl_operations.transforms.left_join import LeftJoin def filter_remittance(remittance): schema = RemittanceSchema() errors = schema.validate(remittance) logging.info(f'{errors} - {errors == {}} - ...
luisarboleda17/etls_valiu
etl_operations/etl_operations/transforms/remittances.py
remittances.py
py
2,088
python
en
code
1
github-code
36
[ { "api_name": "etl_operations.models.remittances.RemittanceSchema", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 11, "usage_type": "call" }, { "api_name": "apache_beam.DoFn", "line_number": 15, "usage_type": "attribute" }, { ...
6829356831
import re import time from os import environ from datetime import datetime from mkdocs.config import config_options from mkdocs.plugins import BasePlugin from .gitinfo import GitInfo class GitShowHistoryLogPlugin(BasePlugin): config_scheme = ( ('max_number_of_commits', config_options.Type(int, default=5)),...
pawelsikora/mkdocs-git-show-history-log-plugin
mkdocs_git_show_history_log_plugin/plugin.py
plugin.py
py
1,784
python
en
code
2
github-code
36
[ { "api_name": "mkdocs.plugins.BasePlugin", "line_number": 9, "usage_type": "name" }, { "api_name": "mkdocs.config.config_options.Type", "line_number": 11, "usage_type": "call" }, { "api_name": "mkdocs.config.config_options", "line_number": 11, "usage_type": "name" }, ...
6667647383
from flask import request, jsonify, abort, Blueprint import requests import json from app import models from .authRoutines import * likeRoutes = Blueprint('likesBp', __name__) # {authToken: xxxx, like: 0, betId: xxxx} # {authToken: xxxx, like: 1, betId: xxxx} @likeRoutes.route('/like/update', methods=['POST']) def ...
ThreeOhSeven/Backend
app/likesBp.py
likesBp.py
py
1,828
python
en
code
0
github-code
36
[ { "api_name": "flask.Blueprint", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 17, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 17, "usage_type": "name" }, { "api_name": "json.loads", ...
42522310312
#WebCrawler é uma ferramenta de captura de informações em sites, cadastrando e salvando o que acha que seja mais relevante por meio de palavras chave #Importa operadores matematicos import operator #Biblioteca de manipulação de estruturas do python from collections import Counter from bs4 import BeautifulSoup i...
CaioNM/S.I.comPython
Aula 04/Web Crawler.py
Web Crawler.py
py
1,835
python
pt
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 15, "usage_type": "call" }, { "api_name": "operator.itemgetter", "line_number": 51, "usage_type": "call" }, { "api_name": "collections.Counte...
73451722984
''' Lets implement CutAndPaste augmentation This augmentations can be added as an augmentation in the DataGenerators, but for the sake of keeping this project simple I am doing this separately and then performing other-augmentations. This can be considered as the first augmentation of Albumentation augmentations. ref...
Anshul22Verma/TP_projects
CopyAndPaste/copy_and_paste_augmentation.py
copy_and_paste_augmentation.py
py
5,384
python
en
code
0
github-code
36
[ { "api_name": "os.path.join", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_number": 29, "usage_type": "name" }, { "api_name": "os.path.dirname", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path.join", "line_number"...
18355189069
from flask import Flask, render_template, request, redirect, session, flash, url_for from mysqlconnection import connectToMySQL # import the function that will return an instance of a connection import re # the regex module from flask_bcrypt import Bcrypt import sys; EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@...
full-time-april-irvine/kent_hervey
flask/flask_mysql/FavoriteBooksFlask/fav_books.py
fav_books.py
py
14,005
python
en
code
0
github-code
36
[ { "api_name": "re.compile", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "flask_bcrypt.Bcrypt", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.session", "line_n...
5209753399
import os import bs4 import requests import re import time def main(): # from alphabet "a" to "c" alphabetical_list = "abc" for char in alphabetical_list: try: url = "https://www.gutenberg.org/browse/authors/{}".format(char) site = pull_site(url) authors = scrape_author(site) print(authors) except...
zabuchan/web_scraping
show_gutenberg_authors.py
show_gutenberg_authors.py
py
1,662
python
en
code
0
github-code
36
[ { "api_name": "time.sleep", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 24, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 30, "usage_type": "call" }, { "api_name": "re.search", "line_numbe...
7537125263
from __future__ import print_function import six from six.moves.html_parser import HTMLParser from collections import defaultdict from itertools import count HTMLP = HTMLParser() class SugarEntry: """Define an entry of a SugarCRM module.""" _hashes = defaultdict(count(1).next if hasattr(count(1), 'next') else...
gddc/python_webservices_library
sugarcrm/sugarentry.py
sugarentry.py
py
7,119
python
en
code
46
github-code
36
[ { "api_name": "six.moves.html_parser.HTMLParser", "line_number": 7, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 11, "usage_type": "call" }, { "api_name": "itertools.count", "line_number": 11, "usage_type": "call" }, { "api_name"...
36896022139
import dns.exception import dns.name import dns.resolver public_enum_domain = dns.name.from_text('e164.arpa.') def from_e164(text, origin=public_enum_domain): """Convert an E.164 number in textual form into a Name object whose value is the ENUM domain name for that number. @param text: an E.164 number in ...
RMerl/asuswrt-merlin
release/src/router/samba-3.6.x/lib/dnspython/dns/e164.py
e164.py
py
2,142
python
en
code
6,715
github-code
36
[ { "api_name": "dns.exception.name.from_text", "line_number": 5, "usage_type": "call" }, { "api_name": "dns.exception.name", "line_number": 5, "usage_type": "attribute" }, { "api_name": "dns.exception", "line_number": 5, "usage_type": "name" }, { "api_name": "dns.e...
41308544644
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk, GLib, GObject from random import randint from threading import Thread from time import sleep import i3 def do_nothing(): return def do_nothing(a, b): return # needed so one can jump to a specific window on button click. # there ar...
KillingSpark/i3-Overview
mywindow.py
mywindow.py
py
8,918
python
en
code
0
github-code
36
[ { "api_name": "gi.require_version", "line_number": 2, "usage_type": "call" }, { "api_name": "gi.repository.Gtk.Button", "line_number": 20, "usage_type": "call" }, { "api_name": "gi.repository.Gtk", "line_number": 20, "usage_type": "name" }, { "api_name": "i3.focus...
11686525581
from pynamodb.models import Model from pynamodb.attributes import ( UnicodeAttribute, UnicodeSetAttribute, NumberAttribute, BooleanAttribute, MapAttribute, UTCDateTimeAttribute ) from datetime import datetime class WatchingList(Model): """ References: https://pynamodb.readthedo...
tanlin2013/stockbot
.aws/stack/lib/dynamo/table.py
table.py
py
603
python
en
code
0
github-code
36
[ { "api_name": "pynamodb.models.Model", "line_number": 13, "usage_type": "name" }, { "api_name": "pynamodb.attributes.UnicodeAttribute", "line_number": 26, "usage_type": "call" } ]
42152798528
#! Lianjia_Sold/sync2es.py # synchronize data in MongoDB to ElasticSearch with updating item from pymongo import MongoClient from datetime import datetime from uuid import uuid1 from elasticsearch import Elasticsearch from elasticsearch.helpers import bulk # import json class MongoSyncEs(object): def __init__(se...
feelingu1314/lianjia
lianjia_sold/lianjia_sold/sync2es.py
sync2es.py
py
4,288
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 20, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 20, "usage_type": "name" }, { "api_name": "pymongo.MongoClient", "line_number": 23, "usage_type": "call" }, { "api_name": "elasticse...
1985519465
import kivy from kivy.app import App from kivy.lang import Builder from kivy.properties import NumericProperty, ObjectProperty, StringProperty from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label from kivy.uix.popup import Popup from kivy.uix.recycleview import RecycleView from kivy.uix.screenmanag...
djose1164/bank-management-system
src/main.py
main.py
py
11,784
python
en
code
3
github-code
36
[ { "api_name": "kivy.require", "line_number": 20, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 25, "usage_type": "call" }, { "api_name": "kivy.lang.Builder.load_file", "line_number": 26, "usage_type": "call" }, { "api_name": "kivy.lang.Builder...
40861536656
import numpy as np from dataclasses import dataclass import random from image_multi_thresholding.base import _between_class_var, _image_probabilities """ Find thresholds of the gray levels using shuffled frog-leaping algorithm with between class variance as fitness function. """ def _is_valid_frog(frog, L): re...
image-multithresholding/Image-multithresholding
src/image_multi_thresholding/threshold/sfl.py
sfl.py
py
4,404
python
en
code
1
github-code
36
[ { "api_name": "dataclasses.dataclass", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 29, "usage_type": "attribute" }, { "api_name": "image_multi_thresholding.base._image_probabilities", "line_number": 59, "usage_type": "call" }...
31489463671
from flask import Flask from flask import render_template from flask import request from urllib.parse import quote from urllib.request import urlopen import json app = Flask(__name__) OPEN_WEATHER_URL = "http://api.openweathermap.org/data/2.5/weather?q={0}&units=metric&APPID={1}" OPEN_WEATHER_KEY = '36c7941...
pacharasiri/news-app-61102010154
app.py
app.py
py
3,173
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 20, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 20, "usage_type": "attribute" }, { "api_name": "flask.reque...
17795520961
import math from typing import List class Solution: def minEatingSpeed(self, piles: List[int], h: int) -> int: def can_eat(k: int) -> bool: ans = 0 for pile in piles: ans += math.ceil(pile / k) return ans <= h left = 1 right = 10 ** 9 ...
fastso/learning-python
leetcode_cn/solved/pg_875.py
pg_875.py
py
517
python
en
code
0
github-code
36
[ { "api_name": "typing.List", "line_number": 6, "usage_type": "name" }, { "api_name": "math.ceil", "line_number": 11, "usage_type": "call" } ]
36494224748
import os import json import platform from os import path from time import sleep import winsound from win10toast import ToastNotifier toaster = ToastNotifier() # assets APP_ICO = path.join("assets","app.ico") COFFEE_ICO = path.join("assets","coffee.ico") TAUNT_WAV= path.join("a...
roshansai24081/Sedentary-alert
_app.py
_app.py
py
1,172
python
en
code
0
github-code
36
[ { "api_name": "win10toast.ToastNotifier", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_number": 25, "usage_type": "name" }, { "api_name": "os.path.join", "lin...
34696107762
#!/usr/bin/env python3 # coding : utf-8 # @author : Francis.zz # @date : 2023-07-28 15:30 # @desc : 使用网页的session key访问chat gpt from revChatGPT.V1 import Chatbot import json """ 使用 `pip install --upgrade revChatGPT` 安装依赖包 使用文档说明:https://github.com/CoolPlayLin/ChatGPT-Wiki/blob/master/docs/ChatGPT/V1.md 1. 可以使用用户名...
zzfengxia/python3-learn
gpt/chatgpt_conversion.py
chatgpt_conversion.py
py
1,355
python
zh
code
0
github-code
36
[ { "api_name": "revChatGPT.V1.Chatbot", "line_number": 28, "usage_type": "call" }, { "api_name": "json.load", "line_number": 28, "usage_type": "call" } ]
2440750792
#!/bin/env python3 from typing import Optional, TypeVar from sqlmodel import SQLModel, Field class MedicationLinkBase(SQLModel): medication_id : Optional[int] = Field( default=None, foreign_key="medication.id" ) class MedicationLinkBaseWithRequiredID(SQLModel): medication_id : int = Fiel...
shlomo-Kallner/poppy_backend_assessment
src/poppy_s/lib/models/base/medications.py
medications.py
py
924
python
en
code
0
github-code
36
[ { "api_name": "sqlmodel.SQLModel", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 7, "usage_type": "name" }, { "api_name": "sqlmodel.Field", "line_number": 7, "usage_type": "call" }, { "api_name": "sqlmodel.SQLModel", ...
30164407430
#!/usr/bin/python3 """ File: test_file_storage.py """ import unittest import json class TestFileStorage(unittest.TestCase): """File Storage Test""" def test_json_load(self): with open("file.json") as fd: d = json.load(fd) self.assertEqual(isinstance(d, dict), True) de...
peterkthomas/AirBnB_clone
tests/test_models/test_engine/test_file_storage.py
test_file_storage.py
py
474
python
en
code
0
github-code
36
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 14, "usage_type": "call" }, { "api_name": "unittest.main", "line_number": 23, "usage_type": "call" } ]
335981878
import os, wx, atexit class StickyNotes(): def __init__(self): self.save_exists = False self.list = [""] self.list_to_save = [] def run(self): self.check_file() for line in self.list: frame = StickyFrame(None, 'Sticky Note', line) def check_file(self): ...
Ghrehh/stickynotes
stickynotes.py
stickynotes.py
py
1,750
python
en
code
0
github-code
36
[ { "api_name": "os.path.exists", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.stat", "line_number": 17, "usage_type": "call" }, { "api_name": "wx.Frame", "line_number": 28,...