code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python # # Seccomp Library test program # # Copyright (c) 2019 Cisco Systems, Inc. <<EMAIL>> # Author: <NAME> <<EMAIL>> # # # This library is free software; you can redistribute it and/or modify it # under the terms of version 2.1 of the GNU Lesser General Public License as # published by the Free Soft...
[ "os.waitpid", "os.getuid", "os.WEXITSTATUS", "os.WIFEXITED", "os.fork" ]
[((951, 960), 'os.fork', 'os.fork', ([], {}), '()\n', (958, 960), False, 'import os\n'), ((850, 861), 'os.getuid', 'os.getuid', ([], {}), '()\n', (859, 861), False, 'import os\n'), ((992, 1003), 'os.getuid', 'os.getuid', ([], {}), '()\n', (1001, 1003), False, 'import os\n'), ((1379, 1397), 'os.waitpid', 'os.waitpid', (...
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the VFS path specification resolver object.""" import unittest from dfvfs.resolver import resolver from tests.resolver import test_lib class ResolverTest(unittest.TestCase): """Class to test the VFS path specification resolver object.""" def testHelperRegi...
[ "unittest.main", "dfvfs.resolver.resolver.Resolver.RegisterHelper", "dfvfs.resolver.resolver.Resolver.DeregisterHelper" ]
[((1004, 1019), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1017, 1019), False, 'import unittest\n'), ((523, 584), 'dfvfs.resolver.resolver.Resolver.RegisterHelper', 'resolver.Resolver.RegisterHelper', (['test_lib.TestResolverHelper'], {}), '(test_lib.TestResolverHelper)\n', (555, 584), False, 'from dfvfs.reso...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from collections import defaultdict magic_number = "df6fa1abb58549287111ba8d776733e9" langstats = defaultdict(int) lang = None for line in sys.stdin: if line.startswith(magic_number): # df6fa1abb58549287111ba8d776733e9 # http://www.achpr....
[ "collections.defaultdict", "sys.stdout.write" ]
[((159, 175), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (170, 175), False, 'from collections import defaultdict\n'), ((564, 612), 'sys.stdout.write', 'sys.stdout.write', (["('%s\\t%d\\n' % (lang, num_bytes))"], {}), "('%s\\t%d\\n' % (lang, num_bytes))\n", (580, 612), False, 'import sys\n')]
from aoc import read_file, timer from collections import defaultdict from re import sub def normalize(instruction): directions = defaultdict(int) for direction_pair in [("se", "nw"), ("sw", "ne"), ("e", "w")]: directions[direction_pair[0]] = \ instruction.count(direction_pair[0]) - instruction....
[ "re.sub", "aoc.read_file", "collections.defaultdict" ]
[((134, 150), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (145, 150), False, 'from collections import defaultdict\n'), ((1448, 1463), 'aoc.read_file', 'read_file', (['"""24"""'], {}), "('24')\n", (1457, 1463), False, 'from aoc import read_file, timer\n'), ((1485, 1508), 'collections.defaultdict'...
from datetime import datetime, date from homeassistant.const import TEMP_CELSIUS from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import Entity from .const import ( DOMAIN, SIGNAL_HELIOS_STATE_UPDATE ) async def as...
[ "homeassistant.helpers.dispatcher.async_dispatcher_connect" ]
[((2785, 2876), 'homeassistant.helpers.dispatcher.async_dispatcher_connect', 'async_dispatcher_connect', (['self.hass', 'SIGNAL_HELIOS_STATE_UPDATE', 'self._update_callback'], {}), '(self.hass, SIGNAL_HELIOS_STATE_UPDATE, self.\n _update_callback)\n', (2809, 2876), False, 'from homeassistant.helpers.dispatcher impor...
from django.urls import path from . import views urlpatterns = [ path('', views.profile, name="profile"), path('delete', views.deleteuser, name="delete"), path('edit', views.edit_profile, name='edit'), path('projects', views.list_projects, name="list") ]
[ "django.urls.path" ]
[((70, 109), 'django.urls.path', 'path', (['""""""', 'views.profile'], {'name': '"""profile"""'}), "('', views.profile, name='profile')\n", (74, 109), False, 'from django.urls import path\n'), ((115, 162), 'django.urls.path', 'path', (['"""delete"""', 'views.deleteuser'], {'name': '"""delete"""'}), "('delete', views.de...
import os import shutil if __name__ == "__main__": for f in os.listdir('.'): if "2014" in f: new_name = f[f.find("2014") + 20:] shutil.move(f, new_name)
[ "os.listdir", "shutil.move" ]
[((65, 80), 'os.listdir', 'os.listdir', (['"""."""'], {}), "('.')\n", (75, 80), False, 'import os\n'), ((165, 189), 'shutil.move', 'shutil.move', (['f', 'new_name'], {}), '(f, new_name)\n', (176, 189), False, 'import shutil\n')]
"""empty message Revision ID: db353218c515 Revises: Create Date: 2018-10-07 00:04:20.199276 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'db353218c515' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
[ "sqlalchemy.ForeignKeyConstraint", "sqlalchemy.Float", "sqlalchemy.NullType", "sqlalchemy.DateTime", "alembic.op.drop_table", "sqlalchemy.Text", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Integer", "sqlalchemy.String" ]
[((1462, 1486), 'alembic.op.drop_table', 'op.drop_table', (['"""entries"""'], {}), "('entries')\n", (1475, 1486), False, 'from alembic import op\n'), ((1491, 1517), 'alembic.op.drop_table', 'op.drop_table', (['"""exercises"""'], {}), "('exercises')\n", (1504, 1517), False, 'from alembic import op\n'), ((1522, 1547), 'a...
""" Kanka Campaign API """ # pylint: disable=bare-except,super-init-not-called,no-else-break from __future__ import absolute_import import logging import json from kankaclient.constants import BASE_URL, GET, PATCH, POST, DELETE, PUT from kankaclient.base import BaseManager class CampaignAPI(BaseManager): """Kan...
[ "logging.getLogger", "json.loads" ]
[((538, 580), 'logging.getLogger', 'logging.getLogger', (['self.__class__.__name__'], {}), '(self.__class__.__name__)\n', (555, 580), False, 'import logging\n'), ((1576, 1601), 'json.loads', 'json.loads', (['response.text'], {}), '(response.text)\n', (1586, 1601), False, 'import json\n'), ((3135, 3160), 'json.loads', '...
#!/usr/bin/env python3 import os import json import torch from misc_scripts import run_cl_exp, run_rep_exp from utils import get_mini_imagenet, get_omniglot from core_functions.vision import evaluate from core_functions.vision_models import OmniglotCNN, MiniImagenetCNN, ConvBase from core_functions.maml import MAML ...
[ "core_functions.vision.evaluate", "torch.nn.CrossEntropyLoss", "torch.cuda.device_count", "utils.get_omniglot", "core_functions.vision_models.MiniImagenetCNN", "utils.get_mini_imagenet", "core_functions.maml.MAML", "misc_scripts.run_cl_exp", "os.scandir", "misc_scripts.run_rep_exp", "core_functi...
[((1049, 1068), 'torch.device', 'torch.device', (['"""cpu"""'], {}), "('cpu')\n", (1061, 1068), False, 'import torch\n'), ((1073, 1106), 'torch.manual_seed', 'torch.manual_seed', (["params['seed']"], {}), "(params['seed'])\n", (1090, 1106), False, 'import torch\n'), ((3944, 3987), 'torch.nn.Linear', 'torch.nn.Linear', ...
# coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from threading import Timer import time import os import octoprint.plugin from octoprint.util.version import get_octoprint_version_string from octoprint.util import RepeatedTimer from prometheus_client import Counter, Inf...
[ "octoprint.util.version.get_octoprint_version_string", "prometheus_client.CollectorRegistry", "prometheus_client.Gauge", "threading.Timer", "prometheus_client.Info", "prometheus_client.make_wsgi_app", "platform.system", "os.popen", "octoprint.util.RepeatedTimer", "socket.gethostname", "prometheu...
[((616, 653), 'prometheus_client.CollectorRegistry', 'CollectorRegistry', ([], {'auto_describe': '(True)'}), '(auto_describe=True)\n', (633, 653), False, 'from prometheus_client import Counter, Info, Gauge, make_wsgi_app, CollectorRegistry\n'), ((1368, 1472), 'prometheus_client.Gauge', 'Gauge', (['"""octoprint_temperat...
from dotenv import load_dotenv import os import datetime # import dateutil import time # from dateutil.tz import tzlocal import boto3 import requests import logging logger = logging.getLogger() logger.setLevel(logging.INFO) client = boto3.client('cloudwatch', region_name='us-east-1') # 0.22sec def parse_services(...
[ "logging.getLogger", "requests.post", "boto3.client", "os.getenv", "dotenv.load_dotenv", "datetime.datetime.today", "datetime.timedelta", "time.time" ]
[((176, 195), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (193, 195), False, 'import logging\n'), ((236, 287), 'boto3.client', 'boto3.client', (['"""cloudwatch"""'], {'region_name': '"""us-east-1"""'}), "('cloudwatch', region_name='us-east-1')\n", (248, 287), False, 'import boto3\n'), ((2314, 2327), 'do...
import json import pickle from typing import NoReturn import pandas as pd def read_data(path: str) -> pd.DataFrame: data = pd.read_csv(path, sep ='\t') return data def save_metrics_to_json(file_path: str, metrics: dict) -> NoReturn: with open(file_path, "w") as metric_file: json.dump(metrics, m...
[ "json.dump", "pickle.load", "pickle.dump", "pandas.read_csv" ]
[((130, 157), 'pandas.read_csv', 'pd.read_csv', (['path'], {'sep': '"""\t"""'}), "(path, sep='\\t')\n", (141, 157), True, 'import pandas as pd\n'), ((300, 331), 'json.dump', 'json.dump', (['metrics', 'metric_file'], {}), '(metrics, metric_file)\n', (309, 331), False, 'import json\n'), ((442, 468), 'pickle.dump', 'pickl...
#!/home/ankit/Desktop/oscar-test/django-oscar/aladin/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
[ "django.core.management.execute_from_command_line" ]
[((132, 170), 'django.core.management.execute_from_command_line', 'management.execute_from_command_line', ([], {}), '()\n', (168, 170), False, 'from django.core import management\n')]
from inspect import getmembers, isclass, isfunction, ismethod, iscoroutinefunction from time import perf_counter, process_time from pathlib import PurePath from logging import getLogger, INFO from functools import wraps from smtplib import SMTP_SSL from email.mime.text import MIMEText from sanic import Sanic, response...
[ "sanic.response.json", "yModel.mongo.NotFound", "yModel.mongo.MongoJSONEncoder.default", "inspect.ismethod", "time.perf_counter", "functools.wraps", "inspect.iscoroutinefunction", "pathlib.PurePath", "time.process_time", "inspect.isclass", "inspect.isfunction", "sanic.exceptions.InvalidUsage",...
[((1018, 1053), 'yModel.mongo.MongoJSONEncoder.default', 'MongoJSONEncoder.default', (['self', 'obj'], {}), '(self, obj)\n', (1042, 1053), False, 'from yModel.mongo import NotFound, MongoJSONEncoder\n'), ((12689, 12726), 'sanic.response.text', 'response.text', (['self.router.routes_all'], {}), '(self.router.routes_all)...
"""Blocks based on `datetime`_. .. _datetime: https://docs.python.org/3/library/datetime.html """ from datetime import datetime from i3pyblocks import blocks class DateTimeBlock(blocks.PollingBlock): r"""Block that shows date and time for current location. This blocks alternates between Time and Date ...
[ "datetime.datetime.now" ]
[((1747, 1761), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1759, 1761), False, 'from datetime import datetime\n')]
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
[ "armi.utils.units.getTk" ]
[((1101, 1114), 'armi.utils.units.getTk', 'getTk', (['Tc', 'Tk'], {}), '(Tc, Tk)\n', (1106, 1114), False, 'from armi.utils.units import getTk\n'), ((1242, 1255), 'armi.utils.units.getTk', 'getTk', (['Tc', 'Tk'], {}), '(Tc, Tk)\n', (1247, 1255), False, 'from armi.utils.units import getTk\n'), ((1447, 1460), 'armi.utils....
from tests.testcases import TestCaseUsingMockAPI from vortexasdk.endpoints.storage_terminals import StorageTerminals from tests.mock_client import example_storage_terminals from vortexasdk.endpoints.storage_terminals_result import StorageTerminalResult class TestStorageTerminals(TestCaseUsingMockAPI): st = Stora...
[ "vortexasdk.endpoints.storage_terminals.StorageTerminals", "vortexasdk.endpoints.storage_terminals_result.StorageTerminalResult" ]
[((315, 363), 'vortexasdk.endpoints.storage_terminals_result.StorageTerminalResult', 'StorageTerminalResult', (['example_storage_terminals'], {}), '(example_storage_terminals)\n', (336, 363), False, 'from vortexasdk.endpoints.storage_terminals_result import StorageTerminalResult\n'), ((412, 430), 'vortexasdk.endpoints....
import pygame import time scoreDataA = [] scoreDataB = [] scoreDataC = [] scoreDataD = [] def saveFile(): index = input("Enter your song INDEX:") with open("SongData.h", "w+") as f: f.writelines("const int LENGTH_" + str(index) + " = " + str(len(scoreDataA)) + ";") f.write("static const bool ...
[ "pygame.init", "pygame.quit", "pygame.display.set_mode", "time.sleep", "pygame.key.get_pressed", "pygame.display.set_caption", "pygame.event.pump" ]
[((1063, 1076), 'pygame.init', 'pygame.init', ([], {}), '()\n', (1074, 1076), False, 'import pygame\n'), ((1090, 1125), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(640, 480)'], {}), '((640, 480))\n', (1113, 1125), False, 'import pygame\n'), ((1130, 1172), 'pygame.display.set_caption', 'pygame.display.set_...
import sys import numpy as np import torch import torch.nn as nn import torch.optim as optim import random from Model import model from utils import init_model import torch.backends.cudnn as cudnn cudnn.benchmark = True def project_tsne(params, dataset, pairs_x, pairs_y, dist, P_joint, device): print("-------------...
[ "torch.log", "utils.init_model", "torch.pow", "torch.transpose", "numpy.max", "torch.nn.MSELoss", "numpy.array", "numpy.random.randint", "torch.sum", "numpy.matmul", "torch.from_numpy", "Model.model", "torch.zeros" ]
[((394, 430), 'Model.model', 'model', (['params.col', 'params.output_dim'], {}), '(params.col, params.output_dim)\n', (399, 430), False, 'from Model import model\n'), ((446, 483), 'utils.init_model', 'init_model', (['net', 'device'], {'restore': 'None'}), '(net, device, restore=None)\n', (456, 483), False, 'from utils ...
import asyncio from datetime import datetime from typing import Any, Dict, List, Optional, Union import tanjun from helpers import Responses, Timestamps, Utility from hikari import ( DMChannel, InteractionMember, MessageType, PermissionOverwrite, PermissionOverwriteType, Permissions, ) from hik...
[ "helpers.Responses.Fail", "datetime.datetime.utcnow", "tanjun.with_str_slash_option", "tanjun.with_int_slash_option", "tanjun.with_author_permission_check", "tanjun.as_slash_command", "tanjun.slash_command_group", "datetime.datetime.now", "loguru.logger.error", "helpers.Utility.Elapsed", "helper...
[((680, 702), 'tanjun.Component', 'Component', ([], {'name': '"""Raid"""'}), "(name='Raid')\n", (689, 702), False, 'from tanjun import Client, Component\n'), ((1156, 1216), 'tanjun.with_author_permission_check', 'tanjun.with_author_permission_check', (['Permissions.BAN_MEMBERS'], {}), '(Permissions.BAN_MEMBERS)\n', (11...
# Boston Housing Price Prediction with DNN # June 27, 2019 # <NAME> # Georgia Institute of Technology # <EMAIL> # 교수님 자료 인용 # 설치 패키지 : pandas, matplotlib, keras, scikit-learn import pandas as pd import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense from sklearn.preproces...
[ "pandas.read_csv", "matplotlib.pyplot.ylabel", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.xlabel", "keras.models.Sequential", "sklearn.preprocessing.StandardScaler", "matplotlib.pyplot.subplot", "matplotlib.pyplot.figure", "sklearn.metrics.mean_squared_error", "keras.layers.Den...
[((1108, 1172), 'pandas.read_csv', 'pd.read_csv', (['"""housing.csv"""'], {'delim_whitespace': '(True)', 'names': 'heading'}), "('housing.csv', delim_whitespace=True, names=heading)\n", (1119, 1172), True, 'import pandas as pd\n'), ((1279, 1295), 'sklearn.preprocessing.StandardScaler', 'StandardScaler', ([], {}), '()\n...
from django.conf.urls import patterns, include, url from accounts import views urlpatterns = patterns('', # Examples: url(r'^$', 'accounts.views.signup'), url(r'^signin/', 'accounts.views.signin', name='signin'), url(r'^signup...
[ "django.conf.urls.url" ]
[((166, 200), 'django.conf.urls.url', 'url', (['"""^$"""', '"""accounts.views.signup"""'], {}), "('^$', 'accounts.views.signup')\n", (169, 200), False, 'from django.conf.urls import patterns, include, url\n'), ((226, 281), 'django.conf.urls.url', 'url', (['"""^signin/"""', '"""accounts.views.signin"""'], {'name': '"""s...
import json from pathlib import Path import logging from typing import List, Dict from fnmatch import fnmatch from mkdocs.config import config_options from mkdocs.plugins import BasePlugin from mkdocs.utils import warning_filter def get_logger(): """ Return a pre-configured logger. """ logger = loggi...
[ "logging.getLogger", "mkdocs.config.config_options.Type", "pathlib.Path", "fnmatch.fnmatch", "json.load", "json.dump" ]
[((315, 372), 'logging.getLogger', 'logging.getLogger', (['"""mkdocs.plugins.mkdocs-exclude-search"""'], {}), "('mkdocs.plugins.mkdocs-exclude-search')\n", (332, 372), False, 'import logging\n'), ((604, 648), 'mkdocs.config.config_options.Type', 'config_options.Type', (['(str, list)'], {'default': '[]'}), '((str, list)...
# -*- coding: utf-8 -*- """ Created on Mon May 10 18:37:40 2021 @author: Korean_Crimson """ import json import datetime import socket import threading class HttpMessage: def encode(self): return str.encode(json.dumps(self.__dict__)) class Response(HttpMessage): def __init__(self, status, body): ...
[ "socket.gethostbyname", "json.loads", "json.dumps", "threading.Event", "datetime.datetime.now", "socket.gethostname" ]
[((1481, 1504), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1502, 1504), False, 'import datetime\n'), ((1578, 1598), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (1596, 1598), False, 'import socket\n'), ((1616, 1646), 'socket.gethostbyname', 'socket.gethostbyname', (['hostname'...
"""Suppression filtre moyen Revision ID: 0502b381ec96 Revises: 3dfc4940599e Create Date: 2021-01-11 17:11:53.532843 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0502b381ec96' down_revision = '3dfc4940599e' branch_labels = None depends_on = None def upgrad...
[ "alembic.op.drop_column", "sqlalchemy.BOOLEAN" ]
[((329, 375), 'alembic.op.drop_column', 'op.drop_column', (['"""recommandation"""', '"""qa_moyenne"""'], {}), "('recommandation', 'qa_moyenne')\n", (343, 375), False, 'from alembic import op\n'), ((455, 467), 'sqlalchemy.BOOLEAN', 'sa.BOOLEAN', ([], {}), '()\n', (465, 467), True, 'import sqlalchemy as sa\n')]
import matplotlib.pyplot as plt import numpy as np import random as rand import csv import math import heapq as hp class Point: def __init__(self,x,y,types,ide) -> None: self.x = x self.y = y self.type = types self.id = ide def getID(self): return self.id def setID(self...
[ "heapq.heappop", "heapq.heappush" ]
[((1894, 1914), 'heapq.heappop', 'hp.heappop', (['openList'], {}), '(openList)\n', (1904, 1914), True, 'import heapq as hp\n'), ((2232, 2262), 'heapq.heappush', 'hp.heappush', (['openList', '(nc, v)'], {}), '(openList, (nc, v))\n', (2243, 2262), True, 'import heapq as hp\n')]
from django import template from django.conf import settings register = template.Library() @register.inclusion_tag('django_uicomponent.html') def component(component_name, *args, **kwargs): template = f'{settings.COMPONENTS_DIR}/{component_name}' return {'UICOMPONENT_TEMPLATE_NAME': template, **kwargs }
[ "django.template.Library" ]
[((73, 91), 'django.template.Library', 'template.Library', ([], {}), '()\n', (89, 91), False, 'from django import template\n')]
import os import shutil import subprocess import sys from setuptools import ( Command, setup, ) sys.path.insert(0, "lib/python") from filebus import ( __author__, __classifiers__, __description__, __email__, __project__, __project_urls__, __url__, __version__, ) sys.path.remov...
[ "sys.path.insert", "subprocess.check_call", "shutil.which", "os.path.join", "sys.path.remove", "os.path.dirname", "os.path.abspath", "os.walk", "os.path.relpath" ]
[((106, 138), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""lib/python"""'], {}), "(0, 'lib/python')\n", (121, 138), False, 'import sys\n'), ((306, 335), 'sys.path.remove', 'sys.path.remove', (['"""lib/python"""'], {}), "('lib/python')\n", (321, 335), False, 'import sys\n'), ((2110, 2131), 'os.walk', 'os.walk', ([...
""" Configuration abstraction for maxcdn-ssl-client """ import yaml class Config(object): """ Object representing a maxcdn-ssl-client configuration file """ # pylint: disable=too-few-public-methods __slots__ = ('_config', ) def __init__(self, file): """ Create a new configura...
[ "yaml.safe_load" ]
[((516, 537), 'yaml.safe_load', 'yaml.safe_load', (['conff'], {}), '(conff)\n', (530, 537), False, 'import yaml\n')]
import logging import os import pyfastaq from viridian import utils def run_racon(seq_to_polish, reads_filename, outprefix, minimap_opts="-t 1 -x map-ont", debug=False): if minimap_opts is None: minimap_opts = "-t 1 -x map-ont" fasta_to_polish = f"{outprefix}.to_polish.fa" with open(fasta_to_pol...
[ "logging.debug", "os.path.join", "os.mkdir", "os.unlink", "os.path.abspath", "viridian.utils.syscall" ]
[((564, 656), 'viridian.utils.syscall', 'utils.syscall', (['f"""minimap2 -a {minimap_opts} {fasta_to_polish} {reads_filename} > {sam}"""'], {}), "(\n f'minimap2 -a {minimap_opts} {fasta_to_polish} {reads_filename} > {sam}')\n", (577, 656), False, 'from viridian import utils\n'), ((690, 789), 'viridian.utils.syscall'...
#!/home/namato/anaconda3/bin/python # XXX needed because of # https://github.com/Anorov/PySocks/issues/119 def warn(*args, **kwargs): pass import warnings warnings.warn = warn from canvasapi import Canvas import argparse import sys from pprint import pprint from canvasgrader import CanvasGrader import time import...
[ "argparse.ArgumentParser", "datetime.datetime.strptime", "time.sleep", "canvasapi.Canvas", "sys.exit", "sys.stdout.flush", "sys.stdout.write" ]
[((453, 477), 'canvasapi.Canvas', 'Canvas', (['API_URL', 'API_KEY'], {}), '(API_URL, API_KEY)\n', (459, 477), False, 'from canvasapi import Canvas\n'), ((1755, 1823), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Award a point score in Canvas"""'}), "(description='Award a point score in...
#!/usr/bin/python # -*- coding:utf-8 -*- """ @author: Raven @contact: <EMAIL> @site: https://github.com/aducode @file: type.py @time: 2016/1/31 23:57 """ import types import sys import struct from datetime import datetime, timedelta from register import register from utils import sign, decide class ProtocolType(ob...
[ "datetime.datetime", "utils.decide", "register.register.get_id", "register.register.get", "struct.pack", "utils.sign", "register.register.reg", "datetime.timedelta" ]
[((20709, 20733), 'register.register.reg', 'register.reg', (['(0)', '(1)', 'Null'], {}), '(0, 1, Null)\n', (20721, 20733), False, 'from register import register\n'), ((20734, 20755), 'register.register.reg', 'register.reg', (['(3)', 'Bool'], {}), '(3, Bool)\n', (20746, 20755), False, 'from register import register\n'),...
import os, sys, vcs, cdms2 f = cdms2.open(os.path.join(vcs.sample_data,"clt.nc")) V = f("clt") x = vcs.init() x.plot(V, bg=1)
[ "os.path.join", "vcs.init" ]
[((100, 110), 'vcs.init', 'vcs.init', ([], {}), '()\n', (108, 110), False, 'import os, sys, vcs, cdms2\n'), ((43, 82), 'os.path.join', 'os.path.join', (['vcs.sample_data', '"""clt.nc"""'], {}), "(vcs.sample_data, 'clt.nc')\n", (55, 82), False, 'import os, sys, vcs, cdms2\n')]
import json import sys import os import torch os.environ["CUDA_VISIBLE_DEVICES"] = "0" from torch import optim from tensorboardX import SummaryWriter from pathlib import Path dirname = os.path.dirname(os.path.abspath(__file__)) p = Path(dirname) twolevelsup = str(p.parent.parent) if twolevelsup not in sys.path: ...
[ "training.seq2seq.train.train_iters", "pathlib.Path", "json.dumps", "os.path.isfile", "json.load", "torch.cuda.is_available", "models.seq2seq.decoder.PointerGeneratorDecoder", "os.path.abspath", "sys.path.append", "models.seq2seq.encoder.EncoderRNN" ]
[((235, 248), 'pathlib.Path', 'Path', (['dirname'], {}), '(dirname)\n', (239, 248), False, 'from pathlib import Path\n'), ((204, 229), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (219, 229), False, 'import os\n'), ((320, 348), 'sys.path.append', 'sys.path.append', (['twolevelsup'], {}), '(...
# -*- coding: utf-8 -*- # * ********************************************************************* * # * Copyright (C) 2018 by xmz * # * ********************************************************************* * ''' @author: <NAME> (<EMAIL>) Copyright (C) xmz. All Right...
[ "logging.getLogger", "secureclientserverservice.ScssSecurityFirewall.checkIpInNetworks", "traceback.format_exc", "socket.socket", "sys.exc_info", "threading.Thread", "logging.info", "logging.error" ]
[((2752, 2792), 'logging.info', 'logging.info', (['"""Starting Inet server ..."""'], {}), "('Starting Inet server ...')\n", (2764, 2792), False, 'import logging\n'), ((2816, 2866), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'self.connectionType'], {}), '(socket.AF_INET, self.connectionType)\n', (2829, 2866),...
import cv2 import numpy as np import ImageLoader as il from pprint import pprint FACE_CASCADE = cv2.CascadeClassifier('haar_cascade.xml') SIDE_CASCADE = cv2.CascadeClassifier('lbpcascade_sideface.xml') def detect_faces(img): """ Method for detecting all faces in a given image. """ gray = cv2.cvtColor(...
[ "numpy.concatenate", "cv2.CascadeClassifier", "cv2.rectangle", "cv2.cvtColor" ]
[((97, 138), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""haar_cascade.xml"""'], {}), "('haar_cascade.xml')\n", (118, 138), False, 'import cv2\n'), ((154, 202), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""lbpcascade_sideface.xml"""'], {}), "('lbpcascade_sideface.xml')\n", (175, 202), False, 'impo...
# # Hello World client in Python # Connects REQ socket to tcp://localhost:5555 # Sends "Hello" to server, expects "World" back # # Adding ZeroMQ messaging library import zmq # Adding Python's logging library import logging print("Hello Client") # Configuring logging example logging.basicConfig(filename='client...
[ "logging.basicConfig", "logging.warning", "zmq.Context" ]
[((284, 440), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""client.log"""', 'filemode': '"""w"""', 'format': '"""%(asctime)s - %(levelname)s - CLIENT - %(message)s"""', 'datefmt': '"""%d-%b-%y %H:%M:%S"""'}), "(filename='client.log', filemode='w', format=\n '%(asctime)s - %(levelname)s - CLIENT...
from distutils.core import setup setup(name='notebook-helpers', version='0.1', packages=['helpers'], )
[ "distutils.core.setup" ]
[((34, 101), 'distutils.core.setup', 'setup', ([], {'name': '"""notebook-helpers"""', 'version': '"""0.1"""', 'packages': "['helpers']"}), "(name='notebook-helpers', version='0.1', packages=['helpers'])\n", (39, 101), False, 'from distutils.core import setup\n')]
import os from PyQt5.QtCore import Qt from PyQt5.Qt import QIcon, QVariant from enum import Enum from util.fsbase import FSBase from util.fsapp import FSExtensionType class FSTreeItem(FSBase): ATTRIBUTES = ["name", "count", "size (mb)", "path"] SIZE_DIVISOR = 1024 * 1024 def __init__(self, name, extensi...
[ "util.fsbase.FSBase.__init__", "os.stat", "PyQt5.Qt.QIcon" ]
[((388, 409), 'util.fsbase.FSBase.__init__', 'FSBase.__init__', (['self'], {}), '(self)\n', (403, 409), False, 'from util.fsbase import FSBase\n'), ((727, 746), 'os.stat', 'os.stat', (['self._path'], {}), '(self._path)\n', (734, 746), False, 'import os\n'), ((1857, 1878), 'PyQt5.Qt.QIcon', 'QIcon', (['"""res/list.svg""...
__author__ = "<NAME>" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules # RiBuild Modules from delphin_6_automation.database_interactions.db_templates import sample_entry from delphin_6_automation.database_...
[ "delphin_6_automation.database_interactions.db_templates.sample_entry.Strategy.objects", "delphin_6_automation.database_interactions.mongo_setup.global_end_ssh", "delphin_6_automation.database_interactions.mongo_setup.global_init", "delphin_6_automation.database_interactions.db_templates.sample_entry.Sample.o...
[((577, 611), 'delphin_6_automation.database_interactions.mongo_setup.global_init', 'mongo_setup.global_init', (['auth_dict'], {}), '(auth_dict)\n', (600, 611), False, 'from delphin_6_automation.database_interactions import mongo_setup\n'), ((863, 897), 'delphin_6_automation.database_interactions.mongo_setup.global_end...
import pkg_resources GAME_ENGINE_VERSION_RAW = "0.4.3" GAME_ENGINE_VERSION = pkg_resources.parse_version(GAME_ENGINE_VERSION_RAW) def parseVersion(version): return pkg_resources.parse_version(version)
[ "pkg_resources.parse_version" ]
[((78, 130), 'pkg_resources.parse_version', 'pkg_resources.parse_version', (['GAME_ENGINE_VERSION_RAW'], {}), '(GAME_ENGINE_VERSION_RAW)\n', (105, 130), False, 'import pkg_resources\n'), ((171, 207), 'pkg_resources.parse_version', 'pkg_resources.parse_version', (['version'], {}), '(version)\n', (198, 207), False, 'impo...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable import argparse import json from tensorboardX import SummaryWriter import os from image_loader import get_loader from AE import AutoEncoder, Decoder if __name__=='__mai...
[ "os.path.exists", "torch.abs", "tensorboardX.SummaryWriter", "argparse.ArgumentParser", "os.makedirs", "torch.autograd.Variable", "torch.load", "json.dumps", "torch.optim.lr_scheduler.StepLR", "AE.Decoder", "AE.AutoEncoder", "image_loader.get_loader", "torch.rand" ]
[((339, 383), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""BEGAN"""'}), "(description='BEGAN')\n", (362, 383), False, 'import argparse\n'), ((1352, 1412), 'image_loader.get_loader', 'get_loader', (['args.datapath', 'args.batch_size', 'args.num_workers'], {}), '(args.datapath, args.batc...
from __future__ import division import pywt import numpy as np import itertools as itt from scipy.interpolate import interp1d from functools import partial from .common import * class SimpleWaveletDensityEstimator(object): def __init__(self, wave_name, j0=1, j1=None, thresholding=None): self.wave = pywt.Wa...
[ "numpy.amin", "pywt.Wavelet", "numpy.zeros", "functools.partial", "numpy.amax" ]
[((313, 336), 'pywt.Wavelet', 'pywt.Wavelet', (['wave_name'], {}), '(wave_name)\n', (325, 336), False, 'import pywt\n'), ((889, 908), 'numpy.amin', 'np.amin', (['xs'], {'axis': '(0)'}), '(xs, axis=0)\n', (896, 908), True, 'import numpy as np\n'), ((929, 948), 'numpy.amax', 'np.amax', (['xs'], {'axis': '(0)'}), '(xs, ax...
from django.urls import path from . import views app_name = "minutes" urlpatterns = [ path("", views.index, name="index"), path("new/", views.CreateMeeting.as_view(), name="new_meeting"), path("edit/<int:pk>/", views.UpdateMeeting.as_view(), name="change_meeting"), path("<int:pk>/", views.meetingBoun...
[ "django.urls.path" ]
[((93, 128), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (97, 128), False, 'from django.urls import path\n'), ((285, 346), 'django.urls.path', 'path', (['"""<int:pk>/"""', 'views.meetingBounce'], {'name': '"""meeting_bounce"""'}), "('<int:pk>/',...
from django.shortcuts import render from .models import Visitor from django.utils import timezone from utils.geoip_helper import GeoIpHelper from bobjiang.settings import RECORD_VISITOR def main_page(request): record_visit(request) # return render(request, 'main/main.html') return render(request, 'main/ma...
[ "django.shortcuts.render", "django.utils.timezone.now", "utils.geoip_helper.GeoIpHelper.get_location", "django.utils.timezone.timedelta" ]
[((296, 332), 'django.shortcuts.render', 'render', (['request', '"""main/main_v2.html"""'], {}), "(request, 'main/main_v2.html')\n", (302, 332), False, 'from django.shortcuts import render\n'), ((863, 877), 'django.utils.timezone.now', 'timezone.now', ([], {}), '()\n', (875, 877), False, 'from django.utils import timez...
#Coded by <NAME> #02/09/2018 latest version. #Copyright (c) <2018> <<NAME>> #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use...
[ "tensorflow.shape", "tensorflow.transpose", "tensorflow.contrib.distributions.Normal", "tensorflow.reduce_mean", "tensorflow.log", "numpy.arange", "numpy.mean", "tensorflow.random_normal", "seaborn.distplot", "tensorflow.placeholder", "matplotlib.pyplot.plot", "tensorflow.square", "tensorflo...
[((1405, 1451), 'tensorflow.contrib.distributions.Exponential', 'tf.contrib.distributions.Exponential', ([], {'rate': '(1.0)'}), '(rate=1.0)\n', (1441, 1451), True, 'import tensorflow as tf\n'), ((1460, 1512), 'tensorflow.contrib.distributions.Normal', 'tf.contrib.distributions.Normal', ([], {'loc': '(-2.0)', 'scale': ...
#!/usr/bin/env python #from Superimpose_weight import superimpose from Superimpose_mask import superimpose from cafysis.file_io.pdb import PdbFile from cafysis.util_pdb import chains_to_ndarray NATOM = 1037 chains_ref = PdbFile('../16SCD.cg.pdb','r').read_all_and_close() chains_que = PdbFile('./cg.pdb','r').read_all_...
[ "Superimpose_mask.superimpose", "cafysis.file_io.pdb.PdbFile", "cafysis.util_pdb.chains_to_ndarray" ]
[((428, 457), 'cafysis.util_pdb.chains_to_ndarray', 'chains_to_ndarray', (['chains_ref'], {}), '(chains_ref)\n', (445, 457), False, 'from cafysis.util_pdb import chains_to_ndarray\n'), ((466, 495), 'cafysis.util_pdb.chains_to_ndarray', 'chains_to_ndarray', (['chains_que'], {}), '(chains_que)\n', (483, 495), False, 'fro...
import time, logging logger = logging.getLogger(__name__) # decorator to calculate duration taken by any function. Logs times at debug level (logging level 10). def calculate_time(func): # added arguments inside the inner1, # if function takes any arguments, # can be added like this. def inner1(*args,...
[ "logging.getLogger", "time.time" ]
[((31, 58), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (48, 58), False, 'import time, logging\n'), ((397, 408), 'time.time', 'time.time', ([], {}), '()\n', (406, 408), False, 'import time, logging\n'), ((512, 523), 'time.time', 'time.time', ([], {}), '()\n', (521, 523), False, 'import...
import os import math import requests import json import datetime import hashlib from pygdpr.models.dpa import DPA from bs4 import BeautifulSoup from pygdpr.services.filename_from_path_service import filename_from_path_service from pygdpr.services.pdf_to_text_service import PDFToTextService from pygdpr.specifications i...
[ "selenium.webdriver.ChromeOptions", "os.makedirs", "datetime.datetime.strptime", "selenium.webdriver.Chrome", "pygdpr.specifications.should_retain_document_specification.ShouldRetainDocumentSpecification", "requests.request", "bs4.BeautifulSoup", "pygdpr.policies.webdriver_exec_policy.WebdriverExecPol...
[((2404, 2450), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page_source.text', '"""html.parser"""'], {}), "(page_source.text, 'html.parser')\n", (2417, 2450), False, 'from bs4 import BeautifulSoup\n'), ((7509, 7555), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page_source.text', '"""html.parser"""'], {}), "(page_source.text,...
from typing import List, Tuple from lib.regexp_checker import match class Analyzer: def __init__(self) -> None: self.__contributor__ = ["syru, hyun9922, Se-AWON, peach1510, cbqnk9"] def privacy_check(self, category: str, raw_result: List[Tuple[str, str]]) -> List[Tuple[str, str]]: unmasked_p...
[ "lib.regexp_checker.match" ]
[((392, 410), 'lib.regexp_checker.match', 'match', (['category', 'a'], {}), '(category, a)\n', (397, 410), False, 'from lib.regexp_checker import match\n')]
"""Insert, mix, update, or normalize a GTFS.""" import logging import pandas as pd from mixer.gtfs.mixer.reader import ReaderETL from mixer.gtfs.mixer.writer import WriterGTFS from mixer.gtfs.reader.controller import Controller as CR from mixer.gtfs.normalizer.controller import Controller as CN from mixer.gt...
[ "mixer.gtfs.subseter.controller.Controller", "mixer.gtfs.mapper.controller.Controller", "mixer.gtfs.crosser.model.Model", "mixer.gtfs.separater.model.Model", "mixer.gtfs.normalizer.controller.Controller", "mixer.gtfs.versioner.controller.Controller", "mixer.gtfs.mixer.reader.ReaderETL", "mixer.glogger...
[((3224, 3263), 'utilities.decorator.logged', 'logged', ([], {'level': 'logging.INFO', 'name': 'logger'}), '(level=logging.INFO, name=logger)\n', (3230, 3263), False, 'from utilities.decorator import logged\n'), ((953, 971), 'mixer.gtfs.mixer.reader.ReaderETL', 'ReaderETL', (['db_name'], {}), '(db_name)\n', (962, 971),...
import pathlib import pkg_resources from setuptools import setup from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() with open(path.join(here, "VERSION")) as f...
[ "pathlib.Path", "os.path.join", "setuptools.setup", "os.path.dirname", "pkg_resources.parse_requirements" ]
[((570, 1358), 'setuptools.setup', 'setup', ([], {'name': '"""dedoc"""', 'version': 'version', 'description': '"""Convert different document in tree structure"""', 'long_description': 'long_description', 'long_description_content_type': '"""text/markdown"""', 'url': '"""https://github.com/ispras/dedoc"""', 'author': '"...
import logging from django.contrib import messages from django.forms import modelformset_factory from django.shortcuts import redirect from django.urls import reverse from django.views.generic.edit import FormView from camps.mixins import CampViewMixin from program.models import Event, EventFeedback, Url, UrlType fr...
[ "logging.getLogger", "program.models.Url", "program.models.UrlType.objects.get", "program.models.EventFeedback.objects.filter", "django.urls.reverse", "program.models.Event.objects.filter" ]
[((413, 456), 'logging.getLogger', 'logging.getLogger', (["('bornhack.%s' % __name__)"], {}), "('bornhack.%s' % __name__)\n", (430, 456), False, 'import logging\n'), ((808, 894), 'program.models.EventFeedback.objects.filter', 'EventFeedback.objects.filter', ([], {'event__track__camp': 'self.camp', 'approved__isnull': '...
"""Trogdor, de neejberhood discord bot. """ import os import json import requests import discord from dotenv import load_dotenv load_dotenv() client = discord.Client() def get_quote(): response = requests.get("https://zenquotes.io/api/random") json_data = json.loads(response.text) quote = json_data[0][...
[ "json.loads", "os.getenv", "requests.get", "dotenv.load_dotenv", "discord.Client" ]
[((130, 143), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (141, 143), False, 'from dotenv import load_dotenv\n'), ((154, 170), 'discord.Client', 'discord.Client', ([], {}), '()\n', (168, 170), False, 'import discord\n'), ((205, 252), 'requests.get', 'requests.get', (['"""https://zenquotes.io/api/random"""'],...
"""Views for this awesome app.""" from django.shortcuts import render from django.urls import reverse_lazy from django.http import Http404 from django.contrib.auth.models import User from django.views.generic import TemplateView, CreateView from imager_images.models import Photo, Album from imager_profile.models import...
[ "django.http.Http404", "django.urls.reverse_lazy" ]
[((899, 927), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""user_profile"""'], {}), "('user_profile')\n", (911, 927), False, 'from django.urls import reverse_lazy\n'), ((1422, 1445), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""library"""'], {}), "('library')\n", (1434, 1445), False, 'from django.urls import r...
import sys import argparse import os.path import math as m import cv2 import numpy as np import yaml import traceback try: import quaternion except: print('Install numpy-quaternion %s (%s) (which also requires scipy and optionally numba)' % ("pip3 install numpy-quaternion", "https://github.com/moble/qua...
[ "cv2.initUndistortRectifyMap", "math.acos", "math.sqrt", "cv2.remap", "yaml.load", "numpy.array", "cv2.destroyAllWindows", "sys.exit", "argparse.ArgumentParser", "numpy.dot", "pandas.DataFrame", "cv2.waitKey", "numpy.identity", "numpy.eye", "numpy.size", "cv2.getOptimalNewCameraMatrix"...
[((1036, 1128), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Project 3d points from ply file back onto image."""'}), "(description=\n 'Project 3d points from ply file back onto image.')\n", (1059, 1128), False, 'import argparse\n'), ((2250, 2317), 'numpy.array', 'np.array', (["[[y['...
import flask from flask import json , request import numpy as np import base64 from io import BytesIO import re from PIL import Image from flask import jsonify from flask_cors import CORS from numpy.lib.type_check import imag import cv2 from tensorflow.keras.models import load_model rev_class_map = {0: 'apple', 1: '...
[ "re.search", "flask_cors.CORS", "flask.Flask", "cv2.threshold", "cv2.boundingRect", "numpy.argmax", "numpy.array", "tensorflow.keras.models.load_model", "cv2.cvtColor", "cv2.findContours", "cv2.resize", "flask.jsonify" ]
[((1050, 1092), 'tensorflow.keras.models.load_model', 'load_model', (['"""server//v5.h5"""'], {'compile': '(False)'}), "('server//v5.h5', compile=False)\n", (1060, 1092), False, 'from tensorflow.keras.models import load_model\n'), ((1102, 1123), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (1113, 1...
from __future__ import print_function, division, absolute_import import unittest import numpy as np from numpy.testing import assert_almost_equal from openmdao.api import Problem, Group, IndepVarComp from openmdao.utils.assert_utils import assert_check_partials from dymos.transcriptions.pseudospectral.components imp...
[ "dymos.transcriptions.grid_data.GridData", "dymos.transcriptions.pseudospectral.components.StateInterpComp", "openmdao.utils.assert_utils.assert_check_partials", "openmdao.api.IndepVarComp", "openmdao.api.Group", "numpy.array", "dymos.utils.lgr.lgr", "numpy.testing.assert_almost_equal", "numpy.linsp...
[((15473, 15488), 'unittest.main', 'unittest.main', ([], {}), '()\n', (15486, 15488), False, 'import unittest\n'), ((844, 870), 'numpy.array', 'np.array', (['[0.0, 3.0, 10.0]'], {}), '([0.0, 3.0, 10.0])\n', (852, 870), True, 'import numpy as np\n'), ((885, 989), 'dymos.transcriptions.grid_data.GridData', 'GridData', ([...
import sys import math import numpy as np from datetime import datetime import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence def ortho_weight(ndim): """ Random orthogonal weights Used...
[ "torch.nn.ReLU", "torch.nn.Dropout", "torch.LongTensor", "torch.max", "torch.from_numpy", "numpy.array", "torch.cuda.is_available", "torch.nn.functional.softmax", "torch.mean", "torch.nn.functional.cosine_similarity", "torch.unsqueeze", "torch.nn.functional.tanh", "torch.nn.functional.log_so...
[((506, 533), 'numpy.random.randn', 'np.random.randn', (['ndim', 'ndim'], {}), '(ndim, ndim)\n', (521, 533), True, 'import numpy as np\n'), ((548, 564), 'numpy.linalg.svd', 'np.linalg.svd', (['W'], {}), '(W)\n', (561, 564), True, 'import numpy as np\n'), ((2682, 2707), 'torch.cuda.is_available', 'torch.cuda.is_availabl...
""" A setup script to create executables and demonstrate the use pythonnet. """ import sys from cx_Freeze import setup, Executable base = None if sys.platform == "win32": base = "Win32GUI" executables = [ Executable("helloform.py", icon="python-clear.ico", base=base), Executable("splitter.py", icon="pyth...
[ "cx_Freeze.Executable", "cx_Freeze.setup" ]
[((416, 566), 'cx_Freeze.setup', 'setup', ([], {'name': '"""pythonnet demos"""', 'version': '"""0.1"""', 'description': '"""https://github.com/pythonnet/pythonnet/tree/master/demo"""', 'executables': 'executables'}), "(name='pythonnet demos', version='0.1', description=\n 'https://github.com/pythonnet/pythonnet/tree...
from rq import get_current_job from app import db from app.models import Tasks def _set_task_progress(progress: int) -> None: """ A helper function which updates the progress status of a background task Parameters ---------- progress : int The percentage of the task progress """ j...
[ "rq.get_current_job", "app.db.session.commit" ]
[((325, 342), 'rq.get_current_job', 'get_current_job', ([], {}), '()\n', (340, 342), False, 'from rq import get_current_job\n'), ((559, 578), 'app.db.session.commit', 'db.session.commit', ([], {}), '()\n', (576, 578), False, 'from app import db\n')]
from setuptools import setup with open("README.rst") as f: long_description = f.read() setup( name="furnish", version="0.2.1", description="Create HTTP API clients from Python.", long_description=long_description, author="<NAME>", author_email="<EMAIL>", license="MIT", url="https:/...
[ "setuptools.setup" ]
[((93, 686), 'setuptools.setup', 'setup', ([], {'name': '"""furnish"""', 'version': '"""0.2.1"""', 'description': '"""Create HTTP API clients from Python."""', 'long_description': 'long_description', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'url': '"""https://github.com/everila...
from abc import ABC, abstractmethod import numpy as np class StochasticProcess(ABC): """ ABC for stochastic process generators """ def __init__(self, t_init, x_init, random_state): self.rs = np.random.RandomState(random_state) self.x = np.copy(x_init) self.t = t_init def sample...
[ "numpy.copy", "numpy.sqrt", "numpy.ones", "numpy.array", "numpy.zeros", "numpy.random.RandomState" ]
[((208, 243), 'numpy.random.RandomState', 'np.random.RandomState', (['random_state'], {}), '(random_state)\n', (229, 243), True, 'import numpy as np\n'), ((261, 276), 'numpy.copy', 'np.copy', (['x_init'], {}), '(x_init)\n', (268, 276), True, 'import numpy as np\n'), ((963, 975), 'numpy.array', 'np.array', (['mu'], {}),...
import FWCore.ParameterSet.Config as cms tdcZeros = cms.VPSet(cms.PSet( endRun = cms.int32(31031), tdcZero = cms.double(1050.5), startRun = cms.int32(27540) ), cms.PSet( endRun = cms.int32(999999), tdcZero = cms.double(1058.5), startRun = cms.int32(31032) ))
[ "FWCore.ParameterSet.Config.int32", "FWCore.ParameterSet.Config.double" ]
[((86, 102), 'FWCore.ParameterSet.Config.int32', 'cms.int32', (['(31031)'], {}), '(31031)\n', (95, 102), True, 'import FWCore.ParameterSet.Config as cms\n'), ((118, 136), 'FWCore.ParameterSet.Config.double', 'cms.double', (['(1050.5)'], {}), '(1050.5)\n', (128, 136), True, 'import FWCore.ParameterSet.Config as cms\n'),...
''' This module defines the class UpdateNodesName. UpdateNodesName class is designed to retrieve the node name and update the name on the Graphic model object. The available methods include: * update_protein_names Description: retrieve names from Uniprot and update protein nodes How to run this module ...
[ "QueryMyGene.QueryMyGene", "json.loads", "requests_cache.install_cache", "Neo4jConnection.Neo4jConnection", "os.path.realpath", "os.path.sep.join", "time.time" ]
[((1231, 1298), 'os.path.sep.join', 'os.path.sep.join', (["[*pathlist[:RTXindex + 1], 'data', 'orangeboard']"], {}), "([*pathlist[:RTXindex + 1], 'data', 'orangeboard'])\n", (1247, 1298), False, 'import re, os\n'), ((1297, 1333), 'requests_cache.install_cache', 'requests_cache.install_cache', (['dbpath'], {}), '(dbpath...
from django.db import models from django.contrib.auth.hashers import make_password # Create your models here. # # http://dsnfof.herokuapp.com/ # from hostname -> Authentication: basic server_username:server_password # hostname = "dsnfof.herokuapp.com" # server_username = "their username" # server_password = "passwo...
[ "django.contrib.auth.hashers.make_password", "django.db.models.CharField", "django.db.models.BooleanField" ]
[((628, 691), 'django.db.models.CharField', 'models.CharField', ([], {'primary_key': '(True)', 'max_length': '(500)', 'unique': '(True)'}), '(primary_key=True, max_length=500, unique=True)\n', (644, 691), False, 'from django.db import models\n'), ((801, 845), 'django.db.models.CharField', 'models.CharField', ([], {'max...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.SmallIntegerField", "django.db.models.DateTimeField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((210, 267), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (241, 267), False, 'from django.db import models, migrations\n'), ((12122, 12212), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'related_name': '...
#!/usr/bin/env python # Copyright 2010 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ "psphere.client.Client", "time.sleep" ]
[((1929, 1937), 'psphere.client.Client', 'Client', ([], {}), '()\n', (1935, 1937), False, 'from psphere.client import Client\n'), ((1323, 1336), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (1333, 1336), False, 'import time\n')]
# <NAME> 2014-2020 # mlxtend Machine Learning Library Extensions # Author: <NAME> <<EMAIL>> # # License: BSD 3 clause import numpy as np from mlxtend.plotting import plot_learning_curves from sklearn import datasets from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import train_test_split ...
[ "sklearn.datasets.load_iris", "mlxtend.plotting.plot_learning_curves", "sklearn.model_selection.train_test_split", "sklearn.tree.DecisionTreeClassifier", "numpy.testing.assert_almost_equal", "numpy.array" ]
[((358, 378), 'sklearn.datasets.load_iris', 'datasets.load_iris', ([], {}), '()\n', (376, 378), False, 'from sklearn import datasets\n'), ((457, 510), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': '(0.4)', 'random_state': '(2)'}), '(X, y, test_size=0.4, random_state=2)\n', (...
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ "googlecloudsdk.calliope.base.ReleaseTracks" ]
[((833, 900), 'googlecloudsdk.calliope.base.ReleaseTracks', 'base.ReleaseTracks', (['base.ReleaseTrack.ALPHA', 'base.ReleaseTrack.BETA'], {}), '(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA)\n', (851, 900), False, 'from googlecloudsdk.calliope import base\n')]
# Multivariate Regression - Predicting Car Prices import pandas as pd import statsmodels.api as sm from sklearn.preprocessing import StandardScaler df = pd.read_excel('C:/Users/<NAME>/Desktop/python-machine-learning/cars.xls') scale = StandardScaler() X = df[['Mileage','Cylinder','Doors']] y = df['Price'] X[['Mileage...
[ "sklearn.preprocessing.StandardScaler", "statsmodels.api.OLS", "pandas.read_excel" ]
[((155, 228), 'pandas.read_excel', 'pd.read_excel', (['"""C:/Users/<NAME>/Desktop/python-machine-learning/cars.xls"""'], {}), "('C:/Users/<NAME>/Desktop/python-machine-learning/cars.xls')\n", (168, 228), True, 'import pandas as pd\n'), ((237, 253), 'sklearn.preprocessing.StandardScaler', 'StandardScaler', ([], {}), '()...
# builtin import asyncio # third party from aioconsole import ainput # custom from utils import cfg, MCP from selection import copysel from commands import parse mc = MCP() async def cmdloop() -> None: try: parse(mc, cfg["autoexec"], fatal=True) except Exception as e: print(f"Error in autoexe...
[ "aioconsole.ainput", "selection.copysel", "asyncio.sleep", "commands.parse", "utils.MCP" ]
[((177, 182), 'utils.MCP', 'MCP', ([], {}), '()\n', (180, 182), False, 'from utils import cfg, MCP\n'), ((222, 260), 'commands.parse', 'parse', (['mc', "cfg['autoexec']"], {'fatal': '(True)'}), "(mc, cfg['autoexec'], fatal=True)\n", (227, 260), False, 'from commands import parse\n'), ((1141, 1159), 'asyncio.sleep', 'as...
import matplotlib.pyplot as plt from sklearn.manifold import MDS import numpy as np def accuracy(acc): max_acc = [max(acc[:i+1]) for i in range(len(acc))] plt.figure(figsize=(16, 4), dpi=100) plt.plot(acc, color="grey", linewidth=2.5, label="Accuracy") plt.plot(max_acc, color="g", linewidth=2.5, labe...
[ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.colorbar", "numpy.sum", "matplotlib.pyplot.figure", "matplotlib.pyplot.cm.get_cmap", "matplotlib.pyplot.title", "sklearn.manifold.MDS", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((165, 201), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(16, 4)', 'dpi': '(100)'}), '(figsize=(16, 4), dpi=100)\n', (175, 201), True, 'import matplotlib.pyplot as plt\n'), ((207, 267), 'matplotlib.pyplot.plot', 'plt.plot', (['acc'], {'color': '"""grey"""', 'linewidth': '(2.5)', 'label': '"""Accuracy""...
""" Hybrid Recommender HRRandom. """ import random from barbante.recommendation.HybridRecommender import HybridRecommender import barbante.utils.logging as barbante_logging log = barbante_logging.get_logger(__name__) class RecommenderHRRandom(HybridRecommender): """ Hybrid Recommender HRRandom. It mer...
[ "random.random", "barbante.utils.logging.get_logger" ]
[((183, 220), 'barbante.utils.logging.get_logger', 'barbante_logging.get_logger', (['__name__'], {}), '(__name__)\n', (210, 220), True, 'import barbante.utils.logging as barbante_logging\n'), ((1957, 1972), 'random.random', 'random.random', ([], {}), '()\n', (1970, 1972), False, 'import random\n')]
import click import json import os import sdc_client from typing import Optional from agent import pipeline, source, streamsets, check_prerequisites from agent.modules.tools import infinite_retry from jsonschema import ValidationError from texttable import Texttable from agent.cli import prompt, preview from sdc_clien...
[ "texttable.Texttable", "click.Choice", "sdc_client.update", "agent.pipeline.repository.get_by_id", "click.File", "agent.check_prerequisites", "sdc_client.get_all_pipeline_statuses", "click.echo", "click.ClickException", "click.UsageError", "os.path.exists", "click.secho", "click.option", "...
[((517, 543), 'click.command', 'click.command', ([], {'name': '"""list"""'}), "(name='list')\n", (530, 543), False, 'import click\n'), ((941, 956), 'click.command', 'click.command', ([], {}), '()\n', (954, 956), False, 'import click\n'), ((958, 1004), 'click.option', 'click.option', (['"""-a"""', '"""--advanced"""'], {...
from google.cloud import storage import base64 def df(event, callback): pubsubMessage = event['data'] buildResource = eval(base64.b64decode(pubsubMessage)) print(buildResource) repo = buildResource['substitutions']['REPO_NAME'] repoName = buildResource['substitutions']['REPO_NAME'] branch = buildResource[...
[ "google.cloud.storage.Client", "base64.b64decode" ]
[((128, 159), 'base64.b64decode', 'base64.b64decode', (['pubsubMessage'], {}), '(pubsubMessage)\n', (144, 159), False, 'import base64\n'), ((603, 619), 'google.cloud.storage.Client', 'storage.Client', ([], {}), '()\n', (617, 619), False, 'from google.cloud import storage\n')]
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ "logging.basicConfig", "logging.getLogger", "commands.getoutput", "libs.verify_libs.Gbp_Verify", "logging.Formatter", "libs.config_libs.Gbp_Config", "logging.FileHandler", "os._exit", "sys.exit", "libs.utils_libs.report_results", "re.search" ]
[((862, 927), 'libs.utils_libs.report_results', 'utils_libs.report_results', (['"""test_gbp_pa_func"""', '"""test_results.txt"""'], {}), "('test_gbp_pa_func', 'test_results.txt')\n", (887, 927), False, 'from libs import utils_libs\n'), ((932, 943), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (940, 943), False, 'imp...
# -*- mode: python; coding: utf-8 -*- # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Tests for calfits object """ import pytest import os import numpy as np from astropy.io import fits from pyuvdata import UVCal import pyuvdata.tests as uvtest from pyuvdata.data impo...
[ "numpy.mean", "pyuvdata.UVCal", "numpy.int64", "pytest.mark.filterwarnings", "astropy.io.fits.PrimaryHDU", "astropy.io.fits.HDUList", "numpy.arange", "astropy.io.fits.ImageHDU", "os.path.join", "numpy.diff", "pytest.mark.parametrize", "numpy.array", "pyuvdata.utils._fits_indexhdus", "pytes...
[((380, 534), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore:telescope_location is not set. Using known values"""', '"""ignore:antenna_positions is not set. Using known values"""'], {}), "(\n 'ignore:telescope_location is not set. Using known values',\n 'ignore:antenna_positions is not s...
import yaml import argparse parser = argparse.ArgumentParser(prog='bench-creator') parser.add_argument('--nodes', help='number of nodes to add', type=int) parser.add_argument('--interval', help='scrape interval, ie 5s') parser.add_argument('--max_shards', help='max_shards setting for remote_write', type=int) parser.ad...
[ "yaml.full_load", "argparse.ArgumentParser", "yaml.dump" ]
[((38, 83), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""bench-creator"""'}), "(prog='bench-creator')\n", (61, 83), False, 'import argparse\n'), ((680, 700), 'yaml.full_load', 'yaml.full_load', (['file'], {}), '(file)\n', (694, 700), False, 'import yaml\n'), ((1924, 1944), 'yaml.full_load', '...
import argparse from data import Data from inference import Inference from model import AuxiliaryClassifierGAN, Discriminator from model.generator import Generator if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--summary', action='store_true', help='Output model summary on...
[ "model.generator.Generator", "model.AuxiliaryClassifierGAN", "argparse.ArgumentParser", "model.Discriminator", "inference.Inference", "data.Data" ]
[((206, 231), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (229, 231), False, 'import argparse\n'), ((2498, 2522), 'data.Data', 'Data', ([], {'subset': 'args.subset'}), '(subset=args.subset)\n', (2502, 2522), False, 'from data import Data\n'), ((2567, 2614), 'inference.Inference', 'Inference'...
import json from unittest import mock import alteia from tests.core.resource_test_base import ResourcesTestBase DEFAULT_MOCK_CONTENT = {'url': 'some url', 'connection': { 'max_retries': 1, 'disable_ssl_certificate': True}} class TestSDK...
[ "json.dumps", "unittest.mock.patch", "alteia.SDK" ]
[((763, 805), 'unittest.mock.patch', 'mock.patch', (['"""alteia.core.config.read_file"""'], {}), "('alteia.core.config.read_file')\n", (773, 805), False, 'from unittest import mock\n'), ((1002, 1044), 'unittest.mock.patch', 'mock.patch', (['"""alteia.core.config.read_file"""'], {}), "('alteia.core.config.read_file')\n"...
from torchsummary import summary import sys import os import torch import torchvision from tensorboardX import SummaryWriter import tensorwatch as tw # from models.model_io import ModelInput, ModelOptions, ModelOutput from utils.flag_parser import parse_arguments import torch.jit as jit # embed basemodel.py import torc...
[ "models.MatchModel", "torch.zeros", "torch.cuda.is_available", "utils.flag_parser.parse_arguments" ]
[((501, 518), 'utils.flag_parser.parse_arguments', 'parse_arguments', ([], {}), '()\n', (516, 518), False, 'from utils.flag_parser import parse_arguments\n'), ((555, 580), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (578, 580), False, 'import torch\n'), ((626, 642), 'models.MatchModel', 'Mat...
from collections.abc import Collection from inspect import getmembers from itertools import starmap from typing import Any from graphql import print_schema from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import as_declarative from apischema import Undefined, deserialize, serialize from ...
[ "apischema.deserialize", "apischema.json_schema.deserialization_schema", "sqlalchemy.ext.declarative.as_declarative", "graphql.print_schema", "apischema.serialize", "apischema.graphql.graphql_schema", "apischema.objects.ObjectField", "itertools.starmap", "sqlalchemy.Column" ]
[((1021, 1037), 'sqlalchemy.ext.declarative.as_declarative', 'as_declarative', ([], {}), '()\n', (1035, 1037), False, 'from sqlalchemy.ext.declarative import as_declarative\n'), ((1431, 1459), 'apischema.deserialize', 'deserialize', (['Foo', "{'bar': 0}"], {}), "(Foo, {'bar': 0})\n", (1442, 1459), False, 'from apischem...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="eksauth", version="0.0.3", author="<NAME>", author_email="<EMAIL>", description="Class to authenticate agains EKS or iam-authenticator k8s clusters", long_description=long_description,...
[ "setuptools.find_packages" ]
[((449, 475), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (473, 475), False, 'import setuptools\n')]
import signal from glob import glob from os import path import pytest from config import Config from . import get_timeout @pytest.fixture def dicom_path(scope='session'): dir1 = path.join(Config.SMALL_DICOM_PATHS, 'LIDC-IDRI-0001') dir2 = '1.3.6.1.4.1.14519.5.2.1.6279.6001.298806137288633453246975630178' ...
[ "signal.signal", "pytest.mark.xfail", "os.path.join", "signal.alarm", "pytest.hookimpl" ]
[((3407, 3440), 'pytest.hookimpl', 'pytest.hookimpl', ([], {'hookwrapper': '(True)'}), '(hookwrapper=True)\n', (3422, 3440), False, 'import pytest\n'), ((186, 239), 'os.path.join', 'path.join', (['Config.SMALL_DICOM_PATHS', '"""LIDC-IDRI-0001"""'], {}), "(Config.SMALL_DICOM_PATHS, 'LIDC-IDRI-0001')\n", (195, 239), Fals...
#!/usr/bin/env python """ Trains model, saves trained models and visualization. """ import datetime import logging import pickle import torch import os import experiments import utils import visualize PKG_PATH = os.path.dirname(os.path.abspath(__file__)) # Adds a simple logger. TSTAMP = datetime.datetime.now().strft...
[ "logging.basicConfig", "logging.getLogger", "visualize.tsne", "utils.Data", "visualize.pca", "datetime.datetime.now", "experiments.tspec", "os.path.abspath", "visualize.training", "visualize.spectra", "visualize.timeseries" ]
[((409, 466), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': 'LOGNAME', 'level': 'logging.INFO'}), '(filename=LOGNAME, level=logging.INFO)\n', (428, 466), False, 'import logging\n'), ((476, 502), 'logging.getLogger', 'logging.getLogger', (['"""train"""'], {}), "('train')\n", (493, 502), False, 'import ...
#-*- encoding:utf-8 -*- """ file: en.py Description: the tokeniser for English text. author: <NAME> MIT License Copyright (c) 2018 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software witho...
[ "sem.storage.Span", "sem.storage.SpannedBounds", "re.match" ]
[((1403, 1418), 'sem.storage.SpannedBounds', 'SpannedBounds', ([], {}), '()\n', (1416, 1418), False, 'from sem.storage import Span, SpannedBounds\n'), ((3210, 3225), 'sem.storage.SpannedBounds', 'SpannedBounds', ([], {}), '()\n', (3223, 3225), False, 'from sem.storage import Span, SpannedBounds\n'), ((1441, 1451), 'sem...
#!/usr/bin/env python3 import pytest import sys import fileinput from os.path import splitext, abspath F_NAME = splitext(abspath(__file__))[0][:-1] LETTERS = { k.replace(' ', '').strip(): v for k, v in { ''' .##.. #..#. #..#. ####. #..#. #..#. ..... ''': 'A', ''' ###...
[ "os.path.abspath", "fileinput.input" ]
[((3919, 3953), 'fileinput.input', 'fileinput.input', (["(F_NAME + '.input')"], {}), "(F_NAME + '.input')\n", (3934, 3953), False, 'import fileinput\n'), ((121, 138), 'os.path.abspath', 'abspath', (['__file__'], {}), '(__file__)\n', (128, 138), False, 'from os.path import splitext, abspath\n')]
import logging from motor.motor_asyncio import AsyncIOMotorClient from ..core.config import MONGODB_URL, MAX_CONNECTIONS_COUNT, MIN_CONNECTIONS_COUNT from .mongodb import db async def connect_to_mongo(): print("Trying to connect to Mongo...") logging.info("Trying to connect to Mongo...") db.client = AsyncIOMotorC...
[ "logging.info" ]
[((248, 293), 'logging.info', 'logging.info', (['"""Trying to connect to Mongo..."""'], {}), "('Trying to connect to Mongo...')\n", (260, 293), False, 'import logging\n'), ((485, 526), 'logging.info', 'logging.info', (['"""Connected Successfully..."""'], {}), "('Connected Successfully...')\n", (497, 526), False, 'impor...
from dataclasses import dataclass from typing import Union from brain_brew.build_tasks.deck_parts.media_group_from_folder import MediaGroupFromFolder from brain_brew.configuration.part_holder import PartHolder from brain_brew.representation.json.crowd_anki_export import CrowdAnkiExport from brain_brew.representation.y...
[ "brain_brew.representation.json.crowd_anki_export.CrowdAnkiExport.create_or_get", "brain_brew.representation.yaml.media_group.MediaGroup.from_directory" ]
[((858, 899), 'brain_brew.representation.json.crowd_anki_export.CrowdAnkiExport.create_or_get', 'CrowdAnkiExport.create_or_get', (['rep.source'], {}), '(rep.source)\n', (887, 899), False, 'from brain_brew.representation.json.crowd_anki_export import CrowdAnkiExport\n'), ((1083, 1138), 'brain_brew.representation.yaml.me...
import torch import networkx as nx import numpy as np from sklearn.manifold import TSNE from sklearn.decomposition import PCA import pickle as pkl import scipy.sparse as sp import torch.utils.data import itertools from collections import Counter from random import shuffle import json # from networkx.readwrite import js...
[ "networkx.barabasi_albert_graph", "networkx.connected_component_subgraphs", "numpy.random.rand", "numpy.exp2", "numpy.log", "numpy.array", "networkx.grid_2d_graph", "numpy.arange", "networkx.from_dict_of_lists", "numpy.mean", "numpy.less", "numpy.where", "networkx.is_connected", "numpy.sor...
[((602, 613), 'numpy.zeros', 'np.zeros', (['l'], {}), '(l)\n', (610, 613), True, 'import numpy as np\n'), ((643, 672), 'numpy.array', 'np.array', (['mask'], {'dtype': 'np.bool'}), '(mask, dtype=np.bool)\n', (651, 672), True, 'import numpy as np\n'), ((1587, 1597), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (1595, ...
from django.db import models from django.contrib.auth.models import User class Contato(models.Model): TIPO_CONTATO = ( ('P', 'Pessoal'), ('C', 'Comercial'), ) nome = models.CharField(max_length=100, verbose_name='Nome') ocupacao = models.CharField(max_length=50, blank=True, null=True,...
[ "django.db.models.EmailField", "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((197, 250), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'verbose_name': '"""Nome"""'}), "(max_length=100, verbose_name='Nome')\n", (213, 250), False, 'from django.db import models\n'), ((266, 345), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)', 'blank'...
from numpy import cumprod, array def readf(filename, items): """ Read IDL arrays from a file filename - path of the file items - iterable of (func, shape) where func is applied to each split string of the file, then made into an array e.g. snaps, vels = readf('sfr.dat', [(...
[ "numpy.cumprod" ]
[((511, 525), 'numpy.cumprod', 'cumprod', (['shape'], {}), '(shape)\n', (518, 525), False, 'from numpy import cumprod, array\n')]
import torch import numpy as np import matplotlib.pyplot as plt def convert_tensor_to_RGB(network_output): x = torch.FloatTensor([[.0, .0, .0], [1.0, .0, .0], [.0, .0, 1.0], [.0, 1.0, .0]]) converted_tensor = torch.nn.functional.embedding(network_output, x).permute(2,0,1) return converted_tensor def dic...
[ "numpy.mean", "numpy.logical_and", "numpy.average", "torch.mean", "numpy.std", "torch.max", "numpy.max", "torch.min", "numpy.array", "torch.functional.F.softmax", "torch.reshape", "numpy.zeros", "numpy.sum", "torch.nn.functional.embedding", "numpy.min", "numpy.shape", "torch.std", ...
[((117, 208), 'torch.FloatTensor', 'torch.FloatTensor', (['[[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 1.0, 0.0]]'], {}), '([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0,\n 1.0, 0.0]])\n', (134, 208), False, 'import torch\n'), ((875, 896), 'numpy.array', 'np.array', (['dice_scores'], {}), '(...
import os base_dir = '/rds/general/user/bheineik/home/' genomeDir= base_dir + 'genomes/pombe_20201008_star' fastqbase = base_dir + 'rna_seq_data/20210315_pombe_ox_bulk/Unaligned/' outfilebase = base_dir + 'rna_seq_data/20210315_pombe_ox_bulk/mapped/' readFilesCommand= 'zcat' #Use to decompress fastq.gz files ...
[ "os.listdir" ]
[((871, 973), 'os.listdir', 'os.listdir', (['"""/rds/general/user/bheineik/home/rna_seq_data/20210315_pombe_ox_bulk/Unaligned/"""'], {}), "(\n '/rds/general/user/bheineik/home/rna_seq_data/20210315_pombe_ox_bulk/Unaligned/'\n )\n", (881, 973), False, 'import os\n')]
import cv2 def showImage(): FILENAME = 'images/test.jpg' # 이미지 파일을 읽기 위한 객체를 리턴 인자(이미지 파일 경로, 읽기 방식) # cv2.IMREAD_COLOR : 투명한 부분 무시되는 컬러 # cv2.IMREAD_GRAYSCALE : 흑백 이미지로 로드 # cv2.IMREAD_UNCHANGED : 알파 채컬을 포함한 이미지 그대로 로드 image = cv2.imread(FILENAME, cv2.IMREAD_UNCHANGED) cv2.namedWindow('mo...
[ "cv2.imshow", "cv2.destroyAllWindows", "cv2.waitKey", "cv2.namedWindow", "cv2.imread" ]
[((254, 296), 'cv2.imread', 'cv2.imread', (['FILENAME', 'cv2.IMREAD_UNCHANGED'], {}), '(FILENAME, cv2.IMREAD_UNCHANGED)\n', (264, 296), False, 'import cv2\n'), ((301, 346), 'cv2.namedWindow', 'cv2.namedWindow', (['"""model"""', 'cv2.WINDOW_AUTOSIZE'], {}), "('model', cv2.WINDOW_AUTOSIZE)\n", (316, 346), False, 'import ...
# Copyright 2016 Intel # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
[ "syntribos.checks.content_validity.valid_content", "requests_mock.Mocker", "requests.get", "textwrap.dedent" ]
[((1072, 1094), 'requests_mock.Mocker', 'requests_mock.Mocker', ([], {}), '()\n', (1092, 1094), False, 'import requests_mock\n'), ((1438, 1472), 'requests.get', 'requests.get', (['"""http://example.com"""'], {}), "('http://example.com')\n", (1450, 1472), False, 'import requests\n'), ((1526, 1545), 'syntribos.checks.con...
import numpy as np import networkx as nx import torch as th with open('1997.txt', 'r') as f: l = [[float(num) for num in line.split(' ')[:-1]] for line in f] mat=np.matrix(l) mat.resize((15, 15)) #print(mat.shape) G=nx.from_numpy_matrix(mat, create_using=nx.DiGraph)
[ "networkx.from_numpy_matrix", "numpy.matrix" ]
[((167, 179), 'numpy.matrix', 'np.matrix', (['l'], {}), '(l)\n', (176, 179), True, 'import numpy as np\n'), ((221, 271), 'networkx.from_numpy_matrix', 'nx.from_numpy_matrix', (['mat'], {'create_using': 'nx.DiGraph'}), '(mat, create_using=nx.DiGraph)\n', (241, 271), True, 'import networkx as nx\n')]
import requests import logging from django.db.models.signals import post_save from django.dispatch import receiver from django.conf import settings from apps.news.models import News from apps.news.serializers import TransferNewsSerializer logger = logging.getLogger("django") headers = getattr(settings, "POST_HEADERS...
[ "logging.getLogger", "django.dispatch.receiver", "requests.post", "apps.news.serializers.TransferNewsSerializer" ]
[((250, 277), 'logging.getLogger', 'logging.getLogger', (['"""django"""'], {}), "('django')\n", (267, 277), False, 'import logging\n'), ((373, 405), 'django.dispatch.receiver', 'receiver', (['post_save'], {'sender': 'News'}), '(post_save, sender=News)\n', (381, 405), False, 'from django.dispatch import receiver\n'), ((...