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
13323002717
# coding: utf-8 # In[1]: # Import Statements import numpy as np import pandas as pd from sklearn.metrics import * from sklearn.svm import SVC from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt # In[2]: # Import data from the UCI database url = 'https://archive.ics.uci.edu/ml/m...
AndrewCoogan/DS_Certificate
Data Science/Week 9/Homework/AndrewCoogan-L09-DataModelEval.py
AndrewCoogan-L09-DataModelEval.py
py
4,357
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 39, "usage_type": "attribute" }, { "api_name": "pandas.to_numeric", "line_number": 39, "usage_type": "attribute" }, { "api_name": "numpy.isnan", ...
72038710772
from scrape import fetch from jinja2 import Template data = fetch() class feed(): def __init__(self, headline, link): self.headline = headline self.link = link def __repr__(self): return f"{self.headline} -- {self.link}" feeds = [feed(data['headline'][i], data['link'][i]) for i in ra...
jatin837/hackfeeds
main.py
main.py
py
521
python
en
code
2
github-code
21
[ { "api_name": "scrape.fetch", "line_number": 5, "usage_type": "call" }, { "api_name": "jinja2.Template", "line_number": 19, "usage_type": "call" } ]
74836838133
import csv import json import logging import os import nltk from collections import defaultdict import markdown import PyPDF2 import requests import speech_recognition as sr import whisper from bs4 import BeautifulSoup from docx import Document from moviepy.editor import VideoFileClip from openpyxl impo...
PawanKamath/resume-extractor
extractor.py
extractor.py
py
16,520
python
en
code
0
github-code
21
[ { "api_name": "os.environ", "line_number": 27, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 28, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 29, "usage_type": "call" }, { "api_name": "logging.ERROR", ...
41758906816
#!/usr/bin/env python3 """ Create yasnippets for Stan functions and distributions from stan_lang.json Yasnippets for other parts of the language are created manually. """ import json import os import re import shutil import sys import subprocess as sp from os import path FUNC_TEMPLATE = """# name: {funcname} # key: ...
standardgalactic/stan-mode
stan-snippets/create_snippets.py
create_snippets.py
py
4,010
python
en
code
null
github-code
21
[ { "api_name": "os.path.exists", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_number": 29, "usage_type": "name" }, { "api_name": "shutil.rmtree", "line_number": 30, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number":...
31289004392
from django.contrib.auth.decorators import login_required from django.contrib.auth import login from django.shortcuts import render, redirect from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes, authentication_classes from re...
vakudix/django_jwt_example
main/views.py
views.py
py
5,068
python
en
code
0
github-code
21
[ { "api_name": "main.forms.PostForm", "line_number": 19, "usage_type": "call" }, { "api_name": "main.models.CustomUser.objects.get", "line_number": 22, "usage_type": "call" }, { "api_name": "main.models.CustomUser.objects", "line_number": 22, "usage_type": "attribute" },...
30044335932
from PyQt5 import QtWidgets, QtGui import os import common import globals_ from ui import GetIcon, HexSpinBox # Sets up the Background Dialog class BGDialog(QtWidgets.QDialog): """ Dialog which lets you choose among various from tabs """ def __init__(self): """ Creates and initializes...
NSMBW-Community/Reggie-Next
background.py
background.py
py
12,488
python
en
code
39
github-code
21
[ { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 9, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 9, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QDialog.__init__", "line_number": 18, "usage_type": "call" }, { "api_n...
5884275863
# %% #!/usr/bin/env python3 """ A first attempt to clean up image_analysis.py Does not include preprocessing steps """ #Imports import numpy as np import matplotlib.pyplot as plt import pandas as pd import cv2 import os import time import pickle import tensorflow as tf import keras from sklearn.preprocessing import ...
davidazimmerman/TSI-ML
models/image_analysis2.py
image_analysis2.py
py
11,242
python
en
code
0
github-code
21
[ { "api_name": "numpy.load", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 31, ...
43038389177
import sys from functools import lru_cache sys.setrecursionlimit(10**6) def main(): n = int(input()) k = int(input()) @lru_cache(maxsize=None) def F(n, k): if n == k == 0: return 1 if n <= 0 or k < 0: return 0 # 1以上n以下の整数で、 # 0でない数がkこあるものの個数 ...
batamorphism/coding
Python/AtCoder/old/abc154_e_1223.py
abc154_e_1223.py
py
722
python
ja
code
0
github-code
21
[ { "api_name": "sys.setrecursionlimit", "line_number": 3, "usage_type": "call" }, { "api_name": "functools.lru_cache", "line_number": 10, "usage_type": "call" } ]
33106250035
from PIL import Image from django.conf import settings import os def save_thumbnail(file_path, file_name) -> str: """ save a copy of a given image file and save it to thumbnails folder returns the usable path to the thumbnail""" thumbnail_folder = os.path.join(settings.MEDIA_ROOT, 'thumbnails') # chec...
hamk-webdev-intip21a6/lainakoodarit_project
borrow/image_process.py
image_process.py
py
932
python
en
code
1
github-code
21
[ { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.conf.settings.MEDIA_ROOT", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.co...
10020659192
from typing import Union from loguru import logger from aiogram import types from aiogram.dispatcher import FSMContext, filters from aiogram.utils.callback_data import CallbackData from aiogram.dispatcher.filters.state import StatesGroup, State from app.loader import dp, bot from app.config import conf # from typin...
av-jok/bot_articles
app/handlers/private/new_switch.py
new_switch.py
py
5,800
python
en
code
0
github-code
21
[ { "api_name": "aiogram.dispatcher.filters.state.StatesGroup", "line_number": 16, "usage_type": "name" }, { "api_name": "aiogram.dispatcher.filters.state.State", "line_number": 17, "usage_type": "call" }, { "api_name": "aiogram.dispatcher.filters.state.State", "line_number": 1...
24233957539
from django.conf.urls.defaults import * import django.views.static from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^', include('yappa.products.urls')), (r'^admin/', include(admin.site.urls)), (r'^tinymce/', include('tinymce.urls')), ) #...
minrivertea/yappa
urls.py
urls.py
py
1,362
python
en
code
1
github-code
21
[ { "api_name": "django.contrib.admin.autodiscover", "line_number": 5, "usage_type": "call" }, { "api_name": "django.contrib.admin", "line_number": 5, "usage_type": "name" }, { "api_name": "django.contrib.admin.site", "line_number": 9, "usage_type": "attribute" }, { ...
13276264054
import requests import psycopg2 from flask import Flask, request, make_response import pandas as pd import json import boto3 app = Flask(__name__) def main(): r = requests.get("https://elevateinterviews:ElevateSecurityInterviews2021@incident-api.use1stag.elevatesecurity.io/identities/") employee_ids = r.json(...
mbodeantor/elevate_security
elevate_security.py
elevate_security.py
py
2,569
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 18, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 5...
24799239605
""" 課題で設定したe-mailの設定をチェックするプログラム """ from pathlib import Path import codecs import email import time import re import pandas as pd def read_mails(): """ 同階層にあるmailフォルダの中に入っているメールのファイルを読み込む """ path = Path.cwd() / "mail" mails_path = list(path.iterdir()) mails = [] for m in mails_path: ...
kelvin27315/mail-debug
email_kadai.py
email_kadai.py
py
3,342
python
en
code
0
github-code
21
[ { "api_name": "pathlib.Path.cwd", "line_number": 16, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 16, "usage_type": "name" }, { "api_name": "email.message_from_bytes", "line_number": 21, "usage_type": "call" }, { "api_name": "pandas.DataFra...
71534551734
import logging import random import re import tqdm logger = logging.getLogger(__name__) def convert_string_to_unique_number(string: str) -> int: """ Hack to convert SNLI ID into a unique integer ID, for tensorizing. """ id_map = {'e': '0', 'c': '1', 'n': '2'} # SNLI-specific hacks. if string.startswith('vg_le...
beyondguo/TrainingDynamics
data_utils_glue.py
data_utils_glue.py
py
2,200
python
en
code
31
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 24, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 26, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number":...
41369295286
import matplotlib.pyplot as plt import numpy from numpy import genfromtxt EURUSDMIN = 1.00600 EURUSDMAX = 1.5 EURUSDVOLMIN = 0 EURUSDVOLMAX = 500 EURUSDMAXSIZE_1M = 0.0003 def calculateProfit(test_x, Result, testSet): i, j = Result.shape in_feature = 1 AccountBalance = 0 trans = 1 for li in range...
BadMojo123/Machine_learning
MT4 integration/ReadyToDeploy/Z_Mind.py
Z_Mind.py
py
3,842
python
en
code
0
github-code
21
[ { "api_name": "numpy.zeros", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 33, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 36, "usage_type": "call" }, { "api_name": "matplotlib.pyplot...
9992416967
# pull out fasta entries that match target_ids from kallisto output file and make new multifasta import argparse import csv parser = argparse.ArgumentParser(description='Make mfa from target_ids from kallisto output') parser.add_argument('filename', help='kallisto abundance.tsv file') args = parser.parse_args() # get...
lorian/tools
MT_pipeline_functional.py
MT_pipeline_functional.py
py
860
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 5, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 11, "usage_type": "call" } ]
53044594
import dnachisel def FlipSeq(left, right, emma): """Calculate left and right overhangs for assembly section to be flipped and return a modified pandas table of the EMMA standard. Parameters ---------- left str name of the leftmost (5') part of the assembly section that will be flipped. ...
Edinburgh-Genome-Foundry/Examples
SeqFlipper/seqflipper.py
seqflipper.py
py
972
python
en
code
5
github-code
21
[ { "api_name": "dnachisel.biotools.reverse_complement", "line_number": 23, "usage_type": "call" }, { "api_name": "dnachisel.biotools", "line_number": 23, "usage_type": "attribute" }, { "api_name": "dnachisel.biotools.reverse_complement", "line_number": 24, "usage_type": "c...
1502672056
from flask import Flask, render_template,request,redirect, send_file from flask_sqlalchemy import SQLAlchemy import os from modules import main from modules2 import main2, delete_tables from modules3 import main3 app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def hello(): if request.method == 'PO...
vhdcpatel/Web-scraper
app.py
app.py
py
1,603
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 13, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 13, "usage_type": "name" }, { "api_name": "flask.request.form...
74474249014
import pygame class ToggleSprite(pygame.sprite.Sprite): def __init__(self, sprite_sheet, pos, letter, alien_pos, eng_pos): super().__init__() self.sprite_sheet = sprite_sheet self.rect = pygame.Rect(pos[0], pos[1], 64, 64) self.frames = self.load_frames(alien_pos, eng_pos) ...
Ouro130Ros/Zapocalypse
toggleSprite.py
toggleSprite.py
py
1,271
python
en
code
0
github-code
21
[ { "api_name": "pygame.sprite", "line_number": 3, "usage_type": "attribute" }, { "api_name": "pygame.Rect", "line_number": 7, "usage_type": "call" }, { "api_name": "pygame.Rect", "line_number": 18, "usage_type": "call" }, { "api_name": "pygame.Rect", "line_numb...
18749335278
#!/usr/bin/env python3 # https://www.hackerrank.com/challenges/missing-numbers import os import unittest from typing import List def missing_numbers(arr: List[int], brr: List[int]) -> List[int]: missing = set() arr = sorted(arr) brr = sorted(brr) n = len(arr) m = len(brr) i = 0 for j in r...
altermarkive/training
algorithms/code/hackerrank/missing_numbers/missing_numbers.py
missing_numbers.py
py
1,355
python
en
code
2
github-code
21
[ { "api_name": "typing.List", "line_number": 9, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 27, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 31, "usage_type": "call" }, { "api_name": "os.path", "line_nu...
12815378282
import requests from bs4 import BeautifulSoup as BS from bs4 import NavigableString import os import json import tqdm def IEEEdecode(obj): out = IEEEJournal(obj['href'], obj['name']) if 'impact' in obj: out.score(obj['impact'],obj['eigen'],obj['influence']) if 'info' in obj: out.descriptio...
bozhiliu/journal_parser
ieee.py
ieee.py
py
5,710
python
en
code
0
github-code
21
[ { "api_name": "json.JSONEncoder", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.path.isfile", "line_number": 70, "usage_type": "call" }, { "api_name": "os.path", "line_number": 70, "usage_type": "attribute" }, { "api_name": "json.load", "li...
43843250530
# -*- coding: utf-8 -*- # @Time : 29/4/2020 10:07 AM # @Author : Joseph Chen # @Email : josephchenhk@gmail.com # @FileName: __init__.py.py # @Software: PyCharm import os import logging # 第一步,创建一个logger logger = logging.getLogger() logger.setLevel(logging.DEBUG) # Log等级总开关 # 第二步,创建一个handler,用于写入日志文件 if "log" n...
josephchenhk/quantkits
quantkits/logger/__init__.py
__init__.py
py
3,024
python
en
code
2
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 16, "usage_type": "call" }, { "api_name": "os.mkdir", "line_...
40548616542
import logging from threading import Event, current_thread from typing import Any, Dict, Sequence import mock_dependency from common.agent_events import ExploitationEvent from common.event_queue import IAgentEventPublisher from common.types import AgentID from infection_monkey.exploit import IAgentBinaryRepository fr...
guardicore/monkey
monkey/tests/data_for_tests/agent_plugin/mock_multiple_vendors/src/plugin.py
plugin.py
py
2,142
python
en
code
6,367
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "common.types.AgentID", "line_number": 21, "usage_type": "name" }, { "api_name": "infection_monkey.exploit.IAgentBinaryRepository", "line_number": 22, "usage_type": "name" }, {...
13998031317
from __future__ import absolute_import from builtins import str from nose.tools import * import os from .try_swig_load import * from .acos_file import * from nose.plugins.skip import Skip, SkipTest import numpy as np test_data = os.path.dirname(__file__) + "/../../unit_test_data/" l2_full_test_data = os.path.dirname(_...
nasa/RtRetrievalFramework
lib/Python/acos_file_test.py
acos_file_test.py
py
3,337
python
en
code
43
github-code
21
[ { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_numb...
71570599094
# coding: utf-8 # author: Brian R. Pauw, Glen J. Smales # date: 2019.08.26 # Structurizes the files we get from the MAUS into a proper NeXus/NXsas file. # based on the 3.8 version of the structurize notebook. # V13 also stores a list of structurized files that can be uploaded to the database # v3p16 works for newer f...
BAMresearch/scicat-upload
processingCode/source/structurize.py
structurize.py
py
58,324
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 39, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 73, "usage_type": "argument" }, { "api_name": "pathlib.Path", "line_number": 77, "usage_type": "argument" }, { "api_name": "h5py.File",...
71961800373
from collections import namedtuple from datetime import datetime import logging import socket import tornado from tornado.concurrent import Future import tornado.ioloop import tornado.web from tornado import gen Event = namedtuple("Event", "raw line source nick user host code args") class TwircUser(object): de...
AxelPhi/Irc2Web
irc2web/__init__.py
__init__.py
py
7,852
python
en
code
0
github-code
21
[ { "api_name": "collections.namedtuple", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 31, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 31, "usage_type": "name" }, { "api_name": "loggin...
33256268731
import traceback import ClaimSLP import aiosqlite as sql from loguru import logger import Common from Common import client MAIN_DB = "axieBot.db" client.db = None # Common @logger.catch async def createMainTables(): # logger.info("in createMainTables") if client.db is None: client.db = await sql.conn...
LampAndMaxAxie/LampAndMaxAxieBot
DB.py
DB.py
py
24,231
python
en
code
26
github-code
21
[ { "api_name": "Common.client.db", "line_number": 9, "usage_type": "attribute" }, { "api_name": "Common.client", "line_number": 9, "usage_type": "name" }, { "api_name": "Common.client.db", "line_number": 16, "usage_type": "attribute" }, { "api_name": "Common.client...
43956593595
from __future__ import unicode_literals, print_function import yaml import json def main(): ytest = 'test.yml' jtest = 'test.json' dictionary = { 'type':'cisco', 'device':'switch', 'use':'branches' } testlist = [ 'hello', 123, 'world' ] with o...
WaltRCodes/pynet_test
lesson1/exercise6.py
exercise6.py
py
510
python
en
code
0
github-code
21
[ { "api_name": "yaml.dump", "line_number": 19, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 21, "usage_type": "call" } ]
34009603231
from django.contrib.auth import get_user_model from django.http import HttpResponse from django.shortcuts import get_object_or_404 from djoser.views import UserViewSet from rest_framework import status, viewsets from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated from res...
rdg0/foodgram-project-react
backend/foodgram/api/views.py
views.py
py
5,777
python
en
code
0
github-code
21
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 23, "usage_type": "call" }, { "api_name": "djoser.views.UserViewSet", "line_number": 26, "usage_type": "name" }, { "api_name": "api.paginations.LimitPageNumberPagination", "line_number": 27, "usage_type": ...
28607351380
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 4 12:01:03 2020 @author: sammirc """ import numpy as np import scipy as sp import pandas as pd import mne from copy import deepcopy import os import os.path as op import sys from matplotlib import pyplot as plt from scipy import ndimage #stuff for...
schekroud/wmconfidence_eeg
analysis_scripts/py/tmp_arraylocked_analyse_orientationdecoding.py
tmp_arraylocked_analyse_orientationdecoding.py
py
10,095
python
en
code
1
github-code
21
[ { "api_name": "sys.path.insert", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 30, "usage_type": "attribute" }, { "api_name": "sys.path.insert", "line_number": 35, "usage_type": "call" }, { "api_name": "sys.path", "line_nu...
1068465706
from pyfiglet import Figlet from termcolor import colored, COLORS text = input("What message do you want to print? ") color = input("What color? ") if color not in COLORS.keys(): color = 'white' # this is a really long comment that probably should be set over a couple # of lines and cleaned up. print(colored(Fig...
mikeblanton/pythonCourse
Modules/colors.py
colors.py
py
352
python
en
code
0
github-code
21
[ { "api_name": "termcolor.COLORS.keys", "line_number": 7, "usage_type": "call" }, { "api_name": "termcolor.COLORS", "line_number": 7, "usage_type": "name" }, { "api_name": "termcolor.colored", "line_number": 12, "usage_type": "call" }, { "api_name": "pyfiglet.Figle...
71745058933
# -*- coding: utf-8 -*- import numpy as np import pickle import prophet import pandas as pd from scipy.stats import boxcox from scipy.special import inv_boxcox from flask import Flask, request, render_template # Create application app = Flask(__name__) # Bind home function to URL @app.route('/') def...
deeksha200/Falsk-Rest-API
app.py
app.py
py
4,076
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.array", "line...
40229410388
from flask import Flask,render_template import requests def get_file_url(api_url, file_path): try: response = requests.post(api_url, json={'file': file_path}) if response.status_code == 200: data = response.json() file_url = data.get('file_url') if file_url: ...
VIVF0/api_online_file_manager
Website/app.py
app.py
py
948
python
en
code
1
github-code
21
[ { "api_name": "requests.post", "line_number": 6, "usage_type": "call" }, { "api_name": "requests.exceptions", "line_number": 16, "usage_type": "attribute" }, { "api_name": "flask.Flask", "line_number": 21, "usage_type": "call" }, { "api_name": "flask.render_templa...
38521112527
from django.contrib.auth import get_user_model import os import shutil from musicc.models.revisions.OpenDriveRevision import OpenDriveRevision from musicc.models.revisions.OpenScenarioRevision import OpenScenarioRevision from musicc.models.revisions.MusiccRevision import MusiccRevision from django.conf import settings ...
theoutsider24/musicc
musicc/tests/utilities.py
utilities.py
py
8,956
python
en
code
1
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 19, "usage_type": "call" }, { "api_name": "django.contrib.auth.get_user_model", "line_number": 23, "usage_type": "call" }, { "api_name": "musicc.models.Profile.Profile.create", "line_number": 26, "usage_type": "call" }, ...
42004253556
import os from distutils.core import setup from setuptools import setup import src def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "MellowAVR", version = "0.0.1", author = "Levan Gogohia", author_email = "levangogohia@yandex.ru", description = ...
MarcSky/MellowAVR
setup.py
setup.py
py
518
python
en
code
1
github-code
21
[ { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_n...
71075326134
import json import random from pathlib import Path import numpy as np import torch dataset = "xsum" metric = "entailment" variant = "sent" in_file = Path(f"{dataset}/{metric}/{metric}_{variant}.json") max_num_sentences = 30 score_key = "precision" # or recall or f1 with in_file.open(mode="r", encoding="UTF-8") as fi...
bigabig/faithfulness
experiments/find_examples.py
find_examples.py
py
1,934
python
en
code
10
github-code
21
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "json.load", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 2...
31153433771
#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().system('pip install git+https://github.com/SciTools/cartopy.git') get_ipython().system('pip uninstall shapely -y') get_ipython().system('pip install shapely --no-binary shapely --force') import cartopy.crs as ccrs import matplotlib.pyplot as plt from cart...
rondorice/WHOI-2021-Real
Micromonas_mapping.py
Micromonas_mapping.py
py
3,424
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 23, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 42, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 42, "usage_type": "name" }, { "api_name": "matplotlib...
3930644533
import hashlib import datetime class Block(): def __init__(self, data): self.index = 0 self.timestamp = self.calc_timestamp() self.data = data self.previous_hash = None self.hash = self.calc_hash(data) self.previous = None def calc_timestamp(self): ...
garyukong/data-structures-and-algorithms
Project 2/Project Submission 2/problem_5.py
problem_5.py
py
12,172
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "attribute" }, { "api_name": "hashlib.sha256", "line_number": 23, "usage_type": "call" } ]
25500396172
import logging import os import json import azure.functions as func from google.cloud import datastore os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = os.path.dirname(os.path.realpath(__file__)) + '/SC-credentials.json' DS_KIND = 'FX' DS_CLIENT = datastore.Client() def main(req: func.HttpRequest) -> func.Htt...
Kazolah/mmk-fx-python-scrapper
fx-azure-test-space/fx-functions/gcp-cf-api/__init__.py
__init__.py
py
2,941
python
en
code
1
github-code
21
[ { "api_name": "os.environ", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "lin...
73322570934
from __future__ import division, print_function from visual import * import visual as vs # for 3D panel import wx, sys # for widgets import threading #from leapmouse import * clr = vs.color class Workspace: def __init__(self): win = window(width=1024, height=720, menus=False, title='SIMULATE VPYTHON GUI')#...
codeHeavy/vortex
workspace.py
workspace.py
py
3,012
python
en
code
0
github-code
21
[ { "api_name": "visual.color", "line_number": 7, "usage_type": "attribute" }, { "api_name": "visual.vector", "line_number": 12, "usage_type": "call" }, { "api_name": "wx.Button", "line_number": 15, "usage_type": "call" }, { "api_name": "wx.EVT_BUTTON", "line_nu...
2135704287
#!/usr/bin/env python # coding: utf-8 # In[22]: #A minimum of 5 variables in your dataset used during your analysis #Read data set import pandas as pd boston_orig = pd.read_csv('boston_house_prices.csv') boston_orig.columns # In[23]: boston_orig.shape # In[24]: # select columns to keepplot o #CRIM per cap...
LilPanda111/dsc530termproject
Boston Housing.py
Boston Housing.py
py
3,643
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.isna", "line_number": 68, "usage_type": "call" }, { "api_name": "seaborn.barplot", "line_number": 99, "usage_type": "call" }, { "api_name": "seaborn.barplot", "li...
72872703092
import pandas as pd import numpy as np from os.path import join from scipy.stats import kurtosis from obspy.core import read from obspy.signal.filter import envelope from obspy.signal.util import smooth from obspy.signal.trigger import triggerOnset syn_dir = '../synthetic_data' syncat = join(syn_dir, 'syn_catalog.txt'...
hibertclement/eqdiscrim
SiHex_discrim/synthetics/syncat_io.py
syncat_io.py
py
2,656
python
en
code
0
github-code
21
[ { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.read_table", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.empty", "line_number": 30, "usage_type": "call" }, { "api_name": "obspy.core.read", "lin...
22643548833
from consolemenu import SelectionMenu import model import view import reader def handle_error(func): def wrapper(tname): try: func(tname) except Exception as e: show_table_menu(tname, str(e)) return wrapper def show_start_menu(tname=None, err=''): tables = list(...
traumgedanken/obd
sem1/lab3/controller.py
controller.py
py
2,404
python
en
code
0
github-code
21
[ { "api_name": "model.TABLES.keys", "line_number": 19, "usage_type": "call" }, { "api_name": "model.TABLES", "line_number": 19, "usage_type": "attribute" }, { "api_name": "consolemenu.SelectionMenu", "line_number": 21, "usage_type": "call" }, { "api_name": "model.c...
70309699254
"""Plot quantile MC standard error.""" import numpy as np import xarray as xr from ..data import convert_to_dataset from ..labels import BaseLabeller from ..sel_utils import xarray_var_iter from ..stats import mcse from ..rcparams import rcParams from ..utils import _var_names, get_coords from .plot_utils import defau...
arviz-devs/arviz
arviz/plots/mcseplot.py
mcseplot.py
py
6,710
python
en
code
1,461
github-code
21
[ { "api_name": "labels.BaseLabeller", "line_number": 137, "usage_type": "call" }, { "api_name": "utils.get_coords", "line_number": 139, "usage_type": "call" }, { "api_name": "data.convert_to_dataset", "line_number": 139, "usage_type": "call" }, { "api_name": "utils...
1307337793
import logging from ingest import ingest_drinks_api_full, ingest_transactions_csv, ingest_bar_csv from load import load_drinks, load_glasses, load_transactions from dataclasses import dataclass from typing import Callable import pandas as pd logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) logging.ba...
michaeljs-c/cocktails-etl
etl/pipeline.py
pipeline.py
py
1,503
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 9, "usage_type": "attribute" }, { "api_name": "logging.basicConfig", "line_number": 10, "usage_type": "call" }, { "api_name": "typing.Callable...
9234409846
#!/usr/bin/env python import numpy as np import gym import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.autograd as autograd from torch.autograd import Variable import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt seed = 123 ...
Villux/atari-tennis
policy-gradients/cartpole-v0/cartpole-pg.py
cartpole-pg.py
py
4,232
python
en
code
1
github-code
21
[ { "api_name": "matplotlib.use", "line_number": 15, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.manual_seed", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.nn.Mod...
40960522709
import discord import os import twitter # Discord Client client = discord.Client() my_secret = os.environ['my_secret'] # Twitter Client twitter_key = os.environ['twitter_key'] twitter_secret = os.environ['twitter_secret'] api = twitter.Api( # consumer_key=[consumer key], # consumer_secret=[consumer secret], a...
itsjustaballoon/a_team_bot
main.py
main.py
py
698
python
en
code
0
github-code
21
[ { "api_name": "discord.Client", "line_number": 6, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.environ", "line_n...
18497575571
from secrets import choice import requests import sys import os import time URLS = { 'prod': 'https://a2a-apigee-prod-prod.apigee.net/mama/api/v1/anagrafiche/upload', 'preprod': 'https://a2a-apigee-noprod-preprod.apigee.net/mama/api/v1/anagrafiche/upload', } HEADERS = { 'preprod': { 'Connection': ...
Serenz/Ultimator6000
sender.py
sender.py
py
4,205
python
en
code
0
github-code
21
[ { "api_name": "secrets.choice", "line_number": 106, "usage_type": "name" }, { "api_name": "secrets.choice", "line_number": 107, "usage_type": "name" }, { "api_name": "secrets.choice", "line_number": 108, "usage_type": "name" }, { "api_name": "secrets.choice", ...
24243410195
import bpy from mathutils import Vector from mathutils.bvhtree import BVHTree import gpu from gpu_extras.batch import batch_for_shader import time from bpy.app.handlers import persistent draw_handler = None def get_intersections(scene, ray_origin, ray_pickup, jet_vector, ray_vector, intersections): context = bp...
TobyThomson/cascade
visualizer/cascade_visualizer.py
cascade_visualizer.py
py
3,816
python
en
code
0
github-code
21
[ { "api_name": "bpy.context", "line_number": 12, "usage_type": "attribute" }, { "api_name": "mathutils.Vector", "line_number": 19, "usage_type": "call" }, { "api_name": "mathutils.Vector", "line_number": 22, "usage_type": "call" }, { "api_name": "mathutils.Vector",...
34963848362
from django.db import models from user.models import User from artwork.models import Artwork, ArtworkColor, ArtworkPrice class Order(models.Model): user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) artwork = models.ForeignKey(Artwork, on_delete=models.SET_NULL, null=True)...
Davidlin2008/casetify_backend
order/models.py
models.py
py
1,032
python
en
code
0
github-code
21
[ { "api_name": "django.db.models.Model", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 6, "usage_type": "name" }, { "api_name": "user.models", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.model...
27639589082
from turtle import Screen import net import paddle import ball import scores from time import sleep LEFT = -300 RIGHT = 300 screen = Screen() screen.setup(width=640, height=480) screen.bgcolor("black") screen.title("Pong") screen.tracer(0) bouncer = ball.Ball() game_on = True score = scores.Scores() the_net = net.Net...
RamenJunkie/Python-Pong
main.py
main.py
py
1,245
python
en
code
0
github-code
21
[ { "api_name": "turtle.Screen", "line_number": 10, "usage_type": "call" }, { "api_name": "ball.Ball", "line_number": 16, "usage_type": "call" }, { "api_name": "scores.Scores", "line_number": 18, "usage_type": "call" }, { "api_name": "net.Net", "line_number": 19...
31264022361
from flask import Flask,render_template,url_for,request, send_from_directory, redirect, flash from werkzeug.utils import secure_filename import detectron2 import numpy as np import shutil import os import cv2 import random from matplotlib import colors, pyplot as plt import json import pycocotools import requests from ...
AnnaShtangey/Fashion-Detection-DeepFashion2-Detectron2-Flask
app.py
app.py
py
4,274
python
en
code
9
github-code
21
[ { "api_name": "flask.Flask", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "line_number": 30, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_...
71259947573
import xlwt import xlrd f = xlwt.Workbook() sheet = f.add_sheet('Python职位信息') sheet.write(0, 0, "你好") f.save('职位信息.xls') dict1 = {'a': 1, 'b':2} for key, val in enumerate(dict1): print(key, val)
Bruceey/Spider_Learning
01、数据存储/excel.py
excel.py
py
221
python
en
code
1
github-code
21
[ { "api_name": "xlwt.Workbook", "line_number": 4, "usage_type": "call" } ]
35124282650
import scrapy class WPSpider(scrapy.Spider): name = "wp" start_urls = ['http://wiadomosci.wp.pl/kat,140556,title,Marcin-Dubieniecki-Jaroslaw-Kaczynski-nie-interweniowal-w-mojej-sprawie,wid,18713063,wiadomosc.html'] def parse(self, response): print("PARSE") more_comments = response.xpath("//a[@class='opA...
wojtek-rybak/veniversum
veniversum/spiders/wp.py
wp.py
py
1,068
python
en
code
0
github-code
21
[ { "api_name": "scrapy.Spider", "line_number": 3, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 16, "usage_type": "call" }, { "api_name": "scrapy.Request", "line_number": 25, "usage_type": "call" } ]
11265470224
import kivy from kivy.app import App kivy.require('2.0.0') # Import for buttons from kivy.uix.gridlayout import GridLayout # For size of window from kivy.config import Config #Set size to resizeable Config.set('graphics', 'resizable', 1) #Making layout class class CalcGridLayout(GridLayout): #Function is cal...
warfalcon64/BasicCalculator
main.py
main.py
py
789
python
en
code
0
github-code
21
[ { "api_name": "kivy.require", "line_number": 5, "usage_type": "call" }, { "api_name": "kivy.config.Config.set", "line_number": 14, "usage_type": "call" }, { "api_name": "kivy.config.Config", "line_number": 14, "usage_type": "name" }, { "api_name": "kivy.uix.gridla...
74807700532
import os import sys import argparse import threading from signal import SIGINT import time import subprocess from mininet.topo import Topo from mininet.net import Mininet from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections from mininet.log import set...
jdunn-git/Pub-Sub-Load-Balancing
assignment1/assignment_executor.py
assignment_executor.py
py
8,716
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 28, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 138, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 147, "usage_type": "call" }, { "api_name": "threading...
32412458598
#!/usr/bin/env python3 # # Author: # Tamas Jos (@skelsec) # import os import logging import asyncio from minikerberos import logger from minikerberos.common.url import KerberosClientURL, kerberos_url_help_epilog from minikerberos.aioclient import AIOKerberosClient from minikerberos.common.spn import KerberosSPN impo...
ryanmrestivo/red-team
Exploitation-Tools/CrackMapExec/site-packages/minikerberos/examples/getS4U2proxy.py
getS4U2proxy.py
py
2,447
python
en
code
91
github-code
21
[ { "api_name": "minikerberos.common.url.KerberosClientURL.from_url", "line_number": 18, "usage_type": "call" }, { "api_name": "minikerberos.common.url.KerberosClientURL", "line_number": 18, "usage_type": "name" }, { "api_name": "minikerberos.common.spn.KerberosSPN.from_target_stri...
28442699345
from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from bs4 import BeautifulSoup import requests import os import pickle import logging.config from parsing import Parsing from sql_commit import TableMaster from settings import BASE_DIR, user_agent, logger_config from environ ...
ikhairulin/parsing
src/joy_libs.py
joy_libs.py
py
14,338
python
ru
code
0
github-code
21
[ { "api_name": "logging.config.config.dictConfig", "line_number": 16, "usage_type": "call" }, { "api_name": "settings.logger_config", "line_number": 16, "usage_type": "argument" }, { "api_name": "logging.config.config", "line_number": 16, "usage_type": "attribute" }, {...
74920433653
import os from subprocess import Popen, PIPE, TimeoutExpired, run, STDOUT from django.conf import settings from django.contrib.auth.models import User from django.db import transaction from django.http import JsonResponse from django.http.response import HttpResponseRedirect from django.shortcuts import redirect, rend...
mreguly/interactive-lab-to-learn-programming
course/views.py
views.py
py
27,558
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 20, "usage_type": "call" }, { "api_name": "forms.CourseForm", "line_number": 30, "usage_type": "call" }, { "api_name": "django.db.transaction.atomic", "line_number": 32, "usage_type": "call" }, { "api_name": "djang...
1624970301
import math import mss import cv2 import numpy as np import os tokens_rect = {"top": 480, "left": 700, "width": 550, "height": 100} damage_rect = {"top": 725, "left": 810, "width": 100, "height": 45} accuracy_rect = {"top": 725, "left": 960, "width": 130, "height": 45} class ScreenReader: def __init__(self, app...
Pentracchiano/for-the-king-oracle
src/main/python/screen_reader.py
screen_reader.py
py
7,278
python
en
code
0
github-code
21
[ { "api_name": "mss.mss", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 2...
19992317113
import typer import json import requests import sys import io import logging import questionary from pathlib import Path import os import subprocess from enum import Enum from llama_index import set_global_service_context from llama_index import ServiceContext from memgpt.interface import CLIInterface as interface #...
winklerj/MemGPT
memgpt/cli/cli.py
cli.py
py
22,991
python
en
code
null
github-code
21
[ { "api_name": "enum.Enum", "line_number": 29, "usage_type": "name" }, { "api_name": "memgpt.config.MemGPTConfig.load", "line_number": 39, "usage_type": "call" }, { "api_name": "memgpt.config.MemGPTConfig", "line_number": 39, "usage_type": "name" }, { "api_name": "...
14613861177
# import cv2 import numpy as np import time import math # import matplotlib.pyplot as plt # import matplotlib # matplotlib.use('TkAgg') import matplotlib.pyplot as plt import queue import argparse from matplotlib.patches import Rectangle plt.ion() height = 10.2 width = 10.2 def obstaclecheck_circle(x, y, r, c): ...
Pradeep-Gopal/A_star_Non_Holonomous_Robot
Code/a_star.py
a_star.py
py
13,517
python
en
code
2
github-code
21
[ { "api_name": "matplotlib.pyplot.ion", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 16, "usage_type": "name" }, { "api_name": "numpy.square", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.square", ...
39920692534
#!/usr/bin/env python # # # # TODO # - add a map drawing functionality # - reuse sky.CelestialObject instead of Asteroid import math from itertools import groupby debug = False class Asteroid(object): @classmethod def compute_declension(cls, obj, origin): # print(f"DECL BETWEEN: {obj} and {origin}"...
nkrot/adventofcode-2019
day.10/solution.py
solution.py
py
9,164
python
en
code
0
github-code
21
[ { "api_name": "math.gcd", "line_number": 22, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 29, "usage_type": "call" }, { "api_name": "itertools.groupby", "line_number": 97, "usage_type": "call" } ]
37943983607
from fastapi import FastAPI from fastapi.responses import PlainTextResponse app = FastAPI() @app.get("/ZKsschpmcYsFVBcSlwfScWSDkDuo{s}") async def ZKsschpmcYsFVBcSlwfScWSDkDuo(): return "" @app.get("/lTToMxeyvefRHAgnTCCYZAToHYcXQEjEdDZZpXsfefqWpgumhC{s}") async def lTToMxeyvefRHAgnTCCYZAToHYcXQEjEdDZZpXsfefqWp...
abersheeran/asgi-benchmark
big-project/fastapi_example.py
fastapi_example.py
py
97,853
python
en
code
4
github-code
21
[ { "api_name": "fastapi.FastAPI", "line_number": 4, "usage_type": "call" }, { "api_name": "fastapi.responses.PlainTextResponse", "line_number": 5009, "usage_type": "call" } ]
23172107020
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt import argparse def check_file_ext(filename): """ Check file extension :param filename: :return filename: """ if not filename.endswith('.csv'): raise argparse.ArgumentTypeError('wrong fil...
Qespion/linear_regression
plot.py
plot.py
py
842
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentTypeError", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.scatter", "line_number": 25, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 25, "usage_type": "name" }, { "api_name":...
10490188104
""" team view """ # Create your views here. from django.contrib.auth import get_user_model from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import AbstractUser from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic i...
maddogncux/Otus-Basic-Project
airsoft/airsoft_teams/views.py
views.py
py
8,140
python
en
code
0
github-code
21
[ { "api_name": "django.contrib.auth.models.AbstractUser", "line_number": 15, "usage_type": "name" }, { "api_name": "django.contrib.auth.get_user_model", "line_number": 15, "usage_type": "call" }, { "api_name": "django.contrib.auth.mixins.LoginRequiredMixin", "line_number": 19,...
31463733340
import pygame from pygame.sprite import Sprite class Alien(Sprite): """Класс представляюший одного пришельца""" def __init__(self, ai_game): super().__init__() self.screen = ai_game.screen # Загрузка изображения пришельца и задает первоночальную позицию self.image = pygame.ima...
Andriyshrub/alien_invasion
alien.py
alien.py
py
776
python
ru
code
0
github-code
21
[ { "api_name": "pygame.sprite.Sprite", "line_number": 5, "usage_type": "name" }, { "api_name": "pygame.image.load", "line_number": 12, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 12, "usage_type": "attribute" } ]
34234309519
from typing import List import collections # count number of distinct elements in contiguous subarrays def countDistinctCategories(arr: List[int]): if len(arr) == 1: return 1 # dont use subarrays and save space complexity start = 0 end = 0 count = 0 while end < len(arr): if arr[...
rahul-nauni/playground
distinctSums.py
distinctSums.py
py
492
python
en
code
0
github-code
21
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" } ]
30434735713
''' input: 1,9,10,3,2,3,11,0,99,30,40,50 output: 3500,9,10,70, 2,3,11,0, 99, 30,40,50 ''' from typing import Optional, List, Tuple # n = 4 # # with open('aoc2.txt', 'r') as f: # raw_data = [item for item in f.readlines()] # # raw_data = raw_data[0].split(',') # raw_data = [int(item) for item in raw_data] # # # # ...
oren0e/aoc-2019
aoc_2.py
aoc_2.py
py
4,704
python
en
code
0
github-code
21
[ { "api_name": "typing.List", "line_number": 80, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 81, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 90, "usage_type": "name" }, { "api_name": "typing.List", "line_numbe...
40505436664
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 17 14:56:08 2020 @author: aadityabhatia """ import pandas as pd import numpy as np import matplotlib.pyplot as plt dirName = '/Users/aadityabhatia/Projects/Coronavirus/' df = pd.read_csv(dirName + 'country_weather_corona_cases.csv') df.new_cases....
Aaditya-Bhatia/Covid-19_AI_weather_prediction
Codes/models.py
models.py
py
676
python
en
code
1
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 23, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 23, "usage_type": "name" } ]
70331416054
from argparse import ArgumentParser import json import numpy as np import pandas as pd from pathlib import Path from pycocotools import mask from tqdm import tqdm from eval_constants import LOCALIZATION_TASKS from heatmap_to_segmentation import pkl_to_mask def get_results(gt_dict, seg_path): """ For each pat...
rajpurkarlab/cheXlocalize
precision_recall_specificity.py
precision_recall_specificity.py
py
3,563
python
en
code
17
github-code
21
[ { "api_name": "json.load", "line_number": 19, "usage_type": "call" }, { "api_name": "eval_constants.LOCALIZATION_TASKS", "line_number": 23, "usage_type": "argument" }, { "api_name": "tqdm.tqdm", "line_number": 25, "usage_type": "call" }, { "api_name": "pycocotools...
40897956000
from flask import abort, render_template, flash, redirect, url_for, current_app from flask_login import current_user, login_required from flask_mail import Message, Mail from . import home from .forms import * from app.models import * @home.route('/') def homepage(): settings = Settings.query.first() return...
Projex-Redesign/Groupproject
app/home/views.py
views.py
py
2,936
python
en
code
0
github-code
21
[ { "api_name": "flask.render_template", "line_number": 14, "usage_type": "call" }, { "api_name": "flask_login.current_user.is_authenticated", "line_number": 19, "usage_type": "attribute" }, { "api_name": "flask_login.current_user", "line_number": 19, "usage_type": "name" ...
20265906173
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Item', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False...
farisv/CJ2020-Final-CTF
web/toko-masker-4/MaskShop/shop/migrations/0001_initial.py
0001_initial.py
py
603
python
en
code
33
github-code
21
[ { "api_name": "django.db.migrations.Migration", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 4, "usage_type": "name" }, { "api_name": "django.db.migrations.CreateModel", "line_number": 12, "usage_type": "call" }, ...
7802813454
from django.contrib import admin from django.urls import path, include from . import views urlpatterns = [ path('', views.store, name="store"), path('cart/',views.cart, name="cart"), path('checkout/', views.checkout, name="checkout"), path('update_item/', views.updateItem, name="update_item"), pat...
PerezChris99/Agri-Market-E-Commerce
store/urls.py
urls.py
py
550
python
en
code
2
github-code
21
[ { "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", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", ...
44181768200
import random from scipy.stats import multivariate_normal # MVN not univariate import matplotlib.pyplot as plt # For general plotting import pandas import numpy as np from sklearn.metrics import confusion_matrix print("hello") # Get All Wine Data all_wine_data = pandas.read_csv('winequality-white.csv', sep=';') pri...
davidantaki/ecece5644_machine_learning
hw1/q3-wine.py
q3-wine.py
py
5,093
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.transpose", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_n...
10761966696
"""Provide some utilities.""" import heapq import logging import sys from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union import matplotlib import matplotlib.pyplot as plt import numpy as np from matplotlib import cm from hoqunm.data_tools.base import OUTPUT_DIR MODEL_COLORS = [ c...
borescht/HoQuNM
hoqunm/utils/utils.py
utils.py
py
7,580
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.cm.get_cmap", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.cm", "line_number": 17, "usage_type": "name" }, { "api_name": "matplotlib.cm.get_cmap", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotli...
6271789282
from r2a.ir2a import IR2A from json import load, dump from math import ceil from player.parser import parse_mpd class R2ASmallestPackage(IR2A): def __init__(self, id): IR2A.__init__(self, id) self.videoRates = [] self.worstWait = 0 self.buffer = 0 self.blocked = False ...
wjld/pydash
r2a/r2asmallestpackage.py
r2asmallestpackage.py
py
1,824
python
en
code
null
github-code
21
[ { "api_name": "r2a.ir2a.IR2A", "line_number": 6, "usage_type": "name" }, { "api_name": "r2a.ir2a.IR2A.__init__", "line_number": 8, "usage_type": "call" }, { "api_name": "r2a.ir2a.IR2A", "line_number": 8, "usage_type": "name" }, { "api_name": "player.parser.parse_m...
73385288692
from flask import Blueprint, session, request from lib.utils import returns from services.shopOrder import get_order, change_order_status shopOrder = Blueprint('shopOrder', __name__) @shopOrder.route('/get', methods=['get']) def shop_order_get(): email = session['email'] if email is None: return ret...
Aven9/YummyLand
routes/shopOrder.py
shopOrder.py
py
1,532
python
en
code
0
github-code
21
[ { "api_name": "flask.Blueprint", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.session", "line_number": 11, "usage_type": "name" }, { "api_name": "lib.utils.returns", "line_number": 13, "usage_type": "call" }, { "api_name": "lib.utils.returns", ...
29917142145
import streamlit as st st.title("Personnalisation des widgets") # Personnaliser un widget bouton button = st.button("Cliquez-moi") # Utiliser du HTML pour personnaliser le bouton button_html = """ <style> .stButton>button { background-color: green; color: white; border: 2px solid black; ...
DeVerMyst/DEVIA2023
E_c_Streamlit-demo/4_wid_perso.py
4_wid_perso.py
py
477
python
fr
code
3
github-code
21
[ { "api_name": "streamlit.title", "line_number": 3, "usage_type": "call" }, { "api_name": "streamlit.button", "line_number": 6, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 19, "usage_type": "call" }, { "api_name": "streamlit.write", ...
12476682986
import torch from torch import nn from transformers import BertModel class BERTClassifier(nn.Module): def __init__(self, args): super(BERTClassifier, self).__init__() self.num_classes = args.num_classes self.bert_model_name = args.model self.bert = BertModel.from_pretraine...
movie112/IIPL_Code_Template
models/BERTClassifier.py
BERTClassifier.py
py
955
python
en
code
null
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 6, "usage_type": "name" }, { "api_name": "transformers.BertModel.from_pretrained", "line_number": 12, "usage_type": "call" }, { "api_name": "tr...
18404221819
import itertools; import math; import operator; import random; import re; from bisect import *; from collections import deque, defaultdict, Counter, OrderedDict; from heapq import *; import unittest; from typing import List def get_sol(): return Solution() class Solution: def getStrongest(self, arr: List[int], k: i...
afzalsiddique/problem-solving
Problem_Solving_Python/leetcode/lc1471.py
lc1471.py
py
1,829
python
en
code
1
github-code
21
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 20, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 26, "usage_type": "attribute" } ]
5208200851
import argparse import subprocess import re import json import sys def useage(): message = "NOTE: Running this requires you have a local clone of the repository and you are in that directory\n" message += "Example: git clone https://github.com/org/repo && cd repo && python3 $HELPER_PATH/draft-release-notes.py ...
ericpassmore/helpers
git/draft-release-notes.py
draft-release-notes.py
py
12,905
python
en
code
0
github-code
21
[ { "api_name": "subprocess.run", "line_number": 21, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 68, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 69, "usage_type": "call" }, { "api_name": "re.compile", "line_number": ...
9917374124
import argparse import os sys.path.append("../../../utils_cv/action_recognition/") from video_annotation_utils import video_format_conversion def main(video_dir, output_dir): for output_format in ["mp4", "avi"]: output_sub_dir = os.path.join(output_dir, output_format) if not os.path.exists(output...
microsoft/computervision-recipes
scenarios/action_recognition/video_annotation/video_conversion.py
video_conversion.py
py
1,267
python
en
code
9,169
github-code
21
[ { "api_name": "os.path.join", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number":...
12699708374
# -*- coding: utf-8 -*- import numpy as np import pickle import pandas as pd import streamlit as st import os os.chdir(r"C:\Users\User\Desktop\data science project\app\lungs app") from PIL import Image pickle_in = open("classifier.pkl","rb") classifier=pickle.load(pickle_in) def welcome(): return "W...
Kanha777/apps
lungs app/app.py
app.py
py
1,273
python
en
code
0
github-code
21
[ { "api_name": "os.chdir", "line_number": 15, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 23, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 40, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_n...
11900194474
from torch.utils.data import DataLoader as TorchDataLoader from torch.utils.data import TensorDataset, RandomSampler, SequentialSampler import common class TorchDataService: def PutDataIntoTorch(self, inputs, masks, tags, batchSize): torchDataLoader = None inputsTensor, masksTensor, tagsTensors = ...
carlCarlson6/NERwithBERT
Services/DataService/TorchDataService.py
TorchDataService.py
py
809
python
en
code
1
github-code
21
[ { "api_name": "common.utils.TensorUtils.InputsIntoTensor", "line_number": 9, "usage_type": "call" }, { "api_name": "common.utils", "line_number": 9, "usage_type": "attribute" }, { "api_name": "common.utils.TensorUtils.TensorsToLongTensors", "line_number": 10, "usage_type"...
7878835635
from typing import Optional, BinaryIO from rabin.crypto_configuration import PLAINTEXT_BLOCK_SIZE_BYTES, CIPHERTEXT_BLOCK_SIZE_BYTES from rabin.cryptosystem.base import RabinCryptosystem from rabin.cryptosystem.integer import IntegerRabinCryptosystem from rabin.dto import RabinPublicKey, RabinCryptoKey from rabin.padd...
LukasForst/rabin-crypto
rabin/cryptosystem/file.py
file.py
py
3,993
python
en
code
0
github-code
21
[ { "api_name": "rabin.cryptosystem.base.RabinCryptosystem", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 16, "usage_type": "name" }, { "api_name": "rabin.padding.padding_strategy.PaddingStrategy", "line_number": 16, "usage_type...
70742125493
#!/usr/bin/env python # coding: utf-8 # In[109]: import pandas as pd import numpy as np from sklearn.model_selection import train_test_split # In[110]: df_raw = pd.read_csv('data.csv', encoding= 'unicode_escape') df_raw.head() # In[111]: df = df_raw[['job_title', 'age', 'salary', 'exp. period']] df.head() ...
msyzdykova/ML-Python
Final Project.py
Final Project.py
py
1,708
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "sklearn.impute.SimpleImputer", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 30, "usage_type": "attribute" }, { "api_name": "sklearn.i...
31172013522
import requests import datetime as dt api_key = "43c24ed228d4a9e99ad15ec124bef7ad" app_id = "e341e1b8" exersice_endpoint = "https://trackapi.nutritionix.com/v2/natural/exercise" sheet_endpoint = "https://api.sheety.co/760a8d91b2f084d8b882a7c8883af212/tracking/workouts" sheet_update = "https://api.sheety.co/760a8d91b2...
Jacousta/Grind_Python
Python1/py_projects/start-exercise-tracking/main.py
main.py
py
1,396
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "attribute" }, { "api_name": "requests.post", "line_number": 29, "usage_type": "call" }, { "api_name": "requests.p...
27845255635
# -*- coding: utf-8 -*- """ Created on Mon Jul 27 09:15:59 2020 @ NERIO QUISPE ANCCO """ import cv2 as cv import matplotlib.pyplot as plt import numpy as np import csv import os import pandas as pd carpeta='C:/Users/NERIO-QA/Documents/ReconocimientoPatrones/PROYECTO RECONOCIMEINTO VOCALES/VOCALES/imagenes' ...
nerioqa/Inteligencia-Artifi
SOLUCION_vocales.py
SOLUCION_vocales.py
py
2,034
python
en
code
0
github-code
21
[ { "api_name": "os.listdir", "line_number": 13, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_number": 18,...
31998500052
import os, json import numpy as np import h5py def load_coco_data(base_dir='cs231n/datasets/coco_captioning', max_train=None, pca_features=True): data = {} caption_file = os.path.join(base_dir, 'coco2014_captions.h5') with h5py.File(caption_file, 'r') as f: for k, v in ...
lightaime/cs231n
assignment3/cs231n/coco_utils.py
coco_utils.py
py
2,650
python
en
code
1,338
github-code
21
[ { "api_name": "os.path.join", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "h5py.File", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number"...
33110591606
# -*- coding: utf-8 -*- """Smartdict -- smart dictionary for formatting strings""" from string import Formatter from attrdict import AttrDict __notfound__ = object() class SmartDict: """Smart dictionary object""" def __init__(self, namespace: object, valuedict: dict = None, default=__notfound__): "...
ThreatConnect-Inc/threatconnect-playbooks
apps/TCPB_-_Expressions/src/smartdict.py
smartdict.py
py
2,260
python
en
code
66
github-code
21
[ { "api_name": "attrdict.AttrDict", "line_number": 63, "usage_type": "call" }, { "api_name": "string.Formatter", "line_number": 74, "usage_type": "call" } ]
16143631983
import requests import pandas as pd import time from tqdm import tqdm API_KEY = None def chain_condenser(data): l_records = [] for expiration in data["putExpDateMap"].keys(): for strike in data["putExpDateMap"][expiration]: keys = [ "putCall","symbol","e...
ltanedo/woo-put-selling-strategy
sp500/options.py
options.py
py
2,296
python
en
code
0
github-code
21
[ { "api_name": "requests.get", "line_number": 46, "usage_type": "call" }, { "api_name": "pandas.read_html", "line_number": 56, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 59, "usage_type": "call" }, { "api_name": "time.sleep", "line_number...
27706260556
# -*- coding: utf-8 -*- from collective.contact.plonegroup.utils import get_organizations from collective.eeafaceted.batchactions.interfaces import IBatchActionsMarker from copy import deepcopy from eea.facetednavigation.criteria.interfaces import ICriteria from imio.helpers.catalog import addOrUpdateColumns from imio...
IMIO/Products.PloneMeeting
src/Products/PloneMeeting/migrations/migrate_to_4200.py
migrate_to_4200.py
py
59,488
python
en
code
1
github-code
21
[ { "api_name": "Products.contentmigration.basemigrator.migrator.CMFFolderMigrator", "line_number": 46, "usage_type": "name" }, { "api_name": "imio.helpers.content.richtextval", "line_number": 96, "usage_type": "call" }, { "api_name": "imio.helpers.content.richtextval", "line_n...
4582517619
"""create owners table Revision ID: 3ddeb90ce292 Revises: Create Date: 2020-12-11 08:33:35.981220 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3ddeb90ce292' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands aut...
Archive-42/nov-static
08-my-website/06-module-6/week-18/unsorted/Week18D4/week18D4-Flask-Migrate/migrations/versions/3ddeb90ce292_create_owners_table.py
3ddeb90ce292_create_owners_table.py
py
864
python
en
code
4
github-code
21
[ { "api_name": "alembic.op.create_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
70619772214
import pandas as pd from sklearn import model_selection if __name__ == "__main__": df = pd.read_csv("../data/IMDB_Dataset.csv") df.sentiment = df.sentiment.map({"positive": 1, "negative": 0}) df["kfold"] = -1 y = df.sentiment.values df = df.sample(frac=1).reset_index(drop=True) kf = model...
LakshyaMalhotra/toy-projects-nlp
imdb-sentiment-analysis/src/create_folds.py
create_folds.py
py
595
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 5, "usage_type": "call" }, { "api_name": "sklearn.model_selection.StratifiedKFold", "line_number": 12, "usage_type": "call" }, { "api_name": "sklearn.model_selection", "line_number": 12, "usage_type": "name" } ]
17308423505
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf sess = tf.InteractiveSession() image = np.array([[[[1], [2], [3]], [[4], [5], [6]], [[7], [8], [9]]]], dtype=np.float32) # print("image:\n", image) print('image.shape {}'.format(image.shape)) ...
ChengBinJin/Tensorflow-SungKim
src/ML_lab_11_01.py
ML_lab_11_01.py
py
1,170
python
en
code
8
github-code
21
[ { "api_name": "tensorflow.InteractiveSession", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 9, "usage_type": "attribute" }, { "api_name": "tensorflow....
32306036992
from socket import * from codecs import * import pygame import time import serial import threading horn = serial.Serial('/dev/ttyACM0', 115200, timeout=.1) # COM4 for windows, /dev/ttyAMC0 #we can clear the que with pygame.event.clear() #pygame.event.wait() stops the program until an event becomes available #all o...
normanadvanced/Underwater-ROV-Project
Computer/baseServer.py
baseServer.py
py
5,939
python
en
code
1
github-code
21
[ { "api_name": "serial.Serial", "line_number": 9, "usage_type": "call" }, { "api_name": "pygame.init", "line_number": 44, "usage_type": "call" }, { "api_name": "pygame.joystick.Joystick", "line_number": 45, "usage_type": "call" }, { "api_name": "pygame.joystick", ...
35319939806
"""Chord URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based v...
mubasher117/chords
Chord/urls.py
urls.py
py
1,903
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 24, "usage_type": "call" }, { "api_name": "chords.views.index", "line_number": 24, "usage_type": "attribute" }, { "api_name": "chords.views", "line_number": 24, "usage_type": "name" }, { "api_name": "django.urls.pat...
40721502761
from flask import Blueprint, render_template, request from app.physical_properties.conversions import evaluate_scrhs from app.physical_properties.staticbhp import StaticBHP from app.physical_properties.pseudoreduced_properties import pseudo_reduced_temp, pseudo_reduced_wellhead_pressure from app.physical_properties.pse...
betiniakarandut/portfolio-project
static_bhp/app/views.py
views.py
py
2,485
python
en
code
0
github-code
21
[ { "api_name": "flask.Blueprint", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.request.form.get", "line_number": 24, "usage_type": "call" }, { "api_name": "flask.req...
5663042287
import discord import borgor import requests from discord.ext import commands from borgor import akatsukiapi from typing import Optional import config from datetime import datetime as dt import time from utils.const import GRADES class Osu(commands.Cog): def __init__(self, bot): self.bot = bot @comma...
atl128/Kali
cogs/osu.py
osu.py
py
3,507
python
en
code
0
github-code
21
[ { "api_name": "discord.ext.commands.Cog", "line_number": 13, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 13, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "confi...