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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
533751023 | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from rest_framework.authtoken.models import Token
from util.stack import Stack
import uuid
import random
class Maze(models.Model):
title = models.CharField(m... | null | adventure/models.py | models.py | py | 8,203 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.db.models.Model",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 12,
"usage_type": "call"
},
{
"api_name"... |
492630974 | import xml.etree.ElementTree as ET
import tkinter as tk
#ERROR WITH EL CAPITAN - ONLY LOADS FOUR PAGES OR SO
'''
import time - 1) feature that times the session 2) feature that deletes if you don't type
import string - seems like it would be important to have here
import re - might be overkill, but highlighting chara... | null | tkFDX_alpha_101517.py | tkFDX_alpha_101517.py | py | 4,124 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 61,
"usage_type": "name"
},
{
"api_name": "tkinter.Tk",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "tkinter.... |
175008402 | #!/usr/bin/env python
from __future__ import print_function, unicode_literals
import requests
import glob
import urllib
BASE_URL = "http://translate.google.com/translate_tts?tl=en&q=%s"
class TTSTextFile(object):
def __init__(self, file_name, text=None):
self.file_name = file_name
self._cached_... | null | reaper-files/molz_abgabe/text_to_speech_generation/script/tts_download.py | tts_download.py | py | 2,395 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "requests.get",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 54,
"usage_type": "call"
}
] |
324790923 | import numpy as np
import cv2 as cv
import copy
original = cv.imread("/Volumes/USB3-64/Image/HKFMI/deskewedImage.png", cv.IMREAD_UNCHANGED)
# resize original for visualization purposes only
print('original {}'.format(original.shape))
original_resized = cv.resize(original, (0,0), fx=.1, fy=.1)
cv.imshow('original_resi... | null | opencv_training/resize2.py | resize2.py | py | 968 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_UNCHANGED",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "cv2.resize",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_n... |
624513897 | from apscheduler.schedulers.blocking import BlockingScheduler
from lumos.lumos import Monitor
sched = BlockingScheduler()
m = Monitor();
#@sched.scheduled_job('cron', year='*', month='*', day='*', week='*', day_of_week='*', hour='16', minute='14')
@sched.scheduled_job('interval', seconds=5)
def timed_job():
prin... | null | summaryreport-monitor/SummaryReportMonitor/summaryreport.py | summaryreport.py | py | 396 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "apscheduler.schedulers.blocking.BlockingScheduler",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "lumos.lumos.Monitor",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "lumos.lumos.Monitor.run",
"line_number": 12,
"usage_type": "call"
}... |
614369314 | # ํด๋ผ์ด์ธํธ
import socket
import struct
from pynput import keyboard
import time
import io
from PIL import Image
import binascii
#import cv2
import numpy as np
#import simplejpeg
from io import StringIO
from io import BytesIO
import base64
# pynput ์ ์ฌ์ฉํ๋ ค๋ฉด ๋งฅOS์ "๋ณด์ ๋ฐ ๊ฐ์ธ ์ ๋ณด ๋ณดํธ"->"์์ฌ์ด์ฌ์ฉ" -> "ํฐ๋ฏธ๋.app"์ฒดํฌ("์์คํ
/์์ฉํ๋ก๊ทธ๋จ/์ ํธ๋ฆฌํฐ/ํฐ๋ฏธ๋.ap... | null | 0012 Unity_AI/DDQN/SocketTcpIp.py | SocketTcpIp.py | py | 3,660 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "socket.socket",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "socket.conn... |
154421223 | """ Functions for sadpt
"""
import automol
import elstruct
from routines.es._routines import conformer
from routines.es._routines import _scan as scan
from routines.es import runner as es_runner
from lib import filesys
from lib.reaction import grid as rxngrid
def check_filesys_for_guess(ini_ts_save_path):
""" Ch... | null | routines/es/_routines/_sadpt.py | _sadpt.py | py | 11,573 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "lib.filesys.build.cnf_fs_from_prefix",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "lib.filesys.build",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "lib.filesys",
"line_number": 20,
"usage_type": "name"
},
{
"api_name"... |
554801829 | import requests
import os
from requests.auth import HTTPBasicAuth
def access_token():
consumer_key = os.environ.get("consumer_key")
consumer_secret = os.environ.get("consumer_secret")
api_URL = "https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials"
r = requests.get... | null | accessToken.py | accessToken.py | py | 594 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.environ.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_num... |
214128067 | #!/bin/bash
import nltk
import os
import sys
import time
'''
@date Monday January 11 11:39:16 PST 2016
@author Daniel Smith
'''
class EarleyParser():
def __init__(self, grammar_file, test_sentence_file, output_file):
'''
@desc create an instance of an Earley Chart parser
@param file gram... | null | project1/src/hw1_parse.py | hw1_parse.py | py | 3,414 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "nltk.data.load",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "nltk.data",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "nltk.parse.EarleyChartParser",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "nltk.parse... |
585184270 | """Generic utility functions used in package.
..
>>> from alchy.utils import *
"""
import re
from collections import Iterable
from sqlalchemy import Column
from ._compat import string_types, iteritems
__all__ = [
'is_sequence',
'has_primary_key',
'camelcase_to_underscore',
'iterflatten',
'... | null | alchy/utils.py | utils.py | py | 2,096 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.Iterable",
"line_number": 28,
"usage_type": "argument"
},
{
"api_name": "_compat.string_types",
"line_number": 29,
"usage_type": "argument"
},
{
"api_name": "_compat.iteritems",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "s... |
19615356 | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 14 00:57:31 2015
@author: Kruthika
"""
import matplotlib.pyplot as plt
import pandas as pd
import scipy.stats as stats
loansData = pd.read_csv('https://spark-public.s3.amazonaws.com/dataanalysis/loansData.csv')
loansData.dropna(inplace=True)
#Box plot for amount reques... | null | prob_lending_club.py | prob_lending_club.py | py | 993 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "matplotlib... |
606755881 | import json
import env
from bs4 import BeautifulSoup
from DiscordHooks import Color
from login import get_html_loged_in
from message import Messages
from helpers import open_and_write_json, getcourse_link_name,get_resource_link_name, exist_file_module
send = Messages()
def diff_module(module_id, html_type, type_nam... | null | diff_module.py | diff_module.py | py | 3,061 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "message.Messages",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "login.get_html_loged_in",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "env.Moodle",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "bs4.Beautiful... |
446916891 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 10 12:29:52 2017
@author: oscartgiles
Various plotting functions for summarising MCMC chains
Plots should be compatible with seaborn plots by using the hue_offsets() function from seaborn
BAYES PLOTTING FILE FOR THE PSYC SCI PAPER
"""
import num... | null | Plotting/bayesplotting.py | bayesplotting.py | py | 10,235 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.linspace",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pylab.gca",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab"... |
634377025 | from django.urls import path,include
from .views import HelloApiView,HelloViewset,UserProfileViewset
from rest_framework.routers import DefaultRouter
router=DefaultRouter()
router.register('viewset',HelloViewset,basename='viewset')
router.register('profile',UserProfileViewset)
urlpatterns = [
path('hello/',HelloA... | null | profiles/API/urls.py | urls.py | py | 375 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "views.HelloViewset",
"line_number": 6,
"usage_type": "argument"
},
{
"api_name": "views.UserProfileViewset",
"line_number": 7,
"usage_type": "argument"
},
{
... |
619387689 | import torch
import torch.nn as nn
import NN
import glob
import pandas as pd
import numpy as np
import sys
import os
netPaths = glob.glob('LatestModels/*')
nets = []
fullFeatures = sys.argv[1] == "True"
if fullFeatures:
nFeatures = 161
else:
nFeatures = 21
for currnet in netPaths:
the_model = NN.Net(10,nF... | null | classifier/ANN/testTrashSet.py | testTrashSet.py | py | 1,014 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "glob.glob",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "NN.Net",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 20,
... |
200310309 | import windowcapture
import vision
import cv2 as cv
wincap = windowcapture.WindowCapture('Old School RuneScape')
while True:
screenie = wincap.capture_screen()
vision.findUser('user.PNG', screenie)
cv.imshow('test', screenie)
if cv.waitKey(1) == ord('q'):
cv.destroyAllWindows()
break | null | main.py | main.py | py | 318 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "windowcapture.WindowCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "vision.findUser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
... |
25195323 | from imutils.video import VideoStream
import argparse
import datetime
import imutils
import time
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video", help="path to the video file")
ap.add_argument("-a", "--min-area", type=int,
default=500, help="minimum area size")
args = vars(ap.... | null | main.py | main.py | py | 2,516 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "imutils.video.VideoStream",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.Video... |
89120531 | import cv,cv2
import numpy as np
import os
#clip = "drip.avi" # b&w droplet
#clip = "IMG_0766_4sec.MOV" # See See small
clip = "DSCF4481.MOV" # See See tea
# clip = "20131208_142558_707_muni10.mp4" # subway station
src = "vids"
# dest = "pix"
dest = os.path.join("/Users/kevinbjorke/Google Drive",'kbImport','Cg','subwa... | null | blur1.py | blur1.py | py | 3,244 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_n... |
273658385 | from model import QNetwork
import torch.optim as optim
from brain import Brain
from event import Event
import torch.nn.functional as F
import torch
import random
import numpy as np
import logging
RECALL_BUFFER_SIZE = int(1e6)
BATCH_SIZE = 256 # minibatch
GAMMA = 0.98 # discount
TAU = 1e-3
LR = 1e-4
HOURS_DAILY = 4 # p... | null | p1_navigation/dqn_agent.py | dqn_agent.py | py | 3,226 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.device",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogge... |
426384101 | import pandas as pd
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import os
import glob
import random
from sklearn.model_selection import train_test_split
from keras import backend as K
from keras.utils import to_categorical
from keras.preprocessing.image import load_img, img_to_array
fro... | null | train_resnet50.py | train_resnet50.py | py | 7,906 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "random.randrange",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "keras.backend.sum",
"line... |
217128522 | from __future__ import unicode_literals
from django.core.exceptions import ValidationError as DjangoValidationError
from rest_framework.exceptions import ValidationError
from rest_framework.fields import get_error_detail
from rest_framework.settings import api_settings
def update_field_settings(setting, user_setting... | null | rest_framework_friendly_errors/utils.py | utils.py | py | 1,784 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "rest_framework.exceptions.ValidationError",
"line_number": 47,
"usage_type": "name"
},
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 47,
"usage_type": "name"
},
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 49,
... |
188947607 | """
mbase module
This module contains the base model class from which
all of the other models inherit from.
"""
from __future__ import print_function
import abc
import sys
import os
import subprocess as sp
import shutil
import threading
import warnings
if sys.version_info > (3, 0):
import queue as Queue
else... | null | hataripy/mbase.py | mbase.py | py | 53,085 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.version_info",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "sys.version_info",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "abc.abstractmethod",
"line_number": 70,
"usage_type": "attribute"
},
{
"api_name": "a... |
386822817 | #!/usr/bin/python
"""
A 2d mouse
"""
import gramme
import struct
from pymouse import PyMouse
from logbook import Logger
from decimalfilter import DecimalFilter
log = Logger('apps: plotter', level=00)
mouse = PyMouse()
DF = DecimalFilter(0,0,precision=2)
amplification = 50
@gramme.server(3030)
def mous... | null | legacy/2Dgyro_mouse/mouse.py | mouse.py | py | 827 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logbook.Logger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pymouse.PyMouse",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "decimalfilter.DecimalFilter",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "struct.unp... |
507341729 | import discord
from discord.ext import commands
from little_light import LittleLightClient
def setup(client):
client.add_cog(Events(client))
class Events(commands.Cog):
"""Basic event listeners for Little Light Client"""
def __init__(self, client: LittleLightClient):
"""Init"""
self.clien... | null | modules/events.py | events.py | py | 2,607 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "little_light.LittleLightClient",
"line_number": 11,
"usage_type": "name"
},
{
"a... |
256835761 | from pytube import YouTube
Save_Path = "D:/Youtube Downloaded Video"
link = open('links.txt')
for i in link:
try:
yt = YouTube(i)
except:
print("Connection Problem....!!!")
# print(yt.streams.all())
mp4file = yt.streams.get_highest_resolution()
print("Please Wait Your video is be... | null | Youtube Video Downloder/Multiple Video Downloader.py | Multiple Video Downloader.py | py | 475 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pytube.YouTube",
"line_number": 8,
"usage_type": "call"
}
] |
414390153 | from aws_cdk import (
core,
aws_codedeploy as codedeploy,
aws_lambda as lambda_,
aws_apigateway as apigateway,
)
import datetime
class LambdaStack(core.Stack):
def __init__(self, app: core.App, id: str, **kwargs):
super().__init__(app, id, **kwargs)
self.lambda_code = lambda_.Code... | null | pipeline/pipeline/lambda_stack.py | lambda_stack.py | py | 1,473 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "aws_cdk.core.Stack",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "aws_cdk.core",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "aws_cdk.core.App",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "aws_cdk.co... |
127634855 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from urllib import request, parse
import re
import time
import smtplib
from email.mime.text import MIMEText
_user = "897920245@qq.com"
_pwd = "cquhfgwtqtekbbcc"
mailto_list = ['luckylsn9610@gmail.com','897920245@qq.com','1620061098@qq.com']
def GetNews():
url = 'http:... | null | test.py | test.py | py | 2,030 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "urllib.request",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "time.strftime",
... |
435737985 | import argparse
from copy import deepcopy
import time
# Priority Queue class
class PriorityQueue(object):
# Initializing the class
def __init__(self):
self.queue = []
# Insert (Enqueue) data into the queue
def insertValue(self, data):
self.queue.append(data)
# Retrieve the data f... | null | Homework1/task2.py | task2.py | py | 12,752 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "copy.deepcopy",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 184,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 200,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 21... |
178947008 | import os
from firecares.settings.base import * # noqa
from celery.schedules import crontab
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS # noqa
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_CELERY_SIGNALS = True
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_st... | null | firecares/settings/production.py | production.py | py | 1,647 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.getenv",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "celery.schedules.crontab",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "celery.schedules.crontab",
"line_number": 55,
"usage_type": "call"
}
] |
291192109 | import os
import requests
import whois
import argparse
from datetime import datetime, timedelta
DAYS_TO_EXPIRE = 30
def load_urls4check(path_file):
if not os.path.exists(path_file):
return None
with open(path_file, 'r', encoding="utf-8") as file_handler:
url_units = file_handler.read().split... | null | check_sites_health.py | check_sites_health.py | py | 1,877 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.exists",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "whois.whois",
"line_numb... |
144165616 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
import time
driver = None
def wait(web_opening_time=3):
time.sleep(web_opening_time)
def load_driver():
global driver
driver = webdriver.Chrome()
def quit():
driver.quit()
... | null | whatsapp/wa.py | wa.py | py | 1,069 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "time.sleep",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "selenium.webdr... |
559081154 | #!/bin/env python
"""pythonista therminsim - a simple theramin style simulator
y axis: frequency
x axis: volume
multitouch works, but best if ios gestures are disabled
in retrospect, should have one audio thread, and feed a list of freq/vols for the different fingers, rather than run multiple threads
Inspired by h... | null | thirdparty/theramin.py | theramin.py | py | 4,731 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "threading.Thread",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "tempfile.NamedTemporaryFile",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "tempfile.NamedTemporaryFile",
"line_number": 40,
"usage_type": "call"
},
{
"api... |
607533189 | # ะะผะฟะพัั ะฑะธะฑะปะธะพัะตะบ ะธ ะผะพะดัะปะตะน
from keras import backend as K
K.set_image_dim_ordering('th')
import numpy as np
import sklearn as sk
# from keras.utils import np_utils
from keras.datasets import cifar10
# ะบะฐัะตะณะพัะธะทะฐัะธั
def to_categorical(y, num_classes=None):
"""Converts a class vector (integers) to binary class mat... | null | main.py | main.py | py | 3,578 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "keras.backend.set_image_dim_ordering",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.ma... |
99450916 | #!/usr/bin/python3
'''Task 10 search for a state with argument'''
from model_state import Base, State
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import sys
if __name__ == "__main__":
t = 'mysql+mysqldb://{}:{}@localhost/{}'
s1 = sys.argv[1]
s2 = sys.argv[2]
s3 = sys.a... | null | 0x0F-python-object_relational_mapping/10-model_state_my_get.py | 10-model_state_my_get.py | py | 731 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
315044996 | import json
class Config:
def __init__(self):
config = self.load_config()
self.database_ip = config['mongo_ip']
self.database_port = config['mongo_port']
self.database_name = config['database_name']
self.image_dir = config['image_dir']
@staticmethod
def load_confi... | null | helper/config.py | config.py | py | 436 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 16,
"usage_type": "call"
}
] |
9715816 | #!/usr/bin/env python
# coding: utf-8
# ## ์ํคํ
์ฒ ๋ณต์ก๋ ์ค์ด๊ธฐ
# In[1]:
import torch.nn as nn
from torch.optim import SGD
import torch
# In[2]:
class Architecture1(nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super(Architecture1, self).__init__()
self.fc1 = nn.Linear(input_... | null | Chapter04/Playing_with_model_complexity_and_regularising_models_completed.py | Playing_with_model_complexity_and_regularising_models_completed.py | py | 1,348 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.nn.Module",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
162358613 | from django.shortcuts import render, redirect
from django.views import generic
from band_booking.models import Concert, Technical_needs
from bookingsjef.actions.concert_overview_term import get_current_term
# Create your views here.
class ConcertsView(generic.ListView):
"""
Generates a view for the query set... | null | arrangรธr/views.py | views.py | py | 2,618 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.views.generic",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "bookingsjef.actions.concert_overview_term.get_current_term",
"line_number": 20,
"us... |
352960404 | import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
N = 200
updateInterval = 400
ON = 255
OFF = 0
vals = [ON, OFF]
def randomGrid(N):
return np.random.choice(vals, N * N).reshape(N, N)
def update(frameNum, img, grid, N):
newGrid = grid.copy()
for i in range(N):
... | null | Lista8/Zadanie2.py | Zadanie2.py | py | 1,122 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.random.choice",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "matp... |
497713795 | import json
import os
import re
import discord
from discord.ext import commands
from help.help import help, handle_error
class TopsCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.tops_file = os.getenv('DISCORD_TOPS_FILE')
self.tops = {}
self.load_tops()
def lo... | null | tops_cog.py | tops_cog.py | py | 3,286 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.loa... |
203636908 | import argparse
import os
import sys
if "/opt/ros/lunar/lib/python2.7/dist-packages" in sys.path:
sys.path.remove("/opt/ros/lunar/lib/python2.7/dist-packages")
from load_model import detector
from gesture_action import select_highest_score
from gesture_action import serial_init
from camera_thread import WebcamVideo... | null | camera/real_time_gesture_detection.py | real_time_gesture_detection.py | py | 2,418 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "sys.path.remove",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
... |
502493572 | # uncompyle6 version 3.7.4
# Python bytecode 3.5 (3350)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: /home/nicolas/workspace/spynl-git/venv/src/spynl/spynl/main/routing.py
# Compiled at: 2017-01-16 09:58:52
# Size of source mod 2**32: 8469 bytes
"""
Routing - mak... | null | pycfiles/spynl-6.0.1-py3-none-any/routing.cpython-35.py | routing.cpython-35.py | py | 6,937 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "spynl.main.utils.get_logger",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "pyramid.security.NO_PERMISSION_REQUIRED",
"line_number": 86,
"usage_type": "name"
},
{
"api_name": "spynl.main.utils.get_logger",
"line_number": 100,
"usage_type": "call... |
244264408 | # -*- coding: utf-8 -*-
"""Prubas
"""
import cv2
import numpy as np
from matplotlib import pyplot as plt
Data=[[27,30], [41, 47], [27,45], [27,48], [27,50], [33,26], [48,36]]
Z=np.float32(Data)
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 10, 1.0)
K =3
ret,label,center=cv2.k... | null | kmeans/kmeans.py | kmeans.py | py | 768 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.float32",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.TERM_CRITERIA_EPS",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "cv2.TERM_CRITERIA_MAX_ITER",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name... |
578002621 | from flask import Flask, request, jsonify
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.cors import CORS
from newspaper import Article
import json
from ml.naive_bayes import NaiveBayes
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://politik:politik@localhost/politik_... | null | app.py | app.py | py | 3,578 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.ext.cors.CORS",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.ext.sqlalchemy.SQLAlchemy",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "newspa... |
608320091 | import xml.etree.ElementTree as ET
from xml.dom import minidom
import sys
import re
L = 24
T = 48
procs = 6,6,6,6
mu = 0.0030
csw = 1.57551
kappa = 0.1373
n_ape = 50
alpha_ape = 0.5
n_gauss = 90
alpha_gauss = 0.2
multigrid = dict(verbosity = 2,
block = (2,2,2,2),
level_1 = dict(n_... | null | OwlsNest/cA2.30.24/mkinput.py | mkinput.py | py | 3,433 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "re.search",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "xml.etree.ElementTree.Element",... |
118532676 | import pytest
from c8y_api.app import CumulocityApi
from c8y_api.model import Device
from utils import c8y, random_name
@pytest.fixture
def random_devices(c8y):
num = 3
typename = random_name()
basename = random_name()
names = [f'{basename}-{i}' for i in range(0, num)]
devices = [Device(c8y=c8y... | null | integration_tests/device_inventory_test.py | device_inventory_test.py | py | 840 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "utils.random_name",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.random_name",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "c8y_api.model.Device",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "utils.c8y",
... |
607547222 | # coding: utf-8
# SNLP - SoSe 2019 - ASSINGMENT III
import math
import re
from collections import defaultdict, Counter
from nltk import ngrams
def tokenize(text):
"List all the word tokens (consecutive letters) in a text. Normalize to lowercase."
return re.findall('[a-z]+', text.lower())
def word_ngrams(sent, n... | null | assignments/3/ngram_LM.py | ngram_LM.py | py | 4,763 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "re.findall",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 50,
"usage_type": "call"
}
] |
35111049 | import time
from appium import webdriver
# ๅ็ฝฎไปฃ็
# desired_capsไธบๅญๅ
ธๆ ผๅผ - ๅธธ็จๅๆฐ๏ผ
from appium.webdriver.common.touch_action import TouchAction
desired_caps = {}
# ๅฟ
ๅกซ-ไธๆญฃ็กฎ
desired_caps['platformName'] = 'Android'
# ๅฟ
ๅกซ-ไธๆญฃ็กฎ
desired_caps['platformVersion'] = '5.1'
# ๅฟ
ๅกซ
desired_caps['deviceName'] = '192.168.56.101:5555'
# ่ฎพ็ฝฎไธญๆ
de... | null | scripts/test13_ๆๆบๆไฝAPI.py | test13_ๆๆบๆไฝAPI.py | py | 1,003 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "appium.webdriver.Remote",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "appium.webdriver",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
286781183 | import aiwolfpy
import aiwolfpy.contentbuilder as cb
import numpy as np
import re
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import time
import random
import matplotlib.pyplot as plt
import collections
from collections import *
X_T = namedtuple("X_T",("sta... | null | dqn/pytorch.py | pytorch.py | py | 48,088 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.utils.tensorboard.SummaryWriter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "p... |
49696624 | #os=Darwin
from urllib import request
import json
excluded_versions = ['v9.11.0']
data = request.urlopen('https://nodejs.org/dist/index.json').read().decode('utf-8')
releases = [{
'version': release['version'][1:],
'stability': 'stable' if release['lts'] else 'testing',
'released': release['date']
} for r... | null | javascript/node-darwin.watch.py | node-darwin.watch.py | py | 435 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "urllib.request",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 12,
"usage_type": "call"
}
] |
69231648 | from django.contrib.auth import logout, login, authenticate
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render, get_object_or_404, get_list_or_404, redirect
from django.template import RequestContext
from djan... | null | flightlist/journal/views.py | views.py | py | 5,179 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.shortcuts.render",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "django.template.RequestContext",
"line_number": 52,
"usage_type": "call"
},
{
"ap... |
162148521 | from __future__ import absolute_import
from hs_core.models import *
from resource_aggregation.models import *
from ga_resources.utils import json_or_jsonp
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from django.contrib.auth.models import User, Group
from django.utils.ti... | null | resource_aggregation/views.py | views.py | py | 6,562 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.forms.Form",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.for... |
213228990 | from multiprocessing import Process, Pipe
from time import sleep
from os import getpid
def ponger(receiver, sender, response):
while True:
# receive a message
msg = receiver.recv()
# print it as f"Process{getpid()} got message: {msg}"
print(f'Process{getpid()} got message: {msg}')
... | null | 14_coro/task_02.py | task_02.py | py | 938 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.getpid",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Pipe",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Process",
... |
32065425 | import pyaudio
import numpy as np
import pylab as pl
import time
import sys
import datetime
import math
launch_time = time.perf_counter()
sample_time = 0.0000208
maxValue = 2**16
bars = 32
form_1 = pyaudio.paInt16 # 16-bit resolution
chans = 2 # 1 channel
samp_rate = 48000 # 48kHz sampling rate
chunk = 512 # 2^12 samp... | null | 00Junk00/PyAudio-DOA-TwoMic.py | PyAudio-DOA-TwoMic.py | py | 3,040 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "time.perf_counter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyaudio.paInt16",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pyaudio.PyAudio",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.perf_count... |
325756450 | import os, sys
import subprocess
from shutil import copyfile
from datetime import datetime
from htk_mail import send_mail
import time
import logging
logging.basicConfig(filename="training_process.log", level=logging.INFO)
DRIVE = 'D:'
HTK_DIR = DRIVE + '\\htk'
ROOT_DIR = DRIVE + '\\_htk_trenovani' #vychozi adresar
p... | null | HTK_scripts/htk_trenovani.py | htk_trenovani.py | py | 3,852 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "datetime.da... |
213608156 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.ticker as ticker
matplotlib.rc('font', size=18)
for depth in (2, 4):
fanout = 3
tree_matrix = np.loadtxt('ping_matrix_%d_%d.txt' % (depth, fanout))
bs_matrix = np.loadtxt('bs_ping_matrix_%d_%d.txt' % (depth, fanout))
... | null | OneBigSwitch/figures/subplots_ping_matrix.py | subplots_ping_matrix.py | py | 1,693 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "matplotlib.rc",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",... |
264946931 | import shelve
import schedule
import telebot
import threading
import time
import requests
import datetime
import json
import os
# parameters = {'pincode': '834002', 'date': '06-08-2021'}
# response = requests.get("https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/findByPin", params=parameters)
# print(json.... | null | APIDemo.py | APIDemo.py | py | 8,385 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "telebot.TeleBot",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "shelve.open",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "shelve.open",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "shelve.open",
"line_numbe... |
69537695 | # -*- coding: utf-8 -*-
from __future__ import division
from astropy.io import fits
from astropy.table import Table
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
import os
def myConv(p, windowsize):
oldR = 30000
newR = 1000
sigma = np.sqrt(pow((5000/newR), 2)-pow((5000/oldR)... | null | nomalization.py | nomalization.py | py | 3,130 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.sqrt",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.power",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.e",
"line_number": 17... |
123442829 | import os
from setuptools import setup, find_packages
this_dir = os.path.abspath(os.path.dirname(__file__))
setup_reqs = []
with open(os.path.join(this_dir, 'requirements.txt'), 'r') as fp:
install_reqs = [r.rstrip() for r in fp.readlines() if
not r.startswith(('#', 'git+'))]
with open(os.pa... | null | setup.py | setup.py | py | 1,308 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
576962012 | import requests
from urllib.parse import urlencode
import json
def get_page(offset):
params={
'offset':offset,
'format':'json',
'keyword':'่กๆ',
'autoload':'true',
'count':20,
'cur_tab':1
}
headers={
'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (... | null | spider/prettyPicture/pretty.py | pretty.py | py | 1,111 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "urllib.parse.urlencode",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "requests.ConnectionError",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "jso... |
599197768 | #!/usr/bin/env python
import os
import json
f = open('/Users/bakhra/default.json')
ips_list = list()
config = json.load(f)
for k, v in config['servers'].items():
if isinstance(v, dict):
for k1, v1 in v.items():
if isinstance(v1, list) and k1 == 'ip':
if len(v1) > 0 and v1[0] !=... | null | ctf/extract_ips_from_config.py | extract_ips_from_config.py | py | 421 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 8,
"usage_type": "call"
}
] |
491223038 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import pymongo
import tornado
import tornado.httpclient
import html2text
from bson import ObjectId
from .base import BaseHandler
from ..utils import debug_wrapper, unquote_fr_mongo
from ..const import LOG_NAME, N_POST_PER_PAGE
log = logging.getLogger(LOG_... | null | gargantua/views/archives.py | archives.py | py | 4,960 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "const.LOG_NAME",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": "base.BaseHandler",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "tornado.web",
... |
186159307 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import math
import sys
import warnings
from geometry_msgs.msg import Pose as RosPose
from geometry_msgs.msg import Transfo... | null | src/planning_program_sig.py | planning_program_sig.py | py | 25,032 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.linalg.norm",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 82,
"usage_type": "attribute"
},
{
"api_name": "sys.float_info",
"line_number": 83,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",... |
394378383 | """1) Parcourir chaque fichier et rรฉcupรฉrer le numรฉro du compte bancaire 'Crรฉdit Mutuel' ainsi que le numรฉro de sรฉcuritรฉ sociale.
2) Afficher les deux numรฉros ร la fin du script."""
import json
import glob #=> module glob
dossier = "arborescence_source_du_dossier**"
files = glob.glob(dossier, recursive=True... | null | 06_recherche_informations_dans_fichiers_d_un_dossier.py | 06_recherche_informations_dans_fichiers_d_un_dossier.py | py | 1,877 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "glob.glob",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 16,
"usage_type": "call"
}
] |
336155625 | from flask import Flask, request, redirect
from twilio import twiml
from twilio.twiml.messaging_response import MessagingResponse
import csv
account_sid = "AC6b14568494cf15e6845734bdb7f2c348"
auth_token = "cde5f95322783c1543b470e21d2609cf"
app = Flask(__name__)
answers = {}
userStates = {}
questions = ["Is there a ... | null | send_sms.py | send_sms.py | py | 1,304 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "twilio.twiml.messaging_response.MessagingResponse",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.request.values",
"line_number": 21,
"usage_type": "attribute"
},
{... |
215463110 | import requests
import os
import time
import datetime
import json
from bs4 import BeautifulSoup
import get_chosun_detail as get_detail
try:
req_url = "http://search.chosun.com/search/news.search" # ์์ฒญ URL
req_param = {
"query": "๊ฐ์",
"pageno": "0",
"orderby": "news",
"categoryn... | null | chosun_crawler.py | chosun_crawler.py | py | 3,631 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "datetime.datetime.now",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path.isdir"... |
159724549 | import os
print('initiating Libraries')
try:
import psutil
import time
from termcolor import colored, cprint
from win10toast import ToastNotifier
n=ToastNotifier()
except:
print('A fatal error occured while importing modules')
os.startfile('/error scripts/script errors/module... | null | sysmalibs.py | sysmalibs.py | py | 1,397 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "win10toast.ToastNotifier",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.startfile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"li... |
646302307 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from os import system
import sys
import curses
class Render(object):
""" Class responsible to render views """
def __init__(self):
self.screen = curses.initscr()
self.screen.clear()
self.screen.border(0)
self.screen.addstr(0, 2, " GENERI... | null | main.py | main.py | py | 922 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "curses.initscr",
"line_number": 10,
"usage_type": "call"
}
] |
451957141 | """
@author: Arkan M. Gerges<arkan.m.gerges@gmail.com>
"""
import os
from authlib.jose import jwt
from src.domain_model.token.TokenData import TokenData
from src.resource.logging.logger import logger
class TokenService:
@staticmethod
def claimsFromToken(token: str) -> dict:
"""Get claims by decoding... | null | src/domain_model/token/TokenService.py | TokenService.py | py | 2,609 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "src.resource.logging.logger.logger.debug",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "src.resource.logging.logger.logger",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "os.getenv",
"line_number": 32,
"usage_type": "call"
},
{
... |
438755669 | from kafka import KafkaProducer
from stock_kafka.realtime.stock import get_quote, get_quotes
from cassandra.cluster import Cluster
from apscheduler.schedulers.background import BlockingScheduler # for catch data every second
from stock_kafka.realtime.db import key_space, quote_table, init_db
def get_session():
c... | null | test/producer_test.py | producer_test.py | py | 1,910 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "cassandra.cluster.Cluster",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "stock_kafka.realtime.db.key_space",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "stock_kafka.realtime.db.key_space",
"line_number": 18,
"usage_type": "argumen... |
145432526 | import numpy as np
import MySQLdb as db
import json
#datainfopath = "selected_algo.json"
class FetchDataClass:
def __init__(self, datainfopath):
self.datainfopath = datainfopath
with open(self.datainfopath, 'rb') as f:
self.datainfo = json.load(f)
f.close()
... | null | FetchData.py | FetchData.py | py | 2,044 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "MySQLdb.Connection",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_numb... |
440160818 | import numpy as np
import csv
from matplotlib import pyplot
import random
def readfile(name):
l = []
with open(name) as f:
reader = csv.reader(f)
for row in reader:
l.append(row)
return l
def loadinput(filename,inputsize = 14):
arrays = np.loadtxt(filename,delimiter=',')
... | null | 1a CS5242/2 Assignment/Assignment1/Assignment_1/code/lzp_assign1.py | lzp_assign1.py | py | 11,861 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "csv.reader",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number"... |
530481066 | from django.shortcuts import render, redirect;
from django.template.loader import render_to_string;
from django.views.generic import View;
from django.core.mail import EmailMultiAlternatives;
class FormEmailView(View):
form_class = None;
page_title = None;
render_template = None;
email_txt_template = '... | null | djangoutilities/views.py | views.py | py | 2,229 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.views.generic.View",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "django.template.loader.render_to_string",
"line_number": 35,
"usage_type": "call"
},
... |
109893501 |
from fastapi import APIRouter
from pathlib import Path
from sorting_techniques import pysort
from app.utilities.utilities import (
get_first_layer_offset, get_font_size, get_spacing, get_offset
)
from app.db.crud import (
get_strain_isolation_mlst, get_strain_isolation
)
isolation_router = r = APIRouter()
s... | null | app/api/api_v1/routers/isolation.py | isolation.py | py | 4,200 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sorting_techniques.pysort.Sorting",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sorting_techniques.pysort",
"line_number": 14,
"usage_type": "name"
},
{
"api... |
652983134 | # script
import sys, os
import json, time
import xml.etree.ElementTree as ET
import base64
import lxml.etree as etree
from array import array
from types import *
from html.parser import HTMLParser
from optparse import OptionParser
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
sel... | null | QRadar-ruleset.py | QRadar-ruleset.py | py | 1,790 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "html.parser.HTMLParser",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "html.parser.HTMLParser.__init__",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "html.parser.HTMLParser",
"line_number": 16,
"usage_type": "name"
},
{
"api... |
563274062 | import need_py3
import cv2
import numpy as np
# import matplotlib.pyplot as plt
# from matplotlib.widgets import Slider
import threading
import time
import argparse
import glob
import os
def get_contours(img, topLevelOnly = False) :
if len(img.shape) == 3 :
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
_... | null | bound.py | bound.py | py | 3,240 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "cv2.cvtColor",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "cv2.threshold",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.THRESH_BINARY_... |
460358528 | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 13 09:15:00 2021
@author: PROTIK
"""
import nltk
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
parahraph = '''
Chutes and Ladders is a game based on complete random chance.
There is no strategy involved whatsoever.
Your pawn m... | null | NLP_Elementary/lemmatization.py | lemmatization.py | py | 1,073 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "nltk.sent_tokenize",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "nltk.stem.WordNetLemmatizer",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "nltk.word_tokenize",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "nlt... |
148542021 | import random
import pandas as pd
import random
from scipy import stats
import numpy as np
import matplotlib.pyplot as plt
import csv
from sklearn.cluster import DBSCAN
import math
import statistics
from sklearn import metrics
pd.options.mode.chained_assignment = None # default='warn'
from sklearn.cluster import KMean... | null | Pyrenote_clustering/confidence_functions/clustering.py | clustering.py | py | 5,933 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pandas.options",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "math.sqrt",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_num... |
15495134 | # -*- coding: utf-8 -*-
import os, uuid, datetime, time, StringIO
from PIL import Image
from campaigns.foundation.const import FoundationConst
from campaigns.lottery.config import ViewConfig, WorkConfig
from cmp import settings
from campaigns.lottery import models
def generate_other_dict_data():
odd = dict()
... | null | campaigns/lottery/applet/utils.py | utils.py | py | 5,223 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "campaigns.foundation.const.FoundationConst.RN_STATIC_URL",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "campaigns.foundation.const.FoundationConst",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "cmp.settings.STATIC_URL",
"line_numb... |
412140183 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All Rights Reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
import ... | null | examples/graph.py | graph.py | py | 5,982 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.dtype",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.dtype",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
611771380 | #!/usr/bin/env python
# Python 2 due to Theano/Lasagne
"""
"""
import argparse
import logging
import os
import sys
import cPickle
import pprint
import Dataset
import theano
import theano.tensor as T
import lasagne
import networks
import DCNN
import numpy
import json
def command_line_parsing():
parser = argparse... | null | microblog_authorship_attribution/deep_learning/cnn/classify.py | classify.py | py | 8,547 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 61,
"usage_type": "attribute"
},
{
"api_name": "logging.basicConf... |
538301405 | from typing import List
import torch
import torch.nn.functional as F
from pytorch_toolbelt.utils.torch_utils import to_tensor
from torch import Tensor
from torch.nn.modules.loss import _Loss
from .functional import soft_jaccard_score
__all__ = ["JaccardLoss", "BINARY_MODE", "MULTICLASS_MODE", "MULTILABEL_MODE"]
BIN... | null | pytorch_toolbelt/losses/jaccard.py | jaccard.py | py | 3,599 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.nn.modules.loss._Loss",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pytorch_toolbelt.utils.torch_utils.to_tensor",
"line_number": 40,
"usage_type": "call"
},
{
... |
629471013 | from .serializers import OrgUnitSerializer , OrgUnitReportSerializer
from rest_framework.response import Response
from .models import OrgUnit, OrgUnitReport
from rest_framework import status
import coreapi, coreschema
from rest_framework.schemas import AutoSchema, ManualSchema
from rest_framework.decorators import api_... | null | sambaAPI/orgunitmgt/views.py | views.py | py | 3,422 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "rest_framework.schemas.AutoSchema",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "coreapi.Field",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "coreschema.String",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cor... |
604004523 | import time
import math
# webdriver ััะพ ะธ ะตััั ะฝะฐะฑะพั ะบะพะผะฐะฝะด ะดะปั ัะฟัะฐะฒะปะตะฝะธั ะฑัะฐัะทะตัะพะผ
from selenium import webdriver
# ะธะฝะธัะธะฐะปะธะทะธััะตะผ ะดัะฐะนะฒะตั ะฑัะฐัะทะตัะฐ. ะะพัะปะต ััะพะน ะบะพะผะฐะฝะดั ะฒั ะดะพะปะถะฝั ัะฒะธะดะตัั ะฝะพะฒะพะต ะพัะบัััะพะต ะพะบะฝะพ ะฑัะฐัะทะตัะฐ
driver = webdriver.Chrome("C:/chromedriver/chromedriver.exe")
# ะะตัะพะด get ัะพะพะฑัะฐะตั ะฑัะฐัะทะตัั, ััะพ ะฝัะถ... | null | testSwitchNewTab.py | testSwitchNewTab.py | py | 1,422 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "math.log",
... |
298673883 | #!/usr/bin/python
#
# Copyright 2018-2022 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | null | core/polyaxon/polypod/compiler/contexts/contexts.py | contexts.py | py | 6,830 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "polyaxon.polyflow.V1RunKind.CLEANER",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "polyaxon.polyflow.V1RunKind",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "polyaxon.polyflow.V1RunKind.NOTIFIER",
"line_number": 42,
"usage_typ... |
393853329 | import copy
import pathlib
import abjad
import arctic
import arctic.tools.FuzzyHarmony as FuzzyHarmony
from arctic.tools.accents import staccato as stassato
from arctic.tools.accents import tenuto as tenuto
from arctic.tools.barlines import barline as barline
from arctic.tools.clef import clef as clef
from arctic.to... | null | arctic/segments/segment_D/definition.py | definition.py | py | 22,432 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pathlib.Path",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "arctic.build_path",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "arctic.ScoreTemplate",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "arctic.Segme... |
281957346 | from typing import List, Set, Optional
import pytest
from checkov.common.util.docs_generator import get_checks
def test_get_checks_returned_check_number():
checks = get_checks(["all"])
assert len(checks) > 0
checks = get_checks()
assert len(checks) > 0
checks = get_checks(["example"])
asse... | null | tests/terraform/util/test_doc_generator.py | test_doc_generator.py | py | 1,223 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "checkov.common.util.docs_generator.get_checks",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "checkov.common.util.docs_generator.get_checks",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "checkov.common.util.docs_generator.get_checks",
"l... |
149451742 | import discord
import asyncio
import time
from calendar import timegm
import random
from traceback import format_exc
from re import search
import wikipedia
from urllib.request import urlopen
import json
from html import unescape
from os import popen
import feedparser
import codecs
fast = """``` ______ _
| ... | null | bots/tux.py | tux.py | py | 31,055 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.loads",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "discord.Client",
"line_number": 187,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 193,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_... |
234483656 | import urllib.parse
import validators
from rspub.core.rs_paras import RsParameters
class ElasticRsParameters(RsParameters):
def __init__(self, **kwargs):
super(ElasticRsParameters, self).__init__(**kwargs)
self.publisher_name = kwargs['publisher_name']
self.res_type = kwargs['res_type']
... | null | resyncserver/elastic/elastic_rs_paras.py | elastic_rs_paras.py | py | 2,509 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "rspub.core.rs_paras.RsParameters",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "urllib.parse.parse.urlparse",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse",
"line_number": 44,
"usage_type": "attribute"
},
{
... |
603292207 | from plrs import Lexer, is_part_numeric
from dataclasses import dataclass
from typing import List
import argparse
import json
@dataclass
class Word:
word: str
defs: List[str]
def __dict__(self):
return {"word": self.word, "defs": self.defs}
def parse(filename: str):
words = []
with ope... | null | main.py | main.py | py | 2,048 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "plrs.is_part_numeric",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "argparse.Argume... |
211353237 | #!/usr/bin/env python
import numpy as np
import cv2 as cv
img=cv.imread('/home/ai11/Desktop/common/ML/Day11/faces.jpg')
f=cv.CascadeClassifier('/home/ai11/Desktop/common/ML/Day12/haarcascade_face.xml')
e=cv.CascadeClassifier('/home/ai11/Desktop/common/ML/Day12/haarcascade_eye.xml')
gray=cv.cvtColor(img,cv.COLOR_BGR2GRA... | null | day12/q5.py | q5.py | py | 678 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
... |
550957235 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException
from openpyxl ... | null | LexisNexis/LexisNexis.py | LexisNexis.py | py | 10,897 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "s... |
159458981 | from django.db import models
from authapp.models import User
PARTICIPANT_TYPES = [
('Band', 'Band'),
('Carriage', 'Carriage')
]
class Recruit(models.Model):
name = models.CharField(max_length=100)
manager_email = models.EmailField(max_length=100)
foundation_date = models.DateField(blank=True)
... | null | main/models.py | models.py | py | 458 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.db.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name"... |
289291517 | # app.py
import json
import datetime, base64, codecs, os
import sqlite3
import traceback
from flask import Flask, request, redirect, session, Response, render_template, g, jsonify
from multiprocessing import Value
from functools import wraps
from urllib.parse import unquote
licznik = Value('i', 0)
app_trains_dbase = {... | null | app.py | app.py | py | 6,505 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "multiprocessing.Value",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.g",
"line... |
470497261 | import logging
import socket
import click
from cassandras3.aws import ClientCache
from cassandras3.log import setup_logging
from cassandras3.util import NodeTool
logger = logging.getLogger('cassandras3')
@click.group()
def view_cmd(): # pragma: no cover
pass
@view_cmd.command(help='Execute view')
@click.opt... | null | src/cassandras3/cli/view.py | view.py | py | 1,542 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "click.group",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "click.option",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "click.option",
"line_n... |
331477095 | # name: Mackenzie Francisco
# uniqname: mackfran
import urllib.request
from bs4 import BeautifulSoup
import operator
import re
# Part A
url = input('Enter link - ')
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html, 'lxml')
all_links = {}
for link in soup.find_all('a'):
page_link = link.get('href... | null | exam.py | exam.py | py | 1,070 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_nam... |
463620793 | # coding: utf-8
"""
Felix' Website mit Blog
The api of my blog.
Contact: felix@felix-scholz.org
"""
from __future__ import absolute_import
import json
import ssl
import certifi
from urllib3._collections import HTTPHeaderDict
from urllib3.exceptions import SSLError
from urllib3 import Timeout, ProxyManage... | null | website_python_client/api/api.py | api.py | py | 13,538 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "enum.Enum",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "website_python_client.configuration.Configuration",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "urllib3.ProxyManager",
"line_number": 64,
"usage_type": "call"
},
{
"... |
322104069 | from flask import Flask, render_template, request, redirect
app = Flask(__name__)
print('\n','===== server start =====')
@app.route('/')
def index():
return render_template('index.html')
@app.route('/result', methods=['POST'])
def forminfo():
print(' = = = = got POST info = = = =')
print(request.form)
... | null | flask_fundamentals/Dojo_Survey/server.py | server.py | py | 835 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.form",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.request... |
513069287 | # -*- coding:utf-8 -*-
import os
import sys
import datetime
def removeName(fileArgv):
fileObj = fileArgv
fileDirname = os.path.dirname(fileObj)
fileName = os.path.basename(fileObj)
obj = os.path.splitext(fileName)
name = obj[0].split(',')
fileName = str(name[0]) + str(obj[1])
... | null | ํ์ผ๋ช
์์๊ฐ์ถ๊ฐ/addDateFile.py | addDateFile.py | py | 1,733 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.dirname",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.basename",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
30282439 | import pygame
from Constants import *
from Player import *
from Enemy import *
from Brick import *
class MainGame:
def __init__(self):
pygame.init()
pygame.display.set_caption(GAME_NAME)
self.player_1 = Player()
# self.player_2 = Player()
# self.enemy_1 = Enemy()
se... | null | myg1/MainModule.py | MainModule.py | py | 1,018 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pygame.init",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_caption",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pygame.eve... |
184528895 | import dataclasses
from datetime import datetime
from logging import getLogger
from typing import ( # type: ignore
TYPE_CHECKING,
Any,
Dict,
Set,
Type,
Union,
_GenericAlias,
)
from .exceptions import DeserializationError, ParameterNotFoundError
from .fields import DeserializeFields
logge... | null | jsondaora/deserializers.py | deserializers.py | py | 4,395 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "typing.Type",
"line_numb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.