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
8983073054
from datetime import datetime from typing import Optional, Union class Poll: """ Slot class for each Pool object. """ MAX_OPTIONS = 10 MIN_OPTIONS = 2 __slots__ = [ "_message_id", "_channel_id", "_question", "_options", "_date_created_at", "_us...
TheXer/Jachym
src/ui/poll.py
poll.py
py
1,559
python
en
code
11
github-code
36
[ { "api_name": "typing.Optional", "line_number": 28, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 29, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 29, "usage_type": "name" }, { "api_name": "datetime.datetime", ...
73224987304
# views.py from django.shortcuts import get_object_or_404 from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from calculator.models import Report from calculator.serializers import ReportSerializer, ReportCalculationSerializer import pandas as p...
StefKal/superdupertax
superdupertax/calculator/views.py
views.py
py
2,749
python
en
code
0
github-code
36
[ { "api_name": "calculator.models.Report.objects.all", "line_number": 18, "usage_type": "call" }, { "api_name": "calculator.models.Report.objects", "line_number": 18, "usage_type": "attribute" }, { "api_name": "calculator.models.Report", "line_number": 18, "usage_type": "n...
8086245877
#!/usr/bin/env python """ The file contains the class and methods for loading and aligning datasets """ from __future__ import print_function, division import pickle import numpy as np from scipy.io import loadmat import pandas as pd from .utils import p2fa_phonemes import warnings from collections import OrderedDict f...
codeislife99/Multimodal_Emotion_Analysis
mmdata/dataset.py
dataset.py
py
29,605
python
en
code
1
github-code
36
[ { "api_name": "sys.version_info", "line_number": 23, "usage_type": "attribute" }, { "api_name": "utils.p2fa_phonemes", "line_number": 45, "usage_type": "name" }, { "api_name": "pickle.load", "line_number": 70, "usage_type": "call" }, { "api_name": "pandas.read_csv...
34594770015
"""OpenAPI schema utility functions.""" from io import StringIO _DEFAULT_EXAMPLES = { "string": "string", "integer": 1, "number": 1.0, "boolean": True, "array": [], } _DEFAULT_STRING_EXAMPLES = { "date": "2020-01-01", "date-time": "2020-01-01T01:01:01Z", "password": "********", ...
sphinx-contrib/openapi
sphinxcontrib/openapi/schema_utils.py
schema_utils.py
py
4,446
python
en
code
103
github-code
36
[ { "api_name": "io.StringIO", "line_number": 119, "usage_type": "call" } ]
33006855107
import csv import io from nltk.tokenize import word_tokenize import sys reload(sys) sys.setdefaultencoding('ISO-8859-1') def findLowest(topWords): result = topWords.keys()[0] for word in topWords: if(topWords[word] < topWords[result]): result = word return result with io.open("old_tweets.csv", encoding = "IS...
Temirlan97/WhatTwitterFeels
wordBag/countWords.py
countWords.py
py
1,230
python
en
code
0
github-code
36
[ { "api_name": "sys.setdefaultencoding", "line_number": 7, "usage_type": "call" }, { "api_name": "io.open", "line_number": 16, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 19, "usage_type": "call" }, { "api_name": "nltk.tokenize.word_tokenize"...
25615151962
#!/usr/bin/env python # -*- coding:utf-8 -*- import os import pandas as pd from datetime import datetime from txt_table import txt_table import re # 将txt文件转化为csv def transfer_data(folder): #建立使用文件列表 filenames=[] filelist=[] filexlsx=[] #遍历文件寻找txt files=os.walk(folder) ...
hellboy1990/qixiang_explore
qixiang_check_v2.py
qixiang_check_v2.py
py
7,538
python
en
code
5
github-code
36
[ { "api_name": "os.walk", "line_number": 19, "usage_type": "call" }, { "api_name": "re.match", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_number": 28, "u...
73692412265
import copy import mock import testtools from stackalytics.processor import default_data_processor from stackalytics.processor import normalizer from stackalytics.tests.unit import test_data class TestDefaultDataProcessor(testtools.TestCase): def setUp(self): super(TestDefaultDataProcessor, self).setUp(...
Mirantis/stackalytics
stackalytics/tests/unit/test_default_data_processor.py
test_default_data_processor.py
py
7,360
python
en
code
12
github-code
36
[ { "api_name": "testtools.TestCase", "line_number": 11, "usage_type": "attribute" }, { "api_name": "mock.Mock", "line_number": 15, "usage_type": "call" }, { "api_name": "stackalytics.tests.unit.test_data.USERS", "line_number": 16, "usage_type": "attribute" }, { "ap...
40974261041
#Import libraries import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify #Database Connection engine = create_engine("sqlite:///Resources/hawaii.sqlite") #Map database Base = au...
AJ-Paine/10-Hawaii-Temperature-Exploration
app.py
app.py
py
3,710
python
en
code
0
github-code
36
[ { "api_name": "sqlalchemy.create_engine", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlalchemy.ext.automap.automap_base", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 21, "usage_type": "call" }, { "api_name...
323607876
"""added Client Favourite and product views Revision ID: bcc08ae9bed7 Revises: 399549c08a2a Create Date: 2020-01-24 22:55:04.098191 """ from alembic import op import sqlalchemy as sa import sqlalchemy_utils # revision identifiers, used by Alembic. revision = 'bcc08ae9bed7' down_revision = '399549c08a2a' branch_labe...
Dsthdragon/kizito_bookstore
migrations/versions/bcc08ae9bed7_added_client_favourite_and_product_views.py
bcc08ae9bed7_added_client_favourite_and_product_views.py
py
1,741
python
en
code
0
github-code
36
[ { "api_name": "alembic.op.create_table", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 22, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 23, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
20885862962
# flake8: noqa import nltk nltk.download("brown") nltk.download("names") import numpy as np import multiprocessing as mp import string import spacy import os os.system("python -m spacy download en_core_web_sm") from sklearn.base import TransformerMixin, BaseEstimator from normalise import normalise import pandas as ...
Lolik-Bolik/Hashing_Algorithms
utils/process_book.py
process_book.py
py
2,868
python
en
code
2
github-code
36
[ { "api_name": "nltk.download", "line_number": 5, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 6, "usage_type": "call" }, { "api_name": "os.system", "line_number": 13, "usage_type": "call" }, { "api_name": "sklearn.base.BaseEstimator", ...
7147825929
#!/usr/bin/env python3 import re import sys import linecache from pathlib import Path regex = re.compile('#?(.*)\s?=\s?(.*)') data = '' try: fpath = str(sys.argv[1]) if not Path(fpath).is_file(): raise Exception("file path is invalid or not a file") except: print("Error: file not provided or inval...
japtain-cack/docker-marid
files/configToRemco.py
configToRemco.py
py
1,338
python
en
code
0
github-code
36
[ { "api_name": "re.compile", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 16...
14049615322
from django.shortcuts import render from admin_dashboard.models import Review, Package from django.contrib import messages def home(request): reviews = Review.objects.all() packages = Package.objects.all() return render(request, 'index.html', { 'title': 'Home', 'reviews': reviews, ...
aniatki/pro-dad
homepage/views.py
views.py
py
709
python
en
code
0
github-code
36
[ { "api_name": "admin_dashboard.models.Review.objects.all", "line_number": 6, "usage_type": "call" }, { "api_name": "admin_dashboard.models.Review.objects", "line_number": 6, "usage_type": "attribute" }, { "api_name": "admin_dashboard.models.Review", "line_number": 6, "usa...
534546914
import pygame as p from Chess import ChessEngine, SmartMoveFinder, DataToLearn, VisualizData import time import xml.etree.ElementTree as gfg import os.path from Chess.DataTree import TreeNode WIDTH = HEIGHT = 512 DIMENSION = 8 SQ_SIZE = HEIGHT // DIMENSION MAX_FPS = 15 IMAGES = {} WHITE_PIECE_CAPTUED = [] BLACK_PIECE...
KaiBaeuerle/chessAI
Chess/ChessMain.py
ChessMain.py
py
16,775
python
en
code
0
github-code
36
[ { "api_name": "pygame.Rect", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.transform.scale", "line_number": 26, "usage_type": "call" }, { "api_name": "pygame.transform", "line_number": 26, "usage_type": "attribute" }, { "api_name": "pygame.image...
33865589189
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import datetime class Migration(migrations.Migration): dependencies = [ ('bot', '0007_bot_logo'), ] operations = [ migrations.CreateModel( name='Chat', fields...
DenerRodrigues/Chatterbot
bot/migrations/0008_chat.py
0008_chat.py
py
681
python
en
code
0
github-code
36
[ { "api_name": "django.db.migrations.Migration", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.migrations.CreateModel", "line_number": 15, "usage_type": "call" }, ...
40568030755
from __future__ import annotations import random from datetime import timedelta from typing import Type from game.theater import FrontLine from game.utils import Distance, Speed, feet from .capbuilder import CapBuilder from .invalidobjectivelocation import InvalidObjectiveLocation from .patrolling import PatrollingFl...
dcs-liberation/dcs_liberation
game/ato/flightplans/barcap.py
barcap.py
py
2,444
python
en
code
647
github-code
36
[ { "api_name": "patrolling.PatrollingFlightPlan", "line_number": 15, "usage_type": "name" }, { "api_name": "patrolling.PatrollingLayout", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Type", "line_number": 17, "usage_type": "name" }, { "api_name"...
7704128693
# -*- coding:utf-8 -*- """ Evluate the performance of embedding via different methods. """ import math import numpy as np from sklearn import metrics from sklearn import utils as sktools from sklearn.cluster import AgglomerativeClustering from sklearn.cluster import SpectralClustering from sklearn.linear_model impor...
Sngunfei/HSD
tools/evaluate.py
evaluate.py
py
5,117
python
en
code
3
github-code
36
[ { "api_name": "sklearn.cluster.AgglomerativeClustering", "line_number": 34, "usage_type": "call" }, { "api_name": "sklearn.metrics.homogeneity_completeness_v_measure", "line_number": 35, "usage_type": "call" }, { "api_name": "sklearn.metrics", "line_number": 35, "usage_ty...
21393775413
""" 5 element API Client """ from typing import Optional, Tuple from bgd.constants import FIFTHELEMENT from bgd.responses import GameSearchResult, Price from bgd.services.abc import GameSearchResultFactory from bgd.services.api_clients import GameSearcher, JsonHttpApiClient from bgd.services.base import CurrencyExchan...
ar0ne/bg_deal
bgd/services/apis/fifth_element.py
fifth_element.py
py
3,213
python
en
code
0
github-code
36
[ { "api_name": "bgd.services.api_clients.JsonHttpApiClient", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 20, "usage_type": "name" }, { "api_name": "bgd.services.constants.GET", "line_number": 24, "usage_type": "argument" }, ...
262396930
from bs4 import BeautifulSoup import requests import requests # request img from web import shutil # save img locally URL1 = 'http://localhost' page = requests.get(URL1) soup = BeautifulSoup(page.content, 'html.parser') print(soup.prettify()) image_tags = soup.find_all('img') for image_tag in image_tags: url = im...
FukudaYoshiro/singo
saudi/import image.py
import image.py
py
555
python
en
code
4
github-code
36
[ { "api_name": "requests.get", "line_number": 6, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 7, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "shutil.copyfileobj", "l...
16858290153
# Enter your code here. Read input from STDIN. Print output to STDOUT from collections import deque deq = deque() for i in range(int(input())): command = input().split() if command[0] == 'append': deq.append(command[1]) elif command[0] == 'appendleft': deq.appendleft(command[1]) elif c...
polemeest/daily_practice
hackerrank_deque.py
hackerrank_deque.py
py
490
python
en
code
0
github-code
36
[ { "api_name": "collections.deque", "line_number": 4, "usage_type": "call" } ]
7136369222
# -*- coding: utf-8 -*- # *************************************************** # * File : timefeatures.py # * Author : Zhefeng Wang # * Email : wangzhefengr@163.com # * Date : 2023-04-19 # * Version : 0.1.041901 # * Description : description # * Link : link # * Requirement : 相关模块版本需求...
wangzhefeng/tsproj
utils/timefeatures.py
timefeatures.py
py
17,505
python
en
code
0
github-code
36
[ { "api_name": "os.getcwd", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 18, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.path", "line_number":...
28297076587
#!/bin/python3 """ Creates new training data for all language directions (META_LANGS) according to META_RECIPES. This may take some time, but is written in a functional way, so the files are not loaded into memory in larger pieces. """ import file_utils from recipes import META_RECIPES import os import argparse par...
zouharvi/reference-mt-distill
src/create_data.py
create_data.py
py
1,805
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "recipes.META_RECIPES.items", "line_number": 34, "usage_type": "call" }, { "api_name": "recipes.META_RECIPES", "line_number": 34, "usage_type": "name" }, { "api_name"...
42218937553
import os import pandas as pd import time from pathlib import Path import shutil from bs4 import BeautifulSoup #loading all the files in the memory and parsing it using beautiful soap to get key financials #problem in reading coal india. #due to unrecognized encoding, it throws error #we add encoding="utf8" d...
santoshjsh/invest
nse_7.py
nse_7.py
py
2,312
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 22, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 31, "usage_type": "call" }, { "api_name": "pathlib.Path", "lin...
44675601513
import pysubs2 import pysrt archivo = 'subtitle.ass' subs = pysubs2.load(archivo, encoding='utf-8') for line in subs: print(line.text) textoplano = line.text texto = open('textoplano.txt', 'a') texto.write(textoplano) texto.close()
FukurOwl/subtitles_translate
load_files.py
load_files.py
py
260
python
es
code
0
github-code
36
[ { "api_name": "pysubs2.load", "line_number": 4, "usage_type": "call" } ]
17795055591
from typing import List class Solution: def highFive(self, items: List[List[int]]) -> List[List[int]]: items.sort(key=lambda x: (x[0], x[1])) ans = list() for i in range(len(items)): if i == len(items) - 1 or items[i][0] != items[i + 1][0]: temp = list() ...
fastso/learning-python
leetcode_cn/solved/pg_1086.py
pg_1086.py
py
569
python
en
code
0
github-code
36
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" } ]
72908308584
""" Чтобы решить данную задачу, можно воспользоваться алгоритмом поиска в ширину (BFS), так как он позволяет находить кратчайшие пути в графе с невзвешенными ребрами. В нашем случае города и дороги между ними образуют граф без весов на ребрах. """ from collections import deque # Функция для вычисления расстояния ме...
TatsianaPoto/yandex
ML & Programming/6_find_shortest_path.py
6_find_shortest_path.py
py
4,858
python
ru
code
0
github-code
36
[ { "api_name": "collections.deque", "line_number": 16, "usage_type": "call" } ]
43301216014
import py from rpython.flowspace.model import Constant from rpython.rtyper.lltypesystem import lltype from rpython.jit.codewriter.flatten import SSARepr, Label, TLabel, Register from rpython.jit.codewriter.flatten import ListOfKind, IndirectCallTargets from rpython.jit.codewriter.jitcode import SwitchDictDescr from rpy...
mozillazg/pypy
rpython/jit/codewriter/format.py
format.py
py
6,680
python
en
code
430
github-code
36
[ { "api_name": "rpython.jit.codewriter.flatten.Register", "line_number": 15, "usage_type": "argument" }, { "api_name": "rpython.flowspace.model.Constant", "line_number": 17, "usage_type": "argument" }, { "api_name": "rpython.rtyper.lltypesystem.lltype.Ptr", "line_number": 18, ...
14365200747
#Import dependencies import json import pandas as pd import numpy as np import re from sqlalchemy import create_engine import psycopg2 from config import db_password import time #Set file directory file_dir = '/Users/mariacarter/Desktop/Berkeley-Bootcamp/Analysis-Projects/Movies-ETL/Resources/' def process_ETL(wiki_m...
mcarter-00/Movies-ETL
challenge.py
challenge.py
py
15,363
python
en
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "lin...
3733422218
from argparse import Namespace from pandas.core.frame import DataFrame from app.command.sub_command import SubCommand from app.error.column_already_exists_error import ColumnAlreadyExistsError from app.error.column_not_found_error import ColumnNotFoundError class Add(SubCommand): def __init__(self, args: Namesp...
takenoco82/alter_csv
src/app/command/add.py
add.py
py
1,355
python
en
code
0
github-code
36
[ { "api_name": "app.command.sub_command.SubCommand", "line_number": 10, "usage_type": "name" }, { "api_name": "argparse.Namespace", "line_number": 11, "usage_type": "name" }, { "api_name": "pandas.core.frame.DataFrame", "line_number": 18, "usage_type": "name" }, { ...
71551407784
import matplotlib.pyplot as plt from sklearn.manifold import TSNE from textClustringAnalysis.feature.common import dict2Array, myTFIDF from textClustringAnalysis.feature.main import TC, TC_PCA, PCA from textClustringAnalysis.preprocessor.dataInfo import getWordCount if __name__ == '__main__': """ 当我们想要对高维数据进行...
bearbro/TextClusteringAnalysis
textClustringAnalysis/showdatafirst.py
showdatafirst.py
py
2,127
python
en
code
3
github-code
36
[ { "api_name": "textClustringAnalysis.preprocessor.dataInfo.getWordCount", "line_number": 17, "usage_type": "call" }, { "api_name": "textClustringAnalysis.feature.main.TC_PCA", "line_number": 20, "usage_type": "call" }, { "api_name": "sklearn.manifold.TSNE", "line_number": 21,...
35206645553
from django.contrib import admin from .models import * class CostInline(admin.TabularInline): model = Cost extra = 0 class CoordinatesAdmin(admin.ModelAdmin): list_display = ('latitude', 'longitude') class LanguageAdmin(admin.ModelAdmin): list_display = ('name', 'population') class CountryAdmin(admin....
borisovodov/np
app/admin.py
admin.py
py
4,586
python
en
code
0
github-code
36
[ { "api_name": "django.contrib.admin.TabularInline", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 6, "usage_type": "name" }, { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 10, "usage_type": "attribute"...
35809219103
#! python2 # -*- coding: utf-8 -*- import scrapy import csv import time from sys import exit import os import logging from scrapy import signals from . import wikimallbottodbmy import re #from scrapy.utils.log import configure_logging class WikimallbotSpider(scrapy.Spider): name = 'wikimallbot' allowed_do...
rizanurhadi/webscraping1
spiders/wikimallbot.py
wikimallbot.py
py
7,971
python
en
code
0
github-code
36
[ { "api_name": "scrapy.Spider", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.path.realpath", ...
69845996905
#!/usr/bin/env python import pika from pika.adapters import BlockingConnection from pika import BasicProperties #connection = BlockingConnection('172.20.14.192') connection = pika.BlockingConnection(pika.ConnectionParameters('172.20.14.192')) channel = connection.channel() client_params = {"x-ha-policy": "all"} exch...
appop/simple-test
createmessage/createqueue.py
createqueue.py
py
654
python
en
code
2
github-code
36
[ { "api_name": "pika.BlockingConnection", "line_number": 7, "usage_type": "call" }, { "api_name": "pika.ConnectionParameters", "line_number": 7, "usage_type": "call" } ]
6435166822
from collections import Counter def maketemp(l,h): templist = [] for i in range(l,h+1): templist.append(i) return templist def themode(lst): n = len(lst) data = Counter(lst) get_mode = dict(data) mode = [k for k, v in get_mode.items() if v == max(list(data.values()))] if len(mo...
DongjiY/Kattis
src/airconditioned.py
airconditioned.py
py
1,012
python
en
code
1
github-code
36
[ { "api_name": "collections.Counter", "line_number": 11, "usage_type": "call" } ]
30134924939
import numpy as np import datetime as dt import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func, and_ from flask import Flask, jsonify engine = create_engine("sqlite:///hawaii.sqlite") base = automap_base() base.prepare(engine,...
Emziicles/sqlalchemy-challenge
app.py
app.py
py
2,364
python
en
code
0
github-code
36
[ { "api_name": "sqlalchemy.create_engine", "line_number": 11, "usage_type": "call" }, { "api_name": "sqlalchemy.ext.automap.automap_base", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 19, "usage_type": "call" }, { "api_name...
2503764043
#!/usr/bin/env python # ********************* # webcam video stream # ********************* import time import cv2 # 0 - Dell Webcam # cap = cv2.VideoCapture('filename.avi') cap = cv2.VideoCapture(0) pTime = 0 while (cap.isOpened()): cTime = time.time() ret, frame = cap.read() if ret == True: fp...
ammarajmal/cam_pose_pkg
script/webcam.py
webcam.py
py
640
python
en
code
0
github-code
36
[ { "api_name": "cv2.VideoCapture", "line_number": 12, "usage_type": "call" }, { "api_name": "time.time", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.putText", "line_number": 20, "usage_type": "call" }, { "api_name": "cv2.FONT_HERSHEY_PLAIN", "...
4877559988
import os from fuzzywuzzy import fuzz from fuzzywuzzy import process import pandas data = pandas.read_csv('C:\\Users\\aruny\\Downloads\\ezyzip\\MusicApp\\songs.csv') data = data.to_dict('records') song_names = [i['name'] for i in data] dir = 'C:\playlist songs\Malayalam_sad_songs' files = os.listdir(dir) for song in ...
chmson/MusicApp_website
MusicApp/give_id.py
give_id.py
py
1,094
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 11, "usage_type": "call" }, { "api_name": "fuzzywuzzy.fuzz.ratio", "line_number": 20, "usage_type": "call" }, { "api_name": "fuzzywuzzy.fuzz", ...
10603730701
import argparse import time , datetime from pythonosc import udp_client if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--ip", default="127.0.0.1", help="The ip of the OSC server") parser.add_argument("--port", type=int, default=9000, help="The port the OSC server...
kakuchrome/OSCscript
timer.py
timer.py
py
968
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "pythonosc.udp_client.SimpleUDPClient", "line_number": 14, "usage_type": "call" }, { "api_name": "pythonosc.udp_client", "line_number": 14, "usage_type": "name" }, { "...
7410224509
from bs4 import BeautifulSoup import requests from selenium import webdriver import re import timeit url = "https://www.investing.com/equities/trending-stocks" driver = webdriver.Chrome(r"C:\Program Files\chromedriver.exe") driver.get(url) # x, stockPopularityData page = driver.page_source soup = BeautifulSoup(page, ...
SRI-VISHVA/WebScrapping
scrapping_73.py
scrapping_73.py
py
1,915
python
en
code
0
github-code
36
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 8, "usage_type": "name" }, { "api_name": "bs4.BeautifulSoup", "line_number": 13, "usage_type": "call" }, { "api_name": "re.finda...
1355556431
import pygame import os import time import random x = 100 y = 50 os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (x,y) width = 1640 height = 980 pygame.init() screen = pygame.display.set_mode((width, height)) white = (255, 255, 255) black = (0, 0, 0) random_color = (random.randint(0, 255), random.ra...
MagicLuxa/Python-Projects
sorting algorithms visualized.py
sorting algorithms visualized.py
py
4,028
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pygame.init", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 14, "usage_type": "call" }, { "api_name": "pygame.display", ...
37914230085
from pathlib import Path import json import plotly.express as px import numpy as np # Read data as a string and convert to a Python object. path = Path("eq_data/eq_data.geojson") contents = path.read_text(encoding="utf-8") all_eq_data = json.loads(contents) # Examine all the earthquakes in dataset all_eq_dicts = all...
hharpreetk/python-earthquake-data-viz
eq_explore_data.py
eq_explore_data.py
py
1,615
python
en
code
0
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.min", "line_number": 28,...
23413820054
# -*- coding: utf-8 -*- """ Create doc tree if you follows :ref:`Sanhe Sphinx standard <en_sphinx_doc_style_guide>`. """ from __future__ import print_function import json from pathlib_mate import PathCls as Path from .template import TC from .pkg import textfile class ArticleFolder(object): """ Represent...
MacHu-GWU/docfly-project
docfly/doctree.py
doctree.py
py
5,328
python
en
code
0
github-code
36
[ { "api_name": "pathlib_mate.PathCls", "line_number": 44, "usage_type": "call" }, { "api_name": "pathlib_mate.PathCls", "line_number": 51, "usage_type": "call" }, { "api_name": "pathlib_mate.PathCls", "line_number": 58, "usage_type": "call" }, { "api_name": "pathli...
16567280409
import tensorflow as tf import keras import numpy as np import matplotlib.pyplot as plt from keras.layers import Input, Dense, Lambda, InputLayer, concatenate, Dropout from keras.models import Model, Sequential from keras import backend as K from keras import metrics from keras.datasets import mnist from keras.utils i...
tirthasheshpatel/Generative-Models
vae.py
vae.py
py
3,413
python
en
code
0
github-code
36
[ { "api_name": "tensorflow.InteractiveSession", "line_number": 14, "usage_type": "call" }, { "api_name": "keras.backend.set_session", "line_number": 16, "usage_type": "call" }, { "api_name": "keras.backend", "line_number": 16, "usage_type": "name" }, { "api_name": ...
17079421444
from glob import glob from itertools import chain import logging from lib.language import canonicalize_tokens, clean_text, clean_tokens, tokenize_text from lib.language.types import TokenStream from lib.util import chain as chain_calls, extract_text logger = logging.getLogger(__name__) def tokenize_corpus(globby_p...
amy-langley/tracking-trans-hate-bills
lib/tasks/tokenize_corpus.py
tokenize_corpus.py
py
752
python
en
code
2
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "itertools.chain.from_iterable", "line_number": 15, "usage_type": "call" }, { "api_name": "itertools.chain", "line_number": 15, "usage_type": "name" }, { "api_name": "lib.u...
34922299042
""" shared dataloader for multiple issues must gurantee that a batch only has data from same issue but the batches can be shuffled """ import collections from more_itertools import more from numpy.core import overrides import torch from torch import tensor import torch.nn as nn import numpy as np from torch.utils.data...
xymou/Frame_Detection
myprompt/myprompt/data/share_dataloader.py
share_dataloader.py
py
7,930
python
en
code
1
github-code
36
[ { "api_name": "random.shuffle", "line_number": 40, "usage_type": "call" }, { "api_name": "torch.utils.data.dataset.Dataset", "line_number": 48, "usage_type": "name" }, { "api_name": "torch.utils.data.sampler.Sampler", "line_number": 60, "usage_type": "name" }, { "...
3327955898
import argparse import re _re_pattern_value_unit = r"^\s*(-?\d+(?:.\d+)?)\s*([a-zA-Z]*?[\/a-zA-Z]*)$" # this regex captures the following example normal(3s,1ms) with/without spaces between parenthesis and comma(s) # it's also able to capture the sample duration specified after the distribution e.g., normal(3s,1ms) H 2...
connets/tod-carla
src/args_parse/parser_utils.py
parser_utils.py
py
7,994
python
en
code
3
github-code
36
[ { "api_name": "re.compile", "line_number": 8, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 11, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 13, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 15, ...
35198885002
# -*- coding: utf-8 -*- """ Test to check api calls in in varonis assignment """ import json import pytest import requests URL = "http://localhost:8000" data = { "data": [{"key": "key1", "val": "val1", "valType": "str"}] } credentials_data = { "username": "test", "password": "1234" } wron...
eldar101/EldarRep
Python/Varonis/api_assignment/test_api.py
test_api.py
py
2,627
python
en
code
0
github-code
36
[ { "api_name": "requests.post", "line_number": 33, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 52, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 53, "usage_type": "call" }, { "api_name": "requests.post", "line_numbe...
2769961219
from weixin_api_two.api.contact.get_wework_token import WeworkToken from weixin_api_two.uitls.get_data import GetData import loguru class Tag(WeworkToken): def __init__(self): self.baseurl=GetData() self.log= loguru.logger self.tagurl=self.baseurl.get_UrlData('url','tag') self.add...
liwanli123/HogwartProjectPractice
weixin_api_two/api/externalcontact/tag_api.py
tag_api.py
py
2,429
python
en
code
0
github-code
36
[ { "api_name": "weixin_api_two.api.contact.get_wework_token.WeworkToken", "line_number": 6, "usage_type": "name" }, { "api_name": "weixin_api_two.uitls.get_data.GetData", "line_number": 9, "usage_type": "call" }, { "api_name": "loguru.logger", "line_number": 10, "usage_typ...
73520719463
from Functions import Functions from log import Log from webdriver import WebDriver import PySimpleGUI as sg import json class Main: def __init__(self): self.ind = 0 # Indice utilizado para acessar o json. self.log = Log() # Log de registro. self.url = Functions().Json('Collector', 'ur...
LucasAmorimDC/SeleniumCollector
Selenium_Collector/Main.py
Main.py
py
4,318
python
en
code
0
github-code
36
[ { "api_name": "log.Log", "line_number": 13, "usage_type": "call" }, { "api_name": "Functions.Functions", "line_number": 14, "usage_type": "call" }, { "api_name": "webdriver.WebDriver", "line_number": 15, "usage_type": "call" }, { "api_name": "Functions.Functions",...
38440361902
import requests from decouple import config from django.contrib.auth.decorators import login_required from django.shortcuts import render @login_required(login_url='/accounts/login/') def home(request): disk = requests.get(config("API") + 'disk_space._') load = requests.get(config("API") + 'system.load') ...
carlos-moreno/dashboard
dashboard/core/views.py
views.py
py
950
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" }, { "api_name": "decouple.config", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "decouple.config", "line_n...
28984839741
#! /usr/bin/env python import argparse import re import numpy as np def to_binary_string(value): """ Converts F or L to zeros, and B or R to 1 and interprets the string as a binary value >>> to_binary_string("FBFBBFF") ('0101100', 44) >>> to_binary_string("RLR") ('101', 5) :param value:...
SocialFinanceDigitalLabs/AdventOfCode
solutions/2020/kws/day_05.py
day_05.py
py
1,856
python
en
code
2
github-code
36
[ { "api_name": "re.sub", "line_number": 20, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 21, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 48, "usage_type": "call" }, { "api_name": "argparse.FileType", "line_n...
12514324819
import torch from torchtext.datasets import AG_NEWS from torchtext.data.utils import get_tokenizer from torchtext.vocab import build_vocab_from_iterator from torch.utils.data import DataLoader UNK = '<unk>' tok = get_tokenizer('basic_english') train_iter = AG_NEWS(split='train') def yield_tokens(data_iter, tokenizer...
moon0331/TorchTutorial
seq2seq.py
seq2seq.py
py
1,590
python
en
code
0
github-code
36
[ { "api_name": "torchtext.data.utils.get_tokenizer", "line_number": 9, "usage_type": "call" }, { "api_name": "torchtext.datasets.AG_NEWS", "line_number": 10, "usage_type": "call" }, { "api_name": "torchtext.vocab.build_vocab_from_iterator", "line_number": 16, "usage_type":...
2346859029
import numpy as np from PIL import Image # Goal: convert an image file from normal pixels to ANSI art made of dots "." # of same color with canvas-like color background # ANSI foreground color (n, 0-255) based on 256-bit -> \033[38;5;nm # ANSI background color (n, 0-255) based on 256-bit -> \033[48;5;nm # end with \0...
jakecharris/pointillism
source.py
source.py
py
2,172
python
en
code
0
github-code
36
[ { "api_name": "PIL.Image.open", "line_number": 17, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 17, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number":...
15771336312
import ctypes import typing as t from . import sdk from .enum import Result from .event import bind_events from .exception import get_exception from .model import UserAchievement class AchievementManager: _internal: sdk.IDiscordAchievementManager = None _garbage: t.List[t.Any] _events: sdk.IDiscordAchiev...
Maselkov/GW2RPC
gw2rpc/lib/discordsdk/achievement.py
achievement.py
py
3,610
python
en
code
47
github-code
36
[ { "api_name": "typing.List", "line_number": 13, "usage_type": "attribute" }, { "api_name": "typing.Any", "line_number": 13, "usage_type": "attribute" }, { "api_name": "event.bind_events", "line_number": 18, "usage_type": "call" }, { "api_name": "model.UserAchievem...
18665738715
import os, requests index_file_path = input("Enter Index file path with extension m3u8 : ") index_file = open(index_file_path,'r') indexes = index_file.read() index_file.close() output_file_path = input("Enter output file path : ") output_file = open(output_file_path,'wb') folder_path = input("Enter folder path ...
nkpro2000sr/m3u8ToVideo
m3u8tovideo.py
m3u8tovideo.py
py
952
python
en
code
1
github-code
36
[ { "api_name": "requests.get", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path", "line_number": 37, "usage_type": "attribute" } ]
36749002781
import cv2 thres = 0.45 # Threshold to detect object # hog = cv2.HOGDescriptor() # hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector()) # # cv2.startWindowThread() cap = cv2.VideoCapture(0) ### for IP CAM # cap = cv2.VideoCapture('rtsp://admin:admin@192.168.1.108/',apiPreference=cv2.CAP_FFMPEG) cap.set(...
Quant1766/detectObjects
main.py
main.py
py
1,420
python
en
code
0
github-code
36
[ { "api_name": "cv2.VideoCapture", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.dnn_DetectionModel", "line_number": 26, "usage_type": "call" }, { "api_name": "cv2.rectangle", "line_number": 39, "usage_type": "call" }, { "api_name": "cv2.putText", ...
30055768931
import argparse import numpy as np from Data import Data from Experiment import Experiment from FrameStackExperiment import FrameStackExperiment if __name__=='__main__': parser = argparse.ArgumentParser(description='Evaluate termination classifier performance') parser.add_argument('filepath', type=str, help=...
jwnicholas99/option-term-classifier
run.py
run.py
py
5,905
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "Data.Data", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 50, "usage_type": "call" }, { "api_name": "FrameStackExperiment.Fr...
17613252101
import plotly.plotly as py import plotly.graph_objs as go from pymongo import MongoClient import sys import networkx as nx import matplotlib.pyplot as plt import matplotlib from networkx.algorithms import approximation as approx from nxpd import draw from networkx.drawing.nx_agraph import graphviz_layout client = Mongo...
diaaahmed850/snaproject
diaa.py
diaa.py
py
5,831
python
en
code
0
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 11, "usage_type": "call" }, { "api_name": "pymongo.MongoClient", "line_number": 12, "usage_type": "call" }, { "api_name": "plotly.plotly.sign_in", "line_number": 52, "usage_type": "call" }, { "api_name": "plotly....
24486912101
""" Clean up of hail endpoint column in three steps: - remove unused staging column - remove now obsolete testing column - make hail_endpoint_production non null Revision ID: aa6d3d875f28 Revises: 8bd62cba881a Create Date: 2020-11-17 09:28:10.910999 """ from alembic import op import sqlalchemy as sa from sqlalchemy.d...
openmaraude/APITaxi
APITaxi_models2/migrations/versions/20201117_09:28:10_aa6d3d875f28_clean_hail_endpoints.py
20201117_09:28:10_aa6d3d875f28_clean_hail_endpoints.py
py
1,214
python
en
code
24
github-code
36
[ { "api_name": "alembic.op.drop_column", "line_number": 23, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 23, "usage_type": "name" }, { "api_name": "alembic.op.drop_column", "line_number": 24, "usage_type": "call" }, { "api_name": "alembic.op",...
15098306537
# # # import pandas as pd import geopandas as gpd from zipfile import ZipFile from pathlib import Path import sys,time def Read_Glob_Bldg( country_geojson ): CACHE = './PICKLE' DIR = Path( '/home/phisan/GeoData/GlobML_BldgFP' ) GEOJSON = DIR.joinpath( country_geojson ) STEM = GEOJSON.stem PICKLE ...
phisan-chula/Thai_Bldg_Model
BreakProv_Bldg.py
BreakProv_Bldg.py
py
2,944
python
en
code
0
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.read_pickle", "line_number": 20, "usage_type": "call" }, { "api_name": "geopandas.read_file", "line_number": 23, "usage_type": "call" }, { "api_name": "geopandas.read_fi...
73456512104
# -*- coding: utf-8 -*- # Time : 2023/10/5 22:53 # Author : QIN2DIM # GitHub : https://github.com/QIN2DIM # Description: import csv from dataclasses import dataclass, field from pathlib import Path from typing import List class Level: first = 1 second = 2 third = 3 fourth = 4 fifth =...
QIN2DIM/hysterical_ticket
hysterical_ticket/component/bingo_ssq.py
bingo_ssq.py
py
3,044
python
en
code
3
github-code
36
[ { "api_name": "typing.List", "line_number": 58, "usage_type": "name" }, { "api_name": "dataclasses.field", "line_number": 72, "usage_type": "call" }, { "api_name": "dataclasses.field", "line_number": 73, "usage_type": "call" }, { "api_name": "dataclasses.field", ...
5511991110
import os from re import M, search from unicodedata import category import requests import json import psycopg2 import itertools from flask import Flask, render_template, request, flash, redirect, session, g, jsonify,url_for,abort from sqlalchemy.exc import IntegrityError from forms import LoginForm, UserAddForm, P...
MITHIRI1/Capstone-Project-1
app.py
app.py
py
8,123
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 19, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 22, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line...
32058791507
from datetime import datetime from binance_functions.client_functions.binance_client import CreateClient from decouple import config from settings.bot_settings import * from multiprocessing import Pool import timeit import json class HistoricalData: def __init__(self): if config('API_KEY') != None and con...
turancan-p/binance-trade-bot
collecting_functions/historical_data.py
historical_data.py
py
2,183
python
en
code
25
github-code
36
[ { "api_name": "decouple.config", "line_number": 12, "usage_type": "call" }, { "api_name": "decouple.config", "line_number": 13, "usage_type": "call" }, { "api_name": "decouple.config", "line_number": 14, "usage_type": "call" }, { "api_name": "binance_functions.cli...
6318280878
# -*- coding: utf-8 -*- """ Created on Tue Jan 15 12:38:24 2019 @author: MHozayen Simple Linear Regression Weighted Linear Regression is commented out """ # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd def predict(x, y, pred): #degree is u...
mohamedhozayen/Diabetes-Analytics-Engine
Joe_Deliverable/LR.py
LR.py
py
772
python
en
code
0
github-code
36
[ { "api_name": "numpy.ones", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.flip", "line_number": 24, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 29, "usage_type": "call" } ]
3465936756
import json, requests, subprocess, sys, yaml from pip._vendor.distlib.compat import raw_input class JiraClient(): board_status_to_env = {"Ready to Deploy": "QAX", "QAX Done": "STGX", "StgX Done": "PROD-EU", "Prod EU Done": "PROD-US"...
mulesoft-labs/popeye
JiraClient.py
JiraClient.py
py
9,957
python
en
code
1
github-code
36
[ { "api_name": "requests.post", "line_number": 31, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 31, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 40, "usage_type": "call" }, { "api_name": "requests.post", "line_numbe...
6637403650
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render, HttpResponse # Create your views here. def home_view(request): if request.user.is_authenticated(): context = { 'isim': 'Emine' } else: context = { 'isim': 'Gues...
emineksknc/veterinerim
home/views.py
views.py
py
382
python
en
code
0
github-code
36
[ { "api_name": "django.shortcuts.render", "line_number": 17, "usage_type": "call" } ]
34647682320
from pathlib import Path from uuid import uuid4 from django.core.validators import FileExtensionValidator from django.db.models import ( CASCADE, CharField, DateField, FileField, ForeignKey, IntegerChoices, IntegerField, Model, TextField, URLField, ) from django.utils.translatio...
cuducos/fio-de-ariadne
web/core/models.py
models.py
py
2,873
python
en
code
78
github-code
36
[ { "api_name": "uuid.uuid4", "line_number": 21, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 22, "usage_type": "call" }, { "api_name": "django.db.models.Model", "line_number": 25, "usage_type": "name" }, { "api_name": "django.db.models.Integ...
25353856217
import http.server import socketserver import cgi import pymongo import json import bcrypt import secrets import hashlib import base64 from datetime import datetime, timedelta import helperFunction as helper SOCKET_GUID = b'258EAFA5-E914-47DA-95CA-C5AB0DC85B11' TEXT_FRAME = 1 OPCODE_MASK = 0b00001111 PAYLOAD_LEN_MASK ...
jackyzhu209/312-Project
website/httpserver.py
httpserver.py
py
27,742
python
en
code
0
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 28, "usage_type": "call" }, { "api_name": "helperFunction.gen_project_post_html_asbytes", "line_number": 48, "usage_type": "call" }, { "api_name": "helperFunction.get_mimetype", "line_number": 95, "usage_type": "call" ...
36402183870
from datetime import datetime, timedelta date_format = "%d.%m.%Y" print("Laenukalkulaator") amount = None while amount is None: try: amount = int(input("laenusumma (täisarv): ")) if amount <= 0: print("Sisestatud väärtus peab olema suurem kui 0") amount = None except ...
marianntoots/Programmeerimine_2021
laenukalkulaator.py
laenukalkulaator.py
py
3,000
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.strptime", "line_number": 47, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 47, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 68, "usage_type": "call" }, { "api_name": "dateti...
2909760362
import streamlit as st import leafmap.kepler as leafmap import geopandas as gpd def app(): st.title("Kaavoitetut rakennukset tyypeittäin") st.markdown( """ Väritä, visualisoi ja filtteröi aineistoa kartan vasemmasta yläkulmasta avautuvan työkalupakin avulla. """ ) m = leafmap.Map(ce...
SanttuVP/SpatialPlanning_vizualization_streamlit
apps/rakennustyypit.py
rakennustyypit.py
py
1,216
python
fi
code
0
github-code
36
[ { "api_name": "streamlit.title", "line_number": 7, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 9, "usage_type": "call" }, { "api_name": "leafmap.kepler.Map", "line_number": 16, "usage_type": "call" }, { "api_name": "leafmap.kepler", ...
20484377775
from collections import Counter # initializing string test_str = "aabbbccde" # using collections.Counter() to get # count of each element in string res = Counter(test_str) # valuesList = list(res.values()) # # printing result # str1 = str(res) print(res) keysList = list(res.keys()) print(keysList) # pri...
prathammodi333/python-programs
pr1.py
pr1.py
py
407
python
en
code
0
github-code
36
[ { "api_name": "collections.Counter", "line_number": 8, "usage_type": "call" } ]
34987945802
import sqlite3 import re from gcpTalent import create_company def sanitize_company_name(input_string): # Replace spaces with underscores sanitized_string = input_string.replace(' ', '_') # Remove special characters using regular expression sanitized_string = re.sub(r'[^a-zA-Z0-9_]', '', sanitized...
LoganOneal/job-scraper
gcp-talent/createCompanies.py
createCompanies.py
py
1,099
python
en
code
0
github-code
36
[ { "api_name": "re.sub", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 19, "usage_type": "call" }, { "api_name": "gcpTalent.create_company", "line_number": 40, "usage_type": "call" } ]
70606642025
import os import sys # 在linux会识别不了包 所以要加临时搜索目录 curPath = os.path.abspath(os.path.dirname(__file__)) rootPath = os.path.split(curPath)[0] sys.path.append(rootPath) import pandas as pd import pymysql from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from clickhouse_sqlalchemy import make_sessio...
cgyPension/pythonstudy_space
05_quantitative_trading_hive/util/DBUtils.py
DBUtils.py
py
6,392
python
en
code
7
github-code
36
[ { "api_name": "os.path.abspath", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path.split", "line_n...
30222648461
import torch.nn as nn class RPN(nn.Module): def __init__(self, input_channels, anchor_count): super(RPN, self).__init__() self.ContainsObjectClassifier = nn.Conv2d( in_channels = input_channels, out_channels = 2*anchor_count, kernel_size = 1, stride = 1, padding = 0) self.RegionRegressor = n...
jday96314/Kuzushiji
ImageProcessing/DualNetworkApproach/RegionProposal/RPN.py
RPN.py
py
1,450
python
en
code
0
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 3, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 3, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.nn", "line_numbe...
20736597554
import random import datetime st = datetime.datetime.now() tai_moji = 10 # 対象文字数 ke_moji = 2 # 欠損文字数 chance = 2 # 試行回数 def shutudai(alh): moji = random.sample(alh, tai_moji) print("対象文字", end = " ") for i in moji: print(i, end = " ") print() nai_moji = random.sample(moji, ke_moji) p...
c0b2108596/ProjExD
ex01/alphabet.py
alphabet.py
py
1,363
python
ja
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 3, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 3, "usage_type": "attribute" }, { "api_name": "random.sample", "line_number": 9, "usage_type": "call" }, { "api_name": "random.sample...
20715607582
# HAPPY NEW YEAR... or something. import re from collections import defaultdict from itertools import repeat DIRECTIONS = { 'se': (.5, 1), 'sw': (-.5, 1), 'nw': (-.5, -1), 'ne': (.5, -1), 'e': (1, 0), 'w': (-1, 0), } def find_tile(reference): reference = re.findall('se|sw|nw|ne|e|w', refer...
jonassjoh/AdventOfCode
2020/24/day24.py
day24.py
py
1,682
python
en
code
0
github-code
36
[ { "api_name": "re.findall", "line_number": 16, "usage_type": "call" }, { "api_name": "itertools.repeat", "line_number": 25, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 30, "usage_type": "call" } ]
22840825846
import cv2 from skimage.measure import ransac from skimage.transform import ProjectiveTransform, AffineTransform import numpy as np class FeatureExtractor(object): def __init__(self, orbParam): self.kpData = [] self.orb = cv2.ORB_create(orbParam) def computeKpData(self, img): kp, des ...
naurunnahansa/SLAM_implementation
featureExtractor.py
featureExtractor.py
py
1,856
python
en
code
1
github-code
36
[ { "api_name": "cv2.ORB_create", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.BFMatcher", "line_number": 22, "usage_type": "call" }, { "api_name": "cv2.NORM_HAMMING", "line_number": 22, "usage_type": "attribute" }, { "api_name": "numpy.float32", ...
44649010863
#!/usr/bin/env python # coding: utf-8 import warnings warnings.filterwarnings("ignore") import numpy as np import os import pandas as pd from divexplorer_generalized.FP_Divergence import FP_Divergence DATASET_DIRECTORY = os.path.join(os.path.curdir, "datasets") # # Import data def abbreviateValue(value, abbrevia...
elianap/h-divexplorer
run_experiments_pruning.py
run_experiments_pruning.py
py
11,632
python
en
code
2
github-code
36
[ { "api_name": "warnings.filterwarnings", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "import_process_datas...
20112154408
import argparse import tflearn import numpy as np from processsing import Processing from training import Training class Prediction(): def __init__(self): # Construct the Neural Network classifier and start the learning phase training = Training() net = training.buildNN() self.mod...
Pierre-Assemat/DeepPoseIdentification
predictions/WorkInProgress/prediction_tflearn.py
prediction_tflearn.py
py
1,534
python
en
code
0
github-code
36
[ { "api_name": "training.Training", "line_number": 12, "usage_type": "call" }, { "api_name": "training.buildNN", "line_number": 13, "usage_type": "call" }, { "api_name": "tflearn.DNN", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "lin...
17364039643
# Imports from Third Party Modules from bs4 import BeautifulSoup from urllib2 import urlopen BASE_URL = "http://www.portlandhikersfieldguide.org" REGIONS = ['Gorge', 'Mount Hood', 'Central OR', 'OR Coast', 'East OR', 'South OR', 'Portland', 'SW WA', 'WA Coast'] REGION_INDEXS = [ 'http://www.portlandhike...
RAINSoftwareTech/hiketheplanet
backend/datascrape.py
datascrape.py
py
5,124
python
en
code
1
github-code
36
[ { "api_name": "urllib2.urlopen", "line_number": 29, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 30, "usage_type": "call" } ]
74332806822
from time import sleep import traceback from django.forms import model_to_dict from django.shortcuts import redirect, render from .models import Transaction from .form.CreateTransactionForm import CreateTransactionForm from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from F...
edwinlowxh/CZ3002---Advanced-Software-Engineering
FinApp/Transaction/views.py
views.py
py
12,542
python
en
code
0
github-code
36
[ { "api_name": "constants.START_DATE_QUERY_PARAM", "line_number": 48, "usage_type": "argument" }, { "api_name": "constants.END_DATE_QUERY_PARAM", "line_number": 49, "usage_type": "argument" }, { "api_name": "constants.INCOME_TABLE_HEADER", "line_number": 50, "usage_type": ...
34116401936
''' Detects a grid. ''' import ujson import cv2 from math import floor from operator import itemgetter from argparse import ArgumentParser from pytesseract import image_to_string parser = ArgumentParser(description = 'Detect grid.') parser.add_argument( "-f", "--filename", dest = "filename", help = "filename prefi...
pumpncode/mimoai
read-game.py
read-game.py
py
12,747
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 37, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 38, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", ...
74172105702
import math import centrosome.outline import numpy import numpy.testing import pytest import skimage.measure import skimage.segmentation import cellprofiler_core.image import cellprofiler_core.measurement from cellprofiler_core.constants.measurement import ( EXPERIMENT, COLTYPE_FLOAT, C_LOCATION, ) impo...
BodenmillerGroup/ImcPluginsCP
tests/test_measureobjectintensitymultichannel.py
test_measureobjectintensitymultichannel.py
py
20,306
python
en
code
10
github-code
36
[ { "api_name": "cellprofiler_core.image.preferences.set_headless", "line_number": 24, "usage_type": "call" }, { "api_name": "cellprofiler_core.image.preferences", "line_number": 24, "usage_type": "attribute" }, { "api_name": "cellprofiler_core.image", "line_number": 24, "u...
198052217
from django.views import generic from digifarming.models import User, Staff, Rating, \ RequestType, Commodity, Supply, \ Order, OrderItem, UserTrackingMovements, HarvestDispatch,FacilityType, Facility, \ JobTitle, JobShift, ArrivalView, DepartureView, CancellationView, \ TransportCategory, TransportTyp...
gatirobi/digifarming
digifarming/digifarming/views.py
views.py
py
53,254
python
en
code
0
github-code
36
[ { "api_name": "django.views.generic.ListView", "line_number": 59, "usage_type": "attribute" }, { "api_name": "django.views.generic", "line_number": 59, "usage_type": "name" }, { "api_name": "digifarming.models.ArrivalView", "line_number": 62, "usage_type": "name" }, {...
19288984909
import tensorflow as tf import numpy as np from dataset import get_dataset, get_rotation_augmentor, get_translation_augmentor from model import build_model AUTOTUNE = tf.data.experimental.AUTOTUNE dataset, num_classes = get_dataset() model = build_model(num_classes) model.load_weights('./saved_weights/weights') rn...
wdecay/ShapeClassification
test_model.py
test_model.py
py
640
python
en
code
0
github-code
36
[ { "api_name": "tensorflow.data", "line_number": 7, "usage_type": "attribute" }, { "api_name": "dataset.get_dataset", "line_number": 9, "usage_type": "call" }, { "api_name": "model.build_model", "line_number": 11, "usage_type": "call" }, { "api_name": "model.load_w...
6163296593
''' Classe wordCloudGenerator que a partir de um conjunto de token gera uma nuvem de palavra Argumentos: text: lista de token (preferencilmente geradas pela classe pdfReader) (OBRIGATORIO) max_font_size: tamanho maximo das palavras na nuvem max_words: numero maximo de palavras na nuvem background_color: color de fundo...
InfoEduc/Automatizando-Pesquisas-Bibliometricas
wordCloudGenerator.py
wordCloudGenerator.py
py
1,515
python
pt
code
1
github-code
36
[ { "api_name": "wordcloud.WordCloud", "line_number": 20, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.imshow", "line_number": 24, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 24, "usage_type": "name" }, { "api_name": "matplo...
18518883640
import random from multiprocessing import Pool from ai_player import Ai_player from deck import Deck class Population: """ blackjack Ai player population """ POPULATION_SIZE = 400 BJ_ROUNDS = 50000 PARENT_SIZE = 5 MAX_THREADS = 40 # most efficient def __init__(self): def...
BenPVandenberg/blackjack-ai
Dustin_Marks/population.py
population.py
py
2,112
python
en
code
1
github-code
36
[ { "api_name": "ai_player.Ai_player", "line_number": 19, "usage_type": "call" }, { "api_name": "random.choices", "line_number": 34, "usage_type": "call" }, { "api_name": "ai_player.Ai_player", "line_number": 39, "usage_type": "call" }, { "api_name": "ai_player.Ai_p...
38608858024
# -*- coding: utf-8 -*- """ Created on Sun Feb 11 22:34:18 2018 @author: Roshan Zameer Syed ID : 99999-2920 Description : Multivariate linear regression and backward elimination """ # Reading the dataset import pandas as pd data = pd.read_csv('Advertising.csv') # Feature and response matrix X = data.iloc[:,[1,2,3]]....
syedroshanzameer/Machine-Learning
Multi-variate Linear Regression/multiRegression.py
multiRegression.py
py
1,600
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 19, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 23, "usage_type": "call" ...
42245347977
#!/usr/bin/python # noinspection PyUnresolvedReferences import json import requests from yoctopuce.yocto_api import * from yoctopuce.yocto_display import * from yoctopuce.yocto_anbutton import * display_list = [] class SimpleXMBC(object): def __init__(self, host, port, user, password): self._password = ...
yoctopuce-examples/xbmc_remote
xbmc_remote.py
xbmc_remote.py
py
6,386
python
en
code
0
github-code
36
[ { "api_name": "requests.post", "line_number": 31, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 32, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 76, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 8...
10167749049
from socket_webserver import Socketserver import json # Creating server instance server = Socketserver() # Configuring host and port server.host = '127.0.0.1' server.port = 8080 """ Two example functions to return response. Upper one returns simple json response and lower one returns html response You could cre...
miikalehtonen/pywebserver
main.py
main.py
py
963
python
en
code
0
github-code
36
[ { "api_name": "socket_webserver.Socketserver", "line_number": 5, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 31, "usage_type": "call" } ]
10625869502
from typing import List from eth_vertigo.incremental.store import MutationRecord, IncrementalMutationStore from eth_vertigo.core import Mutation class IncrementalRecorder: def record(self, mutations: List[Mutation]) -> IncrementalMutationStore: store = IncrementalMutationStore() store.known_mutat...
JoranHonig/vertigo
eth_vertigo/incremental/record.py
record.py
py
958
python
en
code
180
github-code
36
[ { "api_name": "typing.List", "line_number": 8, "usage_type": "name" }, { "api_name": "eth_vertigo.core.Mutation", "line_number": 8, "usage_type": "name" }, { "api_name": "eth_vertigo.incremental.store.IncrementalMutationStore", "line_number": 9, "usage_type": "call" }, ...
6301592120
# !/user/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/5/12 21:11 # @Author : chineseluo # @Email : 848257135@qq.com # @File : run.py # @Software: PyCharm import os from Common.publicMethod import PubMethod import logging from selenium.webdriver.common.by import By from Base.baseBy import BaseBy pub_...
chineseluo/app_auto_frame_v1
ActivityObject/elemParams.py
elemParams.py
py
5,248
python
en
code
11
github-code
36
[ { "api_name": "Common.publicMethod.PubMethod", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.jo...
24300694321
from pyspark import SparkContext, SparkConf from pyspark.sql import SQLContext, DataFrame from pyspark.sql.functions import lit from pyspark.sql.functions import split, explode, monotonically_increasing_id import numpy as np from numpy import linalg as LA from scipy.sparse import csr_matrix import json import datetim...
SebasAndres/Recomendadores
src/sar/models/sar.py
sar.py
py
8,299
python
en
code
0
github-code
36
[ { "api_name": "sar.models.elastic.ElasticHelper", "line_number": 28, "usage_type": "call" }, { "api_name": "tqdm.notebook.trange", "line_number": 48, "usage_type": "call" }, { "api_name": "tqdm.notebook.trange", "line_number": 78, "usage_type": "call" }, { "api_na...
22771811138
# -*- coding: utf-8 -*- # This file is part of CFVVDS. # # CFVVDS is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # ...
swak/cardfight-vanguard-vds
printer.py
printer.py
py
3,420
python
en
code
0
github-code
36
[ { "api_name": "wx.Printout", "line_number": 22, "usage_type": "attribute" }, { "api_name": "wx.Printout.__init__", "line_number": 24, "usage_type": "call" }, { "api_name": "wx.Printout", "line_number": 24, "usage_type": "attribute" }, { "api_name": "wx.Font", ...
31141721992
''' Analyse observation basket ''' import argparse import joblib import pandas as pd import apriori import helpers from rules import RuleGenerator parser = argparse.ArgumentParser(description='Convert Halias RDF dataset for data mining') parser.add_argument('minsup', help='Minimum support', nargs='?', type=float, de...
razz0/DataMiningProject
src/observation_basket_analysis.py
observation_basket_analysis.py
py
1,225
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "apriori.NUM_CORES", "line_number": 17, "usage_type": "attribute" }, { "api_name": "helpers.read_observation_basket", "line_number": 22, "usage_type": "call" }, { "ap...
36808206999
import os import copy from typing import Dict, Union from torch.utils.data import Dataset import torchio as tio from .subject_loaders import SubjectLoader from .subject_filters import SubjectFilter, ComposeFilters class SubjectFolder(Dataset): """ A PyTorch Dataset for 3D medical data. Args: root: ...
efirdc/Segmentation-Pipeline
segmentation_pipeline/data_processing/subject_folder.py
subject_folder.py
py
9,208
python
en
code
1
github-code
36
[ { "api_name": "torch.utils.data.Dataset", "line_number": 12, "usage_type": "name" }, { "api_name": "subject_loaders.SubjectLoader", "line_number": 38, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 39, "usage_type": "name" }, { "api_name": "su...
38406688388
import pandas as pd import matplotlib.pyplot as plt import re # regular expression df = pd.read_csv('./csv/Travel details dataset.csv') # drop the rows with missing values df = df.dropna() # [OPTIONAL] pick country name only after the comma df['Destination'] = df['Destination'].apply(lambda x: x.split(', ')[1] if ',...
mbenkzz/pyt11kelompok13
functions.py
functions.py
py
4,955
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 5, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 15, "usage_type": "call" }, { "api_name": "re.compile", ...
19150508999
import tensorflow as tf from .util.datasetUtil import dataset , filelength from tensorflow.keras.applications import VGG16,VGG19 ,InceptionV3 from .util.Callbacks import CustomCallback import datetime class inference_load(): def __init__(self,params,csvPath): print(params) self.csvPath = './dataset...
kococo-code/Tensorflow_Automatic_Training
server/api/inference/model.py
model.py
py
4,512
python
en
code
1
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 23, "usage_type": "attribute" }, { "api_name": "tensorflow.keras.applications.VGG16", "line_number": 30, "usage_type": "call" }, { "...
4822893898
import base64 import sys from github import Github ACCESS_TOKEN = '' REPO_NAME = '' ACCESS_TOKEN = sys.argv[1] REPO_NAME = sys.argv[2] g = Github(ACCESS_TOKEN) repo = g.get_repo(REPO_NAME) contents = repo.get_contents("/README.md") contents_bkp = repo.get_contents("/docs/README.md") base = contents.content base = b...
BobAnkh/LinuxBeginner
scripts/sync.py
sync.py
py
697
python
en
code
6
github-code
36
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "github.Github", "line_number": 11, "usage_type": "call" }, { "api_name": "base64.b64decode", "line_...
16921327452
#!/usr/bin/env python3 """ Advent of Code 2022 - Elf Rucksack Reorganization A given rucksack always has the same number of items in each of its two compartments Lowercase item types a through z have priorities 1 through 26. Uppercase item types A through Z have priorities 27 through 52. Find the item type that appe...
CristiGuijarro/NN-aoc-2022
scripts/elf_rucksack_priorities.py
elf_rucksack_priorities.py
py
3,390
python
en
code
0
github-code
36
[ { "api_name": "typing.List", "line_number": 55, "usage_type": "name" }, { "api_name": "argparse.ArgumentParser", "line_number": 70, "usage_type": "call" } ]
26409439119
class Solution: def topKFrequent(self, words: List[str], k: int) -> List[str]: dict = {} res = [] lista = [] #哈哈!这个是我自己写的hash table计算单词出现的频率 牛逼吧 #但是性能没下面的好嘻嘻 ''' for i in words: dict[i]=len([x for x in words if x == i]) ''' ...
lpjjj1222/leetcode-notebook
692. Top K Frequent Words.py
692. Top K Frequent Words.py
py
1,460
python
zh
code
0
github-code
36
[ { "api_name": "collections.Counter", "line_number": 19, "usage_type": "call" } ]