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
73491360638
import os import pytest from partfinder import main, util, analysis, config # Get the Errors all into the local space from partfinder.config import ConfigurationError from partfinder.util import PartitionFinderError HERE = os.path.abspath(os.path.dirname(__file__)) test_description = """ DNA_hcluster1 | success ...
brettc/partitionfinder
tests/clustering/test_clustering.py
test_clustering.py
py
3,327
python
en
code
56
github-code
97
[ { "api_name": "os.path.abspath", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.join", "line_nu...
9634681520
import seaborn as sns import pandas as pd import matplotlib.pyplot as plt import numpy as np import warnings def creat_cross_sample(): group_galaxies = pd.read_csv('group_galaxies.csv', engine='c') group_galaxy_type = pd.read_table('group_galaxy_type.dat', engine='c', header=None) group_galaxies['typ'] = ...
fmxFranky/Astronomy
BD_Group_GZ2/match.py
match.py
py
5,364
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_table", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.isnan", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.read_csv", "l...
22362152822
from PySide2.QtWidgets import QGroupBox, QLineEdit, QVBoxLayout, QWidget from src.events.ListenerNode import ListenerNode class TextFilter(QWidget, ListenerNode): def __init__(self, listeners_pool, *args, **kwargs): super(TextFilter, self).__init__(*args, **kwargs) ListenerNode.__init__(self, 'tex...
alejandro2014/contabilidad
src/widgets/TextFilter.py
TextFilter.py
py
903
python
en
code
0
github-code
97
[ { "api_name": "PySide2.QtWidgets.QWidget", "line_number": 5, "usage_type": "name" }, { "api_name": "src.events.ListenerNode.ListenerNode", "line_number": 5, "usage_type": "name" }, { "api_name": "src.events.ListenerNode.ListenerNode.__init__", "line_number": 8, "usage_typ...
74004936960
import pygame from .tile import Tile # Creates the Tiles of the chessboard class Tiles: # 2d Map where each element is a Tile tile_map = None # Dictionary of the tiles as a key of the location tuple and a value of the tile object tile_dict = {} # All the initial tiles where the pieces will be pla...
Mars-98/chessApp
chessui/chessboardparts/tiles.py
tiles.py
py
1,202
python
en
code
0
github-code
97
[ { "api_name": "pygame.sprite.Group", "line_number": 18, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 18, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Group", "line_number": 19, "usage_type": "call" }, { "api_name": "pygame.spr...
41516997222
from pdfminer.high_level import extract_text DOCUMENT = 'otpow.pdf' def get_longest_tweet(index_start, sentence_list): tweet = None cutoff = len(sentence_list) while cutoff > index_start: segment = ". ".join(sentence_list[index_start:cutoff]) if len(segment) > 280: cutoff = cu...
arturo-jc/lewis-bot
extract.py
extract.py
py
985
python
en
code
0
github-code
97
[ { "api_name": "pdfminer.high_level.extract_text", "line_number": 20, "usage_type": "call" } ]
28685409386
import random import networkx as nx import matplotlib.pyplot as plt import graph_params as gp # Функция добавления линии графа def add_edge(f_item, s_item, graph = None, color = 'black'): graph.add_edge(f_item, s_item, color=color) graph.add_edge(s_item, f_item, color=color) # Рисует граф def graph_drawing(gr...
Roman98nsk/Data-protection
РГР/main.py
main.py
py
3,258
python
ru
code
0
github-code
97
[ { "api_name": "networkx.Graph", "line_number": 13, "usage_type": "call" }, { "api_name": "networkx.get_edge_attributes", "line_number": 35, "usage_type": "call" }, { "api_name": "networkx.get_node_attributes", "line_number": 36, "usage_type": "call" }, { "api_name...
40718871610
#!/usr/bin/env python """ @author wanglinqing01@baidu.com @date 2014/10/08 @brief delete verifiedEmail """ import os import sys import time import traceback _NOW_PATH = os.path.dirname(os.path.abspath(__file__)) + '/' _BCE_PATH = _NOW_PATH + '../' sys.path.insert(0, _BCE_PATH) import bes_base_case from baidubce.ser...
baidubce/bce-sdk-python
test/ses/test_delete_verifiedEmail.py
test_delete_verifiedEmail.py
py
1,126
python
en
code
24
github-code
97
[ { "api_name": "os.path.dirname", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.path.insert", "l...
42237984467
from rest_framework import status import requests import json import copy from koiki.delivery_create import CreateDelivery from koiki.delivery_update import UpdateDelivery from koiki.delivery_status import DeliveryStatus from koiki.delivery import Delivery import lazona_connector.vars # API_PATH = "/rekis/api" clas...
coopdevs/lazona_connector
koiki/client.py
client.py
py
2,978
python
en
code
1
github-code
97
[ { "api_name": "lazona_connector.vars.vars", "line_number": 18, "usage_type": "attribute" }, { "api_name": "lazona_connector.vars", "line_number": 18, "usage_type": "name" }, { "api_name": "koiki.delivery_create.CreateDelivery", "line_number": 23, "usage_type": "call" },...
2645254517
import sys import argparse import os import json import yaml #import xmltodict import re import traceback import time import random import string from functools import partial from .tblfmt import SimpleTable from .commandline import commandline from .json2table import prepare_table from json2html import JsonConverter f...
walkerever/qic
qic/dsq.py
dsq.py
py
27,983
python
en
code
2
github-code
97
[ { "api_name": "sys.path.append", "line_number": 27, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 27, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 27, "usage_type": "call" }, { "api_name": "functools.partial", "line...
30306685886
from flask import Flask, request, flash, render_template,redirect, url_for from static.image_processor import GenderTransformer import os.path import os, shutil import time from static import config app = Flask(__name__) app.config["UPLOAD_FOLDER"] = "./static/images" engine = GenderTransformer() def clear_image_di...
gamble27/flask-gender-swap
app.py
app.py
py
2,147
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "static.image_processor.GenderTransformer", "line_number": 12, "usage_type": "call" }, { "api_name": "static.config.input_dir", "line_number": 15, "usage_type": "attribute" }, { "...
73189223359
import boto3 from boto3.dynamodb.types import TypeDeserializer from storyweb.utils.chapters import Chapter from storyweb.utils.constants import DDB_TABLE_NAME, error_page from storyweb.style import load_css ddbclient = boto3.client("dynamodb") table = boto3.resource("dynamodb").Table(DDB_TABLE_NAME) sqs = boto...
arangatang/dyno-staurie
lambdas/storyweb/lambdas/update_story_lambda/update_story_lambda.py
update_story_lambda.py
py
7,059
python
en
code
1
github-code
97
[ { "api_name": "boto3.client", "line_number": 7, "usage_type": "call" }, { "api_name": "storyweb.utils.constants.DDB_TABLE_NAME", "line_number": 8, "usage_type": "argument" }, { "api_name": "boto3.resource", "line_number": 8, "usage_type": "call" }, { "api_name": "...
30513043810
import cv2 import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np import pandas as pd # read data height = 260 width = 346 path_to_temp_data = "../../data/temp/" path_to_data = "../../data/real_power_line/flight2/" path_to_lines = path_to_temp_data + "lines.txt" path_to_events = path_to_temp_da...
uzh-rpg/power_line_tracking_with_event_cameras
prototype/utils/visualize_line.py
visualize_line.py
py
3,948
python
en
code
1
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.int16", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.float64", "line_number": 23, "usage_type": "attribute" }, { "api_name": "pandas.read_csv",...
40747719084
from flask import Flask from flask.helpers import send_from_directory import os app = Flask(__name__, static_url_path='', static_folder='.') app.config['CORS_HEADERS'] = 'Content-Type' # CORS section @app.after_request def after_request_func(response): response.headers.add("Access-Control-Allow-Origin", "*") ...
Joshuafrankle/accio-be
app.py
app.py
py
1,100
python
en
code
1
github-code
97
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.helpers.send_from_directory", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path", ...
5079954686
import os from sys import argv from typing import List, Tuple, Optional from directory_information import DISPLAY_DIRECTORY from fnmatch import fnmatch from file_interaction.files_parser import parse_files from file_interaction.files_displayer import Displayer from file_interaction.file_class import Files from config i...
Aetorny/Display-directory
search.py
search.py
py
3,024
python
en
code
0
github-code
97
[ { "api_name": "sys.argv", "line_number": 14, "usage_type": "name" }, { "api_name": "sys.argv.index", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 15, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 16, ...
22102210092
from django.shortcuts import render, redirect from django.http import HttpResponse from .models import * from .forms import * def index(request): pets = Pet.objects.all() context = {'pets':pets} return render(request,'list.html',context) def addPet(request): pets = Pet.objects.all() form = FormPet...
mateusschwede/django
Outros/epets/prjEPets/appEPets/views.py
views.py
py
1,572
python
en
code
1
github-code
97
[ { "api_name": "django.shortcuts.render", "line_number": 9, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 19, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 20, "usage_type": "call" }, { "api_name...
23285016578
# -*- coding: utf-8 -*- """ Created on Thu Sep 8 15:13:07 2016 @author: aeidelman """ import os import git from annuaire.config_annuaire import path join = os.path.join repo = git.Repo(os.getcwd()) tree = repo.heads[0].commit.tree index = repo.index past_commit_messages = [commit.message for commit i...
AlexisEidelman/AnnuaireServicePublic
annuaire/git_push.py
git_push.py
py
786
python
en
code
5
github-code
97
[ { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "git.Repo", "line_number": 15, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 15, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 21, ...
40912573128
import os import shutil import argparse import time import logging from pathlib import Path import sys LOG_FILE_PATH = './logs/synch.log' def _get_logger(): logger = logging.getLogger('synch folder') logger.setLevel(logging.INFO) formatter = logging.Formatter('%(asctime)s | %(levelname)s | %(message)s') ...
Nurgali-Kadyrbek/synch_folder
src/synchronization.py
synchronization.py
py
2,840
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 14, "usage_type": "attribute" }, { "api_name": "logging.Formatter", "line_number": 15, "usage_type": "call" }, { "api_name": "logging.StreamH...
33850394996
#!/usr/bin/env python # -*- coding: utf-8 -*- # @CXM import urllib.request import re from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument('--headless') chrome_options.add_argument('--disable-gpu') chrome_options.add_argument('blink...
dxcv/Project-1
TEST/spider/forls/getlinklist.py
getlinklist.py
py
2,145
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 10, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 14, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 14, "usage_type": "name" }, {...
32520698452
import argparse import json import os import re from wedc.domain.core.data import loader WEBPAGE_SOURCE = '_source' # list WEBPAGE_NAME = 'name' # list WEBPAGE_URI = 'uri' # string WEBPAGE_DESC = 'description' # string def generate_jsonlines(input, output): import jsonlines pn_file = open(input, 'r...
usc-isi-i2/WEDC
wedc/domain/core/data/loaders/webpages_loader.py
webpages_loader.py
py
846
python
en
code
0
github-code
97
[ { "api_name": "json.load", "line_number": 18, "usage_type": "call" }, { "api_name": "jsonlines.open", "line_number": 22, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 29, "usage_type": "call" } ]
38429200022
from cheshire3.exceptions import * from cheshire3.baseStore import SimpleStore, DeletedObject from cheshire3.baseObjects import ResultSetStore from cheshire3.resultSet import SimpleResultSet, SimpleResultSetItem from cheshire3 import dynamic import os import time import datetime import dateutil import struct import S...
cheshire3/cheshire3
cheshire3/sql/sqlite.py
sqlite.py
py
16,024
python
en
code
16
github-code
97
[ { "api_name": "cheshire3.baseStore.SimpleStore", "line_number": 49, "usage_type": "name" }, { "api_name": "cheshire3.baseStore.SimpleStore.__init__", "line_number": 55, "usage_type": "call" }, { "api_name": "cheshire3.baseStore.SimpleStore", "line_number": 55, "usage_type...
9540983357
import os from flask import Flask from flask.blueprints import Blueprint from flask_bootstrap import Bootstrap from dotenv import load_dotenv, find_dotenv __version__ = "0.0.0b1" def create_app(config=None): load_dotenv(find_dotenv()) """Create and configure an instance of the Flask app""" app = Flask(...
spkane31/fantasy-football-site
ffs/__init__.py
__init__.py
py
927
python
en
code
0
github-code
97
[ { "api_name": "dotenv.load_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "dotenv.find_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 15, "usage_type": "call" }, { "api_name": "flask_bootstrap.Boo...
14655854350
""" A teacher is writing a test with n true/false questions, with 'T' denoting true and 'F' denoting false. He wants to confuse the students by maximizing the number of consecutive questions with the same answer (multiple trues or multiple falses in a row). You are given a string answerKey, where answerKey[i] is the ...
JiriPakr/Python_small_projects
Challanges/Medium/2024.maximize_the_confusion_of_an_exam.py
2024.maximize_the_confusion_of_an_exam.py
py
3,964
python
en
code
0
github-code
97
[ { "api_name": "sys.maxsize", "line_number": 52, "usage_type": "attribute" }, { "api_name": "collections.Counter", "line_number": 74, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 94, "usage_type": "call" } ]
23565440976
from django.shortcuts import render, redirect from .models import Venta from .forms import VentaForm from productos.models import Producto # Create your views here. def ventas(request): ventas = Venta.objects.all() context = {"ventas": ventas} return render(request, "ventas/ventas.html", context) def c...
joaquinlarsen/Stock-management
ventas/views.py
views.py
py
913
python
en
code
0
github-code
97
[ { "api_name": "models.Venta.objects.all", "line_number": 10, "usage_type": "call" }, { "api_name": "models.Venta.objects", "line_number": 10, "usage_type": "attribute" }, { "api_name": "models.Venta", "line_number": 10, "usage_type": "name" }, { "api_name": "djang...
42881419016
# Given an integer array nums, find the contiguous subarray # (containing at least one number) # which has the largest sum and return its sum. # A subarray is a contiguous part of an array. from typing import List class Solution: def maxSubArray(self, nums: List[int]) -> int: sums = [] tmp_sum = 0...
vovapasko/ads
leetcode/max_subarray.py
max_subarray.py
py
673
python
en
code
0
github-code
97
[ { "api_name": "typing.List", "line_number": 9, "usage_type": "name" } ]
42927348120
# -*- coding:utf-8 -*- """模型代码。""" from __future__ import print_function, division, absolute_import import tensorflow as tf import collections EPS = 1e-12 Model = collections.namedtuple("Model", "outputs, predict_real, predict_fake, discrim_loss, discrim_grads_and_vars, gen...
yongyehuang/Tensorflow-Tutorial
models/m04_pix2pix/model.py
model.py
py
12,089
python
en
code
905
github-code
97
[ { "api_name": "collections.namedtuple", "line_number": 11, "usage_type": "call" }, { "api_name": "tensorflow.pad", "line_number": 16, "usage_type": "call" }, { "api_name": "tensorflow.layers.conv2d", "line_number": 17, "usage_type": "call" }, { "api_name": "tensor...
37031820386
from flask import Flask, render_template, request, redirect, session app = Flask(__name__) app.secret_key = 'wubalubadubdub' @app.route('/') def index(): if 'count' in session: session['count'] += 1 else: session['count'] = 1 return render_template('index.html') @app.route('/terminate') d...
Sal-Nunez/python
flask/fundamentals/counter/server.py
server.py
py
695
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 2, "usage_type": "call" }, { "api_name": "flask.session", "line_number": 8, "usage_type": "name" }, { "api_name": "flask.session", "line_number": 9, "usage_type": "name" }, { "api_name": "flask.session", "line_number...
2205087091
# -*- coding: utf-8 -*- import json import operator import copy def export_json(filename, data): with open(filename, "w") as output: output.write(json.dumps(data)) with open('../scrap/movies.json') as f: data = json.load(f) directors_cast = {} for item in data: if item['director'] in directors_cast: ...
mertkahyaoglu/movie-stats
stats/stats.py
stats.py
py
2,042
python
en
code
6
github-code
97
[ { "api_name": "json.dumps", "line_number": 8, "usage_type": "call" }, { "api_name": "json.load", "line_number": 11, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 30, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": ...
73463707839
import matplotlib.pyplot as plt from pathlib import Path import numpy as np import seaborn as sns import pickle as pkl def get_pivot_from_insight(insight): ret = [] for key in insight: print(f'{key}: {insight[key]}') pivot = float(insight[key].split(',')[2].split(':')[1]) ret.append(piv...
ctenhank/modeling-dsp-simulation
tool/temp.py
temp.py
py
3,567
python
en
code
0
github-code
97
[ { "api_name": "pathlib.Path", "line_number": 18, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 24, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 40, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number...
40935900726
import unittest import numpy as np from causallearn.graph.AdjacencyConfusion import AdjacencyConfusion from causallearn.graph.ArrowConfusion import ArrowConfusion from causallearn.graph.GeneralGraph import GeneralGraph from causallearn.graph.GraphNode import GraphNode from causallearn.search.PermutationBased.GRaSP imp...
py-why/causal-learn
tests/TestGRaSP.py
TestGRaSP.py
py
4,172
python
en
code
846
github-code
97
[ { "api_name": "numpy.append", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.random.shuffle", "line_...
19872875322
import numpy as np from scipy.io import readsav from SSINS import plot_lib import matplotlib.pyplot as plt from matplotlib import cm indir = '/Users/mike_e_dubs/MWA/FHD/1061313128_Noflag' noflag = readsav('%s/1061313128_cal.sav' % indir) cotter = readsav('%s/1061313128_COTTER_cal.sav' % indir) ssins = readsav('%s/1061...
mwilensky768/MJW-MWA
1061313128/cal_compare.py
cal_compare.py
py
1,647
python
en
code
0
github-code
97
[ { "api_name": "scipy.io.readsav", "line_number": 8, "usage_type": "call" }, { "api_name": "scipy.io.readsav", "line_number": 9, "usage_type": "call" }, { "api_name": "scipy.io.readsav", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.cm.viridi...
38552649582
#!/usr/bin/env python # -*- coding:utf-8 -*- from requests_oauthlib import OAuth1Session import json from urllib.parse import urlparse import mysql.connector import MeCab ### Constants url = urlparse('mysql://root:root@localhost:3306/km') ### Functions def main(): sql = 'select text from tweets where screen_name...
Kamihara/tw
MecabTest.py
MecabTest.py
py
1,142
python
en
code
0
github-code
97
[ { "api_name": "urllib.parse.urlparse", "line_number": 11, "usage_type": "call" }, { "api_name": "MeCab.Tagger", "line_number": 22, "usage_type": "call" }, { "api_name": "mysql.connector.connector.connect", "line_number": 37, "usage_type": "call" }, { "api_name": "...
38577440536
import numpy as np import copy import matplotlib.pyplot as plt from utils import * from texas_holdem import * #probabilités de Win/Split/loss (et proxy de l'equity (force de la main)) si tous jouaient toujours leurs mains. for n in range(2, 10): NB_PLAYERS = n NB_RANDOM_GAMES_PER_13X13_HANDS = 10000 POSSI...
wiper8/poker_GTO
random_win_texas_holdem.py
random_win_texas_holdem.py
py
4,838
python
en
code
0
github-code
97
[ { "api_name": "numpy.zeros", "line_number": 20, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 21, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.argsort", "line_num...
15584738169
import logging import qtrio import trio import gettext import pickle import time from pathlib import Path from deaduction.dui.launcher import select_course from deaduction.pylib.coursedata import Exercise from deaduction.pylib import logger from deaduction.pylib.server import ServerInterface log = logging.getLogger(_...
dEAduction/dEAduction
snippets/pre_processing/__main__.py
__main__.py
py
6,229
python
en
code
17
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "deaduction.dui.launcher.select_course", "line_number": 22, "usage_type": "call" }, { "api_name": "trio.open_nursery", "line_number": 46, "usage_type": "call" }, { "api_nam...
31730909076
""" A class for grabbing information about a ruzzle board screenshot. Constants are defined in config.py and vary for each device. A pretrained pytesseract model is also required; this should be stored as /usr/share/tesseract-ocr/4.00/tessdata/Alte.traineddata. Alte is used because it most nearly matches the font use...
dchen327/ruzzle-solver
board_ocr.py
board_ocr.py
py
3,133
python
en
code
47
github-code
97
[ { "api_name": "config.MAIN_DIR", "line_number": 22, "usage_type": "attribute" }, { "api_name": "config.PATH_TO_IMG", "line_number": 22, "usage_type": "attribute" }, { "api_name": "PIL.Image.open", "line_number": 24, "usage_type": "call" }, { "api_name": "PIL.Image...
4526624340
import sqlite3 import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText #inserta datos a la base de datos def insertar(datos,opcion): #conexion a la base de datos con_bd = sqlite3.connect('data1.db') #cursor a la db cursor_agenda = con_bd.cursor() if opcio...
SaidaPardo/proyectopython
main.py
main.py
py
10,837
python
es
code
0
github-code
97
[ { "api_name": "sqlite3.connect", "line_number": 9, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 36, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 60, "usage_type": "call" }, { "api_name": "sqlite3.connect", ...
32924542775
from django.urls import path from . import views urlpatterns = [ path('register', views.registerationPage), path('login', views.loginPage, name='login'), path('logout', views.logoutUser, name='logout'), path('shopping_card', views.shoppingCard, name='shopping_card'), path('delete_order/<order_id>',...
novartis-nk/Django-Unsplash-clone
users/urls.py
urls.py
py
453
python
en
code
0
github-code
97
[ { "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", ...
22664355572
from fabric.api import sudo, run, local, put, cd PROJECT_NAME = 'apollo' PROJECT_DIR = 'projects' def _make_archive(version="HEAD"): filename = "%s-%s.tar.gz" % (PROJECT_NAME, version) local('git archive --format=tar --prefix=%s/ %s | gzip >%s' % ( PROJECT_NAME, version, filename)) return filenam...
JamesMura/elections
fabfile.py
fabfile.py
py
649
python
en
code
0
github-code
97
[ { "api_name": "fabric.api.local", "line_number": 9, "usage_type": "call" }, { "api_name": "fabric.api.run", "line_number": 16, "usage_type": "call" }, { "api_name": "fabric.api.put", "line_number": 17, "usage_type": "call" }, { "api_name": "fabric.api.cd", "li...
24174919608
#!/usr/bin/env python3 ''' *** THIS SCRIPT MUST RUN WITH SHELL SCRIPT LAUNCH TO PASS FILES TO SYS.ARGV[1] AND DRIVE PARALLEL *** Script that takes BlueFish MKV tbc 1/1000 and encodes to MKV tbc 1/25: 1. Shell script searches in paths for files that end in '.mkv' and passes on one at a time to Python 2. Receives singl...
bfidatadigipres/transcoding
f47_bluefish_ffv1_tbc_fix.py
f47_bluefish_ffv1_tbc_fix.py
py
16,764
python
en
code
8
github-code
97
[ { "api_name": "os.environ", "line_number": 35, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 36, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 37, "usage_type": "attribute" }, { "api_name": "os.environ", "lin...
15723055358
import logging import colorlog import argparse import os import sys import dns.resolver from multiprocessing import Process,Queue import multiprocessing import gevent ''' set log this code is Useless log.debug is white ,info is green ,warn is yellow ,error is red ,critical red! ''' handler = colorlog.StreamHandler()...
ldbfpiaoran/subdns
dict/subdns1.0.py
subdns1.0.py
py
5,200
python
en
code
72
github-code
97
[ { "api_name": "colorlog.StreamHandler", "line_number": 15, "usage_type": "call" }, { "api_name": "colorlog.ColoredFormatter", "line_number": 16, "usage_type": "call" }, { "api_name": "colorlog.getLogger", "line_number": 31, "usage_type": "call" }, { "api_name": "l...
14129187287
#import time from multiprocessing import Process, Pipe, Event from . import rq from . import ur from .sim.simenv import SimEnv def create(use_sim, config): ''' Creates the appropriate server for either sim or real (hardware) backing. ''' server_type = SimRobotServer if use_sim else RealRobotServer ...
standardgalactic/roman
roman/server.py
server.py
py
4,662
python
en
code
null
github-code
97
[ { "api_name": "sim.simenv.SimEnv", "line_number": 43, "usage_type": "call" }, { "api_name": "multiprocessing.Pipe", "line_number": 76, "usage_type": "call" }, { "api_name": "multiprocessing.Pipe", "line_number": 77, "usage_type": "call" }, { "api_name": "multiproc...
12070966020
from basicnn.knn import knn from utils import load import numpy as np Xtr,Ytr,Xte,Yte = load.load() knn = knn() knn.train(Xtr,Ytr,None,None,Xte,Yte) labels = knn.predict(Xte[0:100,],5) labelss = knn.predicts(Xte[0:100,]) print("{}%".format(np.mean(np.array(labels) == Yte[0:100])*100)) print("{}%".format(np.mean(labe...
chaipan/NeuralNetwork
basicnn/knn/start.py
start.py
py
340
python
en
code
0
github-code
97
[ { "api_name": "utils.load.load", "line_number": 6, "usage_type": "call" }, { "api_name": "utils.load", "line_number": 6, "usage_type": "name" }, { "api_name": "basicnn.knn.knn", "line_number": 7, "usage_type": "name" }, { "api_name": "basicnn.knn.knn.train", "...
72799259838
from __future__ import absolute_import import collections import threading from typing import FrozenSet # pylint: disable=unused-import import time import socket import select import struct import six from six.moves import queue # type: ignore from . import fsm from . import pdu from . import exceptions PDU_TYP...
blanebf/pynetdicom2
pynetdicom2/dulprovider.py
dulprovider.py
py
10,584
python
en
code
10
github-code
97
[ { "api_name": "threading.Thread", "line_number": 41, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 87, "usage_type": "call" }, { "api_name": "six.moves.queue.Queue", "line_number": 90, "usage_type": "call" }, { "api_name": "six.mov...
20382164871
import os import time import json import logging from multiprocessing import Pool from preprocessors.utils import chunk_list, get_paths_of_root, get_paths_of_split from preprocessors.nlp_pipeline import Pipeline from preprocessors.base_processor import BaseProcessor from preprocessors.cnndm_reader import Reader from p...
baoyujing/MultiGraS
preprocessors/cnndm_processor.py
cnndm_processor.py
py
6,289
python
en
code
1
github-code
97
[ { "api_name": "logging.basicConfig", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.ERROR", "line_number": 13, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "preprocessor...
7815117022
import cv2 import numpy as np def main(): image = cv2.imread("../data/house.tiff", 1) blue, green, red = cv2.split(image) rows, columns, channels = image.shape output = np.empty((rows, columns * 3, 3), np.uint8) output[:, 0:columns] = cv2.merge([blue, blue, blue]) output[:, columns:columns ...
amarlearning/Finger-Detection-and-Tracking
OpenCV models/playground.py
playground.py
py
788
python
en
code
385
github-code
97
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.split", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.empty", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 11, ...
4951434523
import os import pandas as pd import cv2 from PIL import Image, ImageOps, ImageEnhance from utils.model import freeze_blocks_resnet, CNN from utils.img_preprocess import img_process_transform, img_process_PIL import xgboost as xgb import pickle import argparse import torch from torch.autograd import Variable import ...
spreadwyvern/kidney-sonography
ensemble_predict.py
ensemble_predict.py
py
4,847
python
en
code
8
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 21, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 30, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 31, "usage_type": "attribute" }, { "api_name": "torch.cuda.se...
70795318719
from PyQt5 import uic from PyQt5.QtWidgets import QMainWindow, QTableWidgetItem, QAbstractItemView, QDialog from ECommerce.Catalogo import Catalogo from Gestione.Database import Database from Gestione.GestioneSessioneMarket import GestioneSessioneMarket from view.CarrelloView import CarrelloView from view.DettagliProd...
federicoarduini/Codice_Gestionale_Tipografia
view/CatalogoView.py
CatalogoView.py
py
6,304
python
it
code
0
github-code
97
[ { "api_name": "PyQt5.QtWidgets.QMainWindow", "line_number": 13, "usage_type": "name" }, { "api_name": "Gestione.GestioneSessioneMarket.GestioneSessioneMarket", "line_number": 17, "usage_type": "call" }, { "api_name": "PyQt5.uic.loadUi", "line_number": 19, "usage_type": "c...
18112251453
import pandas as pd from parser import selectToString from datetime import datetime, date import time def resultsToDf(doc): page_df = pd.DataFrame() # subset the document to only <div id="results_column"> doc = doc.find("div", {"id": "results_column"} ) # iterate through the individual results, save to ...
jamiefd/python-demo
extractor.py
extractor.py
py
2,614
python
en
code
0
github-code
97
[ { "api_name": "pandas.DataFrame", "line_number": 8, "usage_type": "call" }, { "api_name": "parser.selectToString", "line_number": 24, "usage_type": "call" }, { "api_name": "parser.selectToString", "line_number": 28, "usage_type": "call" }, { "api_name": "parser.se...
37337245678
from config import * from player import * from plataformas import * from serra import * import sys import pygame class Inicial: def tela_inicial(self): pygame.init() SCREEN = screen f1 = 20 f2 = 20 escolha = 1 score_font = pygame.font.Fo...
GuilhermeSDSilva/Paradise-Save
game.py
game.py
py
9,771
python
pt
code
0
github-code
97
[ { "api_name": "pygame.init", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.font.Font", "line_number": 19, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 19, "usage_type": "attribute" }, { "api_name": "pygame.font.Font", ...
23211501488
from flask import Flask, flash, redirect, render_template, request, session, url_for, send_file, jsonify, make_response from flask_session import Session from tempfile import mkdtemp from bokeh.embed import components from bokeh.plotting import figure, output_file, save from graphIt import get_CGPA from SGPA import get...
dsciitbbs/piesAndBars
application.py
application.py
py
11,155
python
en
code
2
github-code
97
[ { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 28, "usage_type": "call" }, { "api_name": "SGPA.get_SGPA", "line_number": 31, "usage_type": "call" }, { "api_name": "bokeh.plotting.figure...
37267173820
''' Created on 27.07.2013 @author: Mischa ''' import os import shutil import sys import threading import sqlite3 from datetime import datetime from time import sleep from nsabox.application.config import Config from nsabox.application.flow.FlowService import FlowService from nsabox.application.co...
Jonny87/nsabox
nsabox/application/core/Core.py
Core.py
py
1,593
python
en
code
0
github-code
97
[ { "api_name": "nsabox.application.flow.FlowService.FlowService", "line_number": 20, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 28, "usage_type": "call" }, { "api_nam...
71260618559
"""Langevin dynamics class.""" import numpy as np from numpy.random import standard_normal, randint import asap3 import ase from asap3.md.md import MolecularDynamics, ParallelMolDynMixin from ase.md.langevin import Langevin as Langevin_ASE import asap3.constraints import sys class Langevin_New(object, Langevin_ASE, P...
auag92/n2dm
Asap-3.8.4/Python/asap3/md/langevin.py
langevin.py
py
10,055
python
en
code
1
github-code
97
[ { "api_name": "ase.md.langevin.Langevin", "line_number": 12, "usage_type": "name" }, { "api_name": "asap3.md.md.ParallelMolDynMixin", "line_number": 12, "usage_type": "name" }, { "api_name": "ase.md.langevin.Langevin", "line_number": 15, "usage_type": "argument" }, { ...
42110045460
import numpy as np import collections import copy BeamObject = collections.namedtuple('BeamObject', 'hypothesis score state') class BeamSearch: def __init__(self, beam_size, model, sample, max_length=100): self.beam_size = beam_size self.max_length = max_length self._model = model ...
shamilcm/deeptxt
deeptxt/models/inference/beam_search.py
beam_search.py
py
4,853
python
en
code
1
github-code
97
[ { "api_name": "collections.namedtuple", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.log", "line_n...
8035522167
# -*- coding: utf-8 -*- import cStringIO import csv import os import re import tempfile from pyspark.sql import SQLContext from scalableor.constant import COLUMN_NAME from scalableor.context import eval_expression, to_grel_object from scalableor.manager import MethodsManager from scalableor.facet import get_facet_...
andrejev/Scalable.OR
scalableor/method.py
method.py
py
7,488
python
en
code
1
github-code
97
[ { "api_name": "pyspark.sql.SQLContext", "line_number": 29, "usage_type": "call" }, { "api_name": "scalableor.constant.COLUMN_NAME", "line_number": 33, "usage_type": "name" }, { "api_name": "scalableor.manager.MethodsManager.register", "line_number": 19, "usage_type": "cal...
23749028049
# author: Jasmine Qin # date: 2020-06-09 """ This script performs data wrangling and synthesizing needed for visualization of the business licence file. Usage: src/04_visualization/licence_vis_synthesis.py """ # load packages import pandas as pd import json import re from joblib import load import warnings warnings...
aakanksha023/EVAN
src/04_visualization/licence_vis_synthesis.py
licence_vis_synthesis.py
py
5,714
python
en
code
0
github-code
97
[ { "api_name": "warnings.filterwarnings", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 24, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 27, "usage_type": "call" }, { "api_name": "pandas.read_c...
40810189001
import re import copy import json import functools import traceback from typing import Iterable, List, Dict, Union JSON_PATCH_IMPORT_ERR = None try: import jsonpatch HAS_JSON_PATCH = True except ImportError: HAS_JSON_PATCH = False JSON_PATCH_IMPORT_ERR = traceback.format_exc() from ansible.module_uti...
ansible-collections/amazon.cloud
plugins/module_utils/utils.py
utils.py
py
9,516
python
en
code
12
github-code
97
[ { "api_name": "traceback.format_exc", "line_number": 15, "usage_type": "call" }, { "api_name": "concurrent.futures.ThreadPoolExecutor", "line_number": 35, "usage_type": "call" }, { "api_name": "asyncio.wrap_future", "line_number": 40, "usage_type": "call" }, { "ap...
10132191643
from PyQt5 import QtSql class Client: def __init__(self): self.noClient = None self.nomEntreprise = None self.nomContact = None self.prenomContact = None self.mailContact = None def get_values(self): assert self.noClient is not None query = QtSql.QSqlQu...
baptiste-pasquier/eurocorporate
src/main/python/Classes/client.py
client.py
py
724
python
en
code
0
github-code
97
[ { "api_name": "PyQt5.QtSql.QSqlQuery", "line_number": 14, "usage_type": "call" }, { "api_name": "PyQt5.QtSql", "line_number": 14, "usage_type": "name" } ]
25163018556
""" This script is a simple training script which uses Tensorflow's MonitoredSession interface. It has been orchestrated with SageMaker Debugger hooks to allow saving tensors during training. These hooks have been instrumented to read from json configuration that SageMaker will put in the training container. Configurat...
awslabs/sagemaker-debugger
examples/tensorflow/sagemaker_byoc/simple.py
simple.py
py
3,972
python
en
code
157
github-code
97
[ { "api_name": "argparse.ArgumentTypeError", "line_number": 32, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 35, "usage_type": "call" }, { "api_name": "tensorflow.compat.v1.set_random_seed", "line_number": 47, "usage_type": "call" }, ...
39505576614
import scrapy from ..Utils import * import json import os class DataSpider(scrapy.Spider): name = 'Data' print("Enter Name for Output file:") filenm = input() cmp = data_dict count = 0 def closed(self, reason): if not os.path.exists("Output"): os.mkdir("Output") cm...
falloutats/demo
HomeDepot_data.py
HomeDepot_data.py
py
2,495
python
en
code
0
github-code
97
[ { "api_name": "scrapy.Spider", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.mkdir", "line_nu...
42628486468
# pylint: disable=missing-docstring, invalid-name import logging from logging import config import logging.handlers import os from datetime import datetime import yaml def my_rotation_filename(self, default_name): """ Modify the filename of a log file when rotating. This is provided so that a custom filen...
UrielPaluch/Toolbox
src/toolbox/logging_module/logging_module.py
logging_module.py
py
3,422
python
en
code
1
github-code
97
[ { "api_name": "os.path.split", "line_number": 38, "usage_type": "call" }, { "api_name": "os.path", "line_number": 38, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 40, "usage_type": "call" }, { "api_name": "os.path.join", "line_number...
35245313377
import matplotlib.pyplot as plt socialmedia = ['facebook', 'twitter', 'youtube', 'instagram', 'linkedin'] views = [444, 542, 888, 1500, 100] explodeone = [0 ,0 , 0.1, 0, 0] plt.pie(views, labels=socialmedia, explode=explodeone, autopct='%1.1f%%', wedgeprops={'width':...
prafful/python_jan_2020
44_matplotlib_pie_07.py
44_matplotlib_pie_07.py
py
337
python
en
code
0
github-code
97
[ { "api_name": "matplotlib.pyplot.pie", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotl...
8027610920
# Lint as: python3 """Classification layer implementation in JAX based on official TF model.""" from __future__ import absolute_import from __future__ import division from __future__ import REDACTED from __future__ import print_function from typing import List from flax import nn import jax.numpy as jnp from REDACTED...
mlcommons/training_results_v0.7
Google/benchmarks/bert/implementations/bert-research-JAX-tpu-v3-8192/classification.py
classification.py
py
3,412
python
en
code
58
github-code
97
[ { "api_name": "flax.nn.initializers.lecun_normal", "line_number": 15, "usage_type": "call" }, { "api_name": "flax.nn.initializers", "line_number": 15, "usage_type": "attribute" }, { "api_name": "flax.nn", "line_number": 15, "usage_type": "name" }, { "api_name": "f...
33845136052
import sys import pygame #게임 화면 크기 WINDOW_WIDTH = 1200 WINDOW_HEIGHT = 870 #색상 WHITE = (255,255,255) #속도와 질량 기본 값 VELOCITY = 7 #속도 MASS = 2 #질량 class Characters: def __init__(self): self.image = "" self.dx = 0 self.dy = 0 self.rect = "" #이미지 사각형 이미지 크...
chungkyungsook/cookirunrunrun
test_project/test.py
test.py
py
6,390
python
ko
code
0
github-code
97
[ { "api_name": "pygame.image.load", "line_number": 29, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 29, "usage_type": "attribute" }, { "api_name": "pygame.transform.scale", "line_number": 31, "usage_type": "call" }, { "api_name": "pygame.tra...
19409186572
from io import BytesIO import requests from lxml import etree from ckan.plugins import toolkit parser = etree.XMLParser(recover=True) standard_fields = ['datasetID', 'basisOfRecord', 'dynamicProperties'] valid_types = ['StillImage', 'MovingImage', 'Sound', 'PhysicalObject', 'Event', 'Text'] def load_schema(url, b...
NaturalHistoryMuseum/ckanext-versioned-datastore
ckanext/versioned_datastore/lib/downloads/derivatives/dwc/utils.py
utils.py
py
1,425
python
en
code
7
github-code
97
[ { "api_name": "lxml.etree.XMLParser", "line_number": 8, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 8, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "io.BytesIO", "line_num...
72978701759
# -*- coding: utf-8 -*- import os import io from setuptools import setup, find_packages # Helpers def read(*paths): """Read a text file.""" basedir = os.path.dirname(__file__) fullpath = os.path.join(basedir, *paths) contents = io.open(fullpath, encoding='utf-8').read().strip() return contents ...
frictionlessdata/frictionless-ckan-mapper
setup.py
setup.py
py
1,817
python
en
code
9
github-code
97
[ { "api_name": "os.path.dirname", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number"...
3391815598
from bin.service import Environment from bin.service import Logger from bin.service import CardTransfer from pymongo import MongoClient import urllib.request import json import time class Gitlab: def __init__(self): self.environment = Environment.Environment() self.mongo = MongoClient(self.enviro...
Skadisson/phoenix
bin/service/Gitlab.py
Gitlab.py
py
4,574
python
en
code
2
github-code
97
[ { "api_name": "bin.service.Environment.Environment", "line_number": 13, "usage_type": "call" }, { "api_name": "bin.service.Environment", "line_number": 13, "usage_type": "name" }, { "api_name": "pymongo.MongoClient", "line_number": 14, "usage_type": "call" }, { "a...
70015385919
from time import gmtime, strftime import uuid import json import websocket from credentials import * from utils.mysql_utils import MySQL_Class # Kafka libraries from kafka import KafkaProducer from kafka.errors import KafkaError # Kafka Producer: Send messages to Kafka topics producer = KafkaProducer( value_ser...
AbdullahAshfaq/ML_TradeStation
finnhub_to_kafka_websocket.py
finnhub_to_kafka_websocket.py
py
3,210
python
en
code
0
github-code
97
[ { "api_name": "kafka.KafkaProducer", "line_number": 15, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 16, "usage_type": "call" }, { "api_name": "utils.mysql_utils.MySQL_Class", "line_number": 20, "usage_type": "call" }, { "api_name": "json.loa...
69882958078
# Merge OpenPose json files into npy files # Author: Yuliang Zou # Date: 03/01/2019 import json import numpy as np import os import pandas as pd from glob import glob import sys def read_json(json_path): with open(json_path) as f: data = json.load(f) kps = [] for people in data['people']: ...
yhw-yhw/MOVER
thirdparty/HPS_initialization/HPS_prepare_input/preprocess/footskate_reducer/ground_detector/op2npy.py
op2npy.py
py
5,175
python
en
code
86
github-code
97
[ { "api_name": "json.load", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number": 25...
3771457908
import os import sys import logging from Scopuli.Interfaces.GUI.ApplicationModule import Application from Scopuli.Interfaces.GUI.WindowModule import Window from Scopuli.Interfaces.GUI.WidgetModule import Widget log = logging.getLogger(__name__) class LogHandler(logging.Handler): def __init__(self, application)...
MaxOnNet/scopuli-core-gui
Scopuli/Interfaces/GUI/__init__.py
__init__.py
py
1,662
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.Handler", "line_number": 13, "usage_type": "attribute" }, { "api_name": "logging.Handler.__init__", "line_number": 15, "usage_type": "call" }, { "api_name": "loggi...
30686909318
""" funcX : Fast function serving for clouds, clusters and supercomputers. """ import logging from pythonjsonlogger import jsonlogger from .version import VERSION __author__ = "The funcX team" __version__ = VERSION def set_stream_logger(name="funcx_forwarder", level=logging.DEBUG, format_string=None): """Add ...
funcx-faas/funcx-forwarder
funcx_forwarder/__init__.py
__init__.py
py
1,025
python
en
code
0
github-code
97
[ { "api_name": "version.VERSION", "line_number": 11, "usage_type": "name" }, { "api_name": "logging.DEBUG", "line_number": 14, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 28, "usage_type": "call" }, { "api_name": "logging.DEBUG", ...
15351560900
#author: Riley Doyle #date: 7/15/20 #file: CO2_loss_dynamic #status: WORKING #clear all from IPython import get_ipython get_ipython().magic('reset -sf') from calc_Ks import * from calc_alphas import * from calc_density import * import numpy as np from scipy.integrate import odeint import matplotlib.pyplot as plt glo...
rkd006/Carbonate-Chemistry-Model
Python files/CO2_loss_dynamic.py
CO2_loss_dynamic.py
py
1,853
python
en
code
3
github-code
97
[ { "api_name": "IPython.get_ipython", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.log10", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.log10", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.linspace", "line...
14962573494
from hydra_zen import make_config, MISSING, instantiate, just, launch import pytorch_lightning as pl from typing import Callable, List from omegaconf import DictConfig import submitit import time SlurmConfig = make_config( executor_dir=MISSING, slurm_partition=MISSING, slurm_gres=MISSING, slurm_constra...
MIT-AI-Accelerator/green-computing-toolbox
powersweep/src/powersweep/powersweep.py
powersweep.py
py
3,263
python
en
code
0
github-code
97
[ { "api_name": "hydra_zen.make_config", "line_number": 8, "usage_type": "call" }, { "api_name": "hydra_zen.MISSING", "line_number": 9, "usage_type": "name" }, { "api_name": "hydra_zen.MISSING", "line_number": 10, "usage_type": "name" }, { "api_name": "hydra_zen.MIS...
19898260818
#!/usr/bin/env python3 # This is my first pygame # Made by myself import pygame import os import random from os import path BLACK = (0, 0, 0) WHITE = (255, 255, 255) GREEN = (0, 225, 0) WIDTH = 1204 # width for gaming screen LENGTH = 806 # length for gaming screen BALL_MOVE = 6 LINE_MOVE = 5 ASSET_FOLDER =...
sidinfinity/mygame
src/pong/pong.py
pong.py
py
3,958
python
en
code
5
github-code
97
[ { "api_name": "pygame.sprite", "line_number": 22, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Sprite.__init__", "line_number": 24, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 24, "usage_type": "attribute" }, { "api_name": "p...
615808197
import rospy import publisher_points as publ from sensor_msgs.msg import Image from sensor_msgs.msg import PointCloud2 import cv2 import numpy as np import struct import sensor_msgs.point_cloud2 as pc2 frm = None previus_frame = None msg_cpy = None def callback(msg): "" global msg_cpy msg_cpy = msg ...
gorgis1997/Exjobb
subscriber_points.py
subscriber_points.py
py
2,481
python
en
code
0
github-code
97
[ { "api_name": "rospy.init_node", "line_number": 27, "usage_type": "call" }, { "api_name": "rospy.Publisher", "line_number": 28, "usage_type": "call" }, { "api_name": "sensor_msgs.msg.PointCloud2", "line_number": 28, "usage_type": "argument" }, { "api_name": "rospy...
22981183731
import os, sys import matplotlib.pyplot as plt import json import pprint import numpy as np VERBOSE="-v" in sys.argv MANUAL_FILE="manual.json" PLOTS_DIR="plots" SUITES=['rodinia', 'polybench', 'nvidia-samples-10.1'] def msg(*args, **kwargs): if VERBOSE: print(*args, **kwargs) pre_wd = os.getcwd() os.chdi...
gkrls/kerma-experiments
count-benchmark-accesses-pilot/plots.py
plots.py
py
10,422
python
en
code
0
github-code
97
[ { "api_name": "sys.argv", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 16, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": ...
31013577535
import pygame from pygame.locals import * from random import choice pygame.init() BLACK = (0, 0, 0) WHITE = (255, 255, 255) BLUE = (0, 0, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) size = [400, 300] screen = pygame.display.set_mode(size) pygame.display.set_caption("GATO") done = False imagen = pygame.image.load('img/t...
juanCano29/pygame
gamee.py
gamee.py
py
1,867
python
en
code
0
github-code
97
[ { "api_name": "pygame.init", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 12, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pygame.display...
35467744051
# Problem statement: http://www.codeforces.com/problemset/problem/630/H from math import factorial from operator import mul from functools import reduce def ncr(n, r): r = min(r, n-r) if r == 0: return 1 numer = reduce(mul, range(n, n-r, -1)) denom = reduce(mul, range(1, r+1)) return numer//denom ...
ucefizi/CodeForcesPython
PB630h.py
PB630h.py
py
375
python
en
code
0
github-code
97
[ { "api_name": "functools.reduce", "line_number": 11, "usage_type": "call" }, { "api_name": "operator.mul", "line_number": 11, "usage_type": "argument" }, { "api_name": "functools.reduce", "line_number": 12, "usage_type": "call" }, { "api_name": "operator.mul", ...
2459964631
import gspread_dataframe as gd import gspread as gs import pandas as pd from tkinter import messagebox from tkinter.filedialog import askopenfilename, askdirectory gc = gs.service_account(filename="Sale Database.json") messagebox.showinfo(title='Open...', message="Open file to upload") dfpath = askopenfilename() try...
christitensor/titensor_photography
database_uploader.py
database_uploader.py
py
1,683
python
en
code
1
github-code
97
[ { "api_name": "gspread.service_account", "line_number": 7, "usage_type": "call" }, { "api_name": "tkinter.messagebox.showinfo", "line_number": 10, "usage_type": "call" }, { "api_name": "tkinter.messagebox", "line_number": 10, "usage_type": "name" }, { "api_name": ...
33359270933
# Extracts information from a project that has a distutils setup.py file. import os import sys import logging from copy import copy from distutils import core # From six (where else?): if sys.version_info[0] == 3: def exec_(_code_, _globs_=None, _locs_=None): exec(_code_, _globs_, _locs_) else: def ex...
lugnitdgp/avskr2.0
ve/Lib/site-packages/pyroma/projectdata.py
projectdata.py
py
6,175
python
en
code
3
github-code
97
[ { "api_name": "sys.version_info", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sys._getframe", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path", "li...
74075589120
from marshmallow import ValidationError from werkzeug.exceptions import HTTPException, UnprocessableEntity from flask import jsonify class ApiExceptionHandler: def __init__(self, app): self.app = app self.register() def register(self): self.app.register_error_handler( HTTP...
dev-rijan/flask-api-stater
src/exceptions/api_exception_handler.py
api_exception_handler.py
py
974
python
en
code
4
github-code
97
[ { "api_name": "werkzeug.exceptions.HTTPException", "line_number": 13, "usage_type": "argument" }, { "api_name": "werkzeug.exceptions.UnprocessableEntity", "line_number": 15, "usage_type": "argument" }, { "api_name": "werkzeug.exceptions.HTTPException", "line_number": 17, ...
11273827557
from django.conf import settings from django.db import models from edcs_consent.model_mixins import RequiresConsentFieldsModelMixin from edcs_sites.models import SiteModelMixin from edcs_visit_schedule.model_mixins import ( VisitTrackingCrfModelMixin, ) class CrfNoManagerModelMixin( VisitTrackingCrfModelMixin...
frdrckaman/edcs
edcs_crf/crf_no_manager_model_mixin.py
crf_no_manager_model_mixin.py
py
979
python
en
code
2
github-code
97
[ { "api_name": "edcs_visit_schedule.model_mixins.VisitTrackingCrfModelMixin", "line_number": 11, "usage_type": "name" }, { "api_name": "edcs_consent.model_mixins.RequiresConsentFieldsModelMixin", "line_number": 12, "usage_type": "name" }, { "api_name": "edcs_sites.models.SiteModel...
23004038011
import pygame from pygame.sprite import Sprite class Alien(Sprite): """Alien class, ome alien amongst the fleet.""" def __init__(self, settings, screen): super(Alien, self).__init__() self.screen = screen self.settings = settings # The alien image. self.image = pygame....
8i8/space-invaiders
alien.py
alien.py
py
1,187
python
en
code
0
github-code
97
[ { "api_name": "pygame.sprite.Sprite", "line_number": 4, "usage_type": "name" }, { "api_name": "pygame.image.load", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 13, "usage_type": "attribute" } ]
36658784629
from causal_discovery_utils.constraint_based import LearnStructBase from causal_discovery_algs.pc import LearnStructPC from graphical_models import PAG, arrow_head_types as Mark from itertools import combinations class LearnStructFCI(LearnStructBase): def __init__(self, nodes_set, ci_test, is_sel...
IntelLabs/causality-lab
causal_discovery_algs/fci.py
fci.py
py
6,537
python
en
code
77
github-code
97
[ { "api_name": "causal_discovery_utils.constraint_based.LearnStructBase", "line_number": 7, "usage_type": "name" }, { "api_name": "graphical_models.PAG", "line_number": 10, "usage_type": "argument" }, { "api_name": "graphical_models.arrow_head_types.Circle", "line_number": 17,...
17542813456
from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ #dj的翻译函数ugettext_lazy import datetime # 用来判断日期区间 from django import forms from django.forms import ModelForm from .models import BookInstance class RenewBookForm(forms.Form): """一个表单,方便图书管理员续借""" rene...
anlaganlag/library_project
catalog/forms.py
forms.py
py
2,061
python
en
code
0
github-code
97
[ { "api_name": "django.forms.Form", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 12, "usage_type": "name" }, { "api_name": "django.forms.DateField", "line_number": 14, "usage_type": "call" }, { "api_name": "django.for...
74767199039
from dataclasses import dataclass from typing import Dict, Optional, List import discord from .abstract import AbstractGuildConverter, PartialDiscordModel from .role import PartialRoleModel, RoleConverter from .channels.channel import PartialCategoryChannelModel, PartialGuildChannelModel from .channels.getter import ...
coolwind0202/discord_object_converter
src/discord_object_converter/guild.py
guild.py
py
5,189
python
en
code
0
github-code
97
[ { "api_name": "abstract.PartialDiscordModel", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 14, "usage_type": "name" }, { "api_name": "channels.channel", "line_number": 15, "usage_type": "name" }, { "api_name": "typing....
42073778879
import nltk import re import os #for text summarization tokenizer = nltk.RegexpTokenizer(r"\w+") stopwords = nltk.corpus.stopwords.words('english') stemmer = nltk.stem.PorterStemmer() class Node: def __init__(self, s): s = re.sub("\[[0-9]+\]", '', s)#remove any reference numbering self.ori...
wuyuz99/COEN-296-Natural-Language-Processing
questionbot.py
questionbot.py
py
4,889
python
en
code
0
github-code
97
[ { "api_name": "nltk.RegexpTokenizer", "line_number": 5, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 6, "usage_type": "call" }, { "api_name": "nltk.corpus", "line_number": 6, "usage_type": "attribute" }, { "api_name": "nltk.s...
27213495231
from flask import Flask, render_template, request import random import os from gtts import gTTS from dialogue_manager import DialogueManager from utils import * app = Flask(__name__, instance_relative_config=True) dm = DialogueManager(RESOURCE_PATH) @app.route("/") def home(): return render_template("index.html"...
redsun1988/Course_Natural-Language-Processing
week5/flask-chatterbot/app.py
app.py
py
1,120
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "dialogue_manager.DialogueManager", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 14, "usage_type": "call" }, { "api_name": "fla...
7688947949
import json from pyshark.packet.layer import JsonLayer from pyshark.packet.packet import Packet def duplicate_object_hook(ordered_pairs): """Make lists out of duplicate keys.""" json_dict = {} for key, val in ordered_pairs: existing_val = json_dict.get(key) if not existing_val: ...
i2tResearch/Ciberseguridad_web
Botnets/App/App Web/PDG-env/lib/python3.6/site-packages/pyshark/tshark/tshark_json.py
tshark_json.py
py
1,690
python
en
code
15
github-code
97
[ { "api_name": "json.loads", "line_number": 26, "usage_type": "call" }, { "api_name": "pyshark.packet.layer.JsonLayer", "line_number": 33, "usage_type": "call" }, { "api_name": "pyshark.packet.layer.JsonLayer", "line_number": 36, "usage_type": "call" }, { "api_name...
36052993939
import pandas as pd import numpy as np from sklearn.model_selection import cross_val_score, StratifiedKFold from sklearn.neighbors import KNeighborsClassifier ########### Breast Cancer ################ b_cancer=pd.read_csv(r"C:\Training\Academy\Statistics (Python)\Cases\Wisconsin\BreastCancer.csv", ...
OnkarPotdar/PML
K_folds_knn.py
K_folds_knn.py
py
3,225
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.get_dummies", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.model_selection.StratifiedKFold", "line_number": 15, "usage_type": "call" }, { "api_nam...
42745033407
PKG = 'runtime_monitor' import roslib; roslib.load_manifest(PKG) import wx import unittest import rospy, rostest from time import sleep import sys from optparse import OptionParser from runtime_monitor.monitor_panel import * import threading DURATION = 10 ##\brief Main frame of runtime monitor for testing only cla...
dbking77/diagnostics_monitors
runtime_monitor/test/test_monitor.py
test_monitor.py
py
2,456
python
en
code
0
github-code
97
[ { "api_name": "roslib.load_manifest", "line_number": 2, "usage_type": "call" }, { "api_name": "wx.Frame", "line_number": 18, "usage_type": "attribute" }, { "api_name": "wx.Frame.__init__", "line_number": 20, "usage_type": "call" }, { "api_name": "wx.Frame", "l...
37847942170
import xlrd import requests import json import gensim import os import logging import urllib3 requests.packages.urllib3.disable_warnings() from gensim.summarization import summarize urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) loc = ("C://Users/nandimar/Desktop/Go/R/groups_clouds.xlsx") wb = ...
nandimandalamrajeshreddy/cmp25_cloud_group_python
morpheus_group_s.py
morpheus_group_s.py
py
1,024
python
en
code
0
github-code
97
[ { "api_name": "requests.packages.urllib3.disable_warnings", "line_number": 8, "usage_type": "call" }, { "api_name": "requests.packages", "line_number": 8, "usage_type": "attribute" }, { "api_name": "urllib3.disable_warnings", "line_number": 10, "usage_type": "call" }, ...
24353325833
# -*- coding: utf-8 -*- #!/usr/bin/env python3 """ Created on Thu Feb 16 20:55:19 2017 @Mail: minnglee@163.com @Author: Ming Li """ ###用于非标准VCF文件 import sys,os,logging,click logging.basicConfig(filename='{0}.log'.format(os.path.basename(__file__).replace('.py','')), format='%(asctime)s: %(name)s:...
minglibio/Script
Selection/Hp/CalHpFromReadsCount.py
CalHpFromReadsCount.py
py
2,498
python
en
code
4
github-code
97
[ { "api_name": "logging.basicConfig", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "logging.DEBUG", ...
18331381499
"""Evaluate Python Code inside Telegram Syntax: .eval PythonCode""" # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from telethon import events, sync, errors, functions,...
AnggaR96s/xXx
stdplugins/eval.py
eval.py
py
1,590
python
en
code
3
github-code
97
[ { "api_name": "inspect.isawaitable", "line_number": 28, "usage_type": "call" }, { "api_name": "io.BytesIO", "line_number": 35, "usage_type": "call" }, { "api_name": "uniborg.util.admin_cmd", "line_number": 15, "usage_type": "call" } ]
23696920103
import ufora.FORA.test.ValidatePerf as ValidatePerf import ufora.core.SubprocessRunner as SubprocessRunner import ufora.test.PerformanceTestReporter as PerformanceTestReporter from ufora.FORA.python.ForaValue import FORATuple from ufora.FORA.python.ForaValue import FORAValue import time import sys import logging _bas...
ufora/ufora
ufora/FORA/test/PerfTestBase.py
PerfTestBase.py
py
3,197
python
en
code
494
github-code
97
[ { "api_name": "ufora.FORA.python.ForaValue.FORAValue.makeSymbol", "line_number": 13, "usage_type": "call" }, { "api_name": "ufora.FORA.python.ForaValue.FORAValue", "line_number": 13, "usage_type": "name" }, { "api_name": "time.time", "line_number": 19, "usage_type": "call...
70232366719
import datetime from eosclubhouse.libquest import Registry, NoMessageIdError from eosclubhouse.utils import QuestStringCatalog from eosclubhouse.system import GameStateService from clubhouseunittest import ClubhouseTestCase, define_quest, \ define_questset, setup_episode class TestQuests(ClubhouseTestCase): ...
endlessm/clubhouse
tests/test_quests.py
test_quests.py
py
7,079
python
en
code
6
github-code
97
[ { "api_name": "clubhouseunittest.ClubhouseTestCase", "line_number": 10, "usage_type": "name" }, { "api_name": "eosclubhouse.libquest.Registry.load_current_episode", "line_number": 13, "usage_type": "call" }, { "api_name": "eosclubhouse.libquest.Registry", "line_number": 13, ...
12780784434
# 1039 교환 from collections import deque def bfs(n, k): global ans visited = set() q = deque() q.append((n, 0)) while q: now, cnt = q.pop() if cnt == k: ans = max(ans, now) continue arr = list(map(int, str(now))) for i in rang...
kjskjs356/ALGORITHMS_PRACTICE
백준/Gold/1039. 교환/교환.py
교환.py
py
913
python
en
code
0
github-code
97
[ { "api_name": "collections.deque", "line_number": 9, "usage_type": "call" } ]
41509217735
from typing import Tuple, List, Dict import lib.coord_conversion as cc import json def make_arrivals(local_coordinates: str, gps_coordinates: str) -> None: arrivals_timestamps = timestamps_list(local_coordinates) arrivals_gps = cc.gps_list(gps_coordinates) arrivals_final_coords = final_list(arrivals_time...
ebaustria/regiaoSul
lib/arrival_conversion.py
arrival_conversion.py
py
2,348
python
en
code
0
github-code
97
[ { "api_name": "lib.coord_conversion.gps_list", "line_number": 9, "usage_type": "call" }, { "api_name": "lib.coord_conversion", "line_number": 9, "usage_type": "name" }, { "api_name": "json.dumps", "line_number": 14, "usage_type": "call" }, { "api_name": "typing.Tu...
1823650479
import torch from torch.nn.utils.rnn import pad_sequence from torch.utils.data import DataLoader, Dataset, Sampler def kmeans(x, k): x = torch.tensor(x, dtype=torch.float) # initialize k centroids randomly c, old = x[torch.randperm(len(x))[:k]], None # assign labels to each datapoint based on centroi...
idiap/g2g-transformer
parser/utils/data.py
data.py
py
3,248
python
en
code
48
github-code
97
[ { "api_name": "torch.tensor", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.float", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.randperm", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.abs_", "line_num...
11679463501
""" Created on Fr Nov 9 2020 @author: Cristian Rodrigo Guarachi Ibanez Text translation 2 """ #!/usr/bin/python # -*- coding: utf-8 -*- import os import copy import json import time import re from html.parser import HTMLParser try: from collections.abc import Iterable except ImportError: from collections import Ite...
CristianRodrigoGuarachiIbanez/webScraping
scraping_onlineshop/textTranslation_2.py
textTranslation_2.py
py
4,680
python
en
code
0
github-code
97
[ { "api_name": "html.parser.HTMLParser", "line_number": 24, "usage_type": "name" }, { "api_name": "re.compile", "line_number": 43, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 44, "usage_type": "call" }, { "api_name": "collections.Iterable", "...
72782148798
from typing import Any, Dict from markdown import markdown from mautrix.types import Format, MessageType, TextMessageEventContent from ..db.route import RouteState from ..events import MenuflowNodeEvents from ..events.event_generator import send_node_event from ..repository import Message as MessageModel from ..room ...
iKonoTelecomunicaciones/menuflow-original
menuflow/nodes/message.py
message.py
py
3,201
python
en
code
4
github-code
97
[ { "api_name": "base.Base", "line_number": 15, "usage_type": "name" }, { "api_name": "repository.Message", "line_number": 17, "usage_type": "name" }, { "api_name": "room.Room", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number...
18756113716
import IPy from queue import Queue from threading import Thread import socket import socks import configparser from termcolor import cprint from tqdm import * from colorama import Fore import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # 全都用tqdm.write(url)打印 能够打印在进度条上方,并将进度条下移一行。 # ...
0x727/ShuiZe_0x727
Plugins/infoGather/Intranet/scanPort/scanPort.py
scanPort.py
py
6,309
python
en
code
3,283
github-code
97
[ { "api_name": "urllib3.disable_warnings", "line_number": 11, "usage_type": "call" }, { "api_name": "urllib3.exceptions", "line_number": 11, "usage_type": "attribute" }, { "api_name": "configparser.ConfigParser", "line_number": 20, "usage_type": "call" }, { "api_na...