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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43444307075 | from datetime import datetime, timedelta
import random
import re
import wsgiref.handlers
import cgi
import base64
from google.appengine.api import xmpp
from google.appengine.api import users
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.ereporter import report_gen... | AdamClements/MrsDoyle | app/mrsdoyle.py | mrsdoyle.py | py | 9,138 | python | en | code | 14 | github-code | 1 | [
{
"api_name": "datetime.datetime.now",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "google.appengine.api.xmpp.send_message",
"line_number": 27,
"usage_type": "call"
},
{
"ap... |
20148737612 | #!/usr/bin/env python3
from enum import Enum
from copy import deepcopy
import sys
import readline # make input() use readline <3
CODE_BASE_ADDR = 0x1000 # where code is loaded
MEMORY_SIZE = 0xFFFF # How big memory is
INSTR_PTR_LOC = 0x0
STACK_PTR_LOC = 0x1
BASE_PTR_LOC = 0x2
class InstructionFamily(Enum):
IMM = ... | Hypersonic/CyberTronix64k | ct64k_dbg.py | ct64k_dbg.py | py | 21,766 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "enum.Enum",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "sys.stdin.read",
"line_number": 295,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 29... |
73033882273 | # -*- coding: utf-8 -*-
'''
A salt module for SSL/TLS.
Can create a Certificate Authority (CA)
or use Self-Signed certificates.
:depends: - PyOpenSSL Python module (0.10 or later, 0.14 or later for
X509 extension support)
:configuration: Add the following values in /etc/salt/minion for the CA module
to funct... | shineforever/ops | salt/salt/modules/tls.py | tls.py | py | 56,256 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "distutils.version.LooseVersion",
"line_number": 121,
"usage_type": "call"
},
{
"api_name": "OpenSSL.__dict__.get",
"line_number": 121,
"usage_type": "call"
},
{
"api_name": "OpenSSL.__dict__",
"line_number": 121,
"usage_type": "attribute"
},
{
"api_... |
8503620014 | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pathlib import Path
Path("../Docs/graphs").mkdir(parents=True, exist_ok=True)
#Overhead Experiment
W = [25, 50, 100, 200, 400, 800]
L = ['p', 'a']
overhead_data = pd.read_csv("exp_data/overhead.csv")
fig = plt.figure(figsize = (10,10))
ax = ... | amiller68/CMSC-23010 | amiller68-cs23010-spr-21/HW3a/hw3a/analyze.py | analyze.py | py | 2,204 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplo... |
41331514007 | from datetime import datetime, timedelta
from functools import partial
from itertools import groupby
from odoo import api, fields, models, SUPERUSER_ID, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools.misc import formatLang
from odoo.osv import expression
from odoo.tools import float_is_zero, ... | sanlin-isgm/starglobal-dev | starglobal/models/sales_ext.py | sales_ext.py | py | 9,730 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "odoo.models.Model",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Char",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "odoo.fields",
... |
28456291602 | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 11 06:26:48 2020
@author: Lokeshwar
"""
# In this, the test dataset points are assigned to KMEANS clusters and DBSCAN clusters based on KNN Classifer.
import pandas as pd
from train import features
from sklearn.neighbors import KNeighborsClassifier
file_name = input ('E... | Lokeshwar0304/Data-Mining-CGM-System-Data | Meal data clusters/test.py | test.py | py | 1,453 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sklearn.neighbors.KNeighborsClassifier",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.neighbors.KNeighborsClassifier",
"line_number": 24,
"usage_type": "call"
... |
11731959047 | import argparse
import numpy as np
from keras.layers import Conv1D, BatchNormalization, Activation, MaxPool1D
from keras.layers import Dense, Dropout, GlobalMaxPool1D
from keras.models import Input, Model
from keras.utils import to_categorical
from keras.callbacks import EarlyStopping, ModelCheckpoint
from keras.optimi... | hungchingliu/ML2018SPRING | final/src/method2/train_raw.py | train_raw.py | py | 4,676 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "keras.models.Input",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "keras.layers.Conv1D",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "keras.layers.Activation",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "keras.... |
2144573080 | import requests
from bs4 import BeautifulSoup
from headers import HEADERS
from brainportindustries.hrefFinder import HrefFinder
from csvImporter import CsvImporter
class InfoFinder:
def __init__(self):
self.finder = HrefFinder()
self.url_list = self.finder.get_href_list()
self.importer = C... | redvox27/innovatiespotter | brainportindustries/infoFinder.py | infoFinder.py | py | 991 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "brainportindustries.hrefFinder.HrefFinder",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "csvImporter.CsvImporter",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "headers.HEADERS",
"line_number": 13,
"usage_type": "name"
},
{
... |
4441106692 | from flask import Flask, render_template, request, send_file, Response
import nltk
from gtts import gTTS
nltk.download('stopwords')
from nltk.corpus import stopwords
from nltk.cluster.util import cosine_distance
import numpy as np
import networkx as nx
import pyttsx3
import os
import tempfile
from io import BytesIO
imp... | Santho-osh/flaskProject | app.py | app.py | py | 2,872 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "nltk.download",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "nltk.corpus.stopwords"... |
29638027337 | from datetime import datetime
import time
import os
import time
import psutil
import subprocess
from config.configSetup import *
from databaseSendMSG import handle_error, handle_info
def is_vcgencmd_available():
try:
subprocess.check_output(['vcgencmd'], stderr=subprocess.DEVNULL)
return True
... | SoufianeElkha/trading_talib_ccxt_bitmex_XBTUSD | affichage/display.py | display.py | py | 5,203 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "subprocess.check_output",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "subprocess.DEVNULL",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.popen",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "databaseSend... |
5834626397 | import webapp2
import jinja2
import os
import model
import functions
##==============================================================================##
## CreateNewTeam.py Creates a new Team ##
##==============================================================================##
... | PureIso/PythonWebApp | Google App Engine - PlayerTag App/createnewteam.py | createnewteam.py | py | 3,212 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "jinja2.Environment",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "jinja2.FileSystemLoader",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
71109775394 | """
Endpoints for management of arkOS Applications.
arkOS Kraken
(c) 2016 CitizenWeb
Written by Jacob Cook
Licensed under GPLv3, see LICENSE.md
"""
import os
from flask import Blueprint, abort, jsonify, request, send_from_directory
from flask.views import MethodView
from arkos import applications
from arkos.message... | arkOScloud/kraken | kraken/frameworks/apps.py | apps.py | py | 3,413 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "flask.Blueprint",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "flask.views.MethodView",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "flask.request.args.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "flask.r... |
32771578748 | from flask import (
Blueprint,
Flask,
abort,
jsonify,
redirect,
render_template,
request,
url_for,
)
from flask_jwt_extended import jwt_required
from flask_simplelogin import get_username, login_required
from api.auth import create_user
from api.controller import (
add_new_category,... | joseevilasio/my-videos-lib | api/views.py | views.py | py | 4,498 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "flask.Blueprint",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "flask... |
6829450262 | # coding: utf-8
import csv
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
all_time_series = []
for i in range(15):
file_name = './timeseries_data/timeseries_' + str(i) + '.csv'
f = open(file_name, 'r')
dataReader = csv.reader(f)
for row in dataReader:
... | kozenumezawa/causalviz | python/three-dim-test.py | three-dim-test.py | py | 740 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "csv.reader",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number":... |
69997512993 | from notifypy import Notify
from PySimpleGUI import PySimpleGUI as sg
# 1 ciclo pomodoro = 25 min = 1500 segundos
# OK exibir tempo restante do ciclo na tela
# OK exibir quantidade de ciclos
# OK ao finalizar ciclo, tocar som de alerta COM notificação
# Após 1 ciclo, realizar pausa de 5 min = 300 segundos
# - ao fin... | dan-alvares/Pomodoro-Notipyer | pomodoro.py | pomodoro.py | py | 3,585 | python | pt | code | 0 | github-code | 1 | [
{
"api_name": "notifypy.Notify",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.PySimpleGUI.theme",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.PySimpleGUI",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": ... |
30830730394 | # Feature 2: Date
from datetime import date
import pyttsx3 as speak
# Get the date
today = date.today()
strdate = today.strftime("%B %d, %Y")
# Create the statement to be spoken
statement2 = "Today is " + strdate + ", have a great day"
# Speak the statement
engine = speak.init()
engine.say(statement2)
engine.runAn... | YouCantTouchThis/Thanos | Date.py | Date.py | py | 328 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.date.today",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pyttsx3.init",
"line_number": 15,
"usage_type": "call"
}
] |
40420182184 | from pathlib import Path
import numpy as np
data_folder = Path(".")
class IntCodeProgram:
"""A Class for the state of an IntCode program"""
def __init__(self, instr):
self.instructions = dict(zip(list(range(len(instrs))), instrs))
self.rel_base = 0
self.instr_ptr = 0
self.inp... | eirikhoe/advent-of-code | 2019/11/sol.py | sol.py | py | 7,361 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 96,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
44958344082 | # coding=utf-8
#
# created by kpe on 04.11.2019 at 2:07 PM
#
from __future__ import division, absolute_import, print_function
import unittest
import os
import tempfile
import numpy as np
import tensorflow as tf
import bert
from .test_common import AbstractBertTest, MiniBertFactory
class TestExtendSegmentVocab(A... | kpe/bert-for-tf2 | tests/test_extend_tokens.py | test_extend_tokens.py | py | 1,556 | python | en | code | 802 | github-code | 1 | [
{
"api_name": "test_common.AbstractBertTest",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "tensorflow.compat.v1.reset_default_graph",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tensorflow.compat",
"line_number": 24,
"usage_type": "attribute"
... |
5153499389 | import matplotlib.pyplot as plt
import numpy as np
fp = open('/home/zt/Maillage/sibson/errors.txt', 'r')
errors = fp.readline().split(' ')[:-1]
fp.close()
errors = np.array(errors).reshape((-1, 3)).T
plt.figure(figsize=(15, 8))
plt.plot(errors[0, :-10], color = 'red')
plt.plot(errors[1, :-10], color = 'green')
plt.pl... | Tong-ZHAO/sibson_interpolation | draw_figure.py | draw_figure.py | py | 448 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot... |
18518116189 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('todo', '0003_auto_20140919_2201'),
]
operations = [
migrations.AddField(
model_name='todo',
name='ca... | joshgachnang/djangle | example/todo/migrations/0004_auto_20140920_0016.py | 0004_auto_20140920_0016.py | py | 710 | python | en | code | 1 | github-code | 1 | [
{
"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"
},
{
... |
39415421623 | import xml.etree.ElementTree as ET
from ..track import Track
def parser(
file_path,
*,
require_title=True,
require_duration=False,
require_year=False,
require_bpm=False,
require_fp=False,
default_artist="",
verbose=False,
):
"""
Traktor supports:
- title
- artist
... | slipmatio/playlistparser | src/playlistparser/parsers/traktor.py | traktor.py | py | 1,862 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "xml.etree.ElementTree.fromstring",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "track.get",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "trac... |
75201417632 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Created on 2017/12/16
__author__ = "Jianguo Jin (jinjianguosky@hotmail.com)"
"""
Description:
"""
import unittest
from selenium import webdriver
class SearchTest(unittest.TestCase):
"""【天猫产品搜索】单元测试版本 """
def test_search_by_name(self):
... | skyaiolos/SeleniumWithPython | sec26_unittestWithselenium/search_test.py | search_test.py | py | 803 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "unittest.TestCase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "u... |
7728542412 | import xarray as xa
from data import eisc
from data import zc
from data import dcm
test_run = True
input_dir = "/discover/nobackup/projects/eis_freshwater/swang9/OL_1km/OUTPUT.RST.2013"
month = "201303" if test_run else "*"
eisc( cache = "/gpfsm/dnb43/projects/p151/zarr", mode = "eis.freshwater.swang9" )
input = f"{i... | nasa-nccs-cds/eis_smce | workflows/input_info.py | input_info.py | py | 654 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "data.eisc",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "data.dcm",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "xarray.Dataset",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "data.zc",
"line_number": 15... |
986799681 | import os
import sys
import shutil
import time
import random
import torch
import logging
from pathlib import Path
import numpy as np
import statistic
from torch import multiprocessing
from torch.nn import functional as F
import nibabel as nib
from tensorboardX import SummaryWriter
from skimage.measure import label
de... | DeepMed-Lab-ECNU/BCP | code/pancreas/pancreas_utils.py | pancreas_utils.py | py | 9,038 | python | en | code | 84 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 59,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.seed",
"lin... |
2234470277 | from django.urls import path
from django.http import HttpResponse
from django.template import Template, Context
def index(request):
return HttpResponse('''
<h1>Welcome to my homepage</h1>
<a href="/my-favorite-characters">My favorite Game of Thrones characters</a> <br />
<a href="/about-me... | errinmarie/FeedBack | Documents/BACKEND/week5/5.3-heroku/activities/1-django/manage.py | manage.py | py | 1,391 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 29,
"usage_type": "call"
},
{
"api_nam... |
34015117419 | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# 1. Import the dataset using Pandas from the given URL
url = 'https://raw.githubusercontent.com/SR1608/Datasets/main/covid-data.csv'
df = pd.read_csv(url)
# 2. High Level Data Understanding
# a. Find no. of rows & columns in the datas... | Kempraju/santhosh | final project.py | final project.py | py | 4,311 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "seaborn.displot",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.t... |
2561956080 | from django.db import models
from django.contrib.auth.models import User
from final.settings import AUTH_USER_MODEL as User
# 질문란
class Question(models.Model):
author = models.ForeignKey(User, on_delete=models.CASCADE)
subject = models.CharField(max_length=200)
content = models.TextField()
create_date =... | zzoall/EmoAI | QnA/models.py | models.py | py | 826 | python | en | code | 0 | github-code | 1 | [
{
"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.ForeignKey",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": ... |
21004978153 | from streamer.database import StreamerDB
from pymongo.errors import WriteError
class StreamerUsers:
def __init__(self):
"""
BookdlUsers is the mongo collection for the documents that holds the details of the users.
Functions:
insert_user: insert new documents, that contains t... | Samfun75/SamfunStreamerBot | streamer/database/users.py | users.py | py | 2,611 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "streamer.database.StreamerDB",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pymongo.errors.WriteError",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "pymongo.errors.WriteError",
"line_number": 65,
"usage_type": "name"
}
] |
71530148513 | import random
import requests
import time
class LED_manager:
def __new__(cls):
if not hasattr(cls, 'instance'):
cls.instance = super(LED_manager, cls).__new__(cls)
return cls.instance
def __init__(self) -> None:
self.leds = []
self.create_leds()
def c... | hackaton-ssipf/backend | WLED/main.py | main.py | py | 2,278 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.post",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 22,
"usage_type": "attribute"
}
] |
145946204 | import sys
import os
import argparse
from spinalcordtoolbox.utils import Metavar, SmartFormatter, init_sct, display_viewer_syntax, printv
from spinalcordtoolbox.image import Image
from spinalcordtoolbox.qmri.mt import compute_mtr
def get_parser():
parser = argparse.ArgumentParser(
description='Compute ma... | jem0101/BigSwag-SQA2022-AUBURN | TestOrchestrator4ML-main/resources/Data/supervised/GITHUB_REPOS/neuropoly@spinalcordtoolbox/scripts/sct_compute_mtr.py | sct_compute_mtr.py | py | 2,243 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "spinalcordtoolbox.utils.SmartFormatter",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "os.path.basename",
"line_number": 15,
"usage_type": "call"
},
{
"a... |
40420564164 | from pathlib import Path
import string
data_folder = Path(".").resolve()
type_to_priority = dict(zip(string.ascii_letters, range(1, 53)))
def parse_data(data):
rucksacks = [[type_to_priority[l] for l in line] for line in data.split("\n")]
return rucksacks
def find_common_type(rucksack):
comp_size = len... | eirikhoe/advent-of-code | 2022/03/sol.py | sol.py | py | 1,365 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "string.ascii_letters",
"line_number": 5,
"usage_type": "attribute"
}
] |
31936896058 | from __future__ import print_function
import sys
from operator import add
from pyspark import SparkContext
def splitWith(rowString, rowIndex):
colValue = list(map(int, rowString.split(',')))
retValue = []
for colIndex,item in enumerate(colValue):
retValue.append((colIndex,(rowIndex,item)))
... | alokparmesh/csep524 | hw4/matrixVectorMultiply.py | matrixVectorMultiply.py | py | 1,345 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.argv",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pyspark.SparkContext",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"li... |
38959673751 | from PyQt5.QtWidgets import QWidget,QLineEdit,QHBoxLayout, QVBoxLayout
from UI.Components.button_container import ButtonContainer #buttonClickNoise
from UI.KeyboardPage.completer import suggestWords
groupedChars = ['abc | def | ghi',
'jkl | mno | pqr',
'stu | vwx | yz0',
... | WATOLINK/mind-speech-interface-ssvep | SSVEP-Interface/UI/KeyboardPage/KeyboardWidget.py | KeyboardWidget.py | py | 6,719 | python | en | code | 21 | github-code | 1 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QVBoxLayout",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 31,
"usage_type": "call"
},
{
"api_n... |
2733118265 | import io
from pathlib import Path
import flask
import numpy as np
import pandas as pd
from .utils import list_dir
from .model import define_model
class ServeConfig:
OPT_ML_DIR = Path("/opt/ml")
MODELS_DIR = OPT_ML_DIR / "models"
ASSETS_PATH = Path("./assets")
ASSETS_PATH.mkdir(parents=True, exist_... | tungbui198/sm-safe-deployment-aishield | container/code/predictor.py | predictor.py | py | 3,086 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "utils.list_dir",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "model.define_model",
"li... |
29366515053 | import numpy as np
import tools
import matplotlib.pyplot as plt
from importlib import reload
from time import sleep
from tqdm import tqdm
import pickle
import sys
def load_obj(name ):
with open('obj/' + name + '.pkl', 'rb') as f:
return pickle.load(f)
during = int(sys.argv[1]) # Define the simulation time... | mathias77515/Galaxy | continue_sim.py | continue_sim.py | py | 4,963 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pickle.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number":... |
41973095065 | from .transformer import Transformer
from musikla.core import Voice
from musikla.core.events import MusicEvent, NoteEvent, RestEvent, ChordEvent
from typing import List, Optional
class SlidingAverage():
def __init__ ( self, capacity : int = 0 ):
self.history : List[float] = []
self.capacity = capac... | pedromsilvapt/miei-dissertation | code/musikla/musikla/core/events/transformers/voice_identifier.py | voice_identifier.py | py | 7,553 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "musikla.core.Voice",
"line_number": 47,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "musikla.core.Voice",
... |
15889711723 | import os
import sys
import importlib
import datetime
import time
import shutil
import numpy as np
import pandas as pd
from pathlib import Path
from evidence.post_processing import postprocess
# UltraNest imports
try:
from ultranest import ReactiveNestedSampler
import ultranest.stepsampler
except ImportError:... | nicochunger/evidence | evidence/ultranest/__init__.py | __init__.py | py | 14,333 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "mpi4py.MPI.COMM_WORLD",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "mpi4py.MPI",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "numpy.ones_like",
"line_number": 132,
"usage_type": "call"
},
{
"api_name": "datetime.datet... |
38488304977 | import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Load the cleaned data
data = pd.read_csv("C:\\Users\\wamm1\\Desktop\\midterm\\clean_pop.csv")
# List of countries for visualization
countries = ['Canada', 'India', 'Kenya', 'Brazil', 'Ukraine']
# Filter data for these countries
selected_coun... | TRAP33ZOID/Global-Population-Trends | statistical_modelling/infant_mortality_rates.py | infant_mortality_rates.py | py | 636 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "seaborn.lin... |
17418909566 | import collections
import math
from collections import deque
class Graph:
def __init__(self):
self.vertices = set()
# makes the default value for all vertices an empty list
self.edges = collections.defaultdict(list)
self.weights = {}
def add_vertex(self, value):
self.v... | nzavarinsky/Algorhitms | LABA4(dijkstra-algo)/dijkstra-v3.py | dijkstra-v3.py | py | 3,072 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "collections.defaultdict",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "math.inf",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 64,
"usage_type": "call"
}
] |
6897367210 | import argparse
import ast
import io
import os.path
import shlex
import shutil
import subprocess
import sys
import textwrap
import urllib.parse
def get_url_filename(url, suffix):
filename = urllib.parse.urlparse(url).path
filename = filename.split('/')[-1]
if not filename.endswith(suffix):
raise E... | vstinner/pythonci | pythonci/_ci.py | _ci.py | py | 12,377 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "urllib.parse.parse.urlparse",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "urllib.parse",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "os.p... |
74455165473 | from reportlab.pdfgen.canvas import Canvas
from PollyReports import *
from testdata import data
import sqlite3
import os
from tkinter import messagebox
import webbrowser as vb
# ================== Variables=======
Qty_list = []
Price_list = []
Qty_sum=0
Price_sum=0
# ==========SQL connection============
con=sqlite3.con... | QurbanGujjar/ims | Stock_Report.py | Stock_Report.py | py | 3,580 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sqlite3.connect",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "testdata.data",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "testdata.data",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "testdata.data",
"line... |
38639095519 | """
Need to consider the switching on and off of physics schemes with reduced
precision. Show the active/deactive points as a function of precision for
selected physics schemes (Vertical Diffusion/Surface Fluxes/Convection)
"""
import numpy as np
import matplotlib.pyplot as plt
import iris.plot as iplt
from myscripts... | leosaffin/scripts | myscripts/projects/ithaca/rp_physics/fig5_physics_activation.py | fig5_physics_activation.py | py | 3,054 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "myscripts.models.speedy.sigma_levels",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "myscripts.models.speedy",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 22,
"usage_type": "call"
... |
28010157790 | """This is the utils module.
Module for storing information to the file between program launches.
"""
from os import path
import json
# '/your_absolute_path_here/notes.json'
JSON_FILE = path.abspath('notes.json')
def save_to_file(notes: list) -> None:
"""
Save the list with notes to a file.
:param not... | allwdesign/notes | utils.py | utils.py | py | 936 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.abspath",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "json.dump",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number":... |
40419644184 | from pathlib import Path
import numpy as np
import copy
from itertools import permutations
import re
data_folder = Path(__file__).parent.resolve()
reg = re.compile(
r"(\w+) would (lose|gain) (\d+) happiness units by sitting next to (\w+)."
)
class Table:
def __init__(self, data):
happiness = []
... | eirikhoe/advent-of-code | 2015/13/sol.py | sol.py | py | 2,381 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 3... |
18556723155 | import torch
import torch.nn
from collections import OrderedDict
from deep_learning.architectures.Resnet3D.model import get_pretrained_resnet
from deep_learning.architectures.ClinicalNet import ClinicalNet
def load_trained_model(model, weights_path):
print('loading pretrained model {}'.format(weights_path))
... | lukasfolle/MRI-Classification-RA-PsA | deep_learning/architectures/Resnet3D/ensemble.py | ensemble.py | py | 4,060 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "torch.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.ModuleList"... |
14287230397 | import logging
from smtplib import SMTPException
from django.contrib import messages
from django.core.mail import EmailMultiAlternatives
from django.http import HttpRequest
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_laz... | senyehor/energokodros_website | utils/common/email.py | email.py | py | 1,377 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.http.HttpRequest",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "django.template.loader.render_to_string",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages.warning",
"line_number": 23,
"usage_type": "call"... |
5644139426 | # import matplotlib.pyplot as plt
# import numpy as np
#
# # Sample data for clustered columns
# categories = ['Category A', 'Category B', 'Category C']
# values1 = [15, 25, 30]
# values2 = [10, 20, 25]
#
# # Create an array for the x-axis positions
# x = np.arange(len(categories))
#
# # Set the width of each bar
# bar... | sonyavalo/statistics_paper_sofya_23 | test.py | test.py | py | 1,565 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.convolve",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplo... |
74065867873 | import torch
import numpy as np
import pickle
from tqdm import tqdm
import pandas as pd
import math
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, log_loss
from sentence_transformers import SentenceTransformer, models
from transformers import AutoModel, AutoTokenizer
import os
os.... | bavik022/thesis-ambiguity_detection | bert_finetune_cuda_test.py | bert_finetune_cuda_test.py | py | 7,314 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
... |
31676609044 | import time
import pyautogui
import cv2
import numpy as np
import datetime
import win32api
import win32con
import find_box
import log_message
import role_loc
import role_move
import send_message
map_in_store = cv2.imread('img/map_in_store.png')
open_map_btn = cv2.imread('img/open_map.png')
map_title = cv2.imread('img... | fushenghuanyu/GJ | role_action.py | role_action.py | py | 12,490 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "cv2.imread",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 18,
... |
16675614140 | import json
from mitmproxy import ctx
from habdel_mongo import mongo_info
def response(flow):
if "https://aweme.snssdk.com/aweme/v2/feed" in flow.request.url: #原视频链接获取
info = ctx.log.info
info(flow.response.text)
# print(flow.response.text,"888888888"*10)
# print(flow.request.url)
... | luopeixiong/python-test | 爬虫项目/app爬虫/抖音抓取/decode_douyin.py | decode_douyin.py | py | 1,101 | python | en | code | null | github-code | 1 | [
{
"api_name": "mitmproxy.ctx.log",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "mitmproxy.ctx",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "habdel_mongo.mongo_info... |
17397569699 | import pygame
from time import *
pygame.init()
win=pygame.display.set_mode((300,300))
sleep(5)
pygame.mixer.music.load("1.mp3")
pygame.mixer.music.play(0,0,800)
run=True
click=[0,0,0]
def check_events():
global run,keys,mouse_pos,mouse_down,click
for event in pygame.event.get():
if event.typ... | makazis/School-Project-23.04.2023 | Music/Beat_Syncer.py | Beat_Syncer.py | py | 754 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pygame.init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer.mus... |
9512087556 | from pathlib import Path
import pendulum
from airflow.models import Variable
from docker.types import Mount
class AppConst:
DOCKER_USER = Variable.get("DOCKER_USER", "thangphan")
PROJECT = "real_estate"
IMAGE_NAME = "model_serving"
TAG = "latest"
class AppPath:
ROOT_DIR = Path(Variable.g... | Thangphan0102/RealEstateProject | code/model_serving/dags/utils.py | utils.py | py | 1,943 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "airflow.models.Variable.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "airflow.models.Variable",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "airflo... |
73033755553 | # -*- coding: utf-8 -*-
'''
Beacon to monitor disk usage.
.. versionadded:: 2015.5.0
'''
# Import Python libs
from __future__ import absolute_import
import logging
import psutil
import re
# Import Salt libs
import salt.utils
log = logging.getLogger(__name__)
__virtualname__ = 'diskusage'
def __virtual__():
i... | shineforever/ops | salt/salt/beacons/diskusage.py | diskusage.py | py | 1,359 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "salt.utils.utils.is_windows",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "salt.utils.utils",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "s... |
17094280444 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from decimal import Decimal
class Migration(migrations.Migration):
dependencies = [
('gas', '0005_auto_20150827_0116'),
]
operations = [
migrations.AddField(
model_name='... | stpyang/downtowndivers | gas/migrations/0006_gas_other_percentage.py | 0006_gas_other_percentage.py | py | 509 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AddField",
"line_number": 15,
"usage_type": "call"
},
{
... |
11078081992 | import os
from datetime import datetime
def setnum():
pass
# 图片命名格式化
if __name__ == '__main__':
time1 = datetime.now()
PATH = "Datalast_CUT"
SAVE_PATH = "Datalast"
if not os.path.isdir(SAVE_PATH):
os.mkdir(SAVE_PATH)
NUM_init = 9135 #自定义编号
num = NUM_init
for (dirpath, dirnam... | ChangMQ267/VOC2COCO | PhotoSetNum.py | PhotoSetNum.py | py | 858 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "datetime.datetime.now",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "os.path.isdir",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"... |
8669162789 | #!/usr/bin/env python3
# coding:utf8
import sys
import re
import requests
from bs4 import BeautifulSoup
import json
import random
from django.http import HttpResponse
from requests.packages.urllib3.exceptions import InsecureRequestWarning
reload(sys)
sys.setdefaultencoding('utf8')
requests.packages.urllib3.disable_w... | songkuixi/JapaneseWordBook-Server | search/WordSearchNew.py | WordSearchNew.py | py | 5,204 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.setdefaultencoding",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.packages.urllib3.disable_warnings",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.packages.urllib3.exceptions.InsecureRequestWarning",
"line_number"... |
18216174452 | import os
import tkinter as tk
import sys
from tkinter import filedialog
from tkinter import ttk
from openslide import open_slide
from openslide.deepzoom import DeepZoomGenerator
from modules.recorder import Recorder
class FileSelection:
def __init__(self, master):
self.master = master
self.frame... | UmarJ/lsiv-python3 | interface_recorder.py | interface_recorder.py | py | 2,510 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "tkinter.Frame",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "tkinter.Button",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tkinter.X",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_numb... |
6504127042 | from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: azure_rm_cdnendpoint
version_added: "2.8"
short_description... | testormoo/ansible-azure-complete | modules/library/azure_rm_cdnendpoint.py | azure_rm_cdnendpoint.py | py | 21,277 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "ansible.module_utils.azure_rm_common.AzureRMModuleBase",
"line_number": 219,
"usage_type": "name"
},
{
"api_name": "azure.mgmt.cdn.CdnManagementClient",
"line_number": 376,
"usage_type": "argument"
},
{
"api_name": "msrest.polling.LROPoller",
"line_number": 417... |
15471707418 | from functools import reduce
def my_lambda(acc,val):
res, max = acc
if(val>max):
max = val
res+=1
return res,max
myList = [1,2,3,4,5,1]
skyscraper = reduce(my_lambda, myList, (0,0))
print(myList, "Il max cambia " ,skyscraper[0], " volte") | FilippoBotti/linguaggi-Paradigmi | python/fold_skyscraper.py | fold_skyscraper.py | py | 269 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "functools.reduce",
"line_number": 11,
"usage_type": "call"
}
] |
11702648802 | import json
import csv
AUTHORS_JSON_PATH = '/Users/AB/Dropbox/Dev/CWP/authors.json'
NARRATIVES_JSON_PATH = '/Users/AB/Dropbox/Dev/CWP/narratives.json'
with open(AUTHORS_JSON_PATH, 'r') as f:
authors = json.load(f)
with open(NARRATIVES_JSON_PATH, 'r') as f:
narratives = json.load(f)
with open('narratives.csv... | bakera81/cwp-literacynarratives | json_to_csv.py | json_to_csv.py | py | 1,033 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "json.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "csv.DictWriter",
"line_number": 16,
"usage_type": "call"
}
] |
18808337505 | """
plot_model.py
Code to plot an HII region model fit and data
Based on IDL code by A.A. Kepley
Trey Wenger June 2016
dsb 21Jun2016 - Use linecolor to distinguish models instead of linestyle
dsb 02Sep2016 - Modify units labels in plots
dsb 14Sep2016 - Add spontaneous emission model; GBT data point
dsb 26Sep2016 - Cr... | tvwenger/HII-Region-Models | plot_model.py | plot_model.py | py | 11,647 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "matplotlib.rc_file",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_nu... |
8403487450 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Объект цифрового LED индикатора.
"""
import wx
from ic.components import icwidget
from ic.utils import util
from ic.PropertyEditor import icDefInf
from ic.log import log
from ic.bitmap import bmpfunc
import wx.lib.gizmos as parentModule
LED_NUMBER_CTRL_STYLE = {'... | XHermitOne/defis3 | SCADA/SCADA/usercomponents/led_number_ctrl.py | led_number_ctrl.py | py | 7,716 | python | ru | code | 0 | github-code | 1 | [
{
"api_name": "wx.lib.gizmos.LED_ALIGN_LEFT",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "wx.lib.gizmos",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "wx.lib.gizmos.LED_ALIGN_RIGHT",
"line_number": 20,
"usage_type": "attribute"
},
{
... |
3977143656 | import pygame
import random
import os
from enum import Enum
pygame.init()
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
class GameObject(pygame.sprite.Sprite):
def __init__(self, image_file, position):
super(GameObject, self).__init__()
self._image = pygame.image.load(image_file)
self.rect ... | praveensvsrk/CatchEmAll | CatchEmAll.py | CatchEmAll.py | py | 8,375 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.sprite",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"l... |
35361793296 | from setuptools import setup, find_packages
from pathlib import Path
this_directory = Path(__file__).parent
# long_description = (this_directory / "README.md").read_text()
with open(this_directory / "README.md", encoding="utf8") as file:
long_description = file.read()
VERSION = '0.1.10'
DESCRIPTION = 'Python g... | eduardogpg/pygenerate | setup.py | setup.py | py | 1,150 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 15,
"usage_type": "call"
}
] |
38843635225 | import pandas as pd
import datetime as dt
import os
from difflib import SequenceMatcher
# This module takes downloaded golf score data and parses from said data
# round scores for individual golfers and course data. This information is
# written to CSVs
# NOTES
# Data is curated such that certain events are excluded
... | mtdiedrich/Golf | Collection/html_parser.py | html_parser.py | py | 6,395 | python | en | code | 8 | github-code | 1 | [
{
"api_name": "pandas.set_option",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "difflib.SequenceMatcher",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "datetime.date",
... |
1833646743 | import requests
from bs4 import BeautifulSoup
from collections import Counter
from models.autor import Autor
from models.cancion import Cancion
from models.cantante import Cantante
def obtener_letra(url):
# Realizo una solicitud para obtener el contenido de la página
response = requests.get(url)
# Parseo ... | JGaratL/ejercicio-python | populate_data.py | populate_data.py | py | 4,432 | python | es | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"... |
21058207959 | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 11 16:12:35 2018
@author: yangchg
"""
import requests, json, time, sys
from bs4 import BeautifulSoup
from contextlib import closing
import pandas as pd
class lianjiaDownloader():
def __init__(self, url):
self.server = 'http://sh.lianjia.com'
sel... | ycg860102/crawing | 链家/lianjia.py | lianjia.py | py | 4,603 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
... |
15252690223 | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from src.models.attention import SelfAttention
class DirectInferenceNet(nn.Module):
# DEPRECATED
r"""No autoregre... | malik-ali/generative-grading | src/models/inference_net.py | inference_net.py | py | 13,330 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.device",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.nn.Linear",
"lin... |
43652881788 | from enum import Enum
from pathlib import Path
# server constants
SERVER_URL = "http://localhost:5000"
TABLE_SCHEMA_PATH = str(Path("app") / "database" / "schema.sql")
DEFAULT_DB_PATH = "user.db"
FETCH_DELAY_PERIOD = 5 # time period beetween each server data update
# other
PREFFERED_ENCODING = "utf-8"
# crypto con... | michalwilk123/elliot-chat-client | app/config.py | config.py | py | 823 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 25,
"usage_type": "name"
}
] |
8285329290 | import requests
import pyqrcode
import traceback, ctypes, msvcrt, time, os
from bs4 import BeautifulSoup
from datetime import datetime
from dateutil import parser as dateutil_parser
def wait_any_key(prompt):
print(prompt, end = "", flush = True)
msvcrt.getch()
print()
# Negatives: infinite retries; others... | apkipa/NuaaFTRecorder | 飞天云课堂录播工具.py | 飞天云课堂录播工具.py | py | 8,680 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "msvcrt.getch",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "traceback.print_exc",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
... |
41055406846 | import json
import logging
import smtplib
import ssl
import boto3
from botocore.exceptions import ClientError, WaiterError
from ses_identities import SesIdentity
from ses_templates import SesTemplate
from ses_generate_smtp_credentials import calculate_key
logger = logging.getLogger(__name__)
# snippet-start:[python.... | awsdocs/aws-doc-sdk-examples | python/example_code/ses/ses_email.py | ses_email.py | py | 9,394 | python | en | code | 8,378 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "botocore.exceptions.ClientError",
"line_number": 88,
"usage_type": "name"
},
{
"api_name": "json.dumps",
"line_number": 122,
"usage_type": "call"
},
{
"api_name": "botocor... |
34640311085 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from rest_framework import serializers
from database.models import CollectionType
from database.models import AnnotationType
from rest.serializers.object_types import annotations
from . import types
MODEL = CollectionType.annotation_types.through # p... | CONABIO-audio/irekua | irekua/rest/serializers/object_types/data_collections/annotations.py | annotations.py | py | 2,184 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "database.models.CollectionType.annotation_types",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "database.models.CollectionType",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number... |
38182352525 | from types import NoneType
import pandas as pd
import matplotlib.pyplot as plt
import streamlit as st
import functions as func
import eda
def info_input(data):
##########################################################################################
###Prediction value input
#############################... | HAL9044/IronHack-s-Final-Project | files/ml.py | ml.py | py | 10,675 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "streamlit.columns",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "streamlit.columns",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "streamlit.columns",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "streamlit.text_... |
41465744834 | from apis import magichome
from jarvis import helper
import functools
import logging as log
bulb = None
bulb_addr = None
def action( args ):
global bulb
if bulb == None:
bulb = _discover()
try:
if args[0] in _light_actions:
key = args[0]
_light_actions[key]( args )
... | Dimfred/my_jarvis | jarvis_server/jarvis/actions/light.py | light.py | py | 3,096 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.info",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "apis.magichome.Light",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "apis.magichome",
"... |
17617853804 | import cv2
import numpy as np
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import joblib
from tensorflow.keras.models import load_model
model = load_model('../models/my_model.h5')
opencv_dnn_model = cv2.dnn.readNetFromCaffe(prototxt="../models/deploy.prototxt.txt",
c... | Core9nvidia/behavioural-assessment | code/utils.py | utils.py | py | 2,321 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.environ",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.dnn.readNetFromCaffe",
"line_number": 11,
"usage_type": "call"
},
{
"api_nam... |
72065337954 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 2 14:31:00 2019
@author: andrew
"""
import numpy as np
from pyDOE import lhs as LHS
import subprocess
import os
import time
from scipy.special import erf as ERF
#import sys
from os.path import expanduser
import IscaOpt
# home directory
home = e... | en9apr/M_penalised_funtions | forrester_BO_search.py | forrester_BO_search.py | py | 38,867 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.expanduser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "base_class.Problem",
"line_number": 111,
"usage_type": "name"
},
{
"api_name": "interfaces.EllipseIn... |
31284936895 | import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import json
import pandas as pd
from urllib.request import Request, urlopen
from urllib.error import URLError
import json
from pathlib import Path
import socket
from collections import namedtuple
##############################################... | thiloschild/RockLog | RockLog/functions.py | functions.py | py | 8,050 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.path.append",
"line_number": 1,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 1,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 1,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
34864971721 | import os
import random
import numpy as np
from PIL import Image
import torch
import torch.nn as nn
from torch.utils.data import Dataset
from torchvision import transforms
from torchvision.transforms.functional import InterpolationMode
import torchvision.transforms.functional as F
class StasDataset(Dataset):
de... | travisergodic/T-brain_STAS_Segmentation | data.py | data.py | py | 4,933 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "os.path.join",
... |
15798007027 | #!/usr/bin/python3
'''
takes in a URL,
sends a request to the URL
displays the body of the response (decoded in utf-8).
'''
import requests
from sys import argv
if __name__ == "__main__":
myUrl = argv[1]
req = requests.get(myUrl)
if req.status_code > 400:
print("Error code: {}".format(req.status_co... | Just-Akinyi/alx-higher_level_programming | 0x11-python-network_1/7-error_code.py | 7-error_code.py | py | 359 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
}
] |
15288174099 | from django.shortcuts import get_object_or_404
from services.models import Services
from decimal import Decimal
def get_cart_items_and_total(cart):
cart_items = []
total = 0
for item_id, item_quantity in cart.items():
this_service = get_object_or_404(Services, pk=item_id)
this_total = this_... | wolfenchic/djvalet | cart/utils.py | utils.py | py | 700 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.shortcuts.get_object_or_404",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "services.models.Services",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "decimal.Decimal",
"line_number": 10,
"usage_type": "call"
}
] |
2059870361 | from collections import deque
# file = "test12.txt"
file = "input12.txt"
def get_terrain():
ter = []
start = (0, 0)
end = (0, 0)
with open(file, "r") as f:
for y, line in enumerate(f):
l = list(line.strip())
if "S" in l:
x = l.index("S")
... | professeurb/AdventOfCode2022 | adc12.py | adc12.py | py | 1,932 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "collections.deque",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 51,
"usage_type": "call"
}
] |
21870337610 | from collections import OrderedDict
from six.moves.urllib.parse import urlencode
def joined_or_null(arr):
return "null" if len(arr) == 0 else ','.join(arr)
def build_url(path, includes=None, fields=None):
connector = '&' if '?' in path else '?'
params = {}
if includes:
params.update({'inclu... | Patreon/patreon-python | patreon/jsonapi/url_util.py | url_util.py | py | 787 | python | en | code | 109 | github-code | 1 | [
{
"api_name": "collections.OrderedDict",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "six.moves.urllib.parse.urlencode",
"line_number": 29,
"usage_type": "call"
}
] |
23854869141 | """Setup file for package"""
from setuptools import setup, find_namespace_packages
from os import path
__version__ = "1.0.b1"
__author__ = "rmflynn"
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name="dram2",
... | rmFlynn/collection_of_typical_ocoli_samples | setup.py | setup.py | py | 2,806 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
75065179233 | __all__ = [
"Model",
]
r""""
Adapted from the Robustness Against Backdoors (RAB) repository.
See: https://github.com/AI-secure/Robustness-Against-Backdoor-Attacks
"""
from torch import Tensor
import torch.nn as nn
import torch.nn.functional as F # noqa
from .types import PoisonLearner
class Model(PoisonLearne... | ZaydH/target_identification | fig01_cifar_vs_mnist/poison/datasets/_mnist_cnn.py | _mnist_cnn.py | py | 2,414 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "types.PoisonLearner",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"l... |
31245781337 | # response.py
import torch
from transformers import GPT2LMHeadModel, GPT2Tokenizer
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
tokenizer.pad_token = tokenizer.eos_token
model = GPT2LMHeadModel.from_pretrained("gpt2")
def get_response(user_input):
inputs = tokenizer.encode_plus(
user_input,
add_speci... | Ghassen-bgh/gpt-2-huggingface-chatbot | response.py | response.py | py | 844 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "transformers.GPT2Tokenizer.from_pretrained",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "transformers.GPT2Tokenizer",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "transformers.GPT2LMHeadModel.from_pretrained",
"line_number": 7,
"usa... |
31245757127 | from fastapi import FastAPI
import pandas as pd
#from pydantic import BaseModel
#from typing import Optional
# Ruta al archivo JSON
file_path = '../PI MLOps - STEAM/steam_games.json'
# Leer el archivo JSON línea por línea y cargar los datos en una lista
data_list = []
with open(file_path, 'r') as f:
... | Gio2M/2 | main.py | main.py | py | 1,792 | python | es | code | 0 | github-code | 1 | [
{
"api_name": "pandas.DataFrame",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.notna",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 39,
"usage_type": "call"
}
] |
22190353631 | # Coded By WEYT.MM /*\ 28-05-2020
# https://github.com/WEYTMM/Jadwal-Kencan
from datetime import *
now = datetime.now()
hari_kencan = now.strftime("%A")
tanggal = date.today()
class main:
def __init__(self, kencan):
#Edit Sendiri Jadwal Kencan Kalian
senin = """Gak ada jadwal kencan hari ini
Doi lagi sibuk ke... | WEYTMM/Jadwal-Kencan | kencan.py | kencan.py | py | 2,266 | python | id | code | 0 | github-code | 1 | [
{
"api_name": "datetime.now",
"line_number": 5,
"usage_type": "call"
}
] |
38950183255 | import logging
import os
import pickle
from scipy import ndimage
import numpy
import tensorflow
logging.basicConfig(format='%(asctime)s : %(levelname)s :: %(message)s', level=logging.DEBUG)
# todo fix the image size; our images aren't square
image_size = 28 # Pixel width and height.
image_height = 28
image_width = ... | mikedelong/machine-learning | tensorflow/make_pickle.py | make_pickle.py | py | 16,902 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"... |
71068940194 | import os
from copy import copy
from logging import DEBUG
from logging import INFO
from logging import NOTSET
from furl import furl
from src.typeshed import ConfigDict
from src.typeshed import DBConfigDict
from src.typeshed import DiscordConfigDict
from src.typeshed import FormatterDict
from src.typeshed import Logge... | jplhanna/discord_quest_bot | src/config.py | config.py | py | 2,666 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.environ.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
12922429389 | # De django
from django.urls import path
# Propios
from . import views
urlpatterns = [
path('v1',views.v1,name='v1'),
path('getstaff',views.getStaff,name='getStaff'),
path('getcluster',views.getCluster,name='getCluster'),
path('setdata',views.setData, name='setData'),
path('active-client',views.cha... | Haziel-Soria-Trejo/GymAdmin | API/urls.py | urls.py | py | 475 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
28801028633 | import random
import uuid
from typing import Dict
from typing import Union
from fastapi import APIRouter
from fastapi import HTTPException
from fastapi import Request
from bowled_match_engine.match_engine.game_simulator import simulate_game
from gamelib.team.live_team import get_players_by_team_id
from gamelib.team.l... | bunsamosa/bowled_server | rest_server/live/start_game.py | start_game.py | py | 4,729 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "fastapi.Request",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "rest_server.live.api_models.LiveGameInput",
"line_number": 26,
"usage_type": "name"
},
{
"api_n... |
35080534874 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('event', '0036_auto_20150817_1057'),
]
operations = [
migrations.AlterField(
model_name='event',
name... | smmsadrnezh/bilityab | event/migrations/0037_auto_20150817_2113.py | 0037_auto_20150817_2113.py | py | 638 | python | en | code | 2 | github-code | 1 | [
{
"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.AlterField",
"line_number": 14,
"usage_type": "call"
},
{... |
41027393186 | from typing import Dict, List
def xyz_args(script_name, arg, current_index, args, _) -> Dict[str, List[str]]:
if script_name != 'x/y/z plot':
return {}, None
if not arg or type(arg) is not list:
return {}, None
# 10 represent the checkpoint_name option for both img2img and txt2img
# ... | awslabs/stable-diffusion-aws-extension | aws_extension/inference_scripts_helper/xyz_helper.py | xyz_helper.py | py | 610 | python | en | code | 111 | github-code | 1 | [
{
"api_name": "typing.Dict",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
28437687470 | import grpc
import os
import pickle
from concurrent import futures
from core.inference_service import InferenceService
from grpc_health.v1 import health
from grpc_health.v1 import health_pb2
from grpc_health.v1 import health_pb2_grpc
from grpc_reflection.v1alpha import reflection
from protos import inference_pb2
fro... | liupeirong/MLOpsManufacturing | samples/edge-inferencing-and-mlops/grpc_inferencing_service/service/main.py | main.py | py | 2,764 | python | en | code | 21 | github-code | 1 | [
{
"api_name": "os.path.exists",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "grpc.Server",
"line_numbe... |
28419540730 | # -*- coding: utf-8 -*-
'''
猫狗分类
'''
# @Time : 2021/4/8 17:14
# @Author : LINYANZHEN
# @File : CatDogModel.py
import torch.nn as nn
class CDNet(nn.Module):
def __init__(self):
super(CDNet, self).__init__()
self.convent = nn.Sequential(
nn.Conv2d(in_channels=3, out_channels=8, kernel... | AWSDJIKL/Artificial-Intelligence-and-Neural-Network | CatDogNet/CatDogModel.py | CatDogModel.py | py | 2,025 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"lin... |
15066641758 | from django.db import models
from django.contrib.auth.models import User
from django.forms import CheckboxInput
class Base(models.Model):
create = models.DateTimeField(auto_now_add=True)
update = models.DateTimeField(auto_now=True)
class Modelo(models.Model):
modelo = models.CharField(max_length=150)
... | ctedescojr/apontamentos-gestao-visual-producao | home/models.py | models.py | py | 6,341 | python | pt | code | 0 | github-code | 1 | [
{
"api_name": "django.db.models.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.db.models.DateTimeField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name... |
10955676150 | import re, math
from googletrans import Translator
from collections import Counter
translator=Translator()
WORD = re.compile(r'\w+')
lines1=open('C:/Users/Fahim/Desktop/Final_thesis/QUE_Bangla.txt',encoding='utf8').read().split('\n')
lines2=open('C:/Users/Fahim/Desktop/Final_thesis/Questions_final2.txt',encoding=... | yousuffahim8/Bengali-Social-Virtual-Robot- | Code/fahim_translation.py | fahim_translation.py | py | 2,677 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "googletrans.Translator",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 16... |
9030843872 | import itertools
import os
import xml.etree.ElementTree as ET
from datetime import datetime, timedelta
from multiprocessing import Pool, cpu_count
from diskcache import Cache
from conf import OUTPUT_FOLDER, CACHE_FOLDER, EPG_FILE, DOWNLOAD_EXTRA_INFO, DAYS_TO_DOWNLOAD, DELAYS, HD_CHANNELS
from date_time import DateTi... | oscarbc96/epg_generator | epg_generator.py | epg_generator.py | py | 8,413 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "diskcache.Cache",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "conf.CACHE_FOLDER",
"line_number": 17,
"usage_type": "argument"
},
{
"api_name": "movistar.Movistar.get_channels",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "... |
34020545749 |
# coding: utf-8
# In[21]:
import json
import urllib.request
import time
user = 'whyisjake'
url = 'https://api.github.com/users/%s/repos' % user
users = ['elmiram', 'nevmenandr', 'shwars', 'JelteF', 'timgraham', 'arogozhnikov', 'jasny', 'bcongdon', 'whyisjake']
response = urllib.request.urlopen(url)
text = response... | aischeveva/hw_python2017 | sem071017_json.py | sem071017_json.py | py | 1,230 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 14,
"usage_type": "name"
},
{
"api_nam... |
4848988793 | from datetime import datetime
import os
from random import randint
import tempfile
from time import sleep
from urllib.parse import parse_qs, urlparse
from uuid import uuid1
import tator
def test_get_file(host, token, project, video):
tator_api = tator.get_api(host, token)
video_obj = tator_api.get_media(video... | cvisionai/tator-py | test/test_media.py | test_media.py | py | 10,371 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "tator.get_api",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tempfile.TemporaryDirectory",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.