code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python3 """ SQLite Clinet written in python3 """ # Always prefer setuptools over distutils import re import sys # To use a consistent encoding from codecs import open from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) # Get the long descriptio...
[ "os.path.dirname", "setuptools.find_packages", "os.path.join" ]
[((270, 292), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (282, 292), False, 'from os import path\n'), ((353, 382), 'os.path.join', 'path.join', (['here', '"""README.rst"""'], {}), "(here, 'README.rst')\n", (362, 382), False, 'from os import path\n'), ((1398, 1413), 'setuptools.find_packages'...
import cv2 import numpy as np # Capture the input frame def get_frame(cap, scaling_factor=0.5): ret, frame = cap.read() # Resize the frame frame = cv2.resize(frame, None, fx=scaling_factor, fy=scaling_factor, interpolation=cv2.INTER_AREA) return frame if __name__=='__main__'...
[ "cv2.createBackgroundSubtractorMOG2", "cv2.imshow", "cv2.destroyAllWindows", "cv2.VideoCapture", "cv2.cvtColor", "cv2.resize", "cv2.waitKey" ]
[((169, 265), 'cv2.resize', 'cv2.resize', (['frame', 'None'], {'fx': 'scaling_factor', 'fy': 'scaling_factor', 'interpolation': 'cv2.INTER_AREA'}), '(frame, None, fx=scaling_factor, fy=scaling_factor, interpolation\n =cv2.INTER_AREA)\n', (179, 265), False, 'import cv2\n'), ((376, 395), 'cv2.VideoCapture', 'cv2.Video...
# # Copyright 2021 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
[ "re.match", "splunktaucclib.common.log.logger.info" ]
[((1106, 1168), 'splunktaucclib.common.log.logger.info', 'stulog.logger.info', (['"""State store type is CachedFileStateStore"""'], {}), "('State store type is CachedFileStateStore')\n", (1124, 1168), True, 'import splunktaucclib.common.log as stulog\n'), ((2224, 2254), 're.match', 're.match', (['"""[^\\\\w]"""', 'key_...
# # Copyright (C) 2020 IBM. All Rights Reserved. # # See LICENSE.txt file in the root directory # of this source tree for licensing information. # import selectors import socket import types from typing import Callable from clai.datasource.server_status_datasource import ServerStatusDatasource from clai.server.comman...
[ "socket.socket", "clai.server.logger.current_logger.info", "selectors.DefaultSelector", "types.SimpleNamespace" ]
[((687, 714), 'selectors.DefaultSelector', 'selectors.DefaultSelector', ([], {}), '()\n', (712, 714), False, 'import selectors\n'), ((744, 793), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (757, 793), False, 'import socket\n'), ((1017, 1056...
# -*- coding: utf-8 -*- import numpy from simmate.toolkit import Structure from pymatgen.analysis.diffusion.neb.pathfinder import ( DistinctPathFinder, MigrationHop as PymatgenMigrationHop, IDPPSolver, ) from typing import List class MigrationImages(list): """ This class is just a list of stru...
[ "simmate.toolkit.Structure", "numpy.isclose", "pymatgen.analysis.diffusion.neb.pathfinder.MigrationHop", "pymatgen.analysis.diffusion.neb.pathfinder.IDPPSolver.from_endpoints", "pymatgen.analysis.diffusion.neb.pathfinder.DistinctPathFinder" ]
[((3195, 3280), 'simmate.toolkit.Structure', 'Structure', ([], {'lattice': 'structure.lattice', 'species': 'final_species', 'coords': 'final_coords'}), '(lattice=structure.lattice, species=final_species, coords=final_coords\n )\n', (3204, 3280), False, 'from simmate.toolkit import Structure\n'), ((7774, 7864), 'pyma...
# Copyright 2020 LMNT, Inc. 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 required by applicable law or ag...
[ "wavegrad.model.WaveGrad", "torch.nn.L1Loss", "numpy.array", "wavegrad.dataset.from_path", "os.path.islink", "torch.isnan", "torch.utils.tensorboard.SummaryWriter", "torch.randint", "os.unlink", "numpy.concatenate", "torch.nn.parallel.DistributedDataParallel", "torch.randn_like", "torch.cuda...
[((6383, 6424), 'wavegrad.dataset.from_path', 'dataset_from_path', (['args.data_dirs', 'params'], {}), '(args.data_dirs, params)\n', (6400, 6424), True, 'from wavegrad.dataset import from_path as dataset_from_path\n'), ((6662, 6754), 'torch.distributed.init_process_group', 'torch.distributed.init_process_group', (['"""...
# VISUALISER OF CONTAMINATION # v0.0.1, 21.8.2020 import tkinter as tk from tkinter import messagebox as msgb from tkinter import filedialog as fdialog from itertools import product import pickle from ppopt.auxil import * # ----------------------WINDOW (AS A CLASS DEFINITION)--------------------- class Vis(tk.Frame)...
[ "tkinter.Canvas", "tkinter.Tk", "tkinter.messagebox.showinfo", "tkinter.filedialog.askopenfile" ]
[((10111, 10118), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (10116, 10118), True, 'import tkinter as tk\n'), ((929, 972), 'tkinter.messagebox.showinfo', 'msgb.showinfo', ([], {'title': 'title', 'message': 'message'}), '(title=title, message=message)\n', (942, 972), True, 'from tkinter import messagebox as msgb\n'), ((10...
import frappe def execute(): frappe.reload_doc("education", "doctype", "student_attendance") frappe.db.sql(''' update `tabStudent Attendance` set docstatus=0 where docstatus=1''')
[ "frappe.db.sql", "frappe.reload_doc" ]
[((31, 94), 'frappe.reload_doc', 'frappe.reload_doc', (['"""education"""', '"""doctype"""', '"""student_attendance"""'], {}), "('education', 'doctype', 'student_attendance')\n", (48, 94), False, 'import frappe\n'), ((96, 202), 'frappe.db.sql', 'frappe.db.sql', (['"""\n\t\tupdate `tabStudent Attendance` set\n\t\t\tdocst...
"""TDNN modules definition for custom encoder.""" from typing import Tuple from typing import Union import torch class TDNN(torch.nn.Module): """TDNN module with symmetric context. Args: idim: Input dimension. odim: Output dimension. ctx_size: Size of the context window. str...
[ "torch.nn.ReLU", "torch.nn.Dropout", "torch.nn.BatchNorm1d", "torch.nn.Conv1d", "torch.cat" ]
[((1111, 1182), 'torch.nn.Conv1d', 'torch.nn.Conv1d', (['idim', 'odim', 'ctx_size'], {'stride': 'stride', 'dilation': 'dilation'}), '(idim, odim, ctx_size, stride=stride, dilation=dilation)\n', (1126, 1182), False, 'import torch\n'), ((1375, 1407), 'torch.nn.Dropout', 'torch.nn.Dropout', ([], {'p': 'dropout_rate'}), '(...
# Copyright (c) 2011 <NAME> # Licensed under the MIT license # see LICENSE file for copying permission. import datetime, os, glob # build info BUILD_VERSION = '0.12' BUILD_DATETIME = datetime.datetime(2011, 9, 27, 7, 44, 0) # base db set up, the rest is in environment specific setting files DATABASE_ENGINE = 'mysql'...
[ "datetime.datetime", "os.path.dirname", "os.path.join", "os.path.abspath" ]
[((185, 225), 'datetime.datetime', 'datetime.datetime', (['(2011)', '(9)', '(27)', '(7)', '(44)', '(0)'], {}), '(2011, 9, 27, 7, 44, 0)\n', (202, 225), False, 'import datetime, os, glob\n'), ((1234, 1259), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1249, 1259), False, 'import datetime, o...
''' Builder for the snapshot from smaller snapshots. ''' from amuse.datamodel.particles import Particles from amuse.lab import units from amuse.units.quantities import VectorQuantity from omtool.core.datamodel import Snapshot class SnapshotBuilder: ''' Builder for the snapshot from smaller snapshots. ''' ...
[ "amuse.datamodel.particles.Particles" ]
[((377, 388), 'amuse.datamodel.particles.Particles', 'Particles', ([], {}), '()\n', (386, 388), False, 'from amuse.datamodel.particles import Particles\n')]
"""A collection of utility functions""" import json import os def parse_quantity(q): """ Parse an Onshape units definition Args: q:an Onshape units definition... for instance: { 'typeTag': '', 'unitToPower': [ { 'key': 'METE...
[ "os.getcwd", "os.mkdir", "base64.b64decode", "re.compile" ]
[((1507, 1525), 'base64.b64decode', 'b64decode', (['encoded'], {}), '(encoded)\n', (1516, 1525), False, 'from base64 import b64decode\n'), ((1540, 1566), 're.compile', 're.compile', (['"""name=([^;]*)"""'], {}), "('name=([^;]*)')\n", (1550, 1566), False, 'import re\n'), ((1691, 1709), 'os.mkdir', 'os.mkdir', (['tmp_pat...
#-*- coding=utf-8 -*- #@Time : 2020/10/9 8:40 PM #@Author : 小邋遢 #@File : dandong_policy_spider.py #@Software : PyCharm import pymysql import requests import re from lxml import etree import pandas as pd from policy.config import * headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWe...
[ "pandas.read_sql_query", "re.split", "pymysql.connect", "requests.get", "lxml.etree.HTML", "re.findall" ]
[((490, 524), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (502, 524), False, 'import requests\n'), ((1033, 1067), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (1045, 1067), False, 'import requests\n'), ((1425, 1450), 'p...
from __future__ import unicode_literals import inspect import sys import pytest from _pytest_mock_version import version __version__ = version # pseudo-six; if this starts to require more than this, depend on six already if sys.version_info[0] == 2: # pragma: no cover text_type = unicode # noqa else: tex...
[ "warnings.warn", "inspect.isclass", "inspect.isfunction", "inspect.ismethod" ]
[((5934, 6031), 'warnings.warn', 'warnings.warn', (['""""mock" fixture has been deprecated, use "mocker" instead"""', 'DeprecationWarning'], {}), '(\'"mock" fixture has been deprecated, use "mocker" instead\',\n DeprecationWarning)\n', (5947, 6031), False, 'import warnings\n'), ((3045, 3065), 'inspect.isclass', 'ins...
from __future__ import print_function import os import json import base64 from multiprocessing import Process import hashlib import webbrowser import warnings from .GanjaScene import GanjaScene from .color import Color CEFAVAILABLE = False try: from .cefwindow import * CEFAVAILABLE = True except: warnin...
[ "IPython.get_ipython", "IPython.display.display", "IPython.display.Javascript", "multiprocessing.Process", "base64.b64encode", "json.dumps", "webbrowser.open", "warnings.warn", "os.path.abspath" ]
[((4298, 4312), 'IPython.display.Javascript', 'Javascript', (['js'], {}), '(js)\n', (4308, 4312), False, 'from IPython.display import display, Javascript\n'), ((6932, 6957), 'webbrowser.open', 'webbrowser.open', (['filename'], {}), '(filename)\n', (6947, 6957), False, 'import webbrowser\n'), ((7389, 7400), 'IPython.dis...
# ------------------------------------------------------------------------------ # Copyright IBM Corp. 2020 # # 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/licens...
[ "logging.getLogger", "pandas.read_parquet", "pandas.read_csv", "exceptions.SqlQueryInvalidFormatException", "exceptions.SqlQueryFailException", "time.sleep", "backoff.on_exception", "cos.COSClient.__init__", "inspect.getcallargs", "types.MethodType", "utilities.rename_keys", "pprint.pprint", ...
[((2224, 2251), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2241, 2251), False, 'import logging\n'), ((2366, 2374), 'functools.wraps', 'wraps', (['f'], {}), '(f)\n', (2371, 2374), False, 'from functools import wraps\n'), ((3003, 3011), 'functools.wraps', 'wraps', (['f'], {}), '(f)\n',...
"""Extract the language known by the registered users in Wikipedia and some statistics about them""" import json import more_itertools import mwxml import datetime from typing import Iterable, Iterator, Mapping from backports.datetime_fromisoformat import MonkeyPatch from .. import extractors, languages, utils # Pol...
[ "more_itertools.peekable", "json.dumps", "datetime.datetime.utcnow", "backports.datetime_fromisoformat.MonkeyPatch.patch_fromisoformat" ]
[((365, 398), 'backports.datetime_fromisoformat.MonkeyPatch.patch_fromisoformat', 'MonkeyPatch.patch_fromisoformat', ([], {}), '()\n', (396, 398), False, 'from backports.datetime_fromisoformat import MonkeyPatch\n'), ((3138, 3170), 'more_itertools.peekable', 'more_itertools.peekable', (['mw_page'], {}), '(mw_page)\n', ...
from django.db import models from vendor.models import Store class Category(models.Model): BEAUTY = 'Beauty and Health' CLOTHING = 'Clothing' ELECTRONIC = 'Electronics' FOOD = 'Food and Drinks' GROCERY = 'Grocery' HOME = 'Home' CATEGORY_CHOICES = ( (BEAUTY, 'Beauty and Health')...
[ "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.AutoField", "django.db.models.PositiveIntegerField", "django.db.models.ImageField", "django.db.models.DecimalField", "django.db.models.CharField" ]
[((481, 515), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': '"""img"""'}), "(upload_to='img')\n", (498, 515), False, 'from django.db import models\n'), ((527, 584), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)', 'choices': 'CATEGORY_CHOICES'}), '(max_length=30, ch...
#!/usr/bin/env python3 import argparse import datetime from functools import lru_cache import logging import os.path import errno import stat from fuse import FUSE, FuseOSError, Operations, LoggingMixIn import requests_cache from opengrokfs.opengrok import File, OpenGrok class OpenGrokFs(LoggingMixIn, Operations): ...
[ "logging.basicConfig", "argparse.ArgumentParser", "requests_cache.install_cache", "fuse.FuseOSError", "opengrokfs.opengrok.File", "datetime.datetime.today", "functools.lru_cache", "opengrokfs.opengrok.OpenGrok" ]
[((640, 663), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(4096)'}), '(maxsize=4096)\n', (649, 663), False, 'from functools import lru_cache\n'), ((1392, 1415), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(4096)'}), '(maxsize=4096)\n', (1401, 1415), False, 'from functools import lru_cache\n'), ((264...
import matplotlib matplotlib.use('Agg') import io import matplotlib.pyplot as plt import numpy as np def save_to_mime_img(filename): buf = io.BytesIO() plt.savefig(buf, format='png') buf.seek(0) binary_img = buf.getvalue() buf.close() # if JiraInfo().instance.is_debug(): # save_image...
[ "matplotlib.pyplot.savefig", "matplotlib.use", "matplotlib.pyplot.clf", "io.BytesIO", "matplotlib.pyplot.pie", "matplotlib.pyplot.axis", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots" ]
[((19, 40), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (33, 40), False, 'import matplotlib\n'), ((147, 159), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (157, 159), False, 'import io\n'), ((164, 194), 'matplotlib.pyplot.savefig', 'plt.savefig', (['buf'], {'format': '"""png"""'}), "(buf, for...
# Import necessary packages here from typing import List import warnings from datetime import datetime import pandas as pd import numpy as np import matplotlib.dates as mdates from matplotlib import rc, pyplot as plt # ============================================================================ # ======================...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.hist", "matplotlib.pyplot.ylabel", "matplotlib.rc", "matplotlib.dates.DayLocator", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.style.use", "matplotlib.pyplot.close", "warnings.warn", "matplotlib.pyplot.savefig", "matplotlib.pyplot.MaxNLocator", "...
[((5218, 5232), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (5230, 5232), True, 'from matplotlib import rc, pyplot as plt\n'), ((5237, 5285), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'figure.autolayout': True}"], {}), "({'figure.autolayout': True})\n", (5256, 5285), True, 'fro...
import re from django.core.exceptions import ValidationError def validate_country(value): if len(value) != 2 or not re.match('[A-Z]{2}', value): raise ValidationError('Please enter your country code. e.g. US') def validate_phone(value): if not re.match('\+\d{1,3}\.\d+', value): raise Valida...
[ "re.match", "django.core.exceptions.ValidationError" ]
[((166, 224), 'django.core.exceptions.ValidationError', 'ValidationError', (['"""Please enter your country code. e.g. US"""'], {}), "('Please enter your country code. e.g. US')\n", (181, 224), False, 'from django.core.exceptions import ValidationError\n'), ((265, 302), 're.match', 're.match', (['"""\\\\+\\\\d{1,3}\\\\....
import tempfile from concurrent.futures import ProcessPoolExecutor, as_completed import numpy as np import pytest import zarr from dask.distributed import LocalCluster from swyft import Dataset, DirectoryStore, Prior, Simulator from swyft.store.simulator import SimulationStatus PARAMS = ["z1", "z2"] PRIOR = Prior.fr...
[ "tempfile.TemporaryDirectory", "dask.distributed.LocalCluster", "numpy.random.random", "swyft.Simulator", "numpy.any", "swyft.Dataset", "concurrent.futures.as_completed", "numpy.array", "zarr.open", "swyft.DirectoryStore", "zarr.open_group", "pytest.fixture", "concurrent.futures.ProcessPoolE...
[((700, 732), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (714, 732), False, 'import pytest\n'), ((969, 999), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (983, 999), False, 'import pytest\n'), ((762, 801), 'swyft.Simulator...
import argparse from typing import List, Iterable, Tuple, Optional from dejima.plugin import NoteField, SourcePlugin, CardTemplate, Note __version__ = "0.1.0" class SomeSource(SourcePlugin): # These can be named anything you want, and will become fields on # your notes in Anki. Note that the templates in ...
[ "dejima.plugin.NoteField", "dejima.plugin.Note", "dejima.plugin.CardTemplate" ]
[((404, 438), 'dejima.plugin.NoteField', 'NoteField', ([], {'unique': '(True)', 'merge': '(True)'}), '(unique=True, merge=True)\n', (413, 438), False, 'from dejima.plugin import NoteField, SourcePlugin, CardTemplate, Note\n'), ((450, 484), 'dejima.plugin.NoteField', 'NoteField', ([], {'unique': '(True)', 'merge': '(Tru...
import time from .minesweeper import * # utility / debugging code def parse_api_payload(payload): if 'board' in payload: rules, mine_p = read_board(payload['board'], payload['total_mines'], everything_mode=True) else: rules = [Rule(r['num_mines'], r['cells']) for r in payload['rules']] try: mine_p = paylo...
[ "time.time" ]
[((544, 555), 'time.time', 'time.time', ([], {}), '()\n', (553, 555), False, 'import time\n'), ((679, 690), 'time.time', 'time.time', ([], {}), '()\n', (688, 690), False, 'import time\n')]
import requests import json import csv import time import os import scrape from datetime import datetime # A dict of numerical location codes used by the bandcamp API. LOCATION_CODES = {'novascotia': 6091530, 'ottawa': 6094817, 'pei': 6113358, 'newbrunswick': 6087430, 'saskatchewan': 6141242, 'newfoundland': 63549...
[ "scrape.AlbumScraper", "csv.DictWriter", "requests.post", "datetime.datetime.strptime", "time.sleep", "os.path.realpath", "datetime.datetime.now", "json.dump" ]
[((5166, 5180), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (5178, 5180), False, 'from datetime import datetime\n'), ((5200, 5227), 'scrape.AlbumScraper', 'scrape.AlbumScraper', (['albums'], {}), '(albums)\n', (5219, 5227), False, 'import scrape\n'), ((1527, 1569), 'requests.post', 'requests.post', (['BA...
from unittest.mock import patch from django.urls import reverse from rest_framework import test, status from users.models import User from users.tests.factories import UserFactory class TestUserView(test.APITransactionTestCase): """Test cases for the user view.""" def test_user_resource_url(self): ...
[ "users.tests.factories.UserFactory", "unittest.mock.patch", "users.models.User.objects.count", "django.urls.reverse" ]
[((504, 530), 'unittest.mock.patch', 'patch', (['"""users.logger.info"""'], {}), "('users.logger.info')\n", (509, 530), False, 'from unittest.mock import patch\n'), ((1969, 1995), 'unittest.mock.patch', 'patch', (['"""users.logger.info"""'], {}), "('users.logger.info')\n", (1974, 1995), False, 'from unittest.mock impor...
import pytest from thgsp.alg.coloring import dsatur_py, check_coloring, dsatur_cpp, dsatur from thgsp.graphs.generators import rand_udg, torch from thgsp.visual.plotting import draw_cn import matplotlib.pyplot as plt from ..utils4t import devices def test_dsatur_py(): for _ in range(20): N = 13 G...
[ "thgsp.graphs.generators.rand_udg", "thgsp.graphs.generators.torch.rand", "pytest.mark.parametrize", "thgsp.alg.coloring.dsatur", "thgsp.alg.coloring.dsatur_py", "thgsp.alg.coloring.check_coloring", "thgsp.visual.plotting.draw_cn", "thgsp.alg.coloring.dsatur_cpp", "matplotlib.pyplot.show" ]
[((877, 919), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""device"""', 'devices'], {}), "('device', devices)\n", (900, 919), False, 'import pytest\n'), ((549, 559), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (557, 559), True, 'import matplotlib.pyplot as plt\n'), ((863, 873), 'matplotlib.pyp...
from models.rnn_mlp import RNN_MLP from models.social_attention import SocialAttention from models.cnn_mlp import CNN_MLP from models.spatial_attention import SpatialAttention from models.s2s_spatial_attention import S2sSpatialAtt from models.s2s_social_attention import S2sSocialAtt import time import json import...
[ "torch.manual_seed", "os.path.exists", "torch.mul", "models.spatial_attention.SpatialAttention", "helpers.helpers_training.offsets_to_trajectories", "models.cnn_mlp.CNN_MLP", "helpers.helpers_evaluation.predict_naive", "torch.load", "models.rnn_mlp.RNN_MLP", "torch.FloatTensor", "helpers.helpers...
[((586, 607), 'torch.manual_seed', 'torch.manual_seed', (['(42)'], {}), '(42)\n', (603, 607), False, 'import torch\n'), ((3296, 3320), 'os.path.exists', 'os.path.exists', (['dir_name'], {}), '(dir_name)\n', (3310, 3320), False, 'import os\n'), ((3419, 3447), 'os.path.exists', 'os.path.exists', (['sub_dir_name'], {}), '...
from .models import * from rest_framework import serializers from django.contrib.auth.password_validation import validate_password from django.core.exceptions import ValidationError class foodSerializer(serializers.ModelSerializer): class Meta: model = food fields = '__all__' class RegSerializer(...
[ "rest_framework.serializers.IntegerField" ]
[((694, 720), 'rest_framework.serializers.IntegerField', 'serializers.IntegerField', ([], {}), '()\n', (718, 720), False, 'from rest_framework import serializers\n'), ((2339, 2365), 'rest_framework.serializers.IntegerField', 'serializers.IntegerField', ([], {}), '()\n', (2363, 2365), False, 'from rest_framework import ...
# @Author: <NAME> # @Date: 2021-03-22 09:43:07 # @Last Modified by: <NAME> # @Last Modified time: 2021-11-08 15:09:29 #!/usr/bin/env python ## based on: detectron2.modeling.roi_heads.box_head ## based on: detectron2.modeling.roi_heads.fast_rcnn import torch from torch import nn import numpy as np import logging ...
[ "numpy.prod", "torch.nn.ReLU", "torch.nn.Dropout", "detectron2.modeling.roi_heads.fast_rcnn._log_classification_stats", "torch.nn.init.constant_", "detectron2.layers.cross_entropy", "fvcore.nn.smooth_l1_loss", "torch.nn.functional.softmax", "torch.arange", "detectron2.layers.ShapeSpec", "torch.n...
[((1340, 1372), 'detectron2.modeling.roi_heads.box_head.ROI_BOX_HEAD_REGISTRY.register', 'ROI_BOX_HEAD_REGISTRY.register', ([], {}), '()\n', (1370, 1372), False, 'from detectron2.modeling.roi_heads.box_head import ROI_BOX_HEAD_REGISTRY\n'), ((18533, 18562), 'detectron2.modeling.roi_heads.ROI_HEADS_REGISTRY.register', '...
from dataclasses import dataclass, field from typing import Dict, List, Optional from .node_action import NodeAction from .node_id_filter import NodeIdFilter @dataclass class NodeRunCommandAction(NodeAction): action: str = field(default="RUN_COMMAND", init=False) path: str arguments: Optional[List[str]] ...
[ "dataclasses.field" ]
[((230, 270), 'dataclasses.field', 'field', ([], {'default': '"""RUN_COMMAND"""', 'init': '(False)'}), "(default='RUN_COMMAND', init=False)\n", (235, 270), False, 'from dataclasses import dataclass, field\n')]
#thomas feiring model import math import numpy as np import pandas as pd #enter the year for which you need prediction starting 2019 year=2019 number_of_days=365 day=0 df = pd.read_csv('groundtruth.csv') u=df['Mean'] X_t= u[0] sd=df['St dev'] print("Month,Year,Inflow") #lag -1 correlation lag=df['co relation'] np.rand...
[ "numpy.random.normal", "math.sqrt", "numpy.random.seed", "pandas.read_csv" ]
[((174, 204), 'pandas.read_csv', 'pd.read_csv', (['"""groundtruth.csv"""'], {}), "('groundtruth.csv')\n", (185, 204), True, 'import pandas as pd\n'), ((313, 333), 'numpy.random.seed', 'np.random.seed', (['(9001)'], {}), '(9001)\n', (327, 333), True, 'import numpy as np\n'), ((373, 398), 'numpy.random.normal', 'np.rando...
"""REST client handling, including GitHubStream base class.""" import requests from os import environ from typing import Any, Dict, List, Optional, Iterable, cast from singer_sdk.streams import RESTStream class GitHubStream(RESTStream): """GitHub stream class.""" MAX_PER_PAGE = 1000 MAX_RESULTS_LIMIT: ...
[ "typing.cast" ]
[((3295, 3331), 'typing.cast', 'cast', (['str', 'prepared_request.path_url'], {}), '(str, prepared_request.path_url)\n', (3299, 3331), False, 'from typing import Any, Dict, List, Optional, Iterable, cast\n'), ((1818, 1843), 'typing.cast', 'cast', (['int', 'previous_token'], {}), '(int, previous_token)\n', (1822, 1843),...
#!/usr/bin/env python """ Update autogenerated source files from yaml database. Copyright (c) 2019, vit9696 """ from __future__ import print_function import update_products import fnmatch import operator import os import unicodedata import sys import yaml def remove_accents(input_str): nfkd_form = unicodedata.n...
[ "os.path.exists", "update_products.load_products", "unicodedata.combining", "os.path.join", "yaml.safe_load", "unicodedata.normalize", "sys.exit", "fnmatch.filter", "operator.itemgetter", "os.walk" ]
[((307, 347), 'unicodedata.normalize', 'unicodedata.normalize', (['"""NFKD"""', 'input_str'], {}), "('NFKD', input_str)\n", (328, 347), False, 'import unicodedata\n'), ((669, 684), 'os.walk', 'os.walk', (['dbpath'], {}), '(dbpath)\n', (676, 684), False, 'import os\n'), ((8974, 9005), 'update_products.load_products', 'u...
""" Reference: [1]: Branlard, Flexible multibody dynamics using joint coordinates and the Rayleigh-Ritz approximation: the general framework behind and beyond Flex, Wind Energy, 2019 """ import numpy as np from .utils import * from .bodies import Body as GenericBody from .bodies import RigidBody as Gen...
[ "numpy.eye", "numpy.ones", "numpy.asarray", "numpy.array", "numpy.dot", "numpy.zeros", "numpy.linspace", "numpy.cos", "numpy.sin", "welib.beams.theory.UniformBeamBendingModes", "numpy.transpose", "numpy.arange" ]
[((661, 674), 'numpy.asarray', 'np.asarray', (['m'], {}), '(m)\n', (671, 674), True, 'import numpy as np\n'), ((730, 764), 'numpy.array', 'np.array', (['[[v[0]], [v[1]], [v[2]]]'], {}), '([[v[0]], [v[1]], [v[2]]])\n', (738, 764), True, 'import numpy as np\n'), ((20332, 20350), 'numpy.zeros', 'np.zeros', (['Bp.shape'], ...
import Global from methods.DBManager import DBManager from handlers.kbeServer.XREditor.Interface import xr_interface_mail #获取邮件列表 def Transactions_Code_6001(self_uid,self_username,languageStr,json_data): #回调json json_back = { "code" : 0, "msg": "", "pam": "" } #logging.info("get...
[ "handlers.kbeServer.XREditor.Interface.xr_interface_mail.GetMail", "Global.LanguageInst.GetMsg", "methods.DBManager.DBManager", "handlers.kbeServer.XREditor.Interface.xr_interface_mail.ReadMail", "handlers.kbeServer.XREditor.Interface.xr_interface_mail.DetMail", "handlers.kbeServer.XREditor.Interface.xr_i...
[((2255, 2266), 'methods.DBManager.DBManager', 'DBManager', ([], {}), '()\n', (2264, 2266), False, 'from methods.DBManager import DBManager\n'), ((2283, 2335), 'handlers.kbeServer.XREditor.Interface.xr_interface_mail.ReadAll', 'xr_interface_mail.ReadAll', (['DB', 'self_uid', 'languageStr'], {}), '(DB, self_uid, languag...
#!/usr/bin/env python3.7 # # Please note that the following code is a demo. Edge cases and error # checking are intentionally omitted where they might otherwise distract # us from the core ideas. # "Before we can understand how something can go wrong, we must # learn how it can go right." print('Example from...
[ "hashlib.new" ]
[((3165, 3192), 'hashlib.new', 'hashlib.new', (['"""sha256"""', 'data'], {}), "('sha256', data)\n", (3176, 3192), False, 'import hashlib\n'), ((3235, 3265), 'hashlib.new', 'hashlib.new', (['"""ripemd160"""', 'data'], {}), "('ripemd160', data)\n", (3246, 3265), False, 'import hashlib\n')]
# coding:utf-8 from flask_wtf import Form from wtforms import SelectField, StringField, TextAreaField, SubmitField, \ PasswordField from wtforms.validators import DataRequired, Length, Email, EqualTo from ..main.forms import CommentForm class CommonForm(Form): types = SelectField(u'博文分类', coerce=int, validato...
[ "wtforms.validators.Email", "wtforms.validators.EqualTo", "wtforms.validators.Length", "wtforms.validators.DataRequired", "wtforms.TextAreaField" ]
[((1209, 1231), 'wtforms.TextAreaField', 'TextAreaField', (['u"""分类介绍"""'], {}), "(u'分类介绍')\n", (1222, 1231), False, 'from wtforms import SelectField, StringField, TextAreaField, SubmitField, PasswordField\n'), ((2268, 2288), 'wtforms.TextAreaField', 'TextAreaField', (['u"""备注"""'], {}), "(u'备注')\n", (2281, 2288), Fals...
#!/usr/bin/env python3 import json import iohservice if __name__ == "__main__": import random import sys dimension = 10 fquery = "../debug/query" freply = "../debug/reply" for i in range(5): if i == 3: jq = json.dumps( {"query_type":"new_run"} ) iohservice.que...
[ "iohservice.call", "json.dumps", "random.randint", "iohservice.query" ]
[((617, 661), 'json.dumps', 'json.dumps', (["{'query_type': 'stop'}"], {'indent': '(4)'}), "({'query_type': 'stop'}, indent=4)\n", (627, 661), False, 'import json\n'), ((666, 702), 'iohservice.query', 'iohservice.query', (['jq', 'fquery', 'freply'], {}), '(jq, fquery, freply)\n', (682, 702), False, 'import iohservice\n...
import unittest import numpy as np from sklearn import exceptions # from sklearn.datasets import load_boston as load from skcosmo.datasets import load_csd_1000r as load from skcosmo.feature_selection import CUR class TestCUR(unittest.TestCase): def setUp(self): self.X, _ = load(return_X_y=True) def...
[ "numpy.linalg.eigh", "numpy.allclose", "numpy.argsort", "skcosmo.datasets.load_csd_1000r", "unittest.main", "skcosmo.feature_selection.CUR" ]
[((1455, 1481), 'unittest.main', 'unittest.main', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (1468, 1481), False, 'import unittest\n'), ((290, 311), 'skcosmo.datasets.load_csd_1000r', 'load', ([], {'return_X_y': '(True)'}), '(return_X_y=True)\n', (294, 311), True, 'from skcosmo.datasets import load_csd_1000r as loa...
from django.shortcuts import render,redirect from django.urls import reverse_lazy,reverse from django.contrib.auth.forms import UserCreationForm from django.views.generic import CreateView,DetailView,UpdateView,DeleteView,TemplateView from django.contrib.auth import authenticate,login from django.http import HttpRespon...
[ "urllib.parse.parse_qs", "django.urls.reverse", "django.forms.utils.ErrorList", "django.shortcuts.render", "halls.forms.VideoForm", "halls.models.Hall.objects.all", "django.shortcuts.redirect", "django.urls.reverse_lazy", "halls.forms.SearchForm", "django.contrib.auth.authenticate", "halls.model...
[((1076, 1092), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {}), '()\n', (1090, 1092), False, 'from django.contrib.auth.decorators import login_required\n'), ((1241, 1257), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {}), '()\n', (1255, 1257), False, 'from django....
import warnings import numpy as np from sklearn.covariance import oas, ledoit_wolf, fast_mcd, empirical_covariance from .test import is_square # Mapping different estimator on the sklearn toolbox def _lwf(X): """Wrapper for sklearn ledoit wolf covariance estimator""" C, _ = ledoit_wolf(X.T) return C ...
[ "numpy.hanning", "numpy.trace", "numpy.array", "numpy.linalg.norm", "numpy.arange", "sklearn.covariance.fast_mcd", "numpy.fft.rfft", "numpy.empty", "numpy.concatenate", "warnings.warn", "numpy.abs", "numpy.eye", "numpy.ones", "sklearn.covariance.oas", "numpy.fill_diagonal", "numpy.lib....
[((288, 304), 'sklearn.covariance.ledoit_wolf', 'ledoit_wolf', (['X.T'], {}), '(X.T)\n', (299, 304), False, 'from sklearn.covariance import oas, ledoit_wolf, fast_mcd, empirical_covariance\n'), ((399, 407), 'sklearn.covariance.oas', 'oas', (['X.T'], {}), '(X.T)\n', (402, 407), False, 'from sklearn.covariance import oas...
#!/usr/bin/python from github import collections, functools ''' Decorator that caches a function's return value each time it is called so if it is called later with the same arguments, the cached value is returned, instead of reevaluating the function ''' class Memoized(object): def __init__(self, func): ...
[ "github.functools.partial" ]
[((772, 809), 'github.functools.partial', 'functools.partial', (['self.__call__', 'obj'], {}), '(self.__call__, obj)\n', (789, 809), False, 'from github import collections, functools\n')]
from random import randint import numpy as np n = [ 500 ] m = [ n[i] * n[i + 1] for i in range(len(n) - 1) ] k, v1, v2 = 600, 10, 1000 print('%d %d %d 2' % (np.sum(n), np.sum(m), k)) b = 1 for i in range(len(n) - 1): for j in range(0, n[i]): for k in range(0, n[i + 1]): print('%d %d' % (b + j,...
[ "numpy.sum", "random.randint" ]
[((371, 391), 'random.randint', 'randint', (['v1', '(v1 + v2)'], {}), '(v1, v1 + v2)\n', (378, 391), False, 'from random import randint\n'), ((159, 168), 'numpy.sum', 'np.sum', (['n'], {}), '(n)\n', (165, 168), True, 'import numpy as np\n'), ((170, 179), 'numpy.sum', 'np.sum', (['m'], {}), '(m)\n', (176, 179), True, 'i...
### # Copyright (c) 2002-2004, <NAME> # Copyright (c) 2008-2010, <NAME> # Copyright (c) 2014, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must ret...
[ "supybot.registry.isValidRegistryName", "supybot.utils.str.multipleReplacer", "supybot.utils.file.AtomicFile", "supybot.registry.join", "supybot.world.flushers.remove", "supybot.utils.str.timestamp", "types.MethodType", "supybot.callbacks.CanonicalNameDict", "supybot.i18n.internationalizeDocstring",...
[((2160, 2193), 'supybot.i18n.PluginInternationalization', 'PluginInternationalization', (['"""RSS"""'], {}), "('RSS')\n", (2186, 2193), False, 'from supybot.i18n import PluginInternationalization, internationalizeDocstring\n'), ((2761, 2819), 'supybot.conf.supybot.directories.data.dirize', 'conf.supybot.directories.da...
# coding=utf-8 # # catkin_lint # Copyright (c) 2013-2021 <NAME> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of condition...
[ "catkin_lint.environment.CatkinEnvironment", "catkin_lint.environment.Cache", "os.makedirs", "catkin_lint.environment._store_cache", "time.time", "os.path.join", "catkin_lint.environment._load_cache", "tempfile.mkdtemp", "shutil.rmtree", "catkin_lint.environment._clear_cache" ]
[((2468, 2494), 'os.path.join', 'os.path.join', (['srcdir', 'name'], {}), '(srcdir, name)\n', (2480, 2494), False, 'import os\n'), ((2503, 2522), 'os.makedirs', 'os.makedirs', (['pkgdir'], {}), '(pkgdir)\n', (2514, 2522), False, 'import os\n'), ((3032, 3041), 'tempfile.mkdtemp', 'mkdtemp', ([], {}), '()\n', (3039, 3041...
""" Created by: <NAME>, 12 May 2020 Code to predict rates of adoption using Top_Features identified """ from Build_Model import (format_magpi, format_dataset, split_train_test, create_random_forest, predict_test_data, evaluate_fit, list_top_features, plot_top_features, plot_predicted_actual, plot_tree) from sklear...
[ "Build_Model.format_magpi", "Build_Model.plot_tree", "argparse.ArgumentParser", "Build_Model.create_random_forest", "Build_Model.evaluate_fit", "tkinter.Tk", "Build_Model.format_dataset", "Build_Model.split_train_test", "Build_Model.list_top_features", "Build_Model.plot_predicted_actual", "Build...
[((826, 851), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (849, 851), False, 'import argparse\n'), ((1942, 1946), 'tkinter.Tk', 'Tk', ([], {}), '()\n', (1944, 1946), False, 'from tkinter import filedialog, Tk\n'), ((1964, 2094), 'tkinter.filedialog.askopenfilename', 'filedialog.askopenfilena...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os from pants.base.build_environment import get_buildroot from pants.base.workuni...
[ "os.path.join", "os.path.splitext", "os.path.relpath", "pants.base.build_environment.get_buildroot", "pants.util.dirutil.safe_mkdir_for" ]
[((2537, 2581), 'os.path.relpath', 'os.path.relpath', (['abs_source', 'abs_source_root'], {}), '(abs_source, abs_source_root)\n', (2552, 2581), False, 'import os\n'), ((2596, 2624), 'os.path.splitext', 'os.path.splitext', (['rel_source'], {}), '(rel_source)\n', (2612, 2624), False, 'import os\n'), ((2664, 2699), 'os.pa...
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file accom...
[ "future.moves.collections.OrderedDict" ]
[((9320, 9998), 'future.moves.collections.OrderedDict', 'OrderedDict', (["[('shared_dir', {'allowed_values': ALLOWED_VALUES['file_path'],\n 'validators': [shared_dir_validator]}), ('efs_fs_id', {'allowed_values':\n ALLOWED_VALUES['efs_fs_id'], 'validators': [efs_id_validator]}), (\n 'performance_mode', {'defau...
#!/usr/bin/env python # Copyright 2019 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ "apps.aks.libs.aks.SysManager", "time.time", "glob.glob" ]
[((1089, 1105), 'apps.aks.libs.aks.SysManager', 'aks.SysManager', ([], {}), '()\n', (1103, 1105), False, 'from apps.aks.libs import aks\n'), ((1302, 1313), 'time.time', 'time.time', ([], {}), '()\n', (1311, 1313), False, 'import time\n'), ((1420, 1431), 'time.time', 'time.time', ([], {}), '()\n', (1429, 1431), False, '...
#!/usr/bin/env python3 """ Restore The Combine from a backup stored in the AWS S3 service. Restores The Combine database and backend files from a compressed tarball stored in the AWS S3 service. This script only applies to instances of The Combine running in a Kubernetes cluster. It can restore backups made from ins...
[ "combine_app.CombineApp", "logging.basicConfig", "tempfile.TemporaryDirectory", "tarfile.open", "argparse.ArgumentParser", "script_step.ScriptStep", "pathlib.Path", "re.match", "os.chdir", "aws_backup.AwsBackup", "sys.exit" ]
[((1452, 1624), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Restore TheCombine database and backend files from a file in AWS S3."""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description=\n 'Restore TheCombine database and backend files from a file in AWS S3...
""" Description taken from official website: https://datasets.kensho.com/datasets/spgispeech SPGISpeech consists of 5,000 hours of recorded company earnings calls and their respective transcriptions. The original calls were split into slices ranging from 5 to 15 seconds in length to allow easy training for speech rec...
[ "lhotse.supervision.SupervisionSegment", "lhotse.recipes.utils.manifests_exist", "lhotse.audio.RecordingSet.open_writer", "pathlib.Path", "lhotse.audio.Recording.from_file", "lhotse.audio.RecordingSet.from_jsonl_lazy", "lhotse.recipes.utils.read_manifests_if_cached", "lhotse.supervision.SupervisionSet...
[((2027, 2201), 'logging.info', 'logging.info', (['"""SPGISpeech is not available for direct download. Please fill out the form at https://datasets.kensho.com/datasets/spgispeech to download the corpus."""'], {}), "(\n 'SPGISpeech is not available for direct download. Please fill out the form at https://datasets.ken...
import os from django import template from django.conf import settings from django.template import Template, Context from django.utils.safestring import mark_safe from django.utils.text import normalize_newlines from wagtailmenus.models import FlatMenu from xr_pages import services from xr_pages.svg_icons import svg_...
[ "wagtailmenus.models.FlatMenu.objects.filter", "django.template.Template", "os.path.join", "os.path.isfile", "xr_pages.services.get_local_group_list_page", "django.template.Library", "django.template.Context", "django.utils.text.normalize_newlines", "xr_pages.services.get_home_page", "xr_pages.ser...
[((341, 359), 'django.template.Library', 'template.Library', ([], {}), '()\n', (357, 359), False, 'from django import template\n'), ((480, 506), 'xr_pages.services.get_site', 'services.get_site', (['request'], {}), '(request)\n', (497, 506), False, 'from xr_pages import services\n'), ((632, 663), 'xr_pages.services.get...
from django.contrib import admin from .models import Person admin.site.register(Person) # Register your models here.
[ "django.contrib.admin.site.register" ]
[((61, 88), 'django.contrib.admin.site.register', 'admin.site.register', (['Person'], {}), '(Person)\n', (80, 88), False, 'from django.contrib import admin\n')]
#################################################################################################### ## ## Project: Embedded Learning Library (ELL) ## File: demoHelper.py ## Authors: <NAME> ## <NAME> ## ## Requires: Python 3.x ## #####################################################################...
[ "cv2.rectangle", "cv2.imshow", "sys.exc_info", "sys.path.append", "os.listdir", "ell.model.Map", "argparse.ArgumentParser", "ell.neural.utilities.ell_map_from_float_predictor", "os.path.split", "os.path.isdir", "cv2.waitKey", "cv2.putText", "os.path.dirname", "cv2.cvtColor", "cv2.getText...
[((475, 500), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (490, 500), False, 'import os\n'), ((914, 925), 'time.time', 'time.time', ([], {}), '()\n', (923, 925), False, 'import time\n'), ((4155, 4190), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['helpString'], {}), '(helpString...
#!/bin/env python from __future__ import division, print_function , unicode_literals, absolute_import import os, sys, subprocess crow_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) eigen_cflags = "" try: has_pkg_eigen = subprocess.call(["pkg-config","--exists","eigen3"]) == 0 except: has_pkg_...
[ "subprocess.check_output", "os.path.exists", "os.path.join", "subprocess.call", "os.path.abspath" ]
[((545, 574), 'os.path.exists', 'os.path.exists', (['libmesh_eigen'], {}), '(libmesh_eigen)\n', (559, 574), False, 'import os, sys, subprocess\n'), ((370, 431), 'subprocess.check_output', 'subprocess.check_output', (["['pkg-config', 'eigen3', '--cflags']"], {}), "(['pkg-config', 'eigen3', '--cflags'])\n", (393, 431), F...
from api_common.api_router import router from func_common.get_currenttime import getcurrenttime from func_common.filepathforchecksec import get_filepaths import os ''' 弱口令检测API,不包含暴力枚举破解,只进行收集弱口令检测 ''' @router.get("/checkpasswd", name="账号密码检查", description="用于账号密码检查的api,查看是否有弱密码泄露,username为用户名参数,filename为文件参数") async...
[ "func_common.get_currenttime.getcurrenttime", "os.path.isdir", "func_common.filepathforchecksec.get_filepaths", "api_common.api_router.router.get" ]
[((205, 319), 'api_common.api_router.router.get', 'router.get', (['"""/checkpasswd"""'], {'name': '"""账号密码检查"""', 'description': '"""用于账号密码检查的api,查看是否有弱密码泄露,username为用户名参数,filename为文件参数"""'}), "('/checkpasswd', name='账号密码检查', description=\n '用于账号密码检查的api,查看是否有弱密码泄露,username为用户名参数,filename为文件参数')\n", (215, 319), Fals...
#!/usr/bin/python import urllib2 def getContent(url): """ Retrives url content """ try: content = urllib2.urlopen(url) except IOError: return "" return content.read()
[ "urllib2.urlopen" ]
[((126, 146), 'urllib2.urlopen', 'urllib2.urlopen', (['url'], {}), '(url)\n', (141, 146), False, 'import urllib2\n')]
from __future__ import absolute_import, division, print_function import pytest import torch from pyro.ops.linalg import rinverse from tests.common import assert_equal @pytest.mark.parametrize("A", [ torch.tensor([[17.]]), torch.tensor([[1., 2.], [2., -3.]]), torch.tensor([[1., 2, 0], [2, -2, 4], [0, 4, ...
[ "torch.eye", "pytest.mark.parametrize", "torch.tensor", "pyro.ops.linalg.rinverse", "torch.inverse" ]
[((546, 595), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""use_sym"""', '[True, False]'], {}), "('use_sym', [True, False])\n", (569, 595), False, 'import pytest\n'), ((668, 692), 'pyro.ops.linalg.rinverse', 'rinverse', (['A'], {'sym': 'use_sym'}), '(A, sym=use_sym)\n', (676, 692), False, 'from pyro.ops.l...
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.patches import FancyArrowPatch, Arc def get_angle_plot(line1, line2, radius=1, color=None, origin=(0, 0), len_x_axis=1, len_y_axis=1): l1xy = line1.get_xydata() # Angle between line1...
[ "matplotlib.pyplot.text", "matplotlib.pyplot.savefig", "matplotlib.patches.Arc", "matplotlib.use", "matplotlib.pyplot.plot", "matplotlib.patches.FancyArrowPatch", "numpy.diff", "numpy.linspace", "matplotlib.pyplot.Line2D", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((38, 59), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (52, 59), False, 'import matplotlib\n'), ((825, 914), 'matplotlib.patches.Arc', 'Arc', (['origin', '(len_x_axis * radius)', '(len_y_axis * radius)', '(0)', 'theta1', 'theta2'], {'color': 'color'}), '(origin, len_x_axis * radius, len_y_axi...
# Pomito - Pomodoro timer in steroids # A simple console UI plugin import cmd import logging import click from pomito.plugins import ui # pylint: disable=invalid-name logger = logging.getLogger("pomito.plugins.ui.console") _POMODORO_SERVICE = None def _get_pomodoro_service(): """Gets pomodoro service.""" i...
[ "logging.getLogger", "click.argument", "click.group", "click.echo", "cmd.Cmd.__init__" ]
[((180, 226), 'logging.getLogger', 'logging.getLogger', (['"""pomito.plugins.ui.console"""'], {}), "('pomito.plugins.ui.console')\n", (197, 226), False, 'import logging\n'), ((643, 656), 'click.group', 'click.group', ([], {}), '()\n', (654, 656), False, 'import click\n'), ((773, 808), 'click.argument', 'click.argument'...
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr @testing.parameterize(*testing.product({ 'use_cudnn': ['always', 'never'], })) class TestSpatialTransformerGrid(unitt...
[ "chainer.testing.run_module", "chainer.functions.SpatialTransformerGrid", "chainer.cuda.to_cpu", "chainer.testing.product", "numpy.linspace", "numpy.array", "numpy.random.uniform", "chainer.functions.spatial_transformer_grid", "chainer.testing.assert_allclose", "chainer.cuda.to_gpu", "chainer.us...
[((2252, 2290), 'chainer.testing.run_module', 'testing.run_module', (['__name__', '__file__'], {}), '(__name__, __file__)\n', (2270, 2290), False, 'from chainer import testing\n'), ((824, 842), 'chainer.cuda.to_cpu', 'cuda.to_cpu', (['theta'], {}), '(theta)\n', (835, 842), False, 'from chainer import cuda\n'), ((1267, ...
import os import time import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from torch.utils.data import DataLoader import torchvision.transforms as transforms import torchvision.datasets as datasets from torchvision.models import resnet152 TRAIN_TRANSFORM = transforms.Comp...
[ "torchvision.transforms.CenterCrop", "torchvision.transforms.Compose", "os.path.exists", "torch.nn.CrossEntropyLoss", "time.clock", "torch.load", "torchvision.transforms.Resize", "os.path.dirname", "torchvision.models.resnet152", "torch.nn.Linear", "torch.utils.data.DataLoader", "os.path.abspa...
[((819, 831), 'time.clock', 'time.clock', ([], {}), '()\n', (829, 831), False, 'import time\n'), ((863, 889), 'torchvision.models.resnet152', 'resnet152', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (872, 889), False, 'from torchvision.models import resnet152\n'), ((982, 1014), 'torch.nn.Linear', 'nn.Linear'...
""" Compute numerical solution for Poisson with background. Produces Fig. 7 from the Feldman & Cousins paper. """ import numpy as np from scipy.stats import poisson import matplotlib.pyplot as plt from gammapy.stats import ( fc_construct_acceptance_intervals_pdfs, fc_fix_limits, fc_get_limits, ) backgroun...
[ "gammapy.stats.fc_fix_limits", "matplotlib.pyplot.grid", "matplotlib.pyplot.plot", "gammapy.stats.fc_get_limits", "matplotlib.pyplot.figure", "scipy.stats.poisson", "matplotlib.pyplot.axis", "gammapy.stats.fc_construct_acceptance_intervals_pdfs", "numpy.arange", "matplotlib.pyplot.show" ]
[((409, 431), 'numpy.arange', 'np.arange', (['(0)', 'n_bins_x'], {}), '(0, n_bins_x)\n', (418, 431), True, 'import numpy as np\n'), ((609, 659), 'gammapy.stats.fc_construct_acceptance_intervals_pdfs', 'fc_construct_acceptance_intervals_pdfs', (['matrix', 'cl'], {}), '(matrix, cl)\n', (647, 659), False, 'from gammapy.st...
# Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org # # See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with # the License. Y...
[ "pytest.fixture", "aether.python.avro.schema.Node", "aether.python.avro.generation.SampleGenerator" ]
[((1011, 1041), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (1025, 1041), False, 'import pytest\n'), ((1121, 1151), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (1135, 1151), False, 'import pytest\n'), ((1232, 1262), 'pytest.fi...
import os import argparse import pandas as pd import numpy as np import sys import json DEFAULT_PROJECT_REPO = os.path.sep.join(__file__.split(os.path.sep)[:-2]) PROJECT_REPO_DIR = os.path.abspath( os.environ.get('PROJECT_REPO_DIR', DEFAULT_PROJECT_REPO)) sys.path.append(os.path.join(PROJECT_REPO_DIR, 'src')) from...
[ "argparse.ArgumentParser", "feature_transformation.parse_id_cols", "pandas.merge", "os.path.join", "os.environ.get", "numpy.concatenate", "feature_transformation.parse_feature_cols", "json.load", "feature_transformation.parse_time_col", "json.dump" ]
[((202, 258), 'os.environ.get', 'os.environ.get', (['"""PROJECT_REPO_DIR"""', 'DEFAULT_PROJECT_REPO'], {}), "('PROJECT_REPO_DIR', DEFAULT_PROJECT_REPO)\n", (216, 258), False, 'import os\n'), ((277, 314), 'os.path.join', 'os.path.join', (['PROJECT_REPO_DIR', '"""src"""'], {}), "(PROJECT_REPO_DIR, 'src')\n", (289, 314), ...
import frappe from frappe.desk.reportview import get_match_cond, get_filters_cond from frappe.utils import unique @frappe.whitelist() def get_sales_person(doctype, txt, searchfield, start, page_len, filters): conditions = [] sales_persons = frappe.db.sql(""" SELECT SP.name as name from `tabSales Person` AS SP ...
[ "frappe.utils.unique", "frappe.whitelist", "frappe.desk.reportview.get_filters_cond", "frappe.db.sql", "frappe.desk.reportview.get_match_cond", "frappe.get_meta" ]
[((115, 133), 'frappe.whitelist', 'frappe.whitelist', ([], {}), '()\n', (131, 133), False, 'import frappe\n'), ((249, 597), 'frappe.db.sql', 'frappe.db.sql', (['""" SELECT SP.name as name from `tabSales Person` AS SP \n INNER JOIN `tabSales Team` AS ST ON ST.sales_person = SP.name\n I...
import os from flask import Flask from flask_cache import Cache from flask_login import LoginManager import dmapiclient from dmutils import init_app, init_frontend_app from dmcontent.content_loader import ContentLoader from config import configs cache = Cache() login_manager = LoginManager() data_api_client = dmapi...
[ "flask_login.LoginManager", "flask_cache.Cache", "flask.Flask", "dmutils.init_frontend_app", "os.environ.get", "dmutils.init_app", "dmcontent.content_loader.ContentLoader", "dmapiclient.DataAPIClient" ]
[((258, 265), 'flask_cache.Cache', 'Cache', ([], {}), '()\n', (263, 265), False, 'from flask_cache import Cache\n'), ((282, 296), 'flask_login.LoginManager', 'LoginManager', ([], {}), '()\n', (294, 296), False, 'from flask_login import LoginManager\n'), ((315, 342), 'dmapiclient.DataAPIClient', 'dmapiclient.DataAPIClie...
#!/usr/bin/python import subprocess import os.path import platform def git(*args): return subprocess.check_call(['git'] + list(args)) def gitupdate(repo, mPath): if os.path.exists(mPath) == False: git("clone", repo, mPath) else: git("pull", repo, mPath) def Restore(*args): return sub...
[ "platform.system" ]
[((382, 399), 'platform.system', 'platform.system', ([], {}), '()\n', (397, 399), False, 'import platform\n')]
#------------------------------------------------------------------------------- # Name: setup.py # Purpose: Standard module installation script # Licence: MIT License # This file is subject to the terms and conditions of the MIT License. # For further details, please refer to L...
[ "setuptools.find_packages" ]
[((1047, 1062), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (1060, 1062), False, 'from setuptools import setup, find_packages\n')]
# -*- coding: utf-8 -*- from jetfactory.controller import BaseController, Injector, route, input_load, output_dump from jetfactory.schema import ParamsSchema from jet_guestbook.service import VisitService, VisitorService from jet_guestbook.schema import Visit, Visitor, VisitNew class Controller(BaseController): ...
[ "jetfactory.controller.output_dump", "jetfactory.controller.route", "jetfactory.controller.input_load", "jet_guestbook.service.VisitorService", "jet_guestbook.service.VisitService" ]
[((652, 688), 'jetfactory.controller.route', 'route', (['"""/"""', '"""GET"""', '"""List of entries"""'], {}), "('/', 'GET', 'List of entries')\n", (657, 688), False, 'from jetfactory.controller import BaseController, Injector, route, input_load, output_dump\n'), ((694, 724), 'jetfactory.controller.input_load', 'input_...
# -*- coding: utf-8 -*- """Celery configurations.""" import os from celery import Celery broker = os.environ.get("BROKER_URL", "redis://localhost:6379") backend = os.environ.get("BACKEND_URL", "redis://localhost:6379") app = Celery( __name__, broker=broker, backend=backend, include=["worker.tasks"],...
[ "celery.Celery", "os.environ.get" ]
[((100, 154), 'os.environ.get', 'os.environ.get', (['"""BROKER_URL"""', '"""redis://localhost:6379"""'], {}), "('BROKER_URL', 'redis://localhost:6379')\n", (114, 154), False, 'import os\n'), ((165, 220), 'os.environ.get', 'os.environ.get', (['"""BACKEND_URL"""', '"""redis://localhost:6379"""'], {}), "('BACKEND_URL', 'r...
from setuptools import setup setup(name='alexa-goingson', version='0.1', description='San Francisco Event Recommendations for Amazon Echo', url='http://github.com/kazistan/alexa-goingson', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=['baydata'], install_requires=[ 'requests', 'bs4', 'r...
[ "setuptools.setup" ]
[((30, 378), 'setuptools.setup', 'setup', ([], {'name': '"""alexa-goingson"""', 'version': '"""0.1"""', 'description': '"""San Francisco Event Recommendations for Amazon Echo"""', 'url': '"""http://github.com/kazistan/alexa-goingson"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""',...
import os from shutil import copytree, copy2 from glob import glob import torchvision import torch from tensorboardX import SummaryWriter from sklearn import metrics def copy_source_code(path): if not os.path.isdir(path): os.makedirs(path) denylist = ["./__pycache__/"] folders = glo...
[ "os.path.exists", "tensorboardX.SummaryWriter", "os.makedirs", "shutil.copy2", "shutil.copytree", "os.path.isdir", "os.mkdir", "glob.glob" ]
[((317, 329), 'glob.glob', 'glob', (['"""./*/"""'], {}), "('./*/')\n", (321, 329), False, 'from glob import glob\n'), ((383, 397), 'glob.glob', 'glob', (['"""./*.py"""'], {}), "('./*.py')\n", (387, 397), False, 'from glob import glob\n'), ((478, 494), 'glob.glob', 'glob', (['"""./*.json"""'], {}), "('./*.json')\n", (48...
# boto3-lambda/src/lambda_functions.py import boto3 import json import os from helpers import Zipper from helpers import lambda_client, iam_client from settings import PYTHON_LAMBDA_API_PERMISSION_STATEMENT_ID, LAMBDA_POLICY_NAME, LAMBDA_ROLE, LAMBDA_TIMEOUT, LAMBDA_MEMORY, PYTHON_36_RUNTIME, PYTHON_LAMBDA_NAME def re...
[ "helpers.lambda_client", "json.dumps", "helpers.iam_client", "os.path.abspath", "helpers.Zipper" ]
[((2671, 2683), 'helpers.iam_client', 'iam_client', ([], {}), '()\n', (2681, 2683), False, 'from helpers import lambda_client, iam_client\n'), ((2891, 2916), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (2906, 2916), False, 'import os\n'), ((2954, 2962), 'helpers.Zipper', 'Zipper', ([], {})...
from cyder.base.tests import ModelTestMixin, TestCase from cyder.cydhcp.vrf.models import Vrf class VrfTests(TestCase, ModelTestMixin): @property def objs(self): """Create objects for test_create_delete.""" return ( Vrf.objects.create(name='a'), Vrf.objects.create(name=...
[ "cyder.cydhcp.vrf.models.Vrf.objects.create" ]
[((254, 282), 'cyder.cydhcp.vrf.models.Vrf.objects.create', 'Vrf.objects.create', ([], {'name': '"""a"""'}), "(name='a')\n", (272, 282), False, 'from cyder.cydhcp.vrf.models import Vrf\n'), ((296, 336), 'cyder.cydhcp.vrf.models.Vrf.objects.create', 'Vrf.objects.create', ([], {'name': '"""bbbbbbbbbbbbb"""'}), "(name='bb...
from collections import namedtuple import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F class DQN(nn.Module): def __init__(self): super(DQN, self).__init__() self.linear1 = nn.Linear(4, 64) self.linear2 = nn.Linear(64, 64) ...
[ "torch.nn.Linear" ]
[((255, 271), 'torch.nn.Linear', 'nn.Linear', (['(4)', '(64)'], {}), '(4, 64)\n', (264, 271), True, 'import torch.nn as nn\n'), ((295, 312), 'torch.nn.Linear', 'nn.Linear', (['(64)', '(64)'], {}), '(64, 64)\n', (304, 312), True, 'import torch.nn as nn\n'), ((336, 353), 'torch.nn.Linear', 'nn.Linear', (['(64)', '(64)'],...
import os import tempfile from unittest import TestCase from semantic_release import ImproperConfigurationError from semantic_release.pypi import upload_to_pypi from . import mock, wrapped_config_get class PypiTests(TestCase): @mock.patch("semantic_release.pypi.run") @mock.patch.dict( "os.environ", ...
[ "os.path.join", "tempfile.mkdtemp", "semantic_release.pypi.upload_to_pypi" ]
[((474, 490), 'semantic_release.pypi.upload_to_pypi', 'upload_to_pypi', ([], {}), '()\n', (488, 490), False, 'from semantic_release.pypi import upload_to_pypi\n'), ((1000, 1016), 'semantic_release.pypi.upload_to_pypi', 'upload_to_pypi', ([], {}), '()\n', (1014, 1016), False, 'from semantic_release.pypi import upload_to...
#!/usr/bin/env python # -*- coding: utf-8 -*- import wx class ImagePrintout(wx.Printout): def __init__(self, image): wx.Printout.__init__(self) self._image = image self._bitmap = None def HasPage(self, page_num): return page_num == 1 def OnPreparePrinting(self): ...
[ "wx.Printout.__init__", "wx.Pen", "wx.Image" ]
[((132, 158), 'wx.Printout.__init__', 'wx.Printout.__init__', (['self'], {}), '(self)\n', (152, 158), False, 'import wx\n'), ((827, 862), 'wx.Image', 'wx.Image', (['image_width', 'image_height'], {}), '(image_width, image_height)\n', (835, 862), False, 'import wx\n'), ((1450, 1468), 'wx.Pen', 'wx.Pen', (['"""black"""',...
from collections import OrderedDict from typing import Dict, Sequence, Type import torch import torch.nn as nn import torch.nn.functional as F from .mtl import MTLModel, MTLTaskConfig def make_hidden(sizes: Sequence[int], activation: Type[nn.Module]) -> nn.Module: if len(sizes) == 0: return nn.Identity(...
[ "torch.nn.Identity", "collections.OrderedDict", "torch.nn.functional.relu", "torch.nn.Linear" ]
[((308, 321), 'torch.nn.Identity', 'nn.Identity', ([], {}), '()\n', (319, 321), True, 'import torch.nn as nn\n'), ((1372, 1414), 'torch.nn.Linear', 'nn.Linear', (['task_sizes[-1]', 'task.output_dim'], {}), '(task_sizes[-1], task.output_dim)\n', (1381, 1414), True, 'import torch.nn as nn\n'), ((2005, 2014), 'torch.nn.fu...
from collections import ( defaultdict, ) from contextlib import ( asynccontextmanager, ) from datetime import ( datetime, ) from typing import ( Iterable, ) import psutil from core.db_entities import ( DBTable, DstDatabase, ) from core.enums import ( TransferringStagesEnum, ) from core.help...
[ "core.enums.TransferringStagesEnum.values.get", "psutil.virtual_memory", "core.helpers.logger.info", "datetime.datetime.now", "collections.defaultdict", "core.enums.TransferringStagesEnum.values.keys", "core.helpers.dates_list_to_str" ]
[((534, 551), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (545, 551), False, 'from collections import defaultdict\n'), ((593, 610), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (604, 610), False, 'from collections import defaultdict\n'), ((1182, 1218), 'core.enums.Tran...
# Copyright 2013 OpenStack Foundation # Copyright 2014 NEC Corporation # 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/licens...
[ "tempest.test.attr" ]
[((1408, 1444), 'tempest.test.attr', 'test.attr', ([], {'type': "['negative', 'gate']"}), "(type=['negative', 'gate'])\n", (1417, 1444), False, 'from tempest import test\n'), ((2256, 2292), 'tempest.test.attr', 'test.attr', ([], {'type': "['negative', 'gate']"}), "(type=['negative', 'gate'])\n", (2265, 2292), False, 'f...
from pystac.catalog import Catalog import pystac from pystac import (STACError, Extensions) from pystac.collection import Collection from pystac.extensions.base import (CatalogExtension, ExtensionDefinition, ExtendedObject) def create_single_file_stac(catalog): """Creates a Single File STAC from a STAC catalog. ...
[ "pystac.STACError", "pystac.read_dict", "pystac.extensions.base.ExtendedObject" ]
[((4773, 4822), 'pystac.extensions.base.ExtendedObject', 'ExtendedObject', (['Catalog', 'SingleFileSTACCatalogExt'], {}), '(Catalog, SingleFileSTACCatalogExt)\n', (4787, 4822), False, 'from pystac.extensions.base import CatalogExtension, ExtensionDefinition, ExtendedObject\n'), ((3556, 3629), 'pystac.STACError', 'STACE...
# Copyright (c) 2018 Cloudify Platform Ltd. 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 required by ap...
[ "cloudify_aws.common.utils.update_resource_arn", "json.dumps", "cloudify_aws.sqs.SQSBase.__init__", "cloudify_aws.common.decorators.aws_resource", "cloudify_aws.common.utils.update_resource_id" ]
[((2334, 2382), 'cloudify_aws.common.decorators.aws_resource', 'decorators.aws_resource', (['SQSQueue', 'RESOURCE_TYPE'], {}), '(SQSQueue, RESOURCE_TYPE)\n', (2357, 2382), False, 'from cloudify_aws.common import decorators, utils\n'), ((2561, 2609), 'cloudify_aws.common.decorators.aws_resource', 'decorators.aws_resourc...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-18 00:17 from __future__ import unicode_literals import c3nav.mapdata.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mapdata', '0023_escalatorslope'...
[ "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.ForeignKey" ]
[((452, 545), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (468, 545), False, 'from django.db import migrations, models\...
"""Login to BUPT's network""" #!/usr/env/python3 # -*- coding: UTF-8 -*- import datetime import logging import logging.handlers import os import socket import sys import time import requests IS_WINDOWS_10 = os.name == 'nt' and sys.getwindowsversion().major == 10 if IS_WINDOWS_10: from win10toast import ToastNotif...
[ "logging.basicConfig", "logging.getLogger", "requests.post", "sys.getwindowsversion", "datetime.time", "socket.socket", "logging.Formatter", "win10toast.ToastNotifier", "requests.get", "time.sleep", "logging.info", "socket.setdefaulttimeout" ]
[((666, 784), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""[%(levelname)s] %(asctime)s %(filename)s:%(lineno)d %(message)s"""'}), "(level=logging.INFO, format=\n '[%(levelname)s] %(asctime)s %(filename)s:%(lineno)d %(message)s')\n", (685, 784), False, 'import logging\n')...
import hashlib import typing from pg_sql import SqlId, SqlNumber, SqlObject, SqlString, sql_list from .formats.join import JoinTable from .join_common import Structure, context_column, foreign_column, local_column from .join_key import KeyResolver from .sql import SqlQuery, SqlTableExpr, table_fields, update_excluded...
[ "pg_sql.SqlId", "pg_sql.SqlObject", "pg_sql.SqlString", "pg_sql.SqlNumber", "pg_sql.sql_list" ]
[((3099, 3113), 'pg_sql.SqlId', 'SqlId', (['"""_item"""'], {}), "('_item')\n", (3104, 3113), False, 'from pg_sql import SqlId, SqlNumber, SqlObject, SqlString, sql_list\n'), ((3129, 3147), 'pg_sql.SqlId', 'SqlId', (['"""_new_item"""'], {}), "('_new_item')\n", (3134, 3147), False, 'from pg_sql import SqlId, SqlNumber, S...
import pytest import optuna from optuna import type_checking if type_checking.TYPE_CHECKING: from optuna.trial import Trial # NOQA MIN_RESOURCE = 1 MAX_RESOURCE = 16 REDUCTION_FACTOR = 2 N_BRACKETS = 4 EARLY_STOPPING_RATE_LOW = 0 EARLY_STOPPING_RATE_HIGH = 3 N_REPORTS = 10 EXPECTED_N_TRIALS_PER_BRACKET = 10 d...
[ "optuna.samplers.RandomSampler", "pytest.deprecated_call", "pytest.raises", "optuna.pruners.HyperbandPruner", "pytest.warns" ]
[((968, 1092), 'optuna.pruners.HyperbandPruner', 'optuna.pruners.HyperbandPruner', ([], {'min_resource': 'MIN_RESOURCE', 'max_resource': 'MAX_RESOURCE', 'reduction_factor': 'REDUCTION_FACTOR'}), '(min_resource=MIN_RESOURCE, max_resource=\n MAX_RESOURCE, reduction_factor=REDUCTION_FACTOR)\n', (998, 1092), False, 'imp...
# -*- coding: utf-8 -*- # czat/urls.py from django.conf.urls import url from . import views # import widoków aplikacji app_name = 'czat' # przestrzeń nazw aplikacji urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^loguj/$', views.loguj, name='loguj'), url(r'^wyloguj/$', views.wyloguj, name=...
[ "django.conf.urls.url" ]
[((189, 225), 'django.conf.urls.url', 'url', (['"""^$"""', 'views.index'], {'name': '"""index"""'}), "('^$', views.index, name='index')\n", (192, 225), False, 'from django.conf.urls import url\n'), ((232, 274), 'django.conf.urls.url', 'url', (['"""^loguj/$"""', 'views.loguj'], {'name': '"""loguj"""'}), "('^loguj/$', vi...
#!/usr/bin/python # export PYTHONPATH=/home/lukas/anaconda3/envs/detectron/bin/python # import some common libraries from genericpath import isdir import numpy as np import os import json import cv2 import time import csv import detectron2 from detectron2 import model_zoo from detectron2.engine import DefaultPredicto...
[ "numpy.mean", "os.listdir", "detectron2.config.get_cfg", "csv.writer", "os.path.join", "time.perf_counter", "cv2.rotate", "numpy.array", "detectron2.model_zoo.get_checkpoint_url", "os.path.isdir", "detectron2.model_zoo.get_config_file", "detectron2.data.MetadataCatalog.get", "numpy.std", "...
[((2523, 2532), 'detectron2.config.get_cfg', 'get_cfg', ([], {}), '()\n', (2530, 2532), False, 'from detectron2.config import get_cfg\n'), ((2622, 2664), 'detectron2.model_zoo.get_checkpoint_url', 'model_zoo.get_checkpoint_url', (['params.model'], {}), '(params.model)\n', (2650, 2664), False, 'from detectron2 import mo...
from Tweets2Graph import Tweets2Graph from datetime import datetime import networkx as nx import matplotlib.pyplot as plt import os import time from dotenv import load_dotenv load_dotenv() if __name__ == "__main__": from examples import generate_csv #generate_csv.generate(10,10,33) backend = Tweets2Graph(...
[ "Tweets2Graph.Tweets2Graph", "time.sleep", "dotenv.load_dotenv", "datetime.datetime.now", "networkx.draw", "matplotlib.pyplot.show" ]
[((175, 188), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (186, 188), False, 'from dotenv import load_dotenv\n'), ((307, 392), 'Tweets2Graph.Tweets2Graph', 'Tweets2Graph', ([], {'interactions': "['retweet', 'quote', 'reply']", 'username': '"""screen_name"""'}), "(interactions=['retweet', 'quote', 'reply'], u...
from django.db import models from django.forms import ModelForm from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.core.validators import FileExtensionValidator from .xmltools import analyze_file, include_sync_button import uuid def default_color(): return '#076AA...
[ "django.core.validators.FileExtensionValidator", "django.utils.translation.ugettext_lazy", "django.db.models.ManyToManyField", "django.db.models.ForeignKey" ]
[((1511, 1563), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Project'], {'on_delete': 'models.CASCADE'}), '(Project, on_delete=models.CASCADE)\n', (1528, 1563), False, 'from django.db import models\n'), ((1688, 1737), 'django.db.models.ManyToManyField', 'models.ManyToManyField', (['"""self"""'], {'symmetrical...
# -*- coding: utf-8 -*- from setuptools import setup # type: ignore setup( name='pylookyloo', version='1.11-dev', author='<NAME>', author_email='<EMAIL>', maintainer='<NAME>', url='https://github.com/Lookyloo/lookyloo/client', description='Python client for Lookyloo', packages=['pyloo...
[ "setuptools.setup" ]
[((71, 833), 'setuptools.setup', 'setup', ([], {'name': '"""pylookyloo"""', 'version': '"""1.11-dev"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'maintainer': '"""<NAME>"""', 'url': '"""https://github.com/Lookyloo/lookyloo/client"""', 'description': '"""Python client for Lookyloo"""', 'packages': "['...
import logging import pymongo from bson import regex from watchmen.common.cache.cache_manage import cacheman, TOPIC_DICT_BY_NAME from watchmen.common.data_page import DataPage from watchmen.common.utils.data_utils import build_data_pages from watchmen.database.mongo.index import build_code_options from watch...
[ "logging.getLogger", "watchmen.common.utils.data_utils.build_data_pages", "bson.regex.Regex", "watchmen.database.mongo.index.build_code_options" ]
[((392, 428), 'logging.getLogger', 'logging.getLogger', (["('app.' + __name__)"], {}), "('app.' + __name__)\n", (409, 428), False, 'import logging\n'), ((9722, 9742), 'watchmen.database.mongo.index.build_code_options', 'build_code_options', ([], {}), '()\n', (9740, 9742), False, 'from watchmen.database.mongo.index impo...
from collections import defaultdict import json import datetime import uuid from unidecode import unidecode import re import rdflib from rdflib import Dataset, URIRef, Literal, XSD, Namespace, RDFS, BNode, SKOS, OWL from rdfalchemy import rdfSubject, rdfMultiple, rdfSingle from shapely.geometry import Point, MultiPoi...
[ "rdfalchemy.rdfSingle", "uuid.uuid5", "rdfalchemy.rdfMultiple", "shapely.wkt.loads", "rdflib.Literal", "json.load", "rdflib.BNode", "collections.defaultdict", "unidecode.unidecode", "rdflib.Namespace", "re.sub", "rdflib.Dataset", "rdflib.URIRef", "shapely.geometry.MultiPoint" ]
[((357, 408), 'rdflib.Namespace', 'Namespace', (['"""https://data.create.humanities.uva.nl/"""'], {}), "('https://data.create.humanities.uva.nl/')\n", (366, 408), False, 'from rdflib import Dataset, URIRef, Literal, XSD, Namespace, RDFS, BNode, SKOS, OWL\n'), ((418, 449), 'rdflib.Namespace', 'Namespace', (['"""http://s...
import plotly.figure_factory as FF import numpy as np from scipy.spatial import Delaunay class СharacteristicQuadrilateral: def __init__(self, a): self.x0 = (a[0] - a[2])*1j self.y0 = a[0] + a[2] self.z0 = -a[1]*1j self.x1 = (a[0]-a[2]-a[3])*1j self.y1 = a[0]+a[2]+a[3] ...
[ "plotly.figure_factory.create_trisurf", "numpy.linspace", "numpy.vstack", "scipy.spatial.Delaunay", "numpy.meshgrid" ]
[((703, 721), 'scipy.spatial.Delaunay', 'Delaunay', (['points2D'], {}), '(points2D)\n', (711, 721), False, 'from scipy.spatial import Delaunay\n'), ((771, 924), 'plotly.figure_factory.create_trisurf', 'FF.create_trisurf', ([], {'x': 'x', 'y': 'y', 'z': 'z', 'colormap': "['rgb(50, 0, 75)', 'rgb(200, 0, 200)', '#c8dcc8']...
from django.contrib.auth.hashers import make_password from django.contrib.auth.validators import UnicodeUsernameValidator from django.db import models from django.contrib.auth.models import AbstractUser from django.utils.translation import gettext_lazy as _ from django.conf import settings from multiselectfield import ...
[ "multiselectfield.MultiSelectField", "django.db.models.DateField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.utils.translation.gettext_lazy", "django.db.models.ManyToManyField" ]
[((380, 426), 'django.db.models.TextField', 'models.TextField', (['"""Входные данные"""'], {'blank': '(True)'}), "('Входные данные', blank=True)\n", (396, 426), False, 'from django.db import models\n'), ((440, 487), 'django.db.models.TextField', 'models.TextField', (['"""Выходные данные"""'], {'blank': '(True)'}), "('В...
# PyQt5 modules from PyQt5.QtGui import QColor, QPainter, QRadialGradient, QBrush from PyQt5.QtCore import Qt, QTimer, QSize, pyqtSlot, pyqtProperty from PyQt5.QtWidgets import QWidget, QApplication class LedWidget(QWidget): def __init__(self, parent=None): super(LedWidget, self).__init__(parent) ...
[ "PyQt5.QtCore.pyqtProperty", "PyQt5.QtGui.QPainter", "PyQt5.QtCore.QTimer", "PyQt5.QtGui.QColor", "PyQt5.QtGui.QBrush", "PyQt5.QtCore.pyqtSlot", "PyQt5.QtWidgets.QApplication", "PyQt5.QtGui.QRadialGradient", "PyQt5.QtCore.QSize" ]
[((2366, 2379), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', (['int'], {}), '(int)\n', (2374, 2379), False, 'from PyQt5.QtCore import Qt, QTimer, QSize, pyqtSlot, pyqtProperty\n'), ((2525, 2541), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', (['QColor'], {}), '(QColor)\n', (2533, 2541), False, 'from PyQt5.QtCore import Qt, QTimer, QSiz...
### The point of this module is that, ### when you import it, you get the "vendor" directory ### on your python's sys.path. import sys import os.path import site already_vendorified = False def vendorify(): global already_vendorified if already_vendorified: return ROOT = os.path.dirname(os.path.a...
[ "sys.path.remove" ]
[((644, 665), 'sys.path.remove', 'sys.path.remove', (['item'], {}), '(item)\n', (659, 665), False, 'import sys\n')]