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
37291173233
#!/usr/bin/env python ''' zeromq server example. One front facing server and three workers are instantiated. Front facing server accepts connections from multiple clients and distributes computation requests among workers. Also it collects computed results from workers and send the result back to the ori...
son98vg/process-manager
server.py
server.py
py
4,168
python
en
code
0
github-code
7
[ { "api_name": "zmq.Context", "line_number": 33, "usage_type": "call" }, { "api_name": "zmq.ROUTER", "line_number": 41, "usage_type": "attribute" }, { "api_name": "zmq.DEALER", "line_number": 45, "usage_type": "attribute" }, { "api_name": "zmq.device", "line_nu...
4385543796
# Databricks notebook source from azure.storage.blob import BlobServiceClient import os import pandas as pd from pyspark.sql.types import StructField, StructType, StringType connection_string = "<connection_string>" service = BlobServiceClient.from_connection_string(conn_str=connection_string) # COMMAND ---------- v...
fernandodelago/Python
delete_file_on_blob.py
delete_file_on_blob.py
py
1,862
python
en
code
0
github-code
7
[ { "api_name": "azure.storage.blob.BlobServiceClient.from_connection_string", "line_number": 8, "usage_type": "call" }, { "api_name": "azure.storage.blob.BlobServiceClient", "line_number": 8, "usage_type": "name" } ]
26406712408
import os from setuptools import setup, find_packages version = "0.1.0" requirements_file = 'requirements.txt' with open(requirements_file) as f: install_requires = f.read().splitlines() setup(name="deepmeme", packages=find_packages(), version=version, description="Package for accessing the clus...
dogeplusplus/DeepMeme
setup.py
setup.py
py
808
python
en
code
0
github-code
7
[ { "api_name": "setuptools.setup", "line_number": 11, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 12, "usage_type": "call" } ]
34543895013
import os import time import traceback from pyChaining import Chains from progress_utils_xh import ProgressPinger from kafka import KafkaAdminClient from kafka.admin import NewTopic if __name__ == '__main__': print(os.environ, flush=True) brokers = os.getenv("hosts") print("Broker from env: ", brokers, f...
kafka-study-findings/programming-example
topic-creator/main.py
main.py
py
1,764
python
en
code
0
github-code
7
[ { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.getenv", "line_number": 13, "usage_type": "call" }, { "api_name": "pyChaining.Chains.of", "line_number": 22, "usage_type": "call" }, { "api_name": "pyChaining.Chains", ...
73464088222
import json from collections import Counter import timeit data_file = open('data.json') data = json.load(data_file) starttime = timeit.default_timer() status_list = [] piece_list = [] start_time_list = [] for item in data: piece_list.append(item["piece_id"]) status_list.append(item["status"]) start_time...
ausbrumm/Interview-Questions
question5.py
question5.py
py
1,659
python
en
code
0
github-code
7
[ { "api_name": "json.load", "line_number": 6, "usage_type": "call" }, { "api_name": "timeit.default_timer", "line_number": 8, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 63, "usage_type": "call" }, { "api_name": "timeit.default_timer...
71933592863
import re from django.conf import settings from django.contrib.auth import load_backend from django.core.exceptions import ImproperlyConfigured, PermissionDenied SESSION_KEY = '_auth_user_id' BACKEND_SESSION_KEY = '_auth_user_backend' HASH_SESSION_KEY = '_auth_user_hash' def get_user(request): from django.contr...
arcanoix/alondracms
alondra/src/user/__init__.py
__init__.py
py
726
python
en
code
0
github-code
7
[ { "api_name": "django.conf.settings.AUTHENTICATION_BACKENDS", "line_number": 17, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 17, "usage_type": "name" }, { "api_name": "django.contrib.auth.load_backend", "line_number": 18, "usage_type"...
16127808054
from seminars.app import app from seminars import db from seminars.categories import categories from flask import render_template, request import datetime from lmfdb.utils import ( SearchArray, TextBox, SelectBox, YesNoBox, to_dict, search_wrap, ) class SemSearchArray(SearchArray): noun = "seminar" ...
alexjbest/seminars
seminars/homepage/main.py
main.py
py
3,101
python
en
code
null
github-code
7
[ { "api_name": "lmfdb.utils.SearchArray", "line_number": 14, "usage_type": "name" }, { "api_name": "lmfdb.utils.SelectBox", "line_number": 18, "usage_type": "call" }, { "api_name": "seminars.categories.categories", "line_number": 21, "usage_type": "name" }, { "api_...
31975811187
# -*- coding: utf-8 -*- # --------------------------------- # # Author: Anemily Sippola # # Python Version: 3.10.4 # # Created on: 2023-01-31 # # --------------------------------- # """ Essentially just wraps an actual model and outputs the loss and predictions """ import torch from ...
vsippola/nmle_ML_tools
models/definition/singleclass_classification.py
singleclass_classification.py
py
2,383
python
en
code
0
github-code
7
[ { "api_name": "custom_nn_module.CustomNNModule", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.no_grad", "line_number": 64, "usage_type": "call" }, { "api_name": "torch.nn.functional.softmax", "line_number": 70, "usage_type": "call" }, { "api_nam...
39781074893
from flask import Blueprint, redirect, request, jsonify from app.models import db, User, Post, Comment, FriendRequest from flask_login import current_user from app.forms import FriendForm from sqlalchemy import or_, and_ friend_routes = Blueprint('requests', __name__, url_prefix="/requests") @friend_routes.route('')...
Waseemalame/Phasebook
app/api/friend_routes.py
friend_routes.py
py
2,601
python
en
code
0
github-code
7
[ { "api_name": "flask.Blueprint", "line_number": 8, "usage_type": "call" }, { "api_name": "app.models.User.query.join", "line_number": 12, "usage_type": "call" }, { "api_name": "app.models.FriendRequest", "line_number": 12, "usage_type": "argument" }, { "api_name":...
32389318133
# -*- coding: utf-8 -*- """ Created on Tue Jan 31 15:35:55 2023 @author: chggo """ import matplotlib.pyplot as plt import matplotlib.colors as mcolors import cv2 import numpy as np import os import math class ProcessImages(): def __init__(self,dumpImg,resultPath,gamma=2.5): self.dumpImg=dumpImg ...
geeta395/bystronic
src/topics/pierce/common/visualization/processImages.py
processImages.py
py
2,336
python
en
code
0
github-code
7
[ { "api_name": "numpy.round", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 24, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 29, "usage_type": "call" }, { "api_name": "cv2.putText", "line_number"...
18012989740
# iris cnn cp from sklearn.datasets import load_iris from tensorflow.keras.utils import to_categorical from tensorflow.keras.models import Sequential, Model from tensorflow.keras.layers import Dropout, Dense from tensorflow.keras.layers import Conv2D, Flatten, MaxPool2D from sklearn.preprocessing import StandardScaler...
osy1223/bit_seoul
keras/keras49_cp_6_iris.py
keras49_cp_6_iris.py
py
2,951
python
en
code
0
github-code
7
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 16, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 24, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 29, "usage_type...
7071721251
#!/usr/bin/env python import glob import os import pandas as pd import json import nltk from nltk.tokenize import MWETokenizer from utils import int2str_label, get_rel_stance_label, get_pronouns, get_fulltext, read_quote_json, mv_files PRONOUNS = get_pronouns() # Create MWE Tokenizer for special words tk = MWETokeni...
yiweiluo/GWStance
4_analyses/0_process_predictions.py
0_process_predictions.py
py
8,825
python
en
code
11
github-code
7
[ { "api_name": "utils.get_pronouns", "line_number": 11, "usage_type": "call" }, { "api_name": "nltk.tokenize.MWETokenizer", "line_number": 14, "usage_type": "call" }, { "api_name": "utils.read_quote_json", "line_number": 51, "usage_type": "call" }, { "api_name": "n...
10739116754
from sympy import Matrix from sympy.solvers import solve from fractions import Fraction from Molecules import Molecule import math import re # modos: redox(ácido y básico), ácido-base, desplazamiento, dismutación # cuando falta algo de algún lado? # cargas? # si hay más de una opción? cómo elegir class Reaction: ...
AR0gger/BalanceQ
Balance.py
Balance.py
py
4,650
python
en
code
0
github-code
7
[ { "api_name": "Molecules.Molecule", "line_number": 29, "usage_type": "call" }, { "api_name": "Molecules.Molecule", "line_number": 38, "usage_type": "call" }, { "api_name": "re.split", "line_number": 51, "usage_type": "call" }, { "api_name": "sympy.Matrix", "li...
72356668703
from typing import NamedTuple class Segment(NamedTuple): start: int end: int def fully_contains(self, other: 'Segment'): return self.start <= other.start and self.end >= other.end def overlaps(self, other: 'Segment'): return not (self.start > other.end or self.end < other.start) de...
leotrubach/aocsolutions
python/day04/solution.py
solution.py
py
1,030
python
en
code
0
github-code
7
[ { "api_name": "typing.NamedTuple", "line_number": 4, "usage_type": "name" } ]
21904731099
#Final version from itertools import combinations as combi def solution(n,k): #The cap on number of each key type (kcap) in circulation is given by n-(k-1) kcap = n-(k-1) #lets make a matrix giving all posible ways of sampling kcap from a vector of length n. subsets = list(combi(list(range...
TheScarletBadger/My-Foo.Bar-Challenge-Entries
FreeTheBunnyPrisonersFinal.py
FreeTheBunnyPrisonersFinal.py
py
811
python
en
code
0
github-code
7
[ { "api_name": "itertools.combinations", "line_number": 9, "usage_type": "call" } ]
36085598621
#!/usr/bin/python import re import sys import pefile import struct import binascii import subprocess class Symbol(object): def __init__(self, sec, offset, name): self.sec = sec self.offset = offset self.name = name class Section(object): def __init__(self, offset, length, name, kind): self.offset = offset ...
night199uk/gdb-symbol-maker
symbols.py
symbols.py
py
4,269
python
en
code
10
github-code
7
[ { "api_name": "sys.argv", "line_number": 23, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 24, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 25, "usage_type": "attribute" }, { "api_name": "pefile.PE", "line_numbe...
618997671
from aws_cdk import core, aws_codedeploy as codedeploy, aws_lambda as lambda_ from datetime import datetime class LambdaStack(core.Stack): def __init__(self, app: core.App, id: str, **kwargs): super().__init__(app, id, **kwargs) # [ Lambda: Code ] # # This represents the code to ...
jordancannon88/cdk-lambda-pipeline
stacks/pipeline/lambda_stack.py
lambda_stack.py
py
1,595
python
en
code
0
github-code
7
[ { "api_name": "aws_cdk.core.Stack", "line_number": 6, "usage_type": "attribute" }, { "api_name": "aws_cdk.core", "line_number": 6, "usage_type": "name" }, { "api_name": "aws_cdk.core.App", "line_number": 7, "usage_type": "attribute" }, { "api_name": "aws_cdk.core"...
35679927886
"""Test the ORM's `Path` model.""" import json import googlemaps import pytest import sqlalchemy as sqla from geopy import distance from sqlalchemy import exc as sa_exc from urban_meal_delivery import db from urban_meal_delivery.db import utils @pytest.fixture def another_address(make_address): """Another `Add...
webartifex/urban-meal-delivery
tests/db/test_addresses_addresses.py
test_addresses_addresses.py
py
28,919
python
en
code
2
github-code
7
[ { "api_name": "pytest.fixture", "line_number": 15, "usage_type": "attribute" }, { "api_name": "geopy.distance.great_circle", "line_number": 24, "usage_type": "call" }, { "api_name": "geopy.distance", "line_number": 24, "usage_type": "name" }, { "api_name": "json.d...
74663316702
from downpour.download import Status from downpour.core import models from twisted.internet import defer, threads from time import time from datetime import datetime from dateutil.parser import parse as parsedate import logging, os, re, mimetypes, shutil mediatypes = { 'audio/music': 'Music', 'audio/podcast': ...
jjongsma/downpour
downpour/core/organizer.py
organizer.py
py
17,486
python
en
code
7
github-code
7
[ { "api_name": "re.compile", "line_number": 39, "usage_type": "call" }, { "api_name": "re.IGNORECASE", "line_number": 39, "usage_type": "attribute" }, { "api_name": "re.compile", "line_number": 41, "usage_type": "call" }, { "api_name": "re.IGNORECASE", "line_nu...
72046017502
import argparse import os from config import Config import modules.preprocess as preprocess from modules.algorithm import Algorithm def main(): parser = argparse.ArgumentParser(description='Concept expansion with snippet') parser.add_argument('-task', type=str, choices=['extract', 'expand'], required=True) ...
luogan1234/concept-expansion-snippet
main.py
main.py
py
1,840
python
en
code
13
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "config.Config", "line_number": 25, "usage_type": "call" }, { "api_name": "modules.preprocess.get_candidates", "line_number": 26, "usage_type": "call" }, { "api_name":...
16782134361
from fastapi import FastAPI from api.user import UserViewSet app = FastAPI() @app.get('/') async def root(): return {'message': 'Hello World'} app.include_router(UserViewSet().router) if __name__ == '__main__': import uvicorn uvicorn.run("main:app", port=8001 ,reload=True, workers=4, )
BilalAlpaslan/fastapi-extviews
examples/example_bigger_app/main.py
main.py
py
306
python
en
code
17
github-code
7
[ { "api_name": "fastapi.FastAPI", "line_number": 5, "usage_type": "call" }, { "api_name": "api.user.UserViewSet", "line_number": 13, "usage_type": "call" }, { "api_name": "uvicorn.run", "line_number": 17, "usage_type": "call" } ]
74627948381
#!/usr/bin/env python3 from itertools import islice, product DATA_PATH = "../input/2020/day1.txt" with open(DATA_PATH, "rt") as data_file: int_list = [ int(val.replace("\n", "")) for val in data_file.readlines() if val != "\n" ] for i, o in product(int_list, int_list): if i + ...
Laura7089/advent-of-code
aoc2020/src/day1.py
day1.py
py
389
python
en
code
0
github-code
7
[ { "api_name": "itertools.product", "line_number": 12, "usage_type": "call" } ]
43129013872
import sqlite3 from . import sql from . import views from . import exceptions from . import makes class DoxygenSQLite3(object): """TODO""" indexpage = None connection = None types = None def __init__( self, uri, type_factory=makes.default_types, atom_factory=make...
abathur/doxy_db
doxy_db/db.py
db.py
py
10,520
python
en
code
1
github-code
7
[ { "api_name": "sqlite3.connect", "line_number": 28, "usage_type": "call" } ]
70650556702
from .pypp import preprocess from ast import literal_eval class AbstractConnection(object): def __init__(self, **kwargs): pass def strbuilder(self): result = "" def builder(s = None): nonlocal result if s is not None: result = "%s%s\n" % (result, s) return result return bu...
calcu16/lamPy
scripts/db.py
db.py
py
2,493
python
en
code
2
github-code
7
[ { "api_name": "ast.literal_eval", "line_number": 21, "usage_type": "call" }, { "api_name": "ast.literal_eval", "line_number": 26, "usage_type": "call" }, { "api_name": "pypp.preprocess", "line_number": 30, "usage_type": "call" }, { "api_name": "sqlite3.connect", ...
16572201375
from requests import get from bs4 import BeautifulSoup import pandas as pd def get_ratings(url, season:int): series_episodes = [] # For every season in the series-- range depends on the show for sn in range(1,season+1): # Request from the server the content of the web page by using get(), and...
Alassea0/DTA_Thesis_speaker-diarization
Used_by_me/web_scraping_8.py
web_scraping_8.py
py
2,778
python
en
code
0
github-code
7
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 34, "usage_type": "call" } ]
42508024823
from radical import entk import os, glob import argparse, sys class ESMACS_TIES(object): def __init__(self): self.set_argparse() self._set_rmq() self.am = entk.AppManager(hostname=self.rmq_hostname, port=self.rmq_port, username=self.rmq_username, password=self.rmq_password) #pipeli...
2019-ncovgroup/DrugWorkflows
workflow-3-4/hybridwf.py
hybridwf.py
py
7,274
python
en
code
3
github-code
7
[ { "api_name": "radical.entk.AppManager", "line_number": 10, "usage_type": "call" }, { "api_name": "radical.entk", "line_number": 10, "usage_type": "name" }, { "api_name": "radical.entk.Pipeline", "line_number": 13, "usage_type": "call" }, { "api_name": "radical.en...
11237786177
import re import torch import joblib import numpy as np import itertools import unicodedata import torch.nn as nn # from torch.nn import NLLLoss from nltk.tokenize import word_tokenize from Vocabulary import Vocabulary from Encoder import EncoderRNN from Decoder import DecoderRNN # convert unicode string to ASCII, f...
azfar-imtiaz/GrammarCorrection
cornell_movie_dialogs_corpus/utils.py
utils.py
py
5,679
python
en
code
0
github-code
7
[ { "api_name": "unicodedata.normalize", "line_number": 18, "usage_type": "call" }, { "api_name": "unicodedata.category", "line_number": 18, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 25, "usage_type": "call" }, { "api_name": "re.sub", "line_...
14869403
# Databricks notebook source # MAGIC %run "../includes/configuration" # COMMAND ---------- # MAGIC %run "../includes/common_functions" # COMMAND ---------- dbutils.widgets.text("p_file_date","") v_file_date = dbutils.widgets.get("p_file_date") v_file_date # COMMAND ---------- race_result_df = spark.read.format("d...
MihirOjha/Formula1_Data_Engineering
transformation/constructor_standing.py
constructor_standing.py
py
2,197
python
en
code
0
github-code
7
[ { "api_name": "pyspark.sql.functions.col", "line_number": 30, "usage_type": "call" }, { "api_name": "pyspark.sql.functions.sum", "line_number": 45, "usage_type": "call" }, { "api_name": "pyspark.sql.functions.count", "line_number": 45, "usage_type": "call" }, { "a...
13730272922
__author__ = 'tomstelk' import sqlite3 db_name='buy2letDB.sqlite' zooplaTable='ZooplaPrices' conn = sqlite3.connect(db_name) c=conn.cursor() c.execute('DROP TABLE IF EXISTS ' + zooplaTable) c.execute('CREATE TABLE ' + zooplaTable + ' (zpID int NOT NULL, zpPrice int NOT NULL, zpAddress varchar(255), zpPostCode va...
tomstelk/BuyToLet-Tool
createZooplaPricesTable.py
createZooplaPricesTable.py
py
418
python
en
code
0
github-code
7
[ { "api_name": "sqlite3.connect", "line_number": 5, "usage_type": "call" } ]
10114985502
import datetime import unittest import requests import json import logging from django.conf import settings from django.utils import timezone from app.utils.types import parseInt, parse_date, parse_date_next import app.utils.klx_api as klx from app.utils import smsUtil, excel from staff.views import _try_send_sms _...
malaonline/Server
server/app/cold_tests.py
cold_tests.py
py
6,255
python
en
code
9
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "unittest.TestCase", "line_number": 19, "usage_type": "attribute" }, { "api_name": "app.utils.types.parseInt", "line_number": 22, "usage_type": "call" }, { "api_name": "app...
7757466813
# -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import QApplication, QDialog, QGridLayout, QMessageBox, QLabel, QPushButton, QLineEdit, QSpinBox from PyQt5 import uic from PyQt5.QtSql import QSqlDatabase, QSqlQuery class Dialogo(QDialog): def __init__(self): QDialog.__init__(self) self.set...
vpino/python-Qtyi
Qtsql.pyw
Qtsql.pyw
pyw
4,617
python
es
code
0
github-code
7
[ { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 8, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QDialog.__init__", "line_number": 10, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 10, "usage_type": "name" }, { "a...
27445272897
# -*- coding: utf-8 -*- """ create on 2020-04-16 16:09 author @66492 """ import warnings import numpy as np from leet.ml import activations, losses def _check_X_y(X, y): return class LogisticRegression(object): def __init__(self, *, C=1.0, fit_interception=True, tol=1e-4, max_iter=100): self.C = C...
Syhen/leet-code
leet/ml/linear.py
linear.py
py
3,920
python
en
code
0
github-code
7
[ { "api_name": "numpy.random.random", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 27, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.random.random...
27173090622
import argparse import numpy as np import collections #----------------------------------------- def parse_args(): parser = argparse.ArgumentParser(description="Run VHIs code") parser.add_argument('--data', type=str, default='312_747', help='choose one of the datasets 728_129 32_119 312_747 1380_221') return par...
Daiqh1/PHINNE
load_datasets.py
load_datasets.py
py
3,225
python
en
code
0
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.arra...
35465790345
from wsgiref.simple_server import make_server from pyramid.config import Configurator import views import os from db import Session as DBSession def manageSession(request): session = DBSession() def closeSession(request): session.close() request.add_finished_callback(closeSession) return session if...
happyherp/littlethings
webwatch/server.py
server.py
py
1,170
python
en
code
1
github-code
7
[ { "api_name": "db.Session", "line_number": 13, "usage_type": "call" }, { "api_name": "logconfig.setup", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number...
42349376695
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from apphos.serializadores.Ser_Familiar import familiarserializer from apphos.models.Familiar import Familiar class detailfamiliarview(APIView): def get(self, request, pk, format=None): ...
willintongavilan/proyect-e2
apphos/views/detail_familiarview.py
detail_familiarview.py
py
954
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.views.APIView", "line_number": 7, "usage_type": "name" }, { "api_name": "apphos.models.Familiar.Familiar.objects.get", "line_number": 9, "usage_type": "call" }, { "api_name": "apphos.models.Familiar.Familiar.objects", "line_number": 9, "usage...
17821391793
from aiogram import Router from aiogram.filters import Command, CommandStart from aiogram.fsm.context import FSMContext from aiogram.types import Message from aiogram.utils.markdown import hbold from hpc_bot.exceptions import ExistChatError from hpc_bot.telegram.fsm import UserMode from hpc_bot.telegram.manager import...
aeroshev/LLM-HPCLab-Telegram-Bot
src/hpc_bot/telegram/command_hadlers.py
command_hadlers.py
py
3,833
python
ru
code
0
github-code
7
[ { "api_name": "aiogram.Router", "line_number": 20, "usage_type": "name" }, { "api_name": "aiogram.types.Message", "line_number": 24, "usage_type": "name" }, { "api_name": "hpc_bot.telegram.manager.ModelManager", "line_number": 24, "usage_type": "name" }, { "api_na...
9039243740
from dagster import ( AssetKey, DefaultSensorStatus, EventLogEntry, RunRequest, SensorEvaluationContext, asset_sensor, ) from medallion_weather.jobs import all_assets_job from medallion_weather.resources.configs import define_all_assets_job_run_config @asset_sensor( asset_key=AssetKey(["G...
tsungchih/medallion
medallion-weather/medallion_weather/sensors/asset_sensors.py
asset_sensors.py
py
1,067
python
en
code
0
github-code
7
[ { "api_name": "dagster.SensorEvaluationContext", "line_number": 22, "usage_type": "name" }, { "api_name": "dagster.EventLogEntry", "line_number": 22, "usage_type": "name" }, { "api_name": "medallion_weather.resources.configs.define_all_assets_job_run_config", "line_number": 2...
12878401129
""" 一つのフォルダにある複数Excelブックの調書の施設名とか高さを一つのExcelに一覧にしたいときに使うが、微妙微妙微妙… pandasを使ったほうが、きれいになるかと思ったが… range_copy_from_multipul_sheets.pyを使ったほうが無難 """ import os import pandas import xlwt import xlrd import itertools import glob from tqdm import tqdm dir = "D:/三八DB/02収集資料/区域調書_移動不可/*.xls*" # 集計したいExcelが入っているフォルダ...
TGitGit/scratches
copy/range_copy_pandas_Ver.py
range_copy_pandas_Ver.py
py
5,301
python
ja
code
0
github-code
7
[ { "api_name": "xlwt.Workbook", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 36, "usage_type": "call" }, { "api_name": "xlrd.biffh", "line_number": 40, "usage_type": "attribute" }, { "api_name": "itertools.chain.from_...
20573377317
from redis import Redis if __name__ == '__main__': try: redis_client = Redis(host="192.168.84.128", port=6379, decode_responses=True) result = redis_client.get("name5") print(result, type(result)) # str1 = result.decode("utf-8") # print(str1, type(str1)) except Exception...
xiyangxitian1/learn_days
redis01/redis_get.py
redis_get.py
py
344
python
en
code
0
github-code
7
[ { "api_name": "redis.Redis", "line_number": 5, "usage_type": "call" } ]
69925438942
#!/bin/env python3 """Convert giellalt dict to apertium bidix.""" import sys import xml.etree.ElementTree from argparse import ArgumentParser, FileType from typing import TextIO def giella2apes(giella: str) -> str: """Convert pos tag from giellalt dict to apertium.""" if giella == "Adv": return "adv"...
giellalt/giella-core
scripts/giellalt2apes.py
giellalt2apes.py
py
9,003
python
en
code
7
github-code
7
[ { "api_name": "xml.etree.ElementTree.etree", "line_number": 46, "usage_type": "attribute" }, { "api_name": "xml.etree.ElementTree", "line_number": 46, "usage_type": "name" }, { "api_name": "xml.etree.ElementTree.etree", "line_number": 72, "usage_type": "attribute" }, ...
72864215582
import torch import torch.onnx from collections import OrderedDict import argparse from mmcv import Config, DictAction from mmpose.models import build_posenet def parse_args(): parser = argparse.ArgumentParser(description='Train a pose model') parser.add_argument('--config',default="configs/top_down/deeppose/c...
Ascend/ModelZoo-PyTorch
PyTorch/contrib/cv/pose_estimation/DeepPose/pthtar2onnx.py
pthtar2onnx.py
py
894
python
en
code
31
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "mmcv.Config.fromfile", "line_number": 17, "usage_type": "call" }, { "api_name": "mmcv.Config", "line_number": 17, "usage_type": "name" }, { "api_name": "mmpose.models...
74160507423
""" Unit and regression test for the pyIsoP package. """ # Uses the pytest fixtures decorator to take the energy grid and use it for a series of tests including # values, writing, isotherms and etc # Import package, test suite, and other packages as needed import pyIsoP import pytest import sys #%% def test_pyIsoP_im...
arung-northwestern/pyIsoP
pyIsoP/tests/test_pyIsoP.py
test_pyIsoP.py
py
6,587
python
en
code
1
github-code
7
[ { "api_name": "sys.modules", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pyIsoP.__file__", "...
37520417721
from LOTUS_regression.regression import mzm_regression import numpy as np import pandas as pd import matplotlib.pyplot as plt import datetime from LOTUS_regression.predictors.seasonal import add_seasonal_components ''' Code to apply MLR, ILT or new predictors to the Uccle data For data/model montly mean plots you...
denizpoyraz/MLR_Uccle
MLR_TotalO3.py
MLR_TotalO3.py
py
10,592
python
en
code
0
github-code
7
[ { "api_name": "matplotlib.pyplot.close", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 17, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 19, "usage_type": "call" }, { "api_name": "...
20305275782
#!bin/python import sys, pygame, time import numpy as np from sprites import * from engine import * from player import * Engine.collision_pairs.append(["demons","players"]) Engine.collision_pairs.append(["demons","draw"]) @Engine.addGroup class Demons(pygame.sprite.Group): name="demons" Engine.collision_p...
ajwittmond/MuGameJam2019
demon.py
demon.py
py
4,176
python
en
code
0
github-code
7
[ { "api_name": "pygame.sprite", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 27, "usage_type": "call" }, { "api_name": "pygame.image.load", "line_number": 27, "usage_type": "call" }, { "api_name": "pygame.image", "...
21250173303
import seaborn as sns import numpy as np import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates import matplotlib.cbook as cbook import datetime sns.set_style("darkgrid") df = pd.read_csv("ibex_35.csv") df = df.dropna() log_returns = np.diff(np.log(df["Close"].value...
XabierGA/Ising_Econophysics
Data/log_returns.py
log_returns.py
py
1,130
python
en
code
0
github-code
7
[ { "api_name": "seaborn.set_style", "line_number": 10, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.diff", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.log", "line_nu...
71655470623
from django.shortcuts import get_object_or_404, redirect from django.urls import reverse, reverse_lazy from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import TemplateView, DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic im...
eltimccc/globalcrm
globalcrm/tasks/views.py
views.py
py
9,943
python
en
code
1
github-code
7
[ { "api_name": "django.views.generic.TemplateView", "line_number": 15, "usage_type": "name" }, { "api_name": "models.Task.objects.all", "line_number": 26, "usage_type": "call" }, { "api_name": "models.Task.objects", "line_number": 26, "usage_type": "attribute" }, { ...
73406337182
from mdeditor.fields import MDTextField from solo.models import SingletonModel from django.db import models from django.urls import reverse from TgAdmin.constants import Const class Chat(models.Model): class Meta: verbose_name = 'Название чата' verbose_name_plural = 'Названия чатов' chat_id...
dedalus-3/django-telegram
TgAdmin/models.py
models.py
py
6,997
python
ru
code
0
github-code
7
[ { "api_name": "django.db.models.Model", "line_number": 10, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 10, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 15, "usage_type": "call" }, { "api_name"...
4204474458
## Simple Linear Regression import pandas as pd import numpy as np import matplotlib.pyplot as plt ## Importing the DataSets df = pd.read_csv('Salary_Data.csv') X = df.iloc[:, 0:1].values y = df.iloc[:, -1:].values # Training the Data from sklearn.model_selection import train_test_split X_train, X_test, y_train, y...
prashantkgajjar/Machine-Learning-Essentials
2. Simple Linear Regression.py
2. Simple Linear Regression.py
py
1,393
python
en
code
0
github-code
7
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 16, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 38, "usage_type": "call" ...
36266269725
import requests from bs4 import BeautifulSoup url = 'https://conjugator.reverso.net/conjugation-german-verb-%20machen.html' resp = requests.get(url) soup = BeautifulSoup(resp.text, features="lxml", from_encoding='utf-8') divTag=soup.find_all("div", {"class": "blue-box-wrap"}) #person=divTag.find_all("i", {"class": "gr...
Cap-n-Proud/German-Verb-Anki-Card-Creator
History/soup3.py
soup3.py
py
1,630
python
en
code
0
github-code
7
[ { "api_name": "requests.get", "line_number": 4, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 5, "usage_type": "call" } ]
74101853022
from pandas import DataFrame from typing import Callable, Union from factor.base import BaseFactor from data_manager.TradeHoldDataManager import TradeHoldDataManager class BaseTradeHoldFactor(BaseFactor): """ 成交持仓因子基类 """ def __init__(self, **params) -> None: """Constructor""" super()....
algo21-219040029/Assignment3
factor/TradeHoldFactor/base.py
base.py
py
2,096
python
en
code
1
github-code
7
[ { "api_name": "factor.base.BaseFactor", "line_number": 7, "usage_type": "name" }, { "api_name": "data_manager.TradeHoldDataManager.TradeHoldDataManager", "line_number": 15, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 33, "usage_type": "name" ...
14199521852
"""empty message Revision ID: b5658f866fa4 Revises: a5a5e318846c Create Date: 2021-06-23 01:56:29.504114 """ from alembic import op import sqlalchemy as sa from forms import genres # revision identifiers, used by Alembic. revision = 'b5658f866fa4' down_revision = 'a5a5e318846c' branch_labels = None depends_on = Non...
heyzooi/udacity-FSND-Fyyur
migrations/versions/b5658f866fa4_.py
b5658f866fa4_.py
py
2,096
python
en
code
0
github-code
7
[ { "api_name": "alembic.op.drop_table", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 22, "usage_type": "name" }, { "api_name": "alembic.op.drop_table", "line_number": 23, "usage_type": "call" }, { "api_name": "alembic.op", ...
12823492753
import math import torch import torch.nn as nn import numpy as np from utils.tools import get_mask_from_lengths, pad, reparameterize from .blocks import ( Flip, LinearNorm, ConvBlock, ConvTransposeBlock, NonCausalWaveNet, ) class VariationalGenerator(nn.Module): """ Variational Generator ""...
keonlee9420/PortaSpeech
model/variational_generator.py
variational_generator.py
py
13,124
python
en
code
310
github-code
7
[ { "api_name": "torch.nn.Module", "line_number": 18, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 18, "usage_type": "name" }, { "api_name": "blocks.ConvBlock", "line_number": 46, "usage_type": "call" }, { "api_name": "torch.nn.utils.weight_...
8942290812
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys, os from PyQt5.QtWidgets import QWidget, QDesktopWidget, QApplication, QMainWindow, QFrame, QTableView, QVBoxLayout, QAbstractItemView, QFileDialog, QAction, QMessageBox from PyQt5 import QtGui, QtCore import csv import shutil import re import unicodedata import pp...
petfactory/PyQt5
dragDropTableView/dragDropTableView.py
dragDropTableView.py
py
10,504
python
en
code
1
github-code
7
[ { "api_name": "PyQt5.QtWidgets.QTableView", "line_number": 14, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 16, "usage_type": "call" }, { "api_name": "PyQt5.QtCore", "line_number": 16, "usage_type": "name" }, { "api_name": "PyQt5...
24655659452
import redis import time import datetime import numpy as np from bokeh.plotting import figure, output_file, show, HBox, VBox from bokeh.document import Document """ 1. Create a redis database object - redis_object 2. Pull 60 most recent temp values from redis db redis_object.zrange() 3. Convert the redis data ...
thaong/temp_manager
redis_to_html.py
redis_to_html.py
py
5,528
python
en
code
1
github-code
7
[ { "api_name": "time.strptime", "line_number": 23, "usage_type": "call" }, { "api_name": "time.mktime", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.datetime.fromtimestamp", "line_number": 34, "usage_type": "call" }, { "api_name": "datetime.da...
35200822660
import logging base_config = { 'trainer': 'multitask', 'lr': 5e-5, # only for bert for now 'weight_decay': 0.01, 'warmup_steps': 100, # number of steps to warm up for learning rate scheduler 'collapse_domains': True, # whether to load all datasets together or individually 'epochs': 3, 'batc...
AmanDaVinci/meta-learning-few-shot-domain-adaptation
configs/base_config.py
base_config.py
py
1,549
python
en
code
3
github-code
7
[ { "api_name": "logging.INFO", "line_number": 28, "usage_type": "attribute" } ]
42575898908
#! usr/bin/env python import wx class windowClass(wx.Frame): def __init__(self, *args, **kwargs): super(windowClass, self).__init__(*args, **kwargs) self.basicGUI() def basicGUI(self): panel = wx.Panel(self) # Create text box menuBar = wx.MenuBar() # Create menu bar fileButton = wx.Menu() # creates si...
dvbridges/wxPython
panels.py
panels.py
py
920
python
en
code
1
github-code
7
[ { "api_name": "wx.Frame", "line_number": 5, "usage_type": "attribute" }, { "api_name": "wx.Panel", "line_number": 14, "usage_type": "call" }, { "api_name": "wx.MenuBar", "line_number": 15, "usage_type": "call" }, { "api_name": "wx.Menu", "line_number": 16, ...
19094552511
import os from setuptools import setup, find_packages import nomos with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f: readme = f.read() setup(name='nomos', version=nomos.__version__, description='nomos', long_description=readme, author="Thomas Huang", url='http...
whiteclover/Nomos
setup.py
setup.py
py
864
python
en
code
1
github-code
7
[ { "api_name": "os.path.join", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_n...
30458253073
import itertools as it import random import numpy as np import slith import copy EMPTY = -1 OUT_OF_BOARD = -2 UP = 1 DOWN = 2 RIGHT = 3 LEFT = 4 ALL_DIRS = [ [-1, 0], [1, 0], [0, -1], [0, 1] ] OFFSET_TO_DIR = { (-1, 0): UP, (1, 0): DOWN, (0, 1): RIGHT, (0, -1): LEFT } class Boa...
paulinapp/SlitherlinkEtc
slither link/main/genslither.py
genslither.py
py
9,027
python
en
code
0
github-code
7
[ { "api_name": "itertools.product", "line_number": 53, "usage_type": "call" }, { "api_name": "slith.face_to_edges", "line_number": 55, "usage_type": "call" }, { "api_name": "itertools.product", "line_number": 82, "usage_type": "call" }, { "api_name": "slith.face_to...
30901080869
#!/usr/bin/env python import cgi import logging import optparse import sys import feather.wsgi DEFAULT_HOST = "" DEFAULT_PORT = 9000 def xss_scrub(data): return data.replace("&", "&amp;").replace(">", "&gt;").replace("<", "&lt;") def wsgiapp(environ, start_response): if environ['PATH_INFO'] == '/': ...
teepark/feather
examples/wsgiapptest.py
wsgiapptest.py
py
1,817
python
en
code
6
github-code
7
[ { "api_name": "cgi.parse_qsl", "line_number": 31, "usage_type": "call" }, { "api_name": "optparse.OptionParser", "line_number": 47, "usage_type": "call" }, { "api_name": "feather.wsgi.wsgi.serve", "line_number": 52, "usage_type": "call" }, { "api_name": "feather.w...
24252202545
# Data cleanup routines for IIMC APDS03 Project for Group 8 # This script performs the following activiites from the CVE Vulnerabilities dataset # # 1. Downloads Top 50 Vendors from CVE - Details # 2. Download the CVE-ID's of top 50 vendors page by page and concatenate into a singls csv file # 3.Remove blank CVS3 & C...
sai-yanamandra/MLModelling
datacollection/GetVendors.py
GetVendors.py
py
2,787
python
en
code
0
github-code
7
[ { "api_name": "requests.get", "line_number": 27, "usage_type": "call" }, { "api_name": "pandas.read_html", "line_number": 28, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 34, "usage_type": "call" }, { "api_name": "glob.glob", "line_num...
39578786987
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import numpy as np import IPython import tensorflow as tf import models.experiments as experiments import models.experiments_ifif as experiments_ifif import...
OpenXAIProject/Interactive_Attention_Learning
train.py
train.py
py
4,744
python
en
code
12
github-code
7
[ { "api_name": "collections.namedtuple", "line_number": 29, "usage_type": "call" }, { "api_name": "models.load_data.Load_Data", "line_number": 30, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 38, "usage_type": "call" }, { "api_name...
32643087267
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation from IPython.display import HTML from numba import jit, types from scipy.sparse import diags matplotlib.rcParams['animation.embed_limit'] = 2**128 #=============================================================================== ...
Stefanochsenfeld/Bachelor-thesis-code
Bachelor/Wave_func_propagation.py
Wave_func_propagation.py
py
5,579
python
en
code
0
github-code
7
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 7, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "numpy.pi", "line_number": 22, "usage_type": "attribute" }, { "api_name": "numpy.e...
803859908
from fractions import Fraction def isPrime(n): return [1] == [i for i in range(1,n) if n % i == 0] primelist = [1 if isPrime(i) else -1 for i in range(501)] frog = [1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1] getProb = lambda a,b: Fraction(1,2) + Fraction(a*b,6) accumulator = [0] + [Fraction(1,500)]*500 for i in range(...
fonsp/project-euler
Problem 329/program.py
program.py
py
1,098
python
en
code
3
github-code
7
[ { "api_name": "fractions.Fraction", "line_number": 8, "usage_type": "call" }, { "api_name": "fractions.Fraction", "line_number": 10, "usage_type": "call" }, { "api_name": "fractions.Fraction", "line_number": 19, "usage_type": "call" }, { "api_name": "fractions.Fra...
25939513209
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program 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. # # This program is distrib...
oroosvall/swizzle
blender_script/io_mesh_swm/__init__.py
__init__.py
py
5,550
python
en
code
5
github-code
7
[ { "api_name": "importlib.reload", "line_number": 32, "usage_type": "call" }, { "api_name": "bpy.types", "line_number": 50, "usage_type": "attribute" }, { "api_name": "bpy.types", "line_number": 77, "usage_type": "attribute" }, { "api_name": "bpy.types", "line_...
11069895146
import torch import torch.nn as nn import torch.nn.functional as F class EncoderGRU(nn.Module): def __init__(self, emb_dim, bidirectional, vocab_size): super().__init__() self.bidirectional = bidirectional self.embed = nn.Embedding(embedding_dim=emb_dim, padding_idx=0, num_embeddings=voc...
Jimin9401/nlp_tasks
NMT/neural_machine_translation_by_jointly_learning_to_align_and_translate/model.py
model.py
py
5,829
python
en
code
2
github-code
7
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Embedding", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.nn", "line_n...
22036083653
""" Module for training the bot """ # modified code from the official spacy documentation # reference at https://spacy.io/usage/examples # section: 'Training a custom parser for chat intent semantics' import json from random import shuffle as random_shuffle from spacy.util import compounding, minibatch def create...
emileKing/nova-bot
nova/trainer.py
trainer.py
py
2,282
python
en
code
1
github-code
7
[ { "api_name": "random.shuffle", "line_number": 34, "usage_type": "call" }, { "api_name": "spacy.util.minibatch", "line_number": 36, "usage_type": "call" }, { "api_name": "spacy.util.compounding", "line_number": 36, "usage_type": "call" }, { "api_name": "json.load"...
649195610
import io from flask import jsonify from google.cloud import storage, vision from PIL import Image vision_client = vision.ImageAnnotatorClient() storage_client = storage.Client() def detect_cat(request): """ param: bucket: gcs bucket resource: gcs bucket resource returns: information ...
GoogleCloudPlatform/serverless-expeditions
terraform-serverless/function/main.py
main.py
py
1,373
python
en
code
184
github-code
7
[ { "api_name": "google.cloud.vision.ImageAnnotatorClient", "line_number": 7, "usage_type": "call" }, { "api_name": "google.cloud.vision", "line_number": 7, "usage_type": "name" }, { "api_name": "google.cloud.storage.Client", "line_number": 8, "usage_type": "call" }, { ...
25540701785
import nmap scanner = nmap.PortScanner() def get_port(target,port): res = scanner.scan(target,str(port)) # ip = list(res['scan'].keys()) # target = ip[0] # status_up_down = res['scan'][target]['status']['state'] # status_open_close = res['scan'][target]['tcp'][port]['state'] # name...
SanjayKotabagi/CSUT-Project
logic/nmaplogic.py
nmaplogic.py
py
1,478
python
en
code
0
github-code
7
[ { "api_name": "nmap.PortScanner", "line_number": 3, "usage_type": "call" } ]
31900787148
from numpy.core.fromnumeric import shape from torch.optim import optimizer from network_pytorch import * import cv2, os, time, math import glob import scipy.io as io from loss_pytorch import * from utils import * ##Pytorch Imports import torch,gc from torch.utils.data import DataLoader from torch.autograd import Varia...
JayKarhade/Neural-Point-Cloud-Rendering
ncpr_ScanNet_train.py
ncpr_ScanNet_train.py
py
14,665
python
en
code
1
github-code
7
[ { "api_name": "gc.collect", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.cuda.empty_cache", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 18, "usage_type": "attribute" }, { "api_name": "torch.device", ...
35879240595
from django.db import models import datetime # Create your models here. class TestClass(models.Model): # name = models.CharField(max_length=64, blank=True) doc = models.FileField(upload_to='content_video', default='/logos/anonymous.jpg') # def __str__(self): # return self.name class Badge(models....
MTnes/LC_Backend
main_app/models.py
models.py
py
3,188
python
en
code
0
github-code
7
[ { "api_name": "django.db.models.Model", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 5, "usage_type": "name" }, { "api_name": "django.db.models.FileField", "line_number": 7, "usage_type": "call" }, { "api_name": "...
9013661840
import numpy as np from PIL import Image import cv2 import matplotlib.pyplot as plt from matplotlib.pyplot import figure import pickle import time from matplotlib import style import random import os style.use("ggplot") SIZE = 10 allow_show = True action_space = 4 episodes = 10000 move_penalty = -1 enemy_pe...
gadm21/AI
RL/utils.py
utils.py
py
4,154
python
en
code
0
github-code
7
[ { "api_name": "matplotlib.style.use", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.style", "line_number": 17, "usage_type": "name" }, { "api_name": "numpy.maximum", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.random.rand...
31340180389
from dataclasses import asdict import datetime as dt from datetime import datetime, time from typing import List, Mapping, Tuple, Union from pathlib import Path import json from hashlib import sha256 import aiofiles from fastapi import APIRouter # from config import ovr_passwd from utils.responses import json_obj_res...
cloud11665/vlott
versions/v2/__init__.py
__init__.py
py
3,504
python
en
code
4
github-code
7
[ { "api_name": "fastapi.APIRouter", "line_number": 18, "usage_type": "call" }, { "api_name": "versions.v2.schema.class_id_t", "line_number": 24, "usage_type": "name" }, { "api_name": "datetime.date", "line_number": 25, "usage_type": "attribute" }, { "api_name": "da...
33212046565
from django.shortcuts import render,redirect from django.template import loader from .models import Note,NoteList,Message from django.core import serializers from django.contrib.auth import authenticate from django.contrib.auth.decorators import login_required from .form import NoteListForm,BaseNoteFormSet from django....
tfgGG/NotePlatForm
upload/views.py
views.py
py
12,046
python
en
code
0
github-code
7
[ { "api_name": "hashids.Hashids", "line_number": 36, "usage_type": "call" }, { "api_name": "hashids.Hashids", "line_number": 44, "usage_type": "call" }, { "api_name": "hashids.Hashids", "line_number": 49, "usage_type": "call" }, { "api_name": "django.conf.settings....
36585290282
#---==IMPORTS==--- from discord.ext import commands #---==COMMANDS==--- class member(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_member_join(self, member): """Welcomes a new member.""" channel = member.guild.system_channel if...
alexjonesdev/BaaS
Discord/modules/member.py
member.py
py
716
python
en
code
0
github-code
7
[ { "api_name": "discord.ext.commands.Cog", "line_number": 5, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 5, "usage_type": "name" }, { "api_name": "discord.ext.commands.Cog.listener", "line_number": 9, "usage_type": "call" }, { ...
1168516246
import random import tqdm from django.contrib.auth.models import User from django.core.management.base import BaseCommand from faker import Faker from expenses.models import Expense, Category class Command(BaseCommand): help = "Creates fake data :-)" def add_arguments(self, parser): parser.add_argu...
nonZero/SaveMeMoney
expenses/management/commands/create_fake_data.py
create_fake_data.py
py
1,394
python
en
code
0
github-code
7
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 11, "usage_type": "name" }, { "api_name": "faker.Faker", "line_number": 21, "usage_type": "call" }, { "api_name": "expenses.models.Expense.objects.all", "line_number": 23, "usage_type": "call" }, ...
36844931826
# coding=utf-8 import networkx as nx from semantic_similarity_network import * from candidate_words import * class BetweenCentrality: def __init__(self): self.G = nx.Graph() self.bcdict = {} self.nword = {} def codes_betweeness_centarlity(self, string_sentence): """ f...
dl-sdu/Sports-News-Writer
Similiarity/betweenness_centrality.py
betweenness_centrality.py
py
1,102
python
en
code
25
github-code
7
[ { "api_name": "networkx.Graph", "line_number": 10, "usage_type": "call" }, { "api_name": "networkx.betweenness_centrality", "line_number": 27, "usage_type": "call" } ]
36930013925
# Importing Libraries from functions import * import matplotlib.pyplot as plt import pandas as pd import igraph from igraph import * import time import numpy as np import json from modularitydensity.metrics import modularity_density import community # Variables to control download of new dataset and # To control Tempo...
albertolatino/StockMarketEvolution
main.py
main.py
py
5,168
python
en
code
0
github-code
7
[ { "api_name": "pandas.set_option", "line_number": 87, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 93, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 94, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
28779122841
import string import docker import tempfile import json import time from redis_om import NotFoundError from src.utils import wait_for_container from src.core.config import settings from src.schema.redis import ProjectModel, ResearchModel class Biogpt(): image_name: str = settings.biogpt_image network_name: str = 'du...
Munirmohammed/duri_
api/src/services/biogpt.py
biogpt.py
py
4,971
python
en
code
0
github-code
7
[ { "api_name": "src.core.config.settings.biogpt_image", "line_number": 12, "usage_type": "attribute" }, { "api_name": "src.core.config.settings", "line_number": 12, "usage_type": "name" }, { "api_name": "tempfile.mkdtemp", "line_number": 24, "usage_type": "call" }, { ...
42216455576
from rest_framework.response import Response from rest_framework import status from rest_framework.views import APIView from management.serializers.NotificationSerializer import NotificationSerializer, NotificationPageSerializer from pms.models import Notification from pmsDoctor.models.APIObject import APIObject cla...
furkanyalcindag/oxit-patientManagementSystem
management/views/NotificationView.py
NotificationView.py
py
2,426
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.views.APIView", "line_number": 10, "usage_type": "name" }, { "api_name": "management.serializers.NotificationSerializer.NotificationSerializer", "line_number": 13, "usage_type": "call" }, { "api_name": "rest_framework.response.Response", "line_nu...
21862150941
import argparse import sys from collections import OrderedDict ignoreEvn = ['PATH'] serviceOrder = [ 'image', 'container_name', 'restart', 'command', 'networks', 'labels', 'logging', 'ports', 'environment', 'volumes', ] def customOrder(data: dict, items: list): new_da...
marefati110/docker-esopmoc
utils.py
utils.py
py
1,226
python
en
code
8
github-code
7
[ { "api_name": "collections.OrderedDict", "line_number": 26, "usage_type": "call" } ]
8296193259
from django.shortcuts import get_object_or_404 from django.http import HttpResponse from django.template import loader from .models import * def index(request): template = loader.get_template('posts/index.html') post_list = Posts.objects.all() user_list = User.objects.all() context = { 'post_l...
dragunov-m/django_doc
posts/views.py
views.py
py
963
python
en
code
0
github-code
7
[ { "api_name": "django.template.loader.get_template", "line_number": 8, "usage_type": "call" }, { "api_name": "django.template.loader", "line_number": 8, "usage_type": "name" }, { "api_name": "django.http.HttpResponse", "line_number": 15, "usage_type": "call" }, { ...
40267042318
""" REW-sploit emulate_payload This module is able to identify if a specific flow, identified by IP and PORT (intended as IP of the Meterpreter C2) is a Meterpreter session and it tries to decrypt it if possible """ import os import sys import tempfile import argparse import logging import json import struct import...
RedWifiTeam/REW-sploit
modules/emulate_payload.py
emulate_payload.py
py
20,433
python
en
code
null
github-code
7
[ { "api_name": "sys.path.append", "line_number": 44, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 44, "usage_type": "attribute" }, { "api_name": "colorama.init", "line_number": 54, "usage_type": "call" }, { "api_name": "collections.deque", "...
70605826785
import sys from time import sleep # Check if file was given in arguments if len(sys.argv) <= 2: sys.exit("Please provide a type of agent and file to read the map from as an argument. Example: python ./maze.py random ./maps/map1.json") type_of_agent = sys.argv[1] map_name = sys.argv[2] # Create export Module from expor...
isabelSoares/AASMA-2021
code/maze.py
maze.py
py
3,081
python
en
code
0
github-code
7
[ { "api_name": "sys.argv", "line_number": 5, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 6, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 7, ...
44343436033
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap import sys from netCDF4 import Dataset import netCDF4 as nc #--------------------------------------------------------------- #combine MODIS Monthly mean Dust AOD over ocean (Dr. Yu) and over land (Paul) #Over Ocean 2000-2017; O...
Qianqian-Song/MODIS_Dust_Product
modis_global_aod_20032016month.py
modis_global_aod_20032016month.py
py
6,075
python
en
code
0
github-code
7
[ { "api_name": "netCDF4.Dataset", "line_number": 17, "usage_type": "call" }, { "api_name": "netCDF4.Dataset", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 44, "usage_type": "attribute" }, { "api_name": "numpy.nan", "line_...
9218341253
from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_OAEP, AES from Crypto.Signature import pkcs1_15 from Crypto.Hash import SHA256 import os from Crypto.Random import get_random_bytes RSA_KEY_BITS = 4096 AES_KEY_BITS = 128 def load_server_pub_key(path): return load_key(path) def generate_RSA_key_p...
DataNetworkSecurityProject/final_project
source/client/client_utils.py
client_utils.py
py
2,974
python
en
code
0
github-code
7
[ { "api_name": "Crypto.PublicKey.RSA.generate", "line_number": 17, "usage_type": "call" }, { "api_name": "Crypto.PublicKey.RSA", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 25, "usage_type": "call" }, { "api_name": "os.pa...
21367933527
# Pequeño progama que utiliza el Módulo de MatPlotLib para generar una gráfica de los ejericicos que he hecho esta semana # TRACKING DE EJERCICIOS v1 import matplotlib.pyplot as plt """ Inicializar los parametros """ semanas_Mes = [1,2,3,4] # Eje X # Dias de la Semana weekdays = ["Lunes", "Martes", "Miercoles", "J...
SabasGT/Tracking_Ejercicios
ejerciciosSemanal.py
ejerciciosSemanal.py
py
1,231
python
es
code
0
github-code
7
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 34, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 34, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.xlabel", "line_number": 35, "usage_type": "call" }, { "api_name": "mat...
28301368176
import typer from rich.style import Style from rich.color import Color from rich.console import Console from rich.table import Table from rich.text import Text import boto3 from mypy_boto3_rekognition.type_defs import DominantColorTypeDef import json app = typer.Typer() s3 = boto3.resource("s3") rekognition = boto3....
musikid/img_descriptor
img_descriptor/main.py
main.py
py
3,841
python
en
code
0
github-code
7
[ { "api_name": "typer.Typer", "line_number": 12, "usage_type": "call" }, { "api_name": "boto3.resource", "line_number": 14, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 15, "usage_type": "call" }, { "api_name": "mypy_boto3_rekognition.type_d...
8968332703
# -*- coding: utf-8 -*- """ Created on Wed Dec 22 21:32:13 2021 @author: Marius """ import torch import torch.nn as nn import numpy as np from functools import reduce import operator def krons(psi): if psi.shape[0] == 2: return torch.kron(psi[0], psi[1]) elif psi.shape[0] > 2: return torch.kr...
MariusvanLaar/MSc-thesis
models/layers.py
layers.py
py
13,694
python
en
code
0
github-code
7
[ { "api_name": "torch.kron", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.kron", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.nn.Module", "line_number": 24, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_numbe...
3203950479
# -*- coding: utf-8 -*- """ Created on Wed Sep 29 14:47:57 2021 @author: 张文浩 """ #导入相关库 import sys import math from collections import defaultdict from functools import reduce from textblob import TextBlob #导入文本处理工具 from textblob import Word import json Wt_d = defaultdict(dict) #记录Wt,d doc_score = defaultdi...
zwh-sdu/datamining
exp2/dmexp2.py
dmexp2.py
py
7,414
python
en
code
0
github-code
7
[ { "api_name": "collections.defaultdict", "line_number": 17, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 18, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 20, "usage_type": "call" }, { "api_name"...
2571173762
#!/usr/bin/env python # -*- coding:utf-8 -*- import sys import collections def main(): prefix = sys.argv[1] max_n = int(sys.argv[2]) res = collections.defaultdict(list) for f_i in range(max_n+1): f = open(f'{prefix}.{f_i}', 'r') lines = [l.strip() for l in f] for line_no, l in ...
ftakanashi/wyz_mttool_scripts
NFR/data_building/s2t_manner/merge_match.py
merge_match.py
py
713
python
en
code
0
github-code
7
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "collections.defaultdict", "line_number": 10, "usage_type": "call" } ]
24855886970
import pygame pygame.init() #colors BLACK = (0, 0, 0) WHITE = (255, 255, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) BLUE = (0, 0, 255) #PI pi=3.141592653 #CLOCK clock = pygame.time.Clock() #COORDS_AND_OTHER x = 2 y = 468 width = 30 height = 27 speed = 10 isJump = False JumpCount = 10 left =...
Python-is-a-snake/stickman_game
myowngame.py
myowngame.py
py
4,034
python
ru
code
0
github-code
7
[ { "api_name": "pygame.init", "line_number": 2, "usage_type": "call" }, { "api_name": "pygame.time.Clock", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.time", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pygame.image.load", ...
26043613368
# -*- coding: utf-8 -*- from nwae.utils.Log import Log from inspect import currentframe, getframeinfo from nwae.lang.detect.LangDetect import LangDetect from nwae.lang.LangFeatures import LangFeatures try: from nltk import pos_tag, word_tokenize, download download('punkt') download('averaged_perceptron_tag...
nwae/nwae
src/nwae/lang/preprocessing/Stopwordtags.py
Stopwordtags.py
py
10,892
python
en
code
0
github-code
7
[ { "api_name": "nltk.download", "line_number": 9, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 10, "usage_type": "call" }, { "api_name": "inspect.getframeinfo", "line_number": 13, "usage_type": "call" }, { "api_name": "inspect.currentframe"...
20479246208
import src # My utility functions import itertools import math WEIGHTS = src.read(ints=True) def configure(weights: list, groups=3): assert sum(weights) % groups == 0, f"Total weight is not a multiple of {groups}." target = sum(weights) // groups for size in itertools.count(1): qe_list = [math.p...
Nomen-Heroum/Advent_of_Code
2015/day24.py
day24.py
py
783
python
en
code
0
github-code
7
[ { "api_name": "src.read", "line_number": 5, "usage_type": "call" }, { "api_name": "itertools.count", "line_number": 11, "usage_type": "call" }, { "api_name": "math.prod", "line_number": 12, "usage_type": "call" }, { "api_name": "itertools.combinations", "line_...
45050521275
from rest_framework import serializers from .models import Message class MessageSerializer(serializers.ModelSerializer): owner_email = serializers.ReadOnlyField(source='owner.email') class Meta: fields = ( 'text', 'owner_email', 'created', ...
vadym-drok/django-rest-chat
api/serializers.py
serializers.py
py
375
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 5, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 5, "usage_type": "name" }, { "api_name": "rest_framework.serializers.ReadOnlyField", "line_number": 6, "us...
14828677932
# Python Packages import json from pprint import pprint # Django Packages from django.views import View from django.http import JsonResponse from django.core.paginator import Paginator from django.forms.models import model_to_dict from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import...
siyam04/jobs-service-combined
jobs/views.py
views.py
py
8,989
python
en
code
1
github-code
7
[ { "api_name": "django.views.View", "line_number": 24, "usage_type": "name" }, { "api_name": "models.Job.Gender", "line_number": 28, "usage_type": "attribute" }, { "api_name": "models.Job", "line_number": 28, "usage_type": "name" }, { "api_name": "models.Job.Employ...
8029103157
#!/usr/bin/env python """ Usage: travis2tox <dot_travis_dot_yml_file> travis2tox --help Reads as input <dot_travis_dot_yml_file>, a path to a YAML file for Travis (typically called ".travis.yml") and writes the contents of an equivalent tox.ini file to stdout. """ import argparse from travis2tox import travis2...
msabramo/travis2tox
travis2tox/main.py
main.py
py
767
python
en
code
13
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 22, "usage_type": "call" }, { "api_name": "travis2tox.travis2tox", "line_number": 29, "usage_type": "call" } ]
769258384
from django.shortcuts import render, redirect, get_object_or_404 from contest.models import Contest,ContestParticipant from problem.models import Problem from contestant.models import ProblemTry from user.models import CustomUser from .forms import SubmitForm from submission.models import Submission from Judge_dir.judg...
NazmulHasanMoon/project_oj
Project/hoj/contest/views.py
views.py
py
4,610
python
en
code
0
github-code
7
[ { "api_name": "contest.models.Contest.objects.all", "line_number": 16, "usage_type": "call" }, { "api_name": "contest.models.Contest.objects", "line_number": 16, "usage_type": "attribute" }, { "api_name": "contest.models.Contest", "line_number": 16, "usage_type": "name" ...
24855413530
from rest_framework.response import Response from rest_framework.views import APIView from app.models import Book from app.serializers import BookModelSerializer class BookAPIView(APIView): def get(self, requset, *args, **kwargs): book_id = kwargs.get('id') if book_id: book = Book.obj...
python-lx/day9-work
app/views.py
views.py
py
3,451
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.views.APIView", "line_number": 8, "usage_type": "name" }, { "api_name": "app.models.Book.objects.get", "line_number": 12, "usage_type": "call" }, { "api_name": "app.models.Book.objects", "line_number": 12, "usage_type": "attribute" }, { ...
1811999224
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 1 13:59:12 2021 @author: Debbora Leip """ import numpy as np from scipy.special import comb import scipy.stats as stats import pickle import sys from ModelCode.Auxiliary import _printing from ModelCode.Auxiliary import _GetDefaults # %% #########...
deleip/FoodSecurityWestAfrica
RiskFoodSupply/ModelCode/SettingsParameters.py
SettingsParameters.py
py
40,307
python
en
code
1
github-code
7
[ { "api_name": "ModelCode.Auxiliary._GetDefaults", "line_number": 180, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 212, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 377, "usage_type": "call" }, { "api_name": "pickle.load"...
28771908358
import numpy as np import matplotlib.pyplot as plt from scipy import ndimage from sympy import * from mpl_toolkits.mplot3d import Axes3D import pickle from matplotlib import cm import math as mth from mayavi import mlab import pandas as pd import h5py #Initial data from density field and classification sim_sz=250#Mpc i...
ajib0457/bolchoi-sim_z0
Artemis/investigation/cube_study/cube_dotprod.py
cube_dotprod.py
py
2,051
python
en
code
0
github-code
7
[ { "api_name": "h5py.File", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.column_stack", "line_number": 29, "usage_type": "call" }, { "api_name": "h5py.File", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.column_stack", "line...