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
204846583
import json import numpy as np import random from sklearn.model_selection import KFold from skmultilearn.model_selection import iterative_train_test_split # Set a fixed seed for reproducibility SEED = 42 random.seed(SEED) np.random.seed(SEED) # Load data from .jsonl files def load_jsonl(filename): with open(file...
LearnItAnyway/corpus_ko_AI_competition_2023
comp_1_EA/split.py
split.py
py
3,156
python
en
code
0
github-code
21
[ { "api_name": "random.seed", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 11, "usage_type": "attribute" }, { "api_name": "json.loads", "lin...
2283778204
import os import sys import json try: directory = sys.args[1] except: directory = 'review_json/' file_names = os.listdir(directory) reviews = [json.loads(open(directory+fn, 'r').read()) for fn in file_names] reviews.sort(key=lambda r:len(r['text'])) # sort by length of review reviews = reviews[5:] # get rid...
nlomeli/nlp-with-python
load_reviews.py
load_reviews.py
py
1,435
python
en
code
1
github-code
21
[ { "api_name": "sys.args", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 10, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 12, "usage_type": "call" } ]
75034385973
from smartystreets_python_sdk import StaticCredentials, exceptions, ClientBuilder from smartystreets_python_sdk.us_street import Lookup as StreetLookup import os import logging from application_services.base_address_service import BaseAddressService class SmartyAddressService(BaseAddressService): def __init__(...
FergsCloud5/MovieRecApp-UserService
application_services/smarty_address_service.py
smarty_address_service.py
py
1,562
python
en
code
0
github-code
21
[ { "api_name": "application_services.base_address_service.BaseAddressService", "line_number": 10, "usage_type": "name" }, { "api_name": "os.environ", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 18, "usage_type": "attribute" ...
1190844481
import datetime import json import re from time import sleep import scrapy from scrapy import Request from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from Art...
canggeng/ArticleSpider
ArticleSpider/spiders/zhihu.py
zhihu.py
py
9,043
python
en
code
0
github-code
21
[ { "api_name": "time.sleep", "line_number": 29, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 31, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 39, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 47, ...
74873474291
import nltk from nltk import Tree from constants import * import spacy import networkx as nx nlp = spacy.load('en_coref_sm') nltk.download('punkt') nltk.download('averaged_perceptron_tagger') nltk.download('maxent_ne_chunker') nltk.download('words') LOCATION_RELATED_VERBS = ["locate", "headquart", "found", "base", "...
soylent-grin/textext
helpers.py
helpers.py
py
13,186
python
en
code
0
github-code
21
[ { "api_name": "spacy.load", "line_number": 7, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 9, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 10, "usage_type": "call" }, { "api_name": "nltk.download", "line_number...
9021278540
################################################################################################################################################################################## # Author: Jackson Sholdice, August 28th, 2023 # File contains functions related to intial start up for new user. # Also contains function...
jsholdice/NanoAssembler-Automation
Helper_Functions.py
Helper_Functions.py
py
13,963
python
en
code
0
github-code
21
[ { "api_name": "HMI_Image_Library.Service", "line_number": 19, "usage_type": "call" }, { "api_name": "HMI_Image_Library.System_State", "line_number": 20, "usage_type": "call" }, { "api_name": "HMI_Image_Library.Start_Connection", "line_number": 21, "usage_type": "call" }...
42859799903
from django.urls import path from django.contrib.staticfiles.storage import staticfiles_storage from django.views.generic.base import RedirectView from .views import home_view, download_pdf, another_home, change_theme, change_another app_name = 'portfolio' urlpatterns = [ path('h', home_view, name='ho...
parthishere/my-website
portfolio/urls.py
urls.py
py
662
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 11, "usage_type": "call" }, { "api_name": "views.home_view", "line_number": 11, "usage_type": "argument" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" }, { "api_name": "views.another_h...
38899278105
import streamlit as st import base64 import streamlit.components.v1 as stc #base UI config, reload -> apply other pages def ui_analysis(): #Header #st.image('./icon/plants_icon.png',width=500) st.title('LightGBM Classification for CSV Dataset') #display GIF on home def display_GIF(): fil...
shosuke-13/Stream-GBM
main.py
main.py
py
914
python
en
code
5
github-code
21
[ { "api_name": "streamlit.title", "line_number": 10, "usage_type": "call" }, { "api_name": "base64.b64encode", "line_number": 17, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 20, "usage_type": "call" }, { "api_name": "streamlit.info", ...
5784476865
from pathlib import Path from collections import defaultdict def get_coordinates(left, top, w, h): x = left + 1 y = top + 1 start_x = x start_y = y out = 0 for i in range(start_y, start_y + h): y = i for j in range(start_x, start_x + w): x = j ...
JohnVicke/Kattis
day3.1.py
day3.1.py
py
1,097
python
en
code
0
github-code
21
[ { "api_name": "pathlib.Path", "line_number": 28, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 30, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 31, "usage_type": "call" } ]
12269596119
from flask import Flask, render_template, url_for, redirect, session, request import firebase_admin from firebase_admin import credentials, firestore from flask.helpers import flash from flask.templating import render_template_string from werkzeug.security import generate_password_hash, check_password_hash from functoo...
catursantoso/mc-agent
app.py
app.py
py
5,881
python
en
code
0
github-code
21
[ { "api_name": "firebase_admin.credentials.Certificate", "line_number": 9, "usage_type": "call" }, { "api_name": "firebase_admin.credentials", "line_number": 9, "usage_type": "name" }, { "api_name": "firebase_admin.initialize_app", "line_number": 10, "usage_type": "call" ...
45053285251
import glob import tensorflow as tf import numpy as np import os import sys import wandb from wandb.keras import WandbCallback from d169 import DepthEstimate RESTORE_SAVE = False tf.get_logger().setLevel('ERROR') #os.environ['WANDB_MODE'] = 'dryrun' # Testing for funcitonality if RESTORE_SAVE: wandb.init(project="m...
ben9583/MC_DepthNN
main.py
main.py
py
6,030
python
en
code
2
github-code
21
[ { "api_name": "tensorflow.get_logger", "line_number": 12, "usage_type": "call" }, { "api_name": "wandb.init", "line_number": 16, "usage_type": "call" }, { "api_name": "wandb.init", "line_number": 18, "usage_type": "call" }, { "api_name": "tensorflow.config.list_ph...
3617224481
# maze.py # Written by Eirik Vesterkjær, 2017 # # Maze generator # Uses a randomized Prim's Algorithm to create a MST of cells. # Can be used wiht a CLI or in other projects import random import sys import argparse import logging from utils import check_positive """ Prints the maze elements @arg maze: 2d array """ d...
eirikeve/maze
maze.py
maze.py
py
6,615
python
en
code
0
github-code
21
[ { "api_name": "random.seed", "line_number": 66, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 111, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 149, "usage_type": "call" }, { "api_name": "logging.DEBUG", "l...
11314237230
from django.core.cache import cache from django.utils import timezone import logging logger = logging.getLogger("cached") class CachedAbstract(object): KEY_PREFIX = 'abstract' @classmethod def _key(cls, *models, modifiers): return "{}:{}".format(cls.KEY_PREFIX, ",".join( [str(m.pk i...
madaian/a-plus
lib/cached.py
cached.py
py
2,560
python
en
code
null
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "django.utils.timezone.now", "line_number": 22, "usage_type": "call" }, { "api_name": "django.utils.timezone", "line_number": 22, "usage_type": "name" }, { "api_name": "djan...
31099587957
import os from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy def scandir(dir, files=[]): for file in os.listdir(dir): path = os.path.join(dir, file) if os.path.isfile(path) and path.endswith(".pyx"): files.app...
aurelienpierre/Image-Cases-Studies
setup.py
setup.py
py
2,163
python
en
code
39
github-code
21
[ { "api_name": "os.listdir", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.isfile", "line_numbe...
8110942191
import pandas as pd # package for high-performance, easy-to-use data structures and data analysis import numpy as np # fundamental package for scientific computing with Python import matplotlib import matplotlib.pyplot as plt # for plotting import seaborn as sns # for making plots with seaborn import plotly.offl...
woodsgoing/hyperparam-optimize
fast_eda.py
fast_eda.py
py
25,495
python
en
code
1
github-code
21
[ { "api_name": "pandas.get_dummies", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 71, "usage_type": "call" }, { "api_name": "numpy.mean", "line...
26158324270
import os import argparse from os.path import join as pjoin from typing import Mapping, Optional import numpy as np import textworld from textworld.utils import uniquify from textworld.logic import Variable, Proposition from textworld.generator import QuestGenerationError from textworld.generator import World from te...
microsoft/TextWorld
textworld/challenges/tw_treasure_hunter/treasure_hunter.py
treasure_hunter.py
py
8,814
python
en
code
1,102
github-code
21
[ { "api_name": "os.path.join", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path", "line_number": 22, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", ...
39429600750
from itsdangerous import URLSafeTimedSerializer from flask_mail import Message from app import app, mail ts = URLSafeTimedSerializer(app.config["SECRET_KEY"]) def send_email(email, subject, html): msg = Message( subject, recipients=[email], html=html, sender=app.config['MAIL_DEFAU...
cassizx/flask_todo_app
app/app/utils.py
utils.py
py
357
python
en
code
0
github-code
21
[ { "api_name": "itsdangerous.URLSafeTimedSerializer", "line_number": 5, "usage_type": "call" }, { "api_name": "app.app.config", "line_number": 5, "usage_type": "attribute" }, { "api_name": "app.app", "line_number": 5, "usage_type": "name" }, { "api_name": "flask_ma...
36778543973
from datetime import datetime, timedelta # 日期时间差获取 dt1 = datetime.strptime("2020-04-04 9:20:05", "%Y-%m-%d %H:%M:%S") dt2 = datetime.strptime("2020-05-05 19:30:05", "%Y-%m-%d %H:%M:%S") diff = dt2 - dt1 print("相差天数:{}, 相差小时:{:.2f}".format(diff.days, diff.seconds/(60*60))) # 日期加减操作timedelta dt = datetime.now() n = 10...
diaoyuqiang/python
datetime_delta.py
datetime_delta.py
py
438
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.strptime", "line_number": 4, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 4, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 5, "usage_type": "call" }, { "api_name": "...
16031391732
import argparse from CP.src.CPSolver import CPSolver from SAT.src.SATSolver import SATSolver from MIP.src.mip import MIP from SMT.src.SMTSolver import SMTSolver if __name__ == '__main__': parser = argparse.ArgumentParser( prog="VLSI multi paradigm Solver", epilog="See '<command> --help' to read a...
rrMat/VLSI-Multi-Paradigm-Solver
main.py
main.py
py
5,181
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "CP.src.CPSolver.CPSolver.acceptable_models", "line_number": 32, "usage_type": "attribute"...
36027945115
import random import pygame from game.damage import Damage class Explosion: def __init__(self, start_pos, explosion_sheet, size, damage_amount, damage_type): self.radius = size self.collideRadius = self.radius self.explosionSheet = explosion_sheet self.explosionFrames = 16 ...
MyreMylar/scrolling_shooter
game/explosion.py
explosion.py
py
2,322
python
en
code
0
github-code
21
[ { "api_name": "random.randrange", "line_number": 14, "usage_type": "call" }, { "api_name": "pygame.Rect", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.transform.scale", "line_number": 19, "usage_type": "call" }, { "api_name": "pygame.transform"...
9870272047
from typing import Any import aioredis import pickle from pyot.core.exceptions import NotFound from pyot.pipeline.token import PipelineToken from pyot.pipeline.expiration import ExpirationManager from pyot.core.resources import ResourceTemplate from pyot.utils.logging import LazyLogger from .base import Store, StoreT...
iann838/Pyot
pyot/stores/rediscache.py
rediscache.py
py
2,576
python
en
code
100
github-code
21
[ { "api_name": "pyot.utils.logging.LazyLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "base.Store", "line_number": 17, "usage_type": "name" }, { "api_name": "base.StoreType.CACHE", "line_number": 19, "usage_type": "attribute" }, { "api_name": "ba...
21282341499
#!/usr/bin/env python3 from typing import List class LineerRegression: def __init__(self,learning_rate,epoches): self.learning_rate = learning_rate; self.epoches = epoches; def fit(self, X: List[List[int]], y: List[int]): self.b = 0 self.X = X ...
MineGoksen/LineerRegression
LR.py
LR.py
py
2,741
python
en
code
0
github-code
21
[ { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 20, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 29, "usage_type": "name" }, { "api_name": "typing.List", "line_number": ...
7658755972
import logging import requests from settings import TELEGRAM_CHAT_ID, TELEGRAM_TOKEN, TELEGRAM_URL, WAIT_TIME def send_message(dir_name): text = ( "No han llegado nuevos ficheros al directorio" f" {dir_name} en los últimos {round((WAIT_TIME / 60), 2)} minutos" ) url = ( f"{TELEGR...
jask90/file_checker
telegram.py
telegram.py
py
596
python
en
code
0
github-code
21
[ { "api_name": "settings.WAIT_TIME", "line_number": 11, "usage_type": "name" }, { "api_name": "settings.TELEGRAM_URL", "line_number": 14, "usage_type": "name" }, { "api_name": "settings.TELEGRAM_TOKEN", "line_number": 14, "usage_type": "name" }, { "api_name": "sett...
70253576372
from collections import deque class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Codec: def serialize(self, root): if not root: return None serialized_str = '' q = deque() q.append(root) ...
borget/cracking-the-coding-interview
coding/trees/serialize_deserialize_binary_tree.py
serialize_deserialize_binary_tree.py
py
1,537
python
en
code
0
github-code
21
[ { "api_name": "collections.deque", "line_number": 15, "usage_type": "call" } ]
32855173504
from django.db import models from Products.models import Products from Inventory.models import RawMaterials, PackingMaterials # Create your models here. class Plan(models.Model): planNo = models.AutoField(primary_key=True) date = models.DateField(auto_now_add=True) isSaved = models.BooleanField(default=...
OsamaRiasat/Saffron-BE
Planning/models.py
models.py
py
2,400
python
en
code
0
github-code
21
[ { "api_name": "django.db.models.Model", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 9, "usage_type": "name" }, { "api_name": "django.db.models.AutoField", "line_number": 10, "usage_type": "call" }, { "api_name": ...
9728205252
""" Deep fashion dataset: http://mmlab.ie.cuhk.edu.hk/projects/DeepFashion.html """ from .image_dataset import ImageDataset from pathlib import Path import pandas as pd from easydl.metrics import recall_in_k_pytorch, recall_in_k_query_index import numpy as np from easydl.config import get_config_from_cmd def show_i...
xiaonanzzz/easy-deep-learning-pytorch
easydl/datasets/deep_fashion.py
deep_fashion.py
py
4,208
python
en
code
1
github-code
21
[ { "api_name": "easydl.config.get_config_from_cmd", "line_number": 23, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 25, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 26, "usage_type": "call" }, { "api_name": "pandas.re...
70387768372
import traceback import numpy as np from collections import OrderedDict from pygeoiga.nurb.nurb_creation import NURB from pygeoiga.plot.nrbplotting_mpl import p_cpoints, p_knots, p_surface, create_figure from pygeoiga.plot.solution_mpl import p_temperature import matplotlib.colors as mcolors from tqdm.autonotebook impo...
danielsk78/pygeoiga
pygeoiga/nurb/multipatch_NURBS.py
multipatch_NURBS.py
py
10,666
python
en
code
2
github-code
21
[ { "api_name": "collections.OrderedDict", "line_number": 13, "usage_type": "call" }, { "api_name": "pygeoiga.nurb.nurb_creation.NURB", "line_number": 15, "usage_type": "name" }, { "api_name": "matplotlib.colors.CSS4_COLORS.keys", "line_number": 29, "usage_type": "call" }...
2208474342
import pygame import time import numpy as np from pygame.draw import * def mandelbrot(precision, area): """ Draw a mandelbrot set in selected area on the screen. Making "precision" iterations for every point on the screen. area = (xmin,ymin,delta) """ #start = time.time() #measuring calculating time (starting po...
SimeonStylites/My_programs
Mandelbrot-2.py
Mandelbrot-2.py
py
2,419
python
en
code
0
github-code
21
[ { "api_name": "numpy.zeros", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.mgrid", "line_number": 17, "usage_type": "attribute" }, { "api_name": "numpy.zeros_like", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.abs", "line_n...
74306470133
from django.shortcuts import render from Utilities.views import EmptyAPIView, AuthAPIView, JsonMessage from .models import Menu, Pizza, Ingredient from django.http import HttpResponse import random import json # Create your views here. class RetrieveIngredients(AuthAPIView): def post(self,request): in...
GiorgioBelli/Accunniscila
src/Accunniscila/Menu/views.py
views.py
py
1,827
python
en
code
2
github-code
21
[ { "api_name": "Utilities.views.AuthAPIView", "line_number": 14, "usage_type": "name" }, { "api_name": "models.Ingredient.objects.all", "line_number": 16, "usage_type": "call" }, { "api_name": "models.Ingredient.objects", "line_number": 16, "usage_type": "attribute" }, ...
71173892852
# -*- coding: utf-8 -*- import logging from copy import deepcopy from openn.openn_exception import OPennException from openn.models import * class Updater(object): logger = logging.getLogger(__name__) def __init__(self, repository_configs): self._configs = repository_configs def update(self, t...
KislakCenter/openn
openn/repository/updater.py
updater.py
py
1,998
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" } ]
38794771516
import json import os # import cookielib # import urllib2 from bs4 import BeautifulSoup import re import date_converter import django import pymysql from urllib.request import urlopen from back.settings import BASE_DIR os.environ.setdefault("DJANGO_SETTINGS_MODULE", "back.settings") django.setup() from apps import mod...
Xenorian/mirror_v2
back/apps/github_spider/Requester/ReposRequester.py
ReposRequester.py
py
34,231
python
en
code
2
github-code
21
[ { "api_name": "os.environ.setdefault", "line_number": 13, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 13, "usage_type": "attribute" }, { "api_name": "django.setup", "line_number": 14, "usage_type": "call" }, { "api_name": "apps.github_spider...
29276004675
import os import re import logging import argparse from ikomia.core import config logger = logging.getLogger(__name__) def _to_pascal_case(string: str): return re.sub(r"(_|-)+", " ", string).title().replace(" ", "") def _get_full_base_class(base_class: str): if base_class == "CWorkflowTask": retur...
Ikomia-dev/create_ikomia_algorithm
create_ikomia_algorithm.py
create_ikomia_algorithm.py
py
4,310
python
en
code
4
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path", "line_number": 33,...
27624581484
"""Training procedure for NICE. """ import argparse import torch, torchvision from torchvision import transforms import numpy as np import VAE import pickle import matplotlib.pyplot as plt import os N = 100 def train(vae : VAE.Model, trainloader, optimizer, epoch, device): vae.train() # set to training mode ...
AvivSham/VAE_pytorch
train.py
train.py
py
4,785
python
en
code
1
github-code
21
[ { "api_name": "VAE.Model", "line_number": 17, "usage_type": "attribute" }, { "api_name": "VAE.Model", "line_number": 31, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 31, "usage_type": "attribute" }, { "api_name": "torch.no_grad", "...
6541028697
from django.urls import path from polls import class_views urlpatterns = [ path("poll-class-view/", class_views.PollView.as_view(), name="poll-class-view"), path("question-class-view/", class_views.QuestionView.as_view(), name="question-class-view"), path("answer-class-view/", class_views.AnswerView.as_vi...
KarolinaKL88/mysite
polls/class_urls.py
class_urls.py
py
1,640
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "polls.class_views.PollView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "polls.class_views.PollView", "line_number": 6, "usage_type": "attribute" }, { "...
40319907451
from flask import Flask, render_template, request from modal import Modal from rapid_api import MovieDatabase recommender_obj = Modal() app = Flask(__name__) app.config['SECRET_KEY'] = '' @app.route('/', methods=['GET', 'POST']) def home(): return render_template("index.html") @app.route('/recomend', methods=['...
JAIDHEER007/Project-Space-3
main.py
main.py
py
920
python
en
code
0
github-code
21
[ { "api_name": "modal.Modal", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.request.method", ...
71922360053
from appium import webdriver from UI自动化框架2.page1.basepage1 import BasePage from UI自动化框架2.page1.main1 import Main class App(BasePage): _appPackage = 'com.xueqiu.android' _appActivity = '.view.WelcomeActivityAlias' def start(self): if self._driver is None: des_caps...
dingyuanxia/appiumxueqiu
page1/app1.py
app1.py
py
982
python
en
code
0
github-code
21
[ { "api_name": "UI自动化框架2.page1.basepage1.BasePage", "line_number": 7, "usage_type": "name" }, { "api_name": "appium.webdriver.Remote", "line_number": 22, "usage_type": "call" }, { "api_name": "appium.webdriver", "line_number": 22, "usage_type": "name" }, { "api_nam...
38523428526
import datetime from forex_python.converter import CurrencyRates from forex_python.converter import CurrencyCodes c = CurrencyRates() usd = c.get_rates('USD') print(usd) krw = c.get_rates('KRW') print(krw) c = CurrencyRates() usd_krw = c.get_rates('USD')['KRW'] print(usd_krw) krw_usd = c.get_rates('KRW')['USD'] pr...
minwook-shin/learning-code
python/Forex-test/main.py
main.py
py
876
python
en
code
6
github-code
21
[ { "api_name": "forex_python.converter.CurrencyRates", "line_number": 8, "usage_type": "call" }, { "api_name": "forex_python.converter.CurrencyRates", "line_number": 14, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 20, "usage_type": "call" },...
11983560262
from torch.utils.data import Dataset import numpy as np import os class CLDHGH(Dataset): def __init__(self,path,start,end,size,gan_scale=False): height=1800 width=3600 picts=[] for i in range(start,end): s=str(i) if i<10: s="0"+s fi...
Meso272/PyTorch-GAN
implementations/cesm.py
cesm.py
py
1,241
python
en
code
null
github-code
21
[ { "api_name": "torch.utils.data.Dataset", "line_number": 4, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.fromfile", ...
39871244954
from config.models import Author , Quote from mongoengine.errors import NotUniqueError from config.db import mongoconect import json author_data = 'authors.json' quote_data = 'qoutes.json' def data_load(data): with open(data, encoding='utf-8') as fd: data_json = json.load(fd) return(data_json) def...
MSRoma/python_web_hw8
MongoDB/seed.py
seed.py
py
1,048
python
en
code
0
github-code
21
[ { "api_name": "json.load", "line_number": 13, "usage_type": "call" }, { "api_name": "config.models.Author.objects", "line_number": 19, "usage_type": "call" }, { "api_name": "config.models.Author", "line_number": 19, "usage_type": "name" }, { "api_name": "config.mo...
23286921431
import cv2 as cv img = cv.imread('Photos/group 1.jpg') gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY) #Reads the xml face haar_cascade = cv.CascadeClassifier('haar_face.xml') #Returns coordinates of rectangle with FACe faces_rect = haar_cascade.detectMultiScale(gray,scaleFactor = 1.1,minNeighbors=1) print("Number of fa...
DeVcB13d/OpenCV_Tut
15_Detect_faces.py
15_Detect_faces.py
py
477
python
en
code
0
github-code
21
[ { "api_name": "cv2.imread", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 6, "usage_type": "attribute" }, { "api_name": "cv2.CascadeClassifier", ...
26929313243
import os import numpy as np import cv2 import rasterio import csv import math img_dir = '/home/Image_Processing/July/images_w7/' bin_dir = '/home/Image_Processing/July/binaries_w7/' csv_dir = '/home/Image_Processing/July/csv_w7/' img_filenames = sorted(os.listdir(img_dir)) csv_filenames = sorted(os.listdir(csv_dir))...
aNaravi/crop-counting-and-detection
annotating/geo-csv_to_bin.py
geo-csv_to_bin.py
py
1,176
python
en
code
0
github-code
21
[ { "api_name": "os.listdir", "line_number": 12, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 16, "usage_type": "call" }, { "api_name": "rasterio.open", "line_number": 1...
29361802401
__doc__ = "" __author__ = "Reed Essick (reed.essick@ligo.org)" #------------------------------------------------- import glob import time import numpy as np import subprocess as sp ### non-standard libraries try: from lalframe import frread except ImportError: frread = None try: from lal.gpstime impor...
reedessick/exposure
exposure/datafind.py
datafind.py
py
6,781
python
en
code
0
github-code
21
[ { "api_name": "lalframe.frread", "line_number": 17, "usage_type": "name" }, { "api_name": "lal.gpstime.tconvert", "line_number": 22, "usage_type": "name" }, { "api_name": "lal.gpstime.tconvert", "line_number": 36, "usage_type": "name" }, { "api_name": "lal.gpstime...
71019292854
import numpy as np import scipy.sparse as sp import torch from sklearn.metrics import f1_score from collections import defaultdict import matplotlib.pyplot as plt import dill metrics=['recall@20','recall@40', 'recall@60', 'recall@80', 'recall@100', 'prec@20', 'prec@40', 'prec@60', 'prec@80', 'prec@100', 'hit@20', 'hit@...
linmengsysu/HetLGN
plot.py
plot.py
py
1,878
python
en
code
2
github-code
21
[ { "api_name": "dill.load", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 22, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
20934782825
# a script to scrape data from bls for a particular metro/nonmetro region using beautiful soup import requests import pandas as pd import numpy as np from bs4 import BeautifulSoup from tabulate import tabulate import sqlite3 import re conn = sqlite3.connect('/mnt/c/Users/seans/OneDrive/Desktop/better_bls_fl...
syeo-1/betterbls
wage_data_helpers/retrieve_data.py
retrieve_data.py
py
5,347
python
en
code
0
github-code
21
[ { "api_name": "sqlite3.connect", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 49, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 59, "usage_type": "call" }, { "api_name": "pandas.DataFrame", ...
17809056627
import argparse, os, sys, utils, mixtas, execute import logging import datetime # parse arguments (-B) parser = argparse.ArgumentParser(description="Script to infer a potential co-infection") # INPUT parameters parser.add_argument("inp_dir", help="input directory that contains the fastq files") parser.add_argument("-...
alicia2p/TFM_tbcoinfections
tb_coinfection.py
tb_coinfection.py
py
5,626
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 55, "usage_type": "call" }, { "api_name": "os.path", ...
33200857248
""" Train a detector with standard patches and transformed patches. Usage: python patch_network_train_point.py --training mexico_tilde_p24_Mexico_train_point --test mexico_tilde_p24_Mexico_test_point [Option] General options: --learning_rate Starting learning rate (default 0.01) --training Name of the tr...
ColumbiaDVMM/Transform_Covariant_Detector
tensorflow/patch_network_train_point.py
patch_network_train_point.py
py
7,430
python
en
code
34
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 41, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 75, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 75, "usage_type": "name" }, { "api_name": "patch...
24261618801
import cv2 import numpy as np from torchvision import transforms from PIL import Image to_pil = transforms.ToPILImage() def recenterImageOnEyes(img,window): blurwindow = 7 #31 # Must be an odd number rows = len(img) cols = len(img[0]) grey = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) blur = cv2.GaussianBlur(g...
oliviermirat/ZZDeepRollover
zzdeeprollover/imageTransformFunctions.py
imageTransformFunctions.py
py
1,493
python
en
code
1
github-code
21
[ { "api_name": "torchvision.transforms.ToPILImage", "line_number": 6, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 6, "usage_type": "name" }, { "api_name": "cv2.cvtColor", "line_number": 13, "usage_type": "call" }, { "api_name": "c...
38202102559
# -*- coding: utf-8 -*- """ Created on Fri Nov 22 20:13:19 2019 @author: cogillsb """ import os from keras.layers import Input, Dense, concatenate from keras.layers.advanced_activations import LeakyReLU from keras.models import Model from keras.optimizers import Adam import numpy as np import matplotlib....
syanglab/HRM
hrm_aws.py
hrm_aws.py
py
6,069
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 29, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 29, "usage_type": "name" }, { "api_name": "numpy.arange", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.array", ...
31100607471
import requests from datetime import datetime, timedelta import time # EDIT THIS SECTION age = 36 pincodeMode = False pincodes = ["600001"] states = ["Tamil Nadu"] districts = ["Chennai", "Chengalpet"] num_days = 2 retry = 1 infiniteLoop = True #filter_type = ["COVAXIN","COVISHIELD"] #filter_dose = ["available_capaci...
sktg84/CoWin-Vaccine-Notifier
script.py
script.py
py
7,002
python
en
code
null
github-code
21
[ { "api_name": "requests.get", "line_number": 29, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 43, "usage_type": "call" }, { "api_name": "datetime.datetime.today", "line_number": 60, "usage_type": "call" }, { "api_name": "datetime.datetime",...
34529736165
from django.forms import ModelForm, DateInput from recipes.models import DayIntensity class DayIntensityForm(ModelForm): class Meta: model = DayIntensity # datetime-local is a HTML5 input type, format to make date time show on fields widgets = { 'date': DateInput(attrs={'type': 'date'}, format='%Y-...
Imran122/food_update
cal/forms.py
forms.py
py
1,072
python
en
code
0
github-code
21
[ { "api_name": "django.forms.ModelForm", "line_number": 4, "usage_type": "name" }, { "api_name": "recipes.models.DayIntensity", "line_number": 6, "usage_type": "name" }, { "api_name": "django.forms.DateInput", "line_number": 9, "usage_type": "call" } ]
7607971377
from aiogram.types import InlineQuery, InputTextMessageContent, InlineQueryResultArticle,InlineQueryResultPhoto,InputMediaPhoto,InputMediaVideo,InlineQueryResultVideo,InlineQueryResultAudio,InputMediaAudio, InputMessageContent from loader import dp from utils.ismlar import ismlar_manosi import hashlib # @dp.in...
rakhmatov-kamoliddin/Ismlar-manosi_tg-bot
handlers/users/inlinemode.py
inlinemode.py
py
4,076
python
en
code
1
github-code
21
[ { "api_name": "aiogram.types.InlineQuery", "line_number": 26, "usage_type": "name" }, { "api_name": "utils.ismlar.ismlar_manosi", "line_number": 28, "usage_type": "call" }, { "api_name": "aiogram.types.InputTextMessageContent", "line_number": 30, "usage_type": "call" },...
73036775413
""" Utilities for IGMSurvey code """ from __future__ import print_function, absolute_import, division, unicode_literals import glob import json import pdb from linetools import utils as ltu from pyigm.abssys import utils as pyasu from .igmsurvey import IGMSurvey def load_sys_files(inp, type, ref=None, sys_path=F...
LiuFang816/SALSTM_py_data
python/pyigm_pyigm/pyigm-master/pyigm/surveys/utils.py
utils.py
py
2,398
python
en
code
9
github-code
21
[ { "api_name": "pyigm.abssys.utils.class_by_type", "line_number": 39, "usage_type": "call" }, { "api_name": "pyigm.abssys.utils", "line_number": 39, "usage_type": "name" }, { "api_name": "glob.glob", "line_number": 42, "usage_type": "call" }, { "api_name": "linetoo...
74813030131
import collections class Solution(object): def uncommonFromSentences(self, A, B): """ :type A: str :type B: str :rtype: List[str] """ l1, l2 = A.split(), B.split() dic = collections.Counter(l1 + l2) res = [] for word in dic: if dic[...
kduan005/Leetcode
leetcode884.py
leetcode884.py
py
393
python
en
code
0
github-code
21
[ { "api_name": "collections.Counter", "line_number": 10, "usage_type": "call" } ]
17915521445
from django.urls import path, include from . import views urlpatterns = [ path('', views.home, name='home'), path('about/', views.about, name='about'), path('community/', views.community, name='community'), path('popular/', views.all_questions, name='all_questions'), path('my_communities/', views.m...
pavnkb/Django_Forum
forum/urls.py
urls.py
py
1,424
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", ...
9842565131
import pandas as pd import matplotlib.pyplot as plt def classify_by_season(data): data['order_date'] = pd.to_datetime(data['order_date']) season_map = {1: 'winter', 2: 'spring', 3: 'summer', 4: 'fall'} data['season'] = data['order_date'].dt.month.map(lambda x: season_map[(x % 12 + 3) // 3]) demand_by_t...
Waylandite/TaidiProject
第一问/08season_order.py
08season_order.py
py
1,231
python
en
code
0
github-code
21
[ { "api_name": "pandas.to_datetime", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.show", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 12, "usage_type": "name" }, { "api_name": "pandas.to_...
38986103235
from collections import Counter def solve_it(f: str) -> None: """ Return a consensus string and profile matrix for the collection. (If several possible consensus strings exist, then you may return any one of them.) >>> solve_it('cons-sample_dataset') ATGCAACT A: 5 1 0 0 5 5 0 0 C: 0 0 1 4 2 0...
weitero/rosalind_solutions
bioinformatics_stronghold/cons-consensus_and_profile.py
cons-consensus_and_profile.py
py
869
python
en
code
0
github-code
21
[ { "api_name": "collections.Counter", "line_number": 24, "usage_type": "call" } ]
24061092840
import argparse import json import matplotlib.pyplot as plt import numpy as np import time # # # # # # # # # # # F U N C T I O N S # # # # # # # # # # def analyze_and_plot(filename): # Load the training file and keep a count of how many observations we have per class label counts = {} phrases = {} N = 0 with op...
tjdaley/nb_classifier
sample_analyzer.py
sample_analyzer.py
py
1,732
python
en
code
1
github-code
21
[ { "api_name": "json.loads", "line_number": 20, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 32, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.bar", "line_number": 40, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "...
29571958567
import argparse parser = argparse.ArgumentParser() parser.add_argument('-e','--entry',type=float,help="Entry Price") parser.add_argument('-sl','--stoploss',type=float,help="Stop Loss") parser.add_argument('-r','--risk',type=float,help="Total amount you want to risk(in %)") parser.add_argument('-a','--account',type=fl...
Sayan-404/Position-Size-Calculator
psc.py
psc.py
py
1,525
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 4, "usage_type": "call" } ]
15436732172
from enum import Enum import pygame class PlayerControls: def __init__(self): self.left = pygame.K_LEFT self.right = pygame.K_RIGHT self.up = pygame.K_UP self.down = pygame.K_DOWN def set_left(self, key): self.left = key def set_right(self, key): self.rig...
GrazerComputerClub/Snake
config.py
config.py
py
1,457
python
en
code
0
github-code
21
[ { "api_name": "pygame.K_LEFT", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pygame.K_RIGHT", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pygame.K_UP", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pygame.K_DOWN",...
33045410222
from django.shortcuts import render, redirect, HttpResponse, get_object_or_404 from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.views import View from .forms import LoginForm from .mod...
AntonLazutin/PyStore
ecom/views.py
views.py
py
3,232
python
en
code
0
github-code
21
[ { "api_name": "django.views.View", "line_number": 10, "usage_type": "name" }, { "api_name": "django.shortcuts.render", "line_number": 21, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 31, "usage_type": "call" }, { "api_name": "d...
73369566452
# -*- coding: utf-8 -*- #--------------------------------------------------------------- # Importing libraries import numpy as np import pandas as pd import seaborn as sns import tensorflow as tf import matplotlib.pyplot as plt #--------------------------------------------------------------- # Importing da...
TylerTsang/Data-Science-Archive
Practice/Tensorflow/01 -Tensorflow Practice_Bank.py
01 -Tensorflow Practice_Bank.py
py
3,656
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "seaborn.countplot", "line_number": 31, "usage_type": "call" }, { "api_name": "seaborn.pairplot", "line_number": 32, "usage_type": "call" }, { "api_name": "sklearn.preprocess...
4067581592
import numpy as np import os from fastcluster import complete from tqdm import tqdm import sys sys.path.append("..") from utils.metrics import compute_metrics from scipy.cluster.hierarchy import fcluster class CompleteLinkage(object): def __init__(self, config, target_dir): self.thresholds = config["thres...
ModShift/ModShift
baselines/completelinkage.py
completelinkage.py
py
2,474
python
en
code
0
github-code
21
[ { "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.exists", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number...
533072233
import math import numpy as np from scipy.stats import norm from cgpm.crosscat.engine import Engine from cgpm.crosscat.state import State from cgpm.mixtures.dim import Dim from cgpm.mixtures.view import View from cgpm.utils import general as gu def gen_data_table(n_rows, view_weights, cluster_weights, cctypes, dis...
hiddenswitch/cgpm
src/utils/test.py
test.py
py
12,353
python
en
code
null
github-code
21
[ { "api_name": "cgpm.utils.general.gen_rng", "line_number": 64, "usage_type": "call" }, { "api_name": "cgpm.utils.general", "line_number": 64, "usage_type": "name" }, { "api_name": "numpy.zeros", "line_number": 79, "usage_type": "call" }, { "api_name": "cgpm.mixtur...
15936859581
import collections import copy import gc from tensorflow.python.framework import _python_memory_checker_helper from tensorflow.python.platform import tf_logging as logging from tensorflow.python.profiler import trace def _get_typename(obj): objtype = type(obj) name = objtype.__name__ module = getattr(objtype, '_...
Mockingbird01001/NLG-code-generator-LSTM
work/data/data_model/batch_2/python_memory_checker.py.transformed.py
python_memory_checker.py.transformed.py
py
3,487
python
en
code
0
github-code
21
[ { "api_name": "gc.collect", "line_number": 17, "usage_type": "call" }, { "api_name": "gc.get_objects", "line_number": 18, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 19, "usage_type": "call" }, { "api_name": "collections.Counter...
2754178331
# Imports import streamlit as st import pandas as pd import numpy as np from sklearn.metrics.pairwise import cosine_similarity st.set_page_config( page_title='Song Recommendation App', initial_sidebar_state='expanded' ) # Load Dataset @st.cache def load_data(data): df = pd.read_csv(data) df.drop(colum...
bhoskins23/Music_Recommender_Project
song_rec_app.py
song_rec_app.py
py
4,618
python
en
code
0
github-code
21
[ { "api_name": "streamlit.set_page_config", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "streamlit.cache", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pandas....
36982844008
from pydantic import BaseSettings, Field from saq.job import CronJob from app.tasks import counter, scrape_quote class Settings(BaseSettings): APP_ENV: str = Field("local", env="APP_ENV") DEBUG: bool = Field(True, env="DEBUG") REDIS_HOST = "localhost" REDIS_PORT = 6379 REDIS_DB = 0 CACHES = {...
aprilahijriyan/popol
examples/app/settings/local.py
local.py
py
1,979
python
en
code
4
github-code
21
[ { "api_name": "pydantic.BaseSettings", "line_number": 7, "usage_type": "name" }, { "api_name": "pydantic.Field", "line_number": 8, "usage_type": "call" }, { "api_name": "pydantic.Field", "line_number": 9, "usage_type": "call" }, { "api_name": "app.tasks.scrape_quo...
20912254070
import requests from datetime import datetime, timedelta from timeloop import Timeloop import time from decimal import Decimal # Для добавления тикера в отслеживание, добавьте его в массив tickers = ['XRPUSDT'] tl = Timeloop() class PriceObserver: def __init__(self, ticker): self.ticker = ticker ...
Wagonowod/futures
api.py
api.py
py
2,164
python
en
code
0
github-code
21
[ { "api_name": "timeloop.Timeloop", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 31, "usage_type": "call" }, { "api_name": "decimal.Decimal", ...
23901718413
from django.http import response from django.shortcuts import redirect, render from django.core.files.storage import FileSystemStorage from matplotlib import image import requests import json import xmltodict from .utils import get_plot, toDate BASE_API_URL = "http://127.0.0.1:4000/api/" # Create your views here. def...
josearchi15/IPC2_Proyecto3_201314386
sat_application/satapp/views.py
views.py
py
3,031
python
en
code
0
github-code
21
[ { "api_name": "django.shortcuts.render", "line_number": 14, "usage_type": "call" }, { "api_name": "xmltodict.parse", "line_number": 21, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 23, "usage_type": "call" }, { "api_name": "json.loads", "...
33899052133
from typing import Any, Dict, List, Type, TypeVar, Union import attr from ..models.tax_collection_model import TaxCollectionModel from ..models.tax_collection_responsible_party import TaxCollectionResponsibleParty from ..types import UNSET, Unset T = TypeVar("T", bound="TaxCollection") @attr.s(auto_attribs=True) c...
milyord/sp-api
sp/orders_v0/models/tax_collection.py
tax_collection.py
py
2,863
python
en
code
1
github-code
21
[ { "api_name": "typing.TypeVar", "line_number": 9, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 22, "usage_type": "name" }, { "api_name": "types.Unset", "line_number": 22, "usage_type": "name" }, { "api_name": "models.tax_collection_model.Ta...
21526182012
import numpy as np import rospy import rostopic import yaml import pickle import franka_gripper.msg from franka_gripper.msg import GraspEpsilon from franka_teleop.srv import * from sensor_msgs.msg import Image from geometry_msgs.msg import PoseStamped from sensor_msgs.msg import JoyFeedback, JoyFeedbackArray, JointStat...
ykawamura96/franka_demos
franka_teleop/python/task_executer.py
task_executer.py
py
12,833
python
en
code
0
github-code
21
[ { "api_name": "rospy.init_node", "line_number": 49, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 50, "usage_type": "call" }, { "api_name": "rospy.ServiceProxy", "line_number": 51, "usage_type": "call" }, { "api_name": "yaml.safe_load", "...
24336962931
#WELCOME PAGE import requests import streamlit as st from streamlit_lottie import st_lottie from st_on_hover_tabs import on_hover_tabs import json st.set_page_config( page_title="hack.her", page_icon="👩‍💻", layout="wide", initial_sidebar_state="expanded" ) #sidebar # st.header("Custom tab componen...
mmsarkar/HCSGC
Home.py
Home.py
py
1,644
python
en
code
1
github-code
21
[ { "api_name": "streamlit.set_page_config", "line_number": 10, "usage_type": "call" }, { "api_name": "streamlit.balloons", "line_number": 29, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 31, "usage_type": "call" }, { "api_name": "streamli...
8590310953
import configparser import psycopg2 from sql_queries import create_table_queries, drop_table_queries def drop_tables(cur, conn): """ The function to drop database Parameters: cur : The cursor that will be used to execute queries. conn : The connection towards current connecti...
afontana1/Data-Engineering
projects/Data Engineering/etl-aws-redshift-python/create_tables.py
create_tables.py
py
1,154
python
en
code
2
github-code
21
[ { "api_name": "sql_queries.drop_table_queries", "line_number": 15, "usage_type": "name" }, { "api_name": "sql_queries.create_table_queries", "line_number": 29, "usage_type": "name" }, { "api_name": "configparser.ConfigParser", "line_number": 35, "usage_type": "call" }, ...
39504078698
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Nov 30 10:25:27 2020 @author: yefersontorresberru """ import time from selenium import webdriver import os from pymongo import MongoClient try: conn = MongoClient() print("Connected successfully!!!") except: print("Could not connect ...
torresyeferson/DattaMinigCorruption
Scraping.py
Scraping.py
py
6,592
python
en
code
0
github-code
21
[ { "api_name": "pymongo.MongoClient", "line_number": 14, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number": 177, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 202, "usage_type": "call" }, { "api_name": "selenium.web...
74853327732
from django.urls import path from .views import HelloView,IndexPageView,GoToIndexView from django.views.generic.base import RedirectView urlpatterns = [ path('hello/<slug:name>/', HelloView.as_view() , name="hello-view"), path('index/<slug:name>/', IndexPageView.as_view() , name="index-view...
dalvescb/django_templates
class_views/done/urls.py
urls.py
py
528
python
en
code
2
github-code
21
[ { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "views.HelloView.as_view", "line_number": 7, "usage_type": "call" }, { "api_name": "views.HelloView", "line_number": 7, "usage_type": "name" }, { "api_name": "django.urls.pat...
32360912990
import os from facebook_business.adobjects.adimage import AdImage def create_hash_images(image_files: dict, path: str, ad_account_id: str): files = [] for file in image_files: image = image_files[file] image_path = os.path.join(path, image.filename) files.append(image_path) ima...
PedroCruzADS/oxygen-campaign-creator
functions/creative_images.py
creative_images.py
py
635
python
en
code
0
github-code
21
[ { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "facebook_business.adobjects.adimage.AdImage", "line_number": 16, "usage_type": "call" }, { "api_name": "f...
15710192190
import logging import numpy as np import scipy.sparse import tensorflow as tf from sklearn.model_selection import train_test_split from typing import ( Optional, Dict, Text, List, Tuple, Any, Union, Generator, NamedTuple, ValuesView, ItemsView, ) from collections import def...
xiaolinpeter/rasa2.0_nlu
rasa/utils/tensorflow/model_data.py
model_data.py
py
28,801
python
en
code
30
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 24, "usage_type": "call" }, { "api_name": "typing.Dict", "line_number": 34, "usage_type": "name" }, { "api_name": "typing.Text", "line_number": 34, "usage_type": "name" }, { "api_name": "typing.List", "line_num...
33926635560
# coding: utf-8 from sqlalchemy import Column, ForeignKey, Index, Integer, Numeric, SmallInteger, String, Table, text from sqlalchemy.dialects.mssql.base import MONEY from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() metadata = Base.metadata cl...
higorvaz/Senior-Dev-Technical-Test-DotNet
Python/Bank.py
Bank.py
py
2,846
python
en
code
0
github-code
21
[ { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 8, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 15, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer", "line_number": 15, "usage_type": "argument" }, { ...
29476716341
import math import torch from torch import nn from torch.nn import functional as F import numpy as np import neural_network as mm from neural_network import tf, tint from replay_buffer import ReplayBuffer from envs import AtariEnv from rainbow import DQN parser = argparse.ArgumentParser() parser.add_argument("--lea...
bengioe/interference_and_generalization_in_td
atari_experiments/atari_td_lambda.py
atari_td_lambda.py
py
7,924
python
en
code
4
github-code
21
[ { "api_name": "torch.optim.SGD", "line_number": 48, "usage_type": "call" }, { "api_name": "torch.optim", "line_number": 48, "usage_type": "attribute" }, { "api_name": "torch.optim.SGD", "line_number": 50, "usage_type": "call" }, { "api_name": "torch.optim", "l...
29706958820
from django.http import HttpResponse from django.shortcuts import render, redirect from openpyxl import load_workbook from webapp import models from webapp.utils.pagination import Pagination def depart_list(request): queryset = models.Department.objects.all() page_object = Pagination(request, queryset, page_...
benben555/djangoProject
exp1/webapp/views/depart.py
depart.py
py
1,674
python
en
code
0
github-code
21
[ { "api_name": "webapp.models.Department.objects.all", "line_number": 10, "usage_type": "call" }, { "api_name": "webapp.models.Department", "line_number": 10, "usage_type": "attribute" }, { "api_name": "webapp.models", "line_number": 10, "usage_type": "name" }, { "...
28949748113
import glob from torch.utils.tensorboard import SummaryWriter import torch import torch.nn as nn import torch.utils.data as data import cv2 import os import numpy as np from natsort import natsorted class Max(nn.Module): def __init__(self): super(Max, self).__init__() def forward(self,x): #输入是 b c h w ...
pksolar/sailus
callSum/callbase_3label_c12to4/callNet/model1.py
model1.py
py
2,950
python
en
code
0
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 11, "usage_type": "name" }, { "api_name": "torch.nn.Module", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.nn", "li...
10356290573
from distutils.command.config import config import gym import torch import numpy as np from agents.vpg_agent import VPGAgent from agents.ppo_agent import PPOAgent from processor import InputProcessor import torch.nn as nn from logger import Logger from metric import Metrics,Timer from config import Config from sampler ...
DiligentPanda/mrllib
mrl/trainer.py
trainer.py
py
3,966
python
en
code
0
github-code
21
[ { "api_name": "mpi_pytorch.setup_pytorch_for_mpi", "line_number": 22, "usage_type": "call" }, { "api_name": "logger.Logger", "line_number": 25, "usage_type": "call" }, { "api_name": "pprint.pformat", "line_number": 26, "usage_type": "call" }, { "api_name": "metric...
187904878
import numpy as np from ..util.convert import ConvertibleType from typing import Any, Optional, Iterable, Callable, Tuple, List, Dict GLOBAL_GROUP = '' class analyzer_property: def __init__( self, client_name: Optional[str] = None, *, default, detail: Opti...
accup/VyJit
_lib/analyzer/core.py
core.py
py
4,367
python
en
code
0
github-code
21
[ { "api_name": "typing.Optional", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 16, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 16, "usage_type": "name" }, { "api_name": "util.convert.ConvertibleT...
74097202934
import argparse import os import argparse import subprocess import sys import codecs import logging import json from time import gmtime, strftime import checker import conf import aux parser = argparse.ArgumentParser(description='Linux kernel patch checker') parser.add_argument('-k', action='store', dest='kconfig',...
FYNQ/PIT
src/python/build_utils.py
build_utils.py
py
4,881
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 16, "usage_type": "call" }, { "api_name": "aux.is_tag_bef", "line_number": 40, "usage_type": "call" }, { "api_name": "conf.BASE", "line_number": 41, "usage_type": "attribute" }, { "api_name": "aux.is_patched"...
72145094452
import math from torch import empty from scripts.functional import lossMSE, dlossMSE, lossMAE, dlossMAE # Losses classes class LossMSE: """Class representing a Mean Squared Loss.""" def __init__(self): """Builds the Mean Squared Loss instance. """ self.output = None self.tar...
zbirobin/Deep_Learning_Project_2
scripts/training.py
training.py
py
5,905
python
en
code
0
github-code
21
[ { "api_name": "scripts.functional.lossMSE", "line_number": 28, "usage_type": "call" }, { "api_name": "scripts.functional.dlossMSE", "line_number": 39, "usage_type": "call" }, { "api_name": "scripts.functional.lossMAE", "line_number": 61, "usage_type": "call" }, { ...
36512161347
#!/usr/bin/python #!/usr/bin/env python """ ############################################################################### # Bucket Tracker # Uses Intel Realsense Tracking Camera T265 to obtain pose, position and # velocity. # Publishes results in Network Tables # This code is based on the intel realsense python wrap...
uutzinger/BucketTracker
BucketTrackerSimple.py
BucketTrackerSimple.py
py
3,727
python
en
code
1
github-code
21
[ { "api_name": "logging.basicConfig", "line_number": 42, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 42, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 44, "usage_type": "call" }, { "api_name": "thread...
21528500885
import time from aiohttp import web from aiohttp_session import get_session, setup from aiohttp_session.cookie_storage import EncryptedCookieStorage async def handler(request): session = await get_session(request) session['last_visit'] = time.time() return web.json_response({ "status": True }) ...
gzm1997/aio_ooad
test_session/app.py
app.py
py
526
python
en
code
7
github-code
21
[ { "api_name": "aiohttp_session.get_session", "line_number": 7, "usage_type": "call" }, { "api_name": "time.time", "line_number": 8, "usage_type": "call" }, { "api_name": "aiohttp.web.json_response", "line_number": 9, "usage_type": "call" }, { "api_name": "aiohttp....
38183458165
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from mpemu.cmodel import simple class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.fc = nn.Linear(576, 120) def forward(self, x): x = self.fc(x) return x ...
IntelLabs/FP8-Emulation-Toolkit
mpemu/cmodel/tests/linear_test.py
linear_test.py
py
1,591
python
en
code
50
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
21302688835
import string def lista2(): lista2.var=[] lista2() #decifra codice ocn cfratura multipla lettere=string.ascii_lowercase def diz_codifica(): diz_codifica.var={} diz_codifica() def codifica1(): codifica1.var="" codifica1() n=0 n1=0 cifratura1=0 n2=5 print(lettere) # ~ testo="djbpdjbpdjbpdjbpdjbpdjbpdjbpdjbpdjbp ekcq...
paolocassina2/file_python2
file_python/cifratura/a_c_c_a.py
a_c_c_a.py
py
5,246
python
it
code
0
github-code
21
[ { "api_name": "string.ascii_lowercase", "line_number": 7, "usage_type": "attribute" }, { "api_name": "string.ascii_lowercase", "line_number": 79, "usage_type": "attribute" }, { "api_name": "enchant.Dict", "line_number": 204, "usage_type": "call" } ]
29093162864
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Main script that runs the complete training, validation and test. """ import warnings import os os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8" import comet_ml import pytorch_lightning as pl import torch from pytorch_lightning.loggers import CometLogger from pytorch...
Jacob-Spiess/codraw_icr_generation
mymain.py
mymain.py
py
3,589
python
en
code
0
github-code
21
[ { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pytorch_lightning.seed_everything", "line_number": 31, "usage_type": "call" }, { "api_name": "icr.config.config", "line_number": 31, "usage_type": "name" }, { "api_name": "to...
71356825334
# # deobfuscator for scripts messed up with myobfuscate.com # by Einar Lielmanis <einar@beautifier.io> # # written by Stefano Sanfilippo <a.little.coder@gmail.com> # # usage: # # if detect(some_string): # unpacked = unpack(some_string) # # CAVEAT by Einar Lielmanis # # You really don't want to obfuscate your ...
beautify-web/js-beautify
python/jsbeautifier/unpackers/myobfuscate.py
myobfuscate.py
py
2,762
python
en
code
8,320
github-code
21
[ { "api_name": "urllib.parse.unquote", "line_number": 74, "usage_type": "call" }, { "api_name": "re.search", "line_number": 75, "usage_type": "call" }, { "api_name": "re.DOTALL", "line_number": 75, "usage_type": "attribute" }, { "api_name": "re.search", "line_n...
31983443947
import functools import math import operator class Graph: missing = math.nan is_missing = math.isnan def __init__(self, vertices): self._vertices = set(vertices) self._edges = {} self._out_edges = {vertex: {} for vertex in self._vertices} self._in_edges = {vertex: {} for v...
smailliwcs/pwscripts
python/graph.py
graph.py
py
3,221
python
en
code
0
github-code
21
[ { "api_name": "math.nan", "line_number": 7, "usage_type": "attribute" }, { "api_name": "math.isnan", "line_number": 8, "usage_type": "attribute" }, { "api_name": "functools.partial", "line_number": 78, "usage_type": "call" }, { "api_name": "operator.eq", "line...
14482274361
import copy import pickle import torch import numpy as np import torch.nn as nn from tqdm import tqdm from sklearn.metrics import log_loss, roc_auc_score, mean_squared_error from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder, MinMaxScaler from deepctr_torch_local.inputs...
ChenXiang1998/AutoCTR
CTRAPI/OurAPI.py
OurAPI.py
py
16,072
python
en
code
0
github-code
21
[ { "api_name": "deepctr_torch_local.inputs.SparseFeat", "line_number": 39, "usage_type": "call" }, { "api_name": "deepctr_torch_local.inputs.DenseFeat", "line_number": 41, "usage_type": "call" }, { "api_name": "deepctr_torch_local.inputs.VarLenSparseFeat", "line_number": 49, ...
11694199825
import requests from ctypes import windll import os def setDesktopBackground(path): windll.user32.SystemParametersInfoW(20, 0, path, 0) def getImage(): # Call NASA APOD API to get image URL response = requests.get('https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY') # Extract image URL from JSON ...
asayad1/APOD-Background
apod.py
apod.py
py
857
python
en
code
0
github-code
21
[ { "api_name": "ctypes.windll.user32.SystemParametersInfoW", "line_number": 6, "usage_type": "call" }, { "api_name": "ctypes.windll.user32", "line_number": 6, "usage_type": "attribute" }, { "api_name": "ctypes.windll", "line_number": 6, "usage_type": "name" }, { "a...
40601311041
import sys import json import os import time from flask import Flask, render_template, url_for, request, jsonify # Start by finding the root directory of our script... scriptDir = os.path.dirname(os.path.realpath(__file__)) # ...from which we can determine the root of the Market example... rootDir = os.path.abspath...
datawire/datawire-connect
examples/market/monolith/market.py
market.py
py
3,034
python
en
code
82
github-code
21
[ { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.abspath", "...
72495385652
import asyncio import random from aiogram import Bot, Dispatcher, executor, types from aiogram.types import ReplyKeyboardMarkup, KeyboardButton # for reply keyboard (sends message) import codecs import time import datetime from datetime import date BOT_TOKEN = "5726127993:AAEmqkmE569eZ8UrDhGWHScjGA_Q7St1eck" mates...
lolrdor1gamer/Mikolkakukushki
bot.py
bot.py
py
4,581
python
en
code
0
github-code
21
[ { "api_name": "aiogram.Bot", "line_number": 19, "usage_type": "call" }, { "api_name": "aiogram.Dispatcher", "line_number": 20, "usage_type": "call" }, { "api_name": "time.time", "line_number": 21, "usage_type": "call" }, { "api_name": "aiogram.types.KeyboardButton...
37329778774
import streamlit as st from langchain.embeddings import OpenAIEmbeddings, HuggingFaceInstructEmbeddings from langchain.vectorstores import FAISS from langchain.chat_models import ChatOpenAI from langchain.memory import ConversationBufferMemory from langchain.chains import ConversationalRetrievalChain from src.html_temp...
akshathmangudi/LLMBot
src/data_handling.py
data_handling.py
py
2,790
python
en
code
0
github-code
21
[ { "api_name": "langchain.embeddings.HuggingFaceInstructEmbeddings", "line_number": 25, "usage_type": "call" }, { "api_name": "langchain.vectorstores.FAISS.from_texts", "line_number": 26, "usage_type": "call" }, { "api_name": "langchain.vectorstores.FAISS", "line_number": 26, ...
12408542772
import requests, json from bs4 import BeautifulSoup from db import db def getSoupApi(url): headers = { 'user-agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36', 'referer' : 'https://fastcampus.co.kr/' } respon...
alstjs1207/CourseScrapper
functions.py
functions.py
py
3,292
python
en
code
1
github-code
21
[ { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 18, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 19, "usage_type": "call" }, { "api_name": "json.loads", "line_nu...
43544187008
import sys import json from io import BytesIO from PIL import Image from ultralytics import YOLO def process_image(image_data): # Load the image from the buffer image = Image.open(BytesIO(image_data)) # Convert the image to RGB if it's not already in that format if image.mode != 'RGB': image =...
BaxLi/AIUniversity-ARMS
python_script.py
python_script.py
py
1,294
python
en
code
1
github-code
21
[ { "api_name": "PIL.Image.open", "line_number": 9, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 9, "usage_type": "name" }, { "api_name": "io.BytesIO", "line_number": 9, "usage_type": "call" }, { "api_name": "ultralytics.YOLO", "line_number"...
71099294772
"""reseller document style Revision ID: e60af25c82e5 Revises: d2a568dc5043 Create Date: 2020-06-29 09:21:28.145313 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e60af25c82e5' down_revision = 'd2a568dc5043' branch_labels = None depends_on = None def upgrade...
vrcompugo/EV-Manager-Data-API
migrations/versions/e60af25c82e5_reseller_document_style.py
e60af25c82e5_reseller_document_style.py
py
872
python
en
code
0
github-code
21
[ { "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"...
1053582023
import pickle as pkl from tqdm import tqdm from random import choices import pandas as pd from collections import Counter,OrderedDict from os import listdir from os.path import isfile, isdir, join def negative_sampling(data, num_of_samples): all_last_click = [] for i in data: all_last_clic...
e199612/PC-LR
DART_DIN/01.neg_sampling.py
01.neg_sampling.py
py
3,959
python
en
code
0
github-code
21
[ { "api_name": "collections.Counter", "line_number": 15, "usage_type": "call" }, { "api_name": "random.choices", "line_number": 22, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 69, "usage_type": "call" }, { "api_name": "os.path.join", "lin...