code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from reportlab.lib.pagesizes import A4 from reportlab.lib.units import cm from reportlab.lib.styles import getSampleStyleSheet from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate, Paragraph class LegalDoc: def __init__(self, path): self.path = path styles = getSampleStyleSheet() ...
[ "reportlab.platypus.PageTemplate", "reportlab.platypus.Paragraph", "reportlab.lib.styles.getSampleStyleSheet", "reportlab.platypus.BaseDocTemplate", "reportlab.platypus.Frame" ]
[((298, 319), 'reportlab.lib.styles.getSampleStyleSheet', 'getSampleStyleSheet', ([], {}), '()\n', (317, 319), False, 'from reportlab.lib.styles import getSampleStyleSheet\n'), ((483, 522), 'reportlab.platypus.BaseDocTemplate', 'BaseDocTemplate', (['self.path'], {'pagesize': 'A4'}), '(self.path, pagesize=A4)\n', (498, ...
from datetime import datetime import uuid from sqlalchemy.exc import IntegrityError from dataservice.api.study.models import Study from dataservice.api.participant.models import Participant from dataservice.api.outcome.models import Outcome from dataservice.extensions import db from tests.utils import FlaskTestCase ...
[ "dataservice.api.outcome.models.Outcome", "dataservice.api.participant.models.Participant", "uuid.UUID", "dataservice.api.outcome.models.Outcome.query.filter_by", "dataservice.extensions.db.session.commit", "dataservice.extensions.db.session.delete", "dataservice.extensions.db.session.add", "datetime....
[((520, 547), 'dataservice.api.study.models.Study', 'Study', ([], {'external_id': '"""phs001"""'}), "(external_id='phs001')\n", (525, 547), False, 'from dataservice.api.study.models import Study\n'), ((640, 709), 'dataservice.api.participant.models.Participant', 'Participant', ([], {'external_id': 'participant_id', 'is...
import logging from werkzeug.utils import cached_property from wtforms import FormField, Form, StringField logger = logging.getLogger(__name__) def get_form_class(validators): class YearMonthDateForm(Form): year = StringField(validators=validators) month = StringField() @cached_property...
[ "logging.getLogger", "wtforms.StringField" ]
[((118, 145), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (135, 145), False, 'import logging\n'), ((230, 264), 'wtforms.StringField', 'StringField', ([], {'validators': 'validators'}), '(validators=validators)\n', (241, 264), False, 'from wtforms import FormField, Form, StringField\n')...
from abc import abstractmethod, ABC from datetime import datetime, timezone from typing import Any, List, Tuple, Dict from blurr.core.base import BaseSchema from blurr.core.store_key import Key, KeyType class StoreSchema(BaseSchema): pass class Store(ABC): """ Base Store that allows for data to be persiste...
[ "datetime.datetime.max.replace", "datetime.datetime.min.replace", "blurr.core.store_key.Key" ]
[((1744, 1817), 'blurr.core.store_key.Key', 'Key', (['KeyType.TIMESTAMP', 'base_key.identity', 'base_key.group', '[]', 'start_time'], {}), '(KeyType.TIMESTAMP, base_key.identity, base_key.group, [], start_time)\n', (1747, 1817), False, 'from blurr.core.store_key import Key, KeyType\n'), ((1840, 1911), 'blurr.core.store...
import time, copy import asyncio class TempRefManager: def __init__(self): self.refs = [] self.running = False def add_ref(self, ref, lifetime, on_shutdown): expiry_time = time.time() + lifetime self.refs.append((ref, expiry_time, on_shutdown)) def purge_all(self): ...
[ "asyncio.ensure_future", "asyncio.sleep", "copy.copy", "traceback.print_exc", "time.time" ]
[((1313, 1340), 'asyncio.ensure_future', 'asyncio.ensure_future', (['coro'], {}), '(coro)\n', (1334, 1340), False, 'import asyncio\n'), ((710, 721), 'time.time', 'time.time', ([], {}), '()\n', (719, 721), False, 'import time, copy\n'), ((742, 762), 'copy.copy', 'copy.copy', (['self.refs'], {}), '(self.refs)\n', (751, 7...
import yaml import forest from forest import main def test_earth_networks_loader_given_pattern(): loader = forest.Loader.from_pattern("Label", "EarthNetworks*.txt", "earth_networks") assert isinstance(loader, forest.earth_networks.Loader) def test_build_loader_given_files(): """replicate main.py as clos...
[ "forest.Loader.from_pattern", "forest.Loader.group_args", "forest.config.load_config", "forest.config.FileGroup", "yaml.dump", "forest.Loader.full_pattern", "forest.main.parse_args.parse_args", "forest.db.Database.connect", "forest.config.from_files", "forest.Loader.replace_dir" ]
[((113, 188), 'forest.Loader.from_pattern', 'forest.Loader.from_pattern', (['"""Label"""', '"""EarthNetworks*.txt"""', '"""earth_networks"""'], {}), "('Label', 'EarthNetworks*.txt', 'earth_networks')\n", (139, 188), False, 'import forest\n'), ((387, 420), 'forest.main.parse_args.parse_args', 'main.parse_args.parse_args...
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model from swagger_server import util class Rule(Model): """NOTE: This class is auto generated by the swagger code g...
[ "swagger_server.util.deserialize_model" ]
[((1688, 1721), 'swagger_server.util.deserialize_model', 'util.deserialize_model', (['dikt', 'cls'], {}), '(dikt, cls)\n', (1710, 1721), False, 'from swagger_server import util\n')]
from leetcode_tester import Tester from typing import Optional, List class Solution: def maxProfit(self, prices: List[int]) -> int: r = 0 for i in range(1, len(prices)): if prices[i] > prices[i - 1]: r += prices[i] - prices[i - 1] return r if __name__ == '__m...
[ "leetcode_tester.Tester" ]
[((365, 391), 'leetcode_tester.Tester', 'Tester', (['solution.maxProfit'], {}), '(solution.maxProfit)\n', (371, 391), False, 'from leetcode_tester import Tester\n')]
import torch import json import os from torch.utils.data import DataLoader,Dataset import torchvision.transforms as transforms from PIL import Image import numpy as np data_folder = "./dataset/images" press_times = json.load(open("./dataset/dataset.json")) image_roots = [os.path.join(data_folder,image_file) \ ...
[ "os.listdir", "PIL.Image.open", "os.path.join", "torchvision.transforms.Normalize", "torch.utils.data.DataLoader", "torchvision.transforms.ToTensor" ]
[((274, 311), 'os.path.join', 'os.path.join', (['data_folder', 'image_file'], {}), '(data_folder, image_file)\n', (286, 311), False, 'import os\n'), ((1136, 1228), 'torchvision.transforms.Normalize', 'transforms.Normalize', ([], {'mean': '[0.92206, 0.92206, 0.92206]', 'std': '[0.08426, 0.08426, 0.08426]'}), '(mean=[0.9...
import json from grafana_backup.dashboardApi import create_snapshot def main(args, settings, file_path): grafana_url = settings.get('GRAFANA_URL') http_post_headers = settings.get('HTTP_POST_HEADERS') verify_ssl = settings.get('VERIFY_SSL') client_cert = settings.get('CLIENT_CERT') debug = setting...
[ "json.loads", "json.dumps" ]
[((412, 428), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (422, 428), False, 'import json\n'), ((605, 625), 'json.dumps', 'json.dumps', (['snapshot'], {}), '(snapshot)\n', (615, 625), False, 'import json\n')]
""" Test case for Keras """ from perceptron.zoo.ssd_300.keras_ssd300 import SSD300 from perceptron.models.detection.keras_ssd300 import KerasSSD300Model from perceptron.utils.image import load_image from perceptron.benchmarks.brightness import BrightnessMetric from perceptron.utils.criteria.detection import Targ...
[ "perceptron.models.detection.keras_ssd300.KerasSSD300Model", "perceptron.utils.image.load_image", "perceptron.utils.criteria.detection.TargetClassMiss", "perceptron.zoo.ssd_300.keras_ssd300.SSD300" ]
[((502, 510), 'perceptron.zoo.ssd_300.keras_ssd300.SSD300', 'SSD300', ([], {}), '()\n', (508, 510), False, 'from perceptron.zoo.ssd_300.keras_ssd300 import SSD300\n'), ((567, 608), 'perceptron.models.detection.keras_ssd300.KerasSSD300Model', 'KerasSSD300Model', (['ssd300'], {'bounds': '(0, 255)'}), '(ssd300, bounds=(0,...
""" Routines for the analysis of proton radiographs. These routines can be broadly classified as either creating synthetic radiographs from prescribed fields or methods of 'inverting' experimentally created radiographs to reconstruct the original fields (under some set of assumptions). """ __all__ = [ "SyntheticPr...
[ "numpy.clip", "numpy.log10", "numpy.sqrt", "numpy.arccos", "plasmapy.simulation.particle_integrators.boris_push", "numpy.logical_not", "numpy.array", "numpy.arctan2", "numpy.isfinite", "numpy.linalg.norm", "numpy.sin", "numpy.moveaxis", "numpy.mean", "numpy.cross", "numpy.where", "nump...
[((1362, 1373), 'numpy.zeros', 'np.zeros', (['(3)'], {}), '(3)\n', (1370, 1373), True, 'import numpy as np\n'), ((7185, 7220), 'numpy.cross', 'np.cross', (['self.det_hdir', 'self.det_n'], {}), '(self.det_hdir, self.det_n)\n', (7193, 7220), True, 'import numpy as np\n'), ((10017, 10030), 'numpy.zeros', 'np.zeros', (['[8...
# switch_start.py # Adding another switch statement # Authors : <NAME> import string import random class Switch_Start: def __init__(self, str): self.string = str def insert_switch(self, str): #generate random variable _LENGTH = 11 string_pool = string.ascii_lette...
[ "random.choice" ]
[((389, 424), 'random.choice', 'random.choice', (['string.ascii_letters'], {}), '(string.ascii_letters)\n', (402, 424), False, 'import random\n'), ((480, 506), 'random.choice', 'random.choice', (['string_pool'], {}), '(string_pool)\n', (493, 506), False, 'import random\n'), ((772, 795), 'random.choice', 'random.choice'...
from numpy import array, rad2deg, pi, mgrid, argmin from matplotlib.pylab import contour import matplotlib.pyplot as plt import mplstereonet from obspy.imaging.beachball import aux_plane from focal_mech.lib.classify_mechanism import classify, translate_to_sphharm from focal_mech.io.read_hash import read_demo, read_h...
[ "focal_mech.lib.classify_mechanism.classify", "focal_mech.util.hash_routines.hash_to_classifier", "matplotlib.pylab.contour", "focal_mech.io.read_hash.read_hash_solutions", "focal_mech.io.read_hash.read_demo", "numpy.array", "matplotlib.pyplot.figure", "obspy.imaging.beachball.aux_plane", "focal_mec...
[((507, 542), 'focal_mech.io.read_hash.read_hash_solutions', 'read_hash_solutions', (['"""example1.out"""'], {}), "('example1.out')\n", (526, 542), False, 'from focal_mech.io.read_hash import read_demo, read_hash_solutions\n'), ((598, 653), 'focal_mech.io.read_hash.read_demo', 'read_demo', (['"""north1.phase"""', '"""s...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import sklearn.ensemble import sklearn.metrics import sklearn import progressbar import sklearn.model_selection from plotnine import * import pdb import sys sys.path.append("smooth_rf/") import smooth_base import smooth_level # function def aver...
[ "numpy.abs", "sklearn.ensemble.RandomForestRegressor", "numpy.random.choice", "sklearn.metrics.mean_squared_error", "numpy.zeros", "smooth_base.generate_data", "pandas.DataFrame", "sys.path.append" ]
[((229, 258), 'sys.path.append', 'sys.path.append', (['"""smooth_rf/"""'], {}), "('smooth_rf/')\n", (244, 258), False, 'import sys\n'), ((1181, 1219), 'smooth_base.generate_data', 'smooth_base.generate_data', ([], {'large_n': '(650)'}), '(large_n=650)\n', (1206, 1219), False, 'import smooth_base\n'), ((1234, 1329), 'pa...
''' Created on Sep 29, 2021 @author: thomas ''' import ImageNetTools import sys import getopt def main(argv): try: opts, args = getopt.getopt(argv,"hd:",["dataset="]) except getopt.GetoptError: printHelp() sys.exit(2) for opt, arg in opts: if opt in...
[ "ImageNetTools.benchmarkIOSpeeds", "getopt.getopt", "sys.exit" ]
[((412, 422), 'sys.exit', 'sys.exit', ([], {}), '()\n', (420, 422), False, 'import sys\n'), ((167, 207), 'getopt.getopt', 'getopt.getopt', (['argv', '"""hd:"""', "['dataset=']"], {}), "(argv, 'hd:', ['dataset='])\n", (180, 207), False, 'import getopt\n'), ((265, 276), 'sys.exit', 'sys.exit', (['(2)'], {}), '(2)\n', (27...
import json import math from HistoricalTweetDataFetcher import getHistoricalData joelsarray = getHistoricalData(0) arrs = [] arrm = [] arrp = [] arrsTotal = 0 arrmTotal = 0 ncount = 0 ccount = 0 lcount = 0 time = joelsarray[0]["h"] for dictionary in joelsarray: arrs.append(dictionary["s"]) arrm...
[ "json.load", "HistoricalTweetDataFetcher.getHistoricalData", "math.pow", "json.dump" ]
[((99, 119), 'HistoricalTweetDataFetcher.getHistoricalData', 'getHistoricalData', (['(0)'], {}), '(0)\n', (116, 119), False, 'from HistoricalTweetDataFetcher import getHistoricalData\n'), ((973, 985), 'json.load', 'json.load', (['f'], {}), '(f)\n', (982, 985), False, 'import json\n'), ((1728, 1740), 'json.load', 'json....
#!/usr/bin/env python3 import collections import logging import os import typing import unicodedata from janome.tokenizer import Tokenizer from transformers.file_utils import cached_path from transformers.models.bert.tokenization_bert import BertTokenizer, WordpieceTokenizer, load_vocab import bunkai.constant """ T...
[ "logging.getLogger", "transformers.models.bert.tokenization_bert.load_vocab", "os.path.isfile", "janome.tokenizer.Tokenizer", "transformers.file_utils.cached_path", "unicodedata.normalize", "transformers.models.bert.tokenization_bert.WordpieceTokenizer" ]
[((516, 543), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (533, 543), False, 'import logging\n'), ((1735, 1746), 'janome.tokenizer.Tokenizer', 'Tokenizer', ([], {}), '()\n', (1744, 1746), False, 'from janome.tokenizer import Tokenizer\n'), ((5185, 5211), 'os.path.isfile', 'os.path.isfi...
""" Several methods for generating graphs from the stochastic block model. """ import itertools import math import random import scipy.sparse import numpy as np def _get_num_pos_edges(c1_size, c2_size, same_cluster, self_loops, directed): """ Compute the number of possible edges between two clusters. :pa...
[ "random.randint", "numpy.random.binomial" ]
[((2449, 2506), 'numpy.random.binomial', 'np.random.binomial', (['possible_edges_between_clusters', 'prob'], {}), '(possible_edges_between_clusters, prob)\n', (2467, 2506), True, 'import numpy as np\n'), ((5081, 5118), 'random.randint', 'random.randint', (['(0)', 'num_possible_edges'], {}), '(0, num_possible_edges)\n',...
#!/usr/bin/python3 """ | --------------------- Py include <Mauro Baladés> --------------------- | ___ _ _ _ __ _ _ ___ ____ | | |_) \ \_/ | | | |\ | / /` | | | | | | | \ | |_ | |_| |_| |_| |_| \| \_\_, |_|__ \_\_/ |_|_/ |_|__ | -----------------------------------------...
[ "pathlib.Path" ]
[((1907, 1916), 'pathlib.Path', 'Path', (['arg'], {}), '(arg)\n', (1911, 1916), False, 'from pathlib import Path\n')]
# -*- coding: utf-8 -*- """dependenpy finder module.""" from importlib.util import find_spec from os.path import basename, exists, isdir, isfile, join, splitext class PackageSpec(object): """Holder for a package specification (given as argument to DSM).""" def __init__(self, name, path, limit_to=None): ...
[ "os.path.exists", "importlib.util.find_spec", "os.path.join", "os.path.isfile", "os.path.isdir", "os.path.basename" ]
[((2619, 2633), 'os.path.isdir', 'isdir', (['package'], {}), '(package)\n', (2624, 2633), False, 'from os.path import basename, exists, isdir, isfile, join, splitext\n'), ((3403, 3421), 'importlib.util.find_spec', 'find_spec', (['package'], {}), '(package)\n', (3412, 3421), False, 'from importlib.util import find_spec\...
import math def contfractbeta(a: float, b: float, x: float, itmax: int = 200) -> float: # https://malishoaib.wordpress.com/2014/04/15/the-beautiful-beta-functions-in-raw-python/ # evaluates the continued fraction form of the incomplete Beta function; incompbeta() # code translated from: Numerical Recipes ...
[ "math.exp", "math.lgamma", "math.log" ]
[((1534, 1549), 'math.log', 'math.log', (['(1 - x)'], {}), '(1 - x)\n', (1542, 1549), False, 'import math\n'), ((1495, 1509), 'math.lgamma', 'math.lgamma', (['b'], {}), '(b)\n', (1506, 1509), False, 'import math\n'), ((1516, 1527), 'math.log', 'math.log', (['x'], {}), '(x)\n', (1524, 1527), False, 'import math\n'), ((1...
__all__ = ["Binwalk"] import os import re import time import magic from binwalk.compat import * from binwalk.config import * from binwalk.update import * from binwalk.filter import * from binwalk.parser import * from binwalk.plugins import * from binwalk.plotter import * from binwalk.hexdiff import * from binwalk.entr...
[ "binwalk.common.file_size", "os.path.join", "binwalk.common.BlockFile", "os.path.dirname", "os.path.basename", "magic.open", "time.localtime", "binwalk.common.unique_file_name", "time.time", "os.walk" ]
[((6570, 6592), 'magic.open', 'magic.open', (['self.flags'], {}), '(self.flags)\n', (6580, 6592), False, 'import magic\n'), ((6903, 6927), 'binwalk.common.file_size', 'file_size', (['file_names[0]'], {}), '(file_names[0])\n', (6912, 6927), False, 'from binwalk.common import file_size, unique_file_name, BlockFile\n'), (...
# -*- coding: utf-8 -*- import os import urllib.parse from datetime import date, datetime from functools import partial from urllib.parse import quote_plus import pandas as pd import plotly.express as px import pytz from csci_utils.luigi.requires import Requirement, Requires from csci_utils.luigi.target import Target...
[ "csci_utils.luigi.requires.Requires", "plotly.express.bar", "sendgrid.helpers.mail.Mail", "os.environ.get", "csci_utils.luigi.target.TargetOutput", "plotly.io.to_image", "datetime.datetime.now", "django.template.loader.render_to_string", "functools.partial", "luigi.ListParameter", "datetime.date...
[((3051, 3076), 'luigi.Parameter', 'Parameter', ([], {'default': '"""pm25"""'}), "(default='pm25')\n", (3060, 3076), False, 'from luigi import DateParameter, ExternalTask, ListParameter, LocalTarget, Parameter, Target, Task\n'), ((3140, 3150), 'csci_utils.luigi.requires.Requires', 'Requires', ([], {}), '()\n', (3148, 3...
#!/usr/bin/env python3 def test(): cedTest = ["U²sgal²sdi ạ²dv¹ne²³li⁴sgi.", "Ụ²wo²³dị³ge⁴ɂi gi²hli a¹ke²³he³²ga na ạ²chu⁴ja.", "Ạ²ni²³tạɂ³li ạ²ni²sgạ²ya a¹ni²no²hạ²li²³do³²he, ạ²hwi du¹ni²hyọ²he.", "Sa¹gwu⁴hno ạ²sgạ²ya gạ²lo¹gwe³ ga²ne²he sọ³ɂị³hnv³ hla².", "Na³hnv³ gạ...
[ "re.sub", "unicodedata.normalize" ]
[((2122, 2152), 're.sub', 're.sub', (['"""[̌̂̀́̋]"""', '""""""', 'newText'], {}), "('[̌̂̀́̋]', '', newText)\n", (2128, 2152), False, 'import re\n'), ((2766, 2807), 're.sub', 're.sub', (['"""(?i)([aeiouv]):"""', '"""\\\\1"""', 'newText'], {}), "('(?i)([aeiouv]):', '\\\\1', newText)\n", (2772, 2807), False, 'import re\n'...
import psycopg2 url = "dbname='da43n1slakcjkc' user='msqgxzgmcskvst' host='ec2-54-80-184-43.compute-1.amazonaws.com' port=5432 password='<PASSWORD>'" class database_setup(object): def __init__(self): self.conn = psycopg2.connect(url) self.cursor = self.conn.cursor() def destroy_tables(self):...
[ "psycopg2.connect" ]
[((227, 248), 'psycopg2.connect', 'psycopg2.connect', (['url'], {}), '(url)\n', (243, 248), False, 'import psycopg2\n')]
import numpy as np import shapely.geometry as geom class Bbox: def __init__(self, name, part_id, depth_image, xyz, box_size, projection): if not isinstance(xyz, np.ndarray): raise ValueError("xyz must be an np.ndarray") self.name = name self.id = part_id self.center = np...
[ "numpy.mean", "shapely.geometry.box", "numpy.exp", "numpy.array", "numpy.std" ]
[((318, 344), 'numpy.array', 'np.array', (['[xyz[0], xyz[1]]'], {}), '([xyz[0], xyz[1]])\n', (326, 344), True, 'import numpy as np\n'), ((717, 769), 'shapely.geometry.box', 'geom.box', (['self.xmin', 'self.ymin', 'self.xmax', 'self.ymax'], {}), '(self.xmin, self.ymin, self.xmax, self.ymax)\n', (725, 769), True, 'import...
#!/usr/bin/env python3 # Copyright (c) 2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Useful Script constants and utils.""" from test_framework.script import CScript # To prevent a "tx-size-sma...
[ "test_framework.script.CScript" ]
[((1305, 1325), 'test_framework.script.CScript', 'CScript', (["[b'a' * 21]"], {}), "([b'a' * 21])\n", (1312, 1325), False, 'from test_framework.script import CScript\n')]
import os import numpy as np import pytest import vtk import pyvista from pyvista import examples from pyvista.plotting import system_supports_plotting beam = pyvista.UnstructuredGrid(examples.hexbeamfile) # create structured grid x = np.arange(-10, 10, 2) y = np.arange(-10, 10, 2) z = np.arange(-10, 10, 2) x, y, z...
[ "numpy.array", "pyvista.UnstructuredGrid", "numpy.arange", "pyvista.UniformGrid", "pyvista.plotting.system_supports_plotting", "pyvista.examples.load_structured", "numpy.vstack", "numpy.meshgrid", "numpy.allclose", "numpy.any", "pytest.raises", "pyvista.examples.load_uniform", "pyvista.Struc...
[((162, 208), 'pyvista.UnstructuredGrid', 'pyvista.UnstructuredGrid', (['examples.hexbeamfile'], {}), '(examples.hexbeamfile)\n', (186, 208), False, 'import pyvista\n'), ((239, 260), 'numpy.arange', 'np.arange', (['(-10)', '(10)', '(2)'], {}), '(-10, 10, 2)\n', (248, 260), True, 'import numpy as np\n'), ((265, 286), 'n...
import warnings warnings.simplefilter('ignore') import argparse import pickle import numpy as np import pandas as pd import networkx as nx import scipy.sparse as sp from network_propagation_methods import minprop_2 from sklearn.metrics import roc_auc_score, auc import matplotlib.pyplot as plt #### Parameters ########...
[ "network_propagation_methods.minprop_2", "numpy.mean", "argparse.ArgumentParser", "sklearn.metrics.auc", "pickle.load", "sklearn.metrics.roc_auc_score", "numpy.append", "numpy.sum", "numpy.array", "numpy.zeros", "numpy.isnan", "numpy.dot", "matplotlib.pyplot.scatter", "numpy.argsort", "w...
[((16, 47), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {}), "('ignore')\n", (37, 47), False, 'import warnings\n'), ((335, 386), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Runs MINProp"""'}), "(description='Runs MINProp')\n", (358, 386), False, 'import argpar...
######################################################################################################################## # # # This file is part of kAIvy ...
[ "kivy.graphics.Line", "kivy.graphics.SmoothLine", "numpy.linalg.norm", "numpy.sum", "numpy.array", "kivy.graphics.Color" ]
[((3148, 3165), 'numpy.linalg.norm', 'np.linalg.norm', (['n'], {}), '(n)\n', (3162, 3165), True, 'import numpy as np\n'), ((1386, 1402), 'numpy.array', 'np.array', (['points'], {}), '(points)\n', (1394, 1402), True, 'import numpy as np\n'), ((1663, 1676), 'kivy.graphics.Color', 'Color', (['*color'], {}), '(*color)\n', ...
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import openvino.runtime.opset9 as ov import numpy as np import pytest from tests.runtime import get_runtime from openvino.runtime.utils.types import get_element_type_str from openvino.runtime.utils.types import get_element_type @pytes...
[ "numpy.tile", "numpy.eye", "pytest.param", "numpy.array", "openvino.runtime.utils.types.get_element_type", "openvino.runtime.opset9.constant", "openvino.runtime.utils.types.get_element_type_str" ]
[((677, 707), 'numpy.array', 'np.array', (['[num_rows]', 'np.int32'], {}), '([num_rows], np.int32)\n', (685, 707), True, 'import numpy as np\n'), ((732, 765), 'numpy.array', 'np.array', (['[num_columns]', 'np.int32'], {}), '([num_columns], np.int32)\n', (740, 765), True, 'import numpy as np\n'), ((793, 829), 'numpy.arr...
# -------------------------------------------------------- # (c) Copyright 2014 by <NAME>. # Licensed under BSD 3-clause licence. # -------------------------------------------------------- import unittest from pymonad.Maybe import Maybe, Just, First, Last, _Nothing, Nothing from pymonad.Reader import curry from pymona...
[ "unittest.main", "pymonad.Maybe.First", "pymonad.Maybe.Last", "pymonad.Maybe.Just" ]
[((6686, 6701), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6699, 6701), False, 'import unittest\n'), ((2236, 2248), 'pymonad.Maybe.Just', 'Just', (['(x + 10)'], {}), '(x + 10)\n', (2240, 2248), False, 'from pymonad.Maybe import Maybe, Just, First, Last, _Nothing, Nothing\n'), ((2300, 2311), 'pymonad.Maybe.Jus...
from tkinter import * from ModeEnum import Mode import SerialHelper import Views.StaticView import Views.CustomWidgets.Silder from ColorEnum import Color from functools import partial from Views.CommandPanel import CommandPanel from Views.ListItem import ListItem from ProcessControl import ProcessManager, ProcessCo...
[ "os.kill", "SerialHelper.getSerialPorts", "SerialHelper.SerialHelper", "os.getcwd", "functools.partial", "Views.CommandPanel.CommandPanel", "os.fork", "ProcessControl.ProcessManager.sendCommand" ]
[((9776, 9785), 'os.fork', 'os.fork', ([], {}), '()\n', (9783, 9785), False, 'import os, signal\n'), ((9831, 9859), 'os.kill', 'os.kill', (['pid', 'signal.SIGTERM'], {}), '(pid, signal.SIGTERM)\n', (9838, 9859), False, 'import os, signal\n'), ((677, 704), 'SerialHelper.SerialHelper', 'SerialHelper.SerialHelper', ([], {...
import os import json import tempfile import shutil import unittest from sarpy.io.complex.sicd import SICDReader from sarpy.io.product.sidd import SIDDReader from sarpy.io.product.sidd_schema import get_schema_path from sarpy.processing.sidd.sidd_product_creation import create_detected_image_sidd, create_dynamic_image...
[ "lxml.etree.XMLSchema", "sarpy.processing.ortho_rectify.NearestNeighborMethod", "tests.parse_file_entry", "os.path.join", "os.path.split", "os.path.isfile", "json.load", "sarpy.io.complex.sicd.SICDReader", "sarpy.io.product.sidd.SIDDReader", "tempfile.mkdtemp", "sarpy.processing.sidd.sidd_produc...
[((551, 576), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (566, 576), False, 'import os\n'), ((693, 723), 'os.path.isfile', 'os.path.isfile', (['file_reference'], {}), '(file_reference)\n', (707, 723), False, 'import os\n'), ((1226, 1248), 'sarpy.io.product.sidd.SIDDReader', 'SIDDReader', ...
import random # use of the random module print(random.random()) # a float value >= 0.0 and < 1.0 print(random.random()*100) # a float value >= 0.0 and < 100.0 # use of the randint method print(random.randint(1, 100)) # an int from 1 to 100 print(random.randint(101, 200)) # an int from 101 to 2...
[ "random.random", "random.randint", "random.randrange" ]
[((385, 405), 'random.randint', 'random.randint', (['(1)', '(6)'], {}), '(1, 6)\n', (399, 405), False, 'import random\n'), ((413, 433), 'random.randint', 'random.randint', (['(1)', '(6)'], {}), '(1, 6)\n', (427, 433), False, 'import random\n'), ((48, 63), 'random.random', 'random.random', ([], {}), '()\n', (61, 63), Fa...
from PyInquirer import style_from_dict, Token, prompt, Separator from lnt.graphics.utils import vars_to_string # Mark styles prompt_style = style_from_dict({ Token.Separator: '#6C6C6C', Token.QuestionMark: '#FF9D00 bold', #Token.Selected: '', # default Token.Selected: '#5F819D', Token.Pointer: '#F...
[ "lnt.graphics.utils.vars_to_string", "PyInquirer.style_from_dict" ]
[((141, 365), 'PyInquirer.style_from_dict', 'style_from_dict', (["{Token.Separator: '#6C6C6C', Token.QuestionMark: '#FF9D00 bold', Token.\n Selected: '#5F819D', Token.Pointer: '#FF9D00 bold', Token.Instruction:\n '', Token.Answer: '#5F819D bold', Token.Question: ''}"], {}), "({Token.Separator: '#6C6C6C', Token.Qu...
# -*- coding: utf-8 -*- from datetime import datetime from sqlalchemy.dialects.mysql import LONGTEXT from sqlalchemy.orm import load_only from sqlalchemy import func from flask import abort from markdown import Markdown,markdown from app.models import db,fragment_tags_table from app.models.tag import Tag from app.whoo...
[ "markdown.markdown", "app.models.db.ForeignKey", "app.models.branch.Branch.get", "app.models.db.String", "app.models.db.Column", "app.models.db.session.commit", "app.models.db.session.add", "flask.abort", "app.models.db.backref" ]
[((522, 597), 'app.models.db.Column', 'db.Column', (['db.Integer'], {'nullable': '(False)', 'primary_key': '(True)', 'autoincrement': '(True)'}), '(db.Integer, nullable=False, primary_key=True, autoincrement=True)\n', (531, 597), False, 'from app.models import db, fragment_tags_table\n'), ((683, 731), 'app.models.db.Co...
from .constants import SUCCESS_KEY, MESSAGE_KEY, DATA_KEY from cloudygram_api_server.scripts import CGMessage from typing import List class TtModels: @staticmethod def sing_in_failure(message) -> dict: return { SUCCESS_KEY : False, MESSAGE_KEY : message } @staticme...
[ "cloudygram_api_server.scripts.CGMessage.map_from_tt" ]
[((624, 648), 'cloudygram_api_server.scripts.CGMessage.map_from_tt', 'CGMessage.map_from_tt', (['m'], {}), '(m)\n', (645, 648), False, 'from cloudygram_api_server.scripts import CGMessage\n')]
from collections import namedtuple class SSParser: """ Create a SS block from PDB data. Written to be agnostic of PDB parser, but for now only has PyMOL. .. code-block:: python import pymol2 with pymol2.PyMOL() as pymol: pymol.cmd.load('model.pdb', 'prot') ss = ...
[ "collections.namedtuple", "pymol2.PyMOL" ]
[((754, 805), 'collections.namedtuple', 'namedtuple', (['"""Atom"""', "['ss', 'resi', 'resn', 'chain']"], {}), "('Atom', ['ss', 'resi', 'resn', 'chain'])\n", (764, 805), False, 'from collections import namedtuple\n'), ((3384, 3398), 'pymol2.PyMOL', 'pymol2.PyMOL', ([], {}), '()\n', (3396, 3398), False, 'import pymol2\n...
from django.urls import reverse from Net640.settings import FRONTEND_DATE_FORMAT class AsDictMessageMixin: """ Mixin for representing user messages(post, comments) as dictionaries """ def as_dict(self, executor): return {'content': self.content, 'user_has_like': self.has_like(...
[ "django.urls.reverse" ]
[((514, 576), 'django.urls.reverse', 'reverse', (['"""friends:user_view"""'], {'kwargs': "{'user_id': self.user.id}"}), "('friends:user_view', kwargs={'user_id': self.user.id})\n", (521, 576), False, 'from django.urls import reverse\n')]
"""A module for converting a data source to TFRecords.""" import os import json import copy import csv from pathlib import Path from shutil import rmtree import PIL.Image as Image import tensorflow as tf from tqdm import tqdm from .feature import items_to_features from .errors import DirNotFoundError, InvalidDataset...
[ "json.loads", "csv.DictReader", "os.listdir", "PIL.Image.open", "copy.deepcopy", "pathlib.Path", "tensorflow.train.Features", "shutil.rmtree", "json.load" ]
[((1557, 1578), 'os.listdir', 'os.listdir', (['input_dir'], {}), '(input_dir)\n', (1567, 1578), False, 'import os\n'), ((14752, 14769), 'pathlib.Path', 'Path', (['dataset_dir'], {}), '(dataset_dir)\n', (14756, 14769), False, 'from pathlib import Path\n'), ((1651, 1688), 'os.listdir', 'os.listdir', (["(input_dir / 'anno...
import numpy as np import scipy.special as ss import pathlib from Particle import Particle def ql_global(l, particles): # Keep only particles that have neighbors (this was changed 5/23/2020) particles = [i for i in particles if len(Particle.data[i].neighs)>0] neigh_total = sum([len(Particle.data[i].neig...
[ "numpy.array", "numpy.sqrt" ]
[((1087, 1109), 'numpy.sqrt', 'np.sqrt', (['Qlmbar_mag_sq'], {}), '(Qlmbar_mag_sq)\n', (1094, 1109), True, 'import numpy as np\n'), ((1036, 1084), 'numpy.sqrt', 'np.sqrt', (['(4 * np.pi / (2 * l + 1) * Qlmbar_mag_sq)'], {}), '(4 * np.pi / (2 * l + 1) * Qlmbar_mag_sq)\n', (1043, 1084), True, 'import numpy as np\n'), ((9...
import os import time import datetime def get_current_epoch(): return int((datetime.datetime.utcnow() - datetime.datetime(1970, 1, 1)).total_seconds() * 1000) def get_sleep_parameter(event): user_input = str(event.query["sleep"]) if not user_input or not user_input.isdigit() or int(user_input) < 0: ...
[ "datetime.datetime", "os.environ.get", "time.sleep", "datetime.datetime.utcnow" ]
[((424, 455), 'time.sleep', 'time.sleep', (['(sleep_time / 1000.0)'], {}), '(sleep_time / 1000.0)\n', (434, 455), False, 'import time\n'), ((486, 508), 'os.environ.get', 'os.environ.get', (['"""warm"""'], {}), "('warm')\n", (500, 508), False, 'import os\n'), ((80, 106), 'datetime.datetime.utcnow', 'datetime.datetime.ut...
# This script loads the pre-trained scaler and models and contains the # predict_smile() function to take in an image and return smile predictions import joblib from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing.image import img_to_array, array_to_img from PIL import Image import numpy ...
[ "PIL.Image.open", "tensorflow.keras.preprocessing.image.array_to_img", "tensorflow.keras.models.load_model", "joblib.load", "tensorflow.keras.preprocessing.image.img_to_array" ]
[((431, 466), 'joblib.load', 'joblib.load', (['"""./models/scaler.save"""'], {}), "('./models/scaler.save')\n", (442, 466), False, 'import joblib\n'), ((475, 509), 'tensorflow.keras.models.load_model', 'load_model', (['"""./models/my_model.h5"""'], {}), "('./models/my_model.h5')\n", (485, 509), False, 'from tensorflow....
import sys import webbrowser import os from comicstreamerlib.folders import AppFolders from PyQt4 import QtGui,QtCore class SystemTrayIcon(QtGui.QSystemTrayIcon): def __init__(self, icon, app): QtGui.QSystemTrayIcon.__init__(self, icon, None) self.app = app self.menu = QtGui.QMenu(None) ...
[ "PyQt4.QtGui.QApplication", "comicstreamerlib.folders.AppFolders.imagePath", "PyQt4.QtCore.QCoreApplication.quit", "PyQt4.QtGui.QSystemTrayIcon.__init__", "PyQt4.QtGui.QMenu", "PyQt4.QtGui" ]
[((208, 256), 'PyQt4.QtGui.QSystemTrayIcon.__init__', 'QtGui.QSystemTrayIcon.__init__', (['self', 'icon', 'None'], {}), '(self, icon, None)\n', (238, 256), False, 'from PyQt4 import QtGui, QtCore\n'), ((300, 317), 'PyQt4.QtGui.QMenu', 'QtGui.QMenu', (['None'], {}), '(None)\n', (311, 317), False, 'from PyQt4 import QtGu...
""" IO Handler for LAS (and compressed LAZ) file format """ import laspy import numpy as np from laserchicken import keys from laserchicken.io.base_io_handler import IOHandler from laserchicken.io.utils import convert_to_short_type, select_valid_attributes DEFAULT_LAS_ATTRIBUTES = { 'x', 'y', 'z', 'i...
[ "laspy.create", "laserchicken.io.utils.convert_to_short_type", "laserchicken.io.utils.select_valid_attributes", "laspy.ExtraBytesParams", "laspy.read", "numpy.zeros_like" ]
[((757, 778), 'laspy.read', 'laspy.read', (['self.path'], {}), '(self.path)\n', (767, 778), False, 'import laspy\n'), ((993, 1050), 'laserchicken.io.utils.select_valid_attributes', 'select_valid_attributes', (['attributes_available', 'attributes'], {}), '(attributes_available, attributes)\n', (1016, 1050), False, 'from...
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout, BatchNormalization from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.callbacks import ModelCheckpoint from tensorflow.keras.models import Sequential from tensorflow.keras.models import load_model ...
[ "logging.getLogger", "tensorflow.device", "logging.StreamHandler", "tensorflow.random.set_seed", "argparse.ArgumentParser", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.MaxPooling2D", "tensorflow.keras.layers.Dropout", "os.path.join", "tensorflow.keras.preprocessing.image.ImageDataGe...
[((538, 558), 'numpy.random.seed', 'np.random.seed', (['SEED'], {}), '(SEED)\n', (552, 558), True, 'import numpy as np\n'), ((559, 583), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['SEED'], {}), '(SEED)\n', (577, 583), True, 'import tensorflow as tf\n'), ((609, 639), 'logging.getLogger', 'logging.getLogger', ...
""" Thư viện này viết ra phục vụ cho môn học `Các mô hình ngẫu nhiên và ứng dụng` Sử dụng các thư viện `networkx, pandas, numpy, matplotlib` """ import networkx as nx import numpy as np import matplotlib.pyplot as plt from matplotlib.image import imread import pandas as pd def _gcd(a, b): if a == 0: retu...
[ "pandas.read_csv", "matplotlib.pyplot.ylabel", "matplotlib.image.imread", "numpy.ndarray.tolist", "matplotlib.pyplot.imshow", "numpy.delete", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "networkx.DiGraph", "numpy.subtract", "numpy.matmul", "pandas.DataFrame", "matplotlib.pyplot.axi...
[((1247, 1264), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (1258, 1264), True, 'import pandas as pd\n'), ((1282, 1300), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (1294, 1300), True, 'import pandas as pd\n'), ((2356, 2385), 'numpy.matmul', 'np.matmul', (['self.pi', 'self.data'], ...
#进行users 子应用的视图路由 from django.urls import path from users.views import RegisterView, ImageCodeView,SmsCodeView urlpatterns = [ #path的第一个参数:路由 #path的第二个函数:视图函数名 path('register/', RegisterView.as_view(),name='register'), #图片验证码的路由 path('imagecode/',ImageCodeView.as_view(),name='imagecode'), #短信...
[ "users.views.ImageCodeView.as_view", "users.views.RegisterView.as_view", "users.views.SmsCodeView.as_view" ]
[((192, 214), 'users.views.RegisterView.as_view', 'RegisterView.as_view', ([], {}), '()\n', (212, 214), False, 'from users.views import RegisterView, ImageCodeView, SmsCodeView\n'), ((270, 293), 'users.views.ImageCodeView.as_view', 'ImageCodeView.as_view', ([], {}), '()\n', (291, 293), False, 'from users.views import R...
#!/usr/bin/python from builtins import object from builtins import str import sys import traceback sys.path.append("/opt/contrail/fabric_ansible_playbooks/module_utils") # noqa from filter_utils import _task_done, _task_error_log, _task_log, FilterLog from job_manager.job_utils import JobVncApi class FilterModule...
[ "filter_utils._task_done", "traceback.format_exc", "filter_utils._task_log", "filter_utils.FilterLog.instance", "builtins.str", "sys.path.append", "job_manager.job_utils.JobVncApi.vnc_init" ]
[((101, 171), 'sys.path.append', 'sys.path.append', (['"""/opt/contrail/fabric_ansible_playbooks/module_utils"""'], {}), "('/opt/contrail/fabric_ansible_playbooks/module_utils')\n", (116, 171), False, 'import sys\n'), ((524, 582), 'filter_utils.FilterLog.instance', 'FilterLog.instance', (['"""Import_lldp_info_Filter"""...
"""Provides the MENU html string which is appended to all templates Please note that the MENU only works in [Fast](https://www.fast.design/) based templates. If you need some sort of custom MENU html string feel free to customize this code. """ from awesome_panel_extensions.frameworks.fast.fast_menu import to_menu f...
[ "src.shared.config.applications.values" ]
[((402, 430), 'src.shared.config.applications.values', 'config.applications.values', ([], {}), '()\n', (428, 430), False, 'from src.shared import config\n')]
# <NAME> <EMAIL> # The MIT License (MIT) # # Copyright (c) 2020 # # # 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, copy...
[ "serial.Serial", "time.sleep" ]
[((1999, 2014), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (2009, 2014), False, 'import time\n'), ((2150, 2165), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (2160, 2165), False, 'import time\n'), ((1412, 1456), 'serial.Serial', 'serial.Serial', ([], {'port': 'comport', 'baudrate': '(115200)'}),...
import os import urllib.request os.makedirs('saved_models', exist_ok=True) model_path = 'http://shape2prog.csail.mit.edu/repo/wrn_40_2_vanilla/ckpt_epoch_240.pth' model_dir = 'saved_models/wrn_40_2_vanilla' os.makedirs(model_dir, exist_ok=True) urllib.request.urlretrieve(model_path, os.path.join(model_dir, mo...
[ "os.makedirs" ]
[((36, 78), 'os.makedirs', 'os.makedirs', (['"""saved_models"""'], {'exist_ok': '(True)'}), "('saved_models', exist_ok=True)\n", (47, 78), False, 'import os\n'), ((216, 253), 'os.makedirs', 'os.makedirs', (['model_dir'], {'exist_ok': '(True)'}), '(model_dir, exist_ok=True)\n', (227, 253), False, 'import os\n'), ((554, ...
#!/usr/bin/env python from argparse import ArgumentParser import sys from comp_pi import compute_pi def main(): arg_parser = ArgumentParser(description='compute pi using Fortran ' 'function') arg_parser.add_argument('n', default=1000, nargs='?', hel...
[ "comp_pi.compute_pi", "argparse.ArgumentParser", "sys.exit" ]
[((132, 195), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""compute pi using Fortran function"""'}), "(description='compute pi using Fortran function')\n", (146, 195), False, 'from argparse import ArgumentParser\n'), ((485, 501), 'sys.exit', 'sys.exit', (['status'], {}), '(status)\n', (493, 501)...
#!/usr/bin/env python3 import unittest import torch from Lgpytorch.lazy import CatLazyTensor, NonLazyTensor from Lgpytorch.test.lazy_tensor_test_case import LazyTensorTestCase class TestCatLazyTensor(LazyTensorTestCase, unittest.TestCase): seed = 1 def create_lazy_tensor(self): root = torch.randn(...
[ "unittest.main", "Lgpytorch.lazy.CatLazyTensor", "torch.randn", "Lgpytorch.lazy.NonLazyTensor" ]
[((3869, 3884), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3882, 3884), False, 'import unittest\n'), ((308, 325), 'torch.randn', 'torch.randn', (['(6)', '(7)'], {}), '(6, 7)\n', (319, 325), False, 'import torch\n'), ((566, 591), 'Lgpytorch.lazy.NonLazyTensor', 'NonLazyTensor', (['slice1_mat'], {}), '(slice1_m...
import re from AFD import AFD class AFN: def __init__(self, nome=None, estados=[], simbolos=[], estado_inicial=None, estados_finais=[], funcoes_programa={}): self.nome = nome self.estados = estados self.simbolos = simbolos self.estado_inicial = estado_inicial self.estados...
[ "re.findall", "AFD.AFD", "re.search" ]
[((4692, 4838), 'AFD.AFD', 'AFD', ([], {'nome': 'self.nome', 'estados': 'q', 'simbolos': 'self.simbolos', 'estado_inicial': 'self.estado_inicial', 'estados_finais': 'estados_finais', 'funcoes_programa': 't'}), '(nome=self.nome, estados=q, simbolos=self.simbolos, estado_inicial=self.\n estado_inicial, estados_finais=...
from typing import List, Dict import pathlib import shutil import enum from typer import Option as O_ import typer from cs_tools.helpers.cli_ux import console, frontend, CSToolsGroup, CSToolsCommand from cs_tools.util.datetime import to_datetime from cs_tools.tools.common import run_tql_command, run_tql_script, tsloa...
[ "cs_tools.thoughtspot.ThoughtSpot", "cs_tools.helpers.cli_ux.console.status", "pathlib.Path", "typer.Option", "cs_tools.util.algo.chunks", "typer.Typer", "cs_tools.helpers.cli_ux.console.print", "cs_tools.tools.common.run_tql_script", "cs_tools.tools.common.tsload", "cs_tools.util.datetime.to_date...
[((6713, 7834), 'typer.Typer', 'typer.Typer', ([], {'help': '"""\n Make Dependencies searchable in your platform.\n\n [b][yellow]USE AT YOUR OWN RISK![/b] This tool uses private API calls which\n could change on any version update and break the tool.[/]\n\n Dependencies can be collected for various types of...
#!/usr/bin/python import math import random from utils.log import log from bots.simpleBots import BasicBot def get_Chosen(num_cards, desired_score): chosen = list(range(1,num_cards+1)) last_removed = 0 while sum(chosen) > desired_score: #remove a random element last_removed = random.randint(0,len(chosen)-1) ...
[ "utils.log.log", "math.ceil" ]
[((1997, 2039), 'math.ceil', 'math.ceil', (['((num_cards + 1) * num_cards / 4)'], {}), '((num_cards + 1) * num_cards / 4)\n', (2006, 2039), False, 'import math\n'), ((3112, 3158), 'utils.log.log', 'log', (['self', '"""This is a verbose print statment!"""'], {}), "(self, 'This is a verbose print statment!')\n", (3115, 3...
import uuid from typing import Dict, List from nehushtan.ws.NehushtanWebsocketConnectionEntity import NehushtanWebsocketConnectionEntity class TestWebsocketRegisterAgent: def __init__(self): self.__map: Dict[str, NehushtanWebsocketConnectionEntity] = {} self.agent_identity = str(uuid.uuid4()) ...
[ "nehushtan.ws.NehushtanWebsocketConnectionEntity.NehushtanWebsocketConnectionEntity", "uuid.uuid4" ]
[((371, 416), 'nehushtan.ws.NehushtanWebsocketConnectionEntity.NehushtanWebsocketConnectionEntity', 'NehushtanWebsocketConnectionEntity', (['websocket'], {}), '(websocket)\n', (405, 416), False, 'from nehushtan.ws.NehushtanWebsocketConnectionEntity import NehushtanWebsocketConnectionEntity\n'), ((304, 316), 'uuid.uuid4...
# Generated by Django 4.0.3 on 2022-04-02 17:32 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
[ "django.db.models.FloatField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.PositiveIntegerField", "django.db.models.BigAutoField", "django.db.models.DateTimeField", "django.db.migrations.swappable_dependency", "django.db.model...
[((259, 316), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (290, 316), False, 'from django.db import migrations, models\n'), ((456, 552), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '...
""" TutorialMirror A simple mirror object to experiment with. """ from evennia import DefaultObject from evennia.utils import make_iter, is_iter from evennia import logger class TutorialMirror(DefaultObject): """ A simple mirror object that - echoes back the description of the object looking at it ...
[ "evennia.logger.log_msg", "evennia.utils.make_iter", "evennia.utils.is_iter" ]
[((1810, 1823), 'evennia.utils.is_iter', 'is_iter', (['text'], {}), '(text)\n', (1817, 1823), False, 'from evennia.utils import make_iter, is_iter\n'), ((1878, 1897), 'evennia.utils.make_iter', 'make_iter', (['from_obj'], {}), '(from_obj)\n', (1887, 1897), False, 'from evennia.utils import make_iter, is_iter\n'), ((216...
# ----------------------------------------------------------------------- # Author: <NAME> # # Purpose: Determines the fire season for each window. The fire season is # defined as the minimum number of consecutive months that contain more # than 80% of the burned area (Archibald ett al 2013; Abatzoglou et al. # 2018). ...
[ "os.path.exists", "os.makedirs", "os.path.join", "os.chdir", "pandas.read_excel", "pandas.DataFrame" ]
[((989, 1006), 'os.chdir', 'os.chdir', (['"""../.."""'], {}), "('../..')\n", (997, 1006), False, 'import os\n'), ((1129, 1171), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': "['window', 'months']"}), "(columns=['window', 'months'])\n", (1141, 1171), True, 'import pandas as pd\n'), ((2378, 2431), 'os.path.join', ...
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "tensorflow.compat.v1.placeholder", "tensorflow.compat.v1.clip_by_global_norm", "tensorflow.compat.v1.disable_v2_behavior", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.reduce_sum", "tensorflow_probability.distributions.Normal", "tensorflow_probability.distributions.Bernoulli", "tensorflow.comp...
[((666, 690), 'tensorflow.compat.v1.disable_v2_behavior', 'tf.disable_v2_behavior', ([], {}), '()\n', (688, 690), True, 'import tensorflow.compat.v1 as tf\n'), ((867, 893), 'tensorflow.compat.v1.layers.dense', 'tf.layers.dense', (['hidden', '(1)'], {}), '(hidden, 1)\n', (882, 893), True, 'import tensorflow.compat.v1 as...
from setuptools import setup, find_packages setup( name='SBIExperiments', version='0.0.1', url='https://github.com/astrodeepnet/sbi_experiments', author='<NAME> and friends', description='Package for numerical experiments of SBI tools', packages=find_packages(), install_requires=[ 'numpy>=1.19.2', ...
[ "setuptools.find_packages" ]
[((259, 274), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (272, 274), False, 'from setuptools import setup, find_packages\n')]
#!/usr/bin/env python3 """ Author : antoniog1 Date : 2019-02-21 Purpose: Rock the Casbah """ import argparse import sys import os # -------------------------------------------------- def get_args(): """get command-line arguments""" parser = argparse.ArgumentParser( description='Argparse Python scri...
[ "os.listdir", "argparse.ArgumentParser", "os.path.join", "os.path.isdir", "sys.exit" ]
[((254, 375), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Argparse Python script"""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description='Argparse Python script',\n formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n", (277, 375), False, 'import argp...
# Copyright 2021 Google 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 writing, s...
[ "uuid.uuid4", "google.cloud.bigquery.Dataset", "google.cloud.bigquery.Table", "export_to_bigquery.export_to_bigquery", "google.cloud.bigquery.Client" ]
[((1069, 1086), 'google.cloud.bigquery.Client', 'bigquery.Client', ([], {}), '()\n', (1084, 1086), False, 'from google.cloud import bigquery\n'), ((1154, 1200), 'google.cloud.bigquery.Dataset', 'bigquery.Dataset', (['f"""{project_id}.{dataset_id}"""'], {}), "(f'{project_id}.{dataset_id}')\n", (1170, 1200), False, 'from...
import serial import RPi.GPIO as GPIO import time ser=serial.Serial("/dev/ttyACM0",9600) start_time = time.time() imu = open("IMU.txt","w") while time.time() - start_time <= 1: ser.readline() while time.time() - start_time <= 8: read_ser=ser.readline() if float(read_ser) == 0.00: pa...
[ "serial.Serial", "time.time" ]
[((59, 94), 'serial.Serial', 'serial.Serial', (['"""/dev/ttyACM0"""', '(9600)'], {}), "('/dev/ttyACM0', 9600)\n", (72, 94), False, 'import serial\n'), ((108, 119), 'time.time', 'time.time', ([], {}), '()\n', (117, 119), False, 'import time\n'), ((156, 167), 'time.time', 'time.time', ([], {}), '()\n', (165, 167), False,...
from pyg_base._types import is_iterable from pyg_base._loop import len0 __all__ = ['zipper', 'lens'] def lens(*values): """ measures (and enforces) a common length across all values :Parameters: ---------------- *values : lists Raises ------ ValueError if you have values with...
[ "pyg_base._types.is_iterable", "pyg_base._loop.len0" ]
[((569, 581), 'pyg_base._loop.len0', 'len0', (['values'], {}), '(values)\n', (573, 581), False, 'from pyg_base._loop import len0\n'), ((621, 632), 'pyg_base._loop.len0', 'len0', (['value'], {}), '(value)\n', (625, 632), False, 'from pyg_base._loop import len0\n'), ((1775, 1793), 'pyg_base._types.is_iterable', 'is_itera...
# coding: utf-8 # # Copyright 2020 The Oppia Authors. 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 requi...
[ "subprocess.Popen", "core.python_utils.PRINT", "os.path.join", "sys.exit", "re.search" ]
[((923, 968), 'os.path.join', 'os.path.join', (['common.NODE_PATH', '"""bin"""', '"""node"""'], {}), "(common.NODE_PATH, 'bin', 'node')\n", (935, 968), False, 'import os\n'), ((984, 1036), 'os.path.join', 'os.path.join', (['"""node_modules"""', '"""nyc"""', '"""bin"""', '"""nyc.js"""'], {}), "('node_modules', 'nyc', 'b...
from __future__ import print_function from pyomo.environ import * from pyomo.core.base import Constraint, Objective, Suffix, minimize from pyomo.opt import ProblemFormat, SolverFactory from nmpc_mhe.dync.NMPCGenv2 import NmpcGen from nmpc_mhe.mods.bfb.nob5_hi_t import bfb_dae from snap_shot import snap import sys, os i...
[ "nmpc_mhe.dync.NMPCGenv2.NmpcGen", "itertools.product", "pyomo.opt.SolverFactory" ]
[((1825, 1962), 'nmpc_mhe.dync.NMPCGenv2.NmpcGen', 'NmpcGen', (['bfb_dae', '(400 / nfe_mhe)', 'states', 'u'], {'ref_state': 'ref_state', 'u_bounds': 'u_bounds', 'nfe_tnmpc': 'nfe_mhe', 'ncp_tnmpc': '(1)', 'nfe_t': '(5)', 'ncp_t': '(1)'}), '(bfb_dae, 400 / nfe_mhe, states, u, ref_state=ref_state, u_bounds=\n u_bounds...
from urllib.parse import urlparse from quart import current_app as app, request, jsonify def filter_referrers(): filters = app.config.get('REFERRERS_FILTER') if not filters: return None referrer = request.referrer if referrer: parsed = urlparse(referrer) for filter in filters:...
[ "urllib.parse.urlparse", "quart.jsonify", "quart.current_app.config.get" ]
[((130, 164), 'quart.current_app.config.get', 'app.config.get', (['"""REFERRERS_FILTER"""'], {}), "('REFERRERS_FILTER')\n", (144, 164), True, 'from quart import current_app as app, request, jsonify\n'), ((271, 289), 'urllib.parse.urlparse', 'urlparse', (['referrer'], {}), '(referrer)\n', (279, 289), False, 'from urllib...
from django.db import models from filer.fields.file import FilerFileField class FakeLink(models.Model): """ In our widget we need to manually render a AdminFileFormField. Basically for every other Field type this is not a problem at all, but Failer needs a rel attribute which consists of a reverse relatio...
[ "filer.fields.file.FilerFileField" ]
[((383, 446), 'filer.fields.file.FilerFileField', 'FilerFileField', ([], {'blank': '(True)', 'null': '(True)', 'on_delete': 'models.CASCADE'}), '(blank=True, null=True, on_delete=models.CASCADE)\n', (397, 446), False, 'from filer.fields.file import FilerFileField\n')]
from __future__ import print_function import atexit import errno import logging import os import select import signal import sys import time from process_tests import setup_coverage TIMEOUT = int(os.getenv('MANHOLE_TEST_TIMEOUT', 10)) SOCKET_PATH = '/tmp/manhole-socket' OUTPUT = sys.__stdout__ def handle_sigterm(s...
[ "time.sleep", "sys.exc_info", "manhole.install", "eventlet.monkey_patch", "sys.exit", "os.fork", "ctypes.CDLL", "signalfd.signalfd", "os.read", "os.forkpty", "os.path.exists", "os.kill", "gevent.monkey.patch_all", "subprocess.Popen", "os.unlink", "traceback.print_exc", "select.select...
[((548, 593), 'signal.signal', 'signal.signal', (['signal.SIGTERM', 'handle_sigterm'], {}), '(signal.SIGTERM, handle_sigterm)\n', (561, 593), False, 'import signal\n'), ((199, 236), 'os.getenv', 'os.getenv', (['"""MANHOLE_TEST_TIMEOUT"""', '(10)'], {}), "('MANHOLE_TEST_TIMEOUT', 10)\n", (208, 236), False, 'import os\n'...
from django.contrib import admin from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import models if settings.HAS_ADDITIONAL_USER_DATA: try: class UserProfileInline(admin.TabularInline): model = models.UserProfile extra = 0 except (...
[ "django.contrib.admin.site.register", "django.core.exceptions.ImproperlyConfigured" ]
[((889, 932), 'django.contrib.admin.site.register', 'admin.site.register', (['models.User', 'UserAdmin'], {}), '(models.User, UserAdmin)\n', (908, 932), False, 'from django.contrib import admin\n'), ((933, 970), 'django.contrib.admin.site.register', 'admin.site.register', (['models.IpAddress'], {}), '(models.IpAddress)...
from client import exception, embed_creator, console_interface, discord_manager, file_manager, ini_manager, json_manager, origin, permissions, server_timer from client.config import config as c, language as l from discord.ext import commands, tasks from client.external.hiscores import hiscores_xp from PIL import Image,...
[ "locale.format_string", "client.ini_manager.get_ini", "client.external.hiscores.hiscores_xp.Hiscores", "PIL.ImageDraw.Draw", "client.json_manager.get_data", "discord.ext.commands.command", "client.exception.error", "PIL.ImageFont.truetype", "client.console_interface.console_message", "client.json_...
[((33610, 33629), 'discord.ext.tasks.loop', 'tasks.loop', ([], {'count': '(1)'}), '(count=1)\n', (33620, 33629), False, 'from discord.ext import commands, tasks\n'), ((35103, 35121), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (35119, 35121), False, 'from discord.ext import commands, tasks\n')...
# Copyright © 2019. <NAME>. All rights reserved. import numpy as np import pandas as pd from collections import OrderedDict import math import warnings from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA from sklearn.neighbors import NearestNeighbors from sklearn.metrics import silhouette_sco...
[ "numpy.invert", "numpy.argsort", "numpy.array", "numpy.linalg.norm", "numpy.nanmin", "numpy.cov", "numpy.arange", "numpy.random.RandomState", "numpy.mean", "numpy.histogram", "numpy.reshape", "numpy.where", "numpy.delete", "numpy.diff", "numpy.max", "numpy.linspace", "numpy.empty", ...
[((1982, 1996), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1994, 1996), True, 'import pandas as pd\n'), ((8894, 8918), 'numpy.zeros', 'np.zeros', (['(total_units,)'], {}), '((total_units,))\n', (8902, 8918), True, 'import numpy as np\n'), ((9794, 9818), 'numpy.zeros', 'np.zeros', (['(total_units,)'], {}), '...
import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import copy from .pdp_calc_utils import _sample_data, _find_onehot_actual, _find_closest from sklearn.cluster import MiniBatchKMeans, KMeans def _pdp_plot_title(n_grids, feature_name, ax, multi_flag, whi...
[ "sklearn.cluster.KMeans", "numpy.log10", "sklearn.cluster.MiniBatchKMeans", "numpy.min", "numpy.max", "numpy.array", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.figure", "numpy.linspace", "copy.deepcopy", "pandas.DataFrame", "matplotlib.pyplot.subplot", "matplotlib.pyplot.get_cmap" ]
[((5131, 5171), 'copy.deepcopy', 'copy.deepcopy', (['pdp_isolate_out.ice_lines'], {}), '(pdp_isolate_out.ice_lines)\n', (5144, 5171), False, 'import copy\n'), ((5184, 5218), 'copy.deepcopy', 'copy.deepcopy', (['pdp_isolate_out.pdp'], {}), '(pdp_isolate_out.pdp)\n', (5197, 5218), False, 'import copy\n'), ((11826, 11886)...
import os import pytest from kodexa import Document, Pipeline, PipelineContext, TagsToKeyValuePairExtractor, RollupTransformer def get_test_directory(): return os.path.dirname(os.path.abspath(__file__)) + "/../test_documents/" @pytest.mark.skip def test_html_rollup(): document = Document.from_msgpack(open...
[ "kodexa.RollupTransformer", "os.path.abspath", "kodexa.PipelineContext", "kodexa.TagsToKeyValuePairExtractor", "kodexa.Pipeline" ]
[((678, 720), 'kodexa.RollupTransformer', 'RollupTransformer', ([], {'collapse_type_res': "['a']"}), "(collapse_type_res=['a'])\n", (695, 720), False, 'from kodexa import Document, Pipeline, PipelineContext, TagsToKeyValuePairExtractor, RollupTransformer\n'), ((1327, 1379), 'kodexa.TagsToKeyValuePairExtractor', 'TagsTo...
# -*- coding: utf-8 -*- """ Injector. A partir de um arquivo binario, de uma tabela binaria gerada com o Finder, e um arquivo de substituição, o Injector é capaz de injetar um texto no binario trocando o texto in-game O Injector faz automaticamente a adequação do tamanho do texto ao tamanho da caixa, truncan...
[ "os.path.exists", "sys.exit", "os.path.isfile", "pickle.Unpickler", "binascii.unhexlify" ]
[((2675, 2686), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (2683, 2686), False, 'import sys\n'), ((2775, 2794), 'os.path.exists', 'os.path.exists', (['sfc'], {}), '(sfc)\n', (2789, 2794), False, 'import os\n'), ((2799, 2818), 'os.path.isfile', 'os.path.isfile', (['tbl'], {}), '(tbl)\n', (2813, 2818), False, 'impor...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class Cudnn(Package): """NVIDIA cuDNN is a GPU-accelerated library of primitives for d...
[ "os.path.join" ]
[((10119, 10172), 'os.path.join', 'os.path.join', (['self.prefix', '"""targets"""', '"""ppc64le-linux"""'], {}), "(self.prefix, 'targets', 'ppc64le-linux')\n", (10131, 10172), False, 'import os\n'), ((10337, 10392), 'os.path.join', 'os.path.join', (['prefix', '"""targets"""', '"""ppc64le-linux"""', '"""lib"""'], {}), "...
# -*- coding: utf-8 -*- """Graphical monitor of Celery events using curses.""" from __future__ import absolute_import, print_function, unicode_literals import curses import sys import threading from datetime import datetime from itertools import count from textwrap import wrap from time import time from math import c...
[ "curses.start_color", "curses.endwin", "curses.napms", "textwrap.wrap", "curses.nocbreak", "curses.cbreak", "threading.Thread.__init__", "celery.five.values", "curses.init_pair", "threading.RLock", "celery.five.items", "curses.beep", "curses.color_pair", "celery.utils.text.abbrtask", "cu...
[((17802, 17821), 'celery.app.app_or_default', 'app_or_default', (['app'], {}), '(app)\n', (17816, 17821), False, 'from celery.app import app_or_default\n'), ((1920, 1937), 'threading.RLock', 'threading.RLock', ([], {}), '()\n', (1935, 1937), False, 'import threading\n'), ((4667, 4675), 'itertools.count', 'count', (['(...
"""A feature extractor for patients' utilization.""" from __future__ import absolute_import import logging import pandas as pd from sutter.lib import postgres from sutter.lib.feature_extractor import FeatureExtractor log = logging.getLogger('feature_extraction') class UtilizationExtractor(FeatureExtractor): ...
[ "logging.getLogger", "sutter.lib.postgres.get_connection", "pandas.pivot_table", "pandas.read_sql" ]
[((228, 267), 'logging.getLogger', 'logging.getLogger', (['"""feature_extraction"""'], {}), "('feature_extraction')\n", (245, 267), False, 'import logging\n'), ((969, 994), 'sutter.lib.postgres.get_connection', 'postgres.get_connection', ([], {}), '()\n', (992, 994), False, 'from sutter.lib import postgres\n'), ((1010,...
"""Perform normalization on inputs or rewards. """ import numpy as np import torch from gym.spaces import Box def normalize_angle(x): """Wraps input angle to [-pi, pi]. """ return ((x + np.pi) % (2 * np.pi)) - np.pi class RunningMeanStd(): """Calulates the running mean and std of a data stream. ...
[ "numpy.mean", "numpy.sqrt", "numpy.ones", "numpy.asarray", "numpy.square", "numpy.zeros", "numpy.var" ]
[((787, 814), 'numpy.zeros', 'np.zeros', (['shape', 'np.float64'], {}), '(shape, np.float64)\n', (795, 814), True, 'import numpy as np\n'), ((834, 860), 'numpy.ones', 'np.ones', (['shape', 'np.float64'], {}), '(shape, np.float64)\n', (841, 860), True, 'import numpy as np\n'), ((1094, 1114), 'numpy.mean', 'np.mean', (['...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 21 20:09:08 2021 ###################### ##### read h5 ######## ###################### # 1.read h5-file h5_file = h5py.File(files[1],'r') # 2.show all keys in h5-file h5_file.keys() # 3.循环读取所有 keys in h5-file for key in h5_file.keys(): onekey =...
[ "h5py.File" ]
[((1202, 1222), 'h5py.File', 'h5py.File', (['file', '"""r"""'], {}), "(file, 'r')\n", (1211, 1222), False, 'import h5py\n')]
import data_algebra import data_algebra.test_util from data_algebra.data_ops import * # https://github.com/WinVector/data_algebra import data_algebra.util import data_algebra.SQLite def test_compount_where_and(): d = data_algebra.default_data_model.pd.DataFrame( { "a": ["a", "b", None, None]...
[ "data_algebra.default_data_model.pd.DataFrame", "data_algebra.SQLite.SQLiteModel", "data_algebra.test_util.check_transform" ]
[((225, 387), 'data_algebra.default_data_model.pd.DataFrame', 'data_algebra.default_data_model.pd.DataFrame', (["{'a': ['a', 'b', None, None], 'b': ['c', None, 'd', None], 'x': [1, 2, None,\n None], 'y': [3, None, 4, None]}"], {}), "({'a': ['a', 'b', None, None],\n 'b': ['c', None, 'd', None], 'x': [1, 2, None, N...
from setuptools import setup, find_packages setup( name='passgen-py', packages=find_packages(), version='1.1', description='Generate Passwords Deterministically based on a Master Password.', classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', ...
[ "setuptools.find_packages" ]
[((88, 103), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (101, 103), False, 'from setuptools import setup, find_packages\n')]
#!/usr/bin/env python import sys import colorama from pick_db_file import pick_db_file import db_connection import card_repository from review_cards import review_cards from new_card import new_card from new_cards import new_cards import review from user_colors import print_info, print_instruction, print_error from usa...
[ "user_colors.print_info", "pick_db_file.pick_db_file", "sys.exit", "usage_info.print_usage_info", "card_repository.check_if_empty", "colorama.init", "user_colors.print_error", "review.browse_by_regex_front", "review.browse_by_score", "review.browse_by_last_viewed", "review.browse_by_regex", "n...
[((396, 411), 'colorama.init', 'colorama.init', ([], {}), '()\n', (409, 411), False, 'import colorama\n'), ((721, 735), 'pick_db_file.pick_db_file', 'pick_db_file', ([], {}), '()\n', (733, 735), False, 'from pick_db_file import pick_db_file\n'), ((755, 785), 'db_connection.connect', 'db_connection.connect', (['db_file'...
import numpy as np from scipy.special import factorial from pyapprox.indexing import hash_array from pyapprox.indexing import compute_hyperbolic_level_indices def multiply_multivariate_polynomials(indices1,coeffs1,indices2,coeffs2): """ TODO: instead of using dictionary to colect terms consider using uniqu...
[ "numpy.tile", "numpy.ones", "numpy.hstack", "scipy.special.factorial", "pyapprox.indexing.compute_hyperbolic_level_indices", "numpy.asarray", "pyapprox.indexing.hash_array", "numpy.zeros", "numpy.empty", "numpy.vstack", "numpy.polynomial.polynomial.polypow", "numpy.zeros_like" ]
[((1047, 1089), 'numpy.empty', 'np.empty', (['(num_vars, max_num_indices)', 'int'], {}), '((num_vars, max_num_indices), int)\n', (1055, 1089), True, 'import numpy as np\n'), ((1101, 1133), 'numpy.empty', 'np.empty', (['max_num_indices', 'float'], {}), '(max_num_indices, float)\n', (1109, 1133), True, 'import numpy as n...
# -*- coding: utf-8 -*- from unittest import TestCase from mock import Mock, patch from vault.tests.fakes import fake_request from vault.views import SetProjectView from django.utils.translation import ugettext as _ class SetProjectTest(TestCase): def setUp(self): self.view = SetProjectView.as_view() ...
[ "mock.patch.stopall", "mock.patch", "vault.views.SetProjectView.as_view", "django.utils.translation.ugettext", "vault.tests.fakes.fake_request" ]
[((632, 659), 'mock.patch', 'patch', (['"""vault.views.switch"""'], {}), "('vault.views.switch')\n", (637, 659), False, 'from mock import Mock, patch\n'), ((983, 1010), 'mock.patch', 'patch', (['"""vault.views.switch"""'], {}), "('vault.views.switch')\n", (988, 1010), False, 'from mock import Mock, patch\n'), ((294, 31...
import numpy as np import cv2 import os import math os.system("fswebcam -r 507x456 --no-banner image11.jpg") def showImage(capImg): cv2.imshow('img', capImg) cv2.waitKey(0) cv2.destroyAllWindows() img = cv2.imread('image11.jpg',-1) height, width, channel = img.shape topy= height topx = width hsv = cv2.cv...
[ "cv2.rectangle", "cv2.drawContours", "cv2.threshold", "cv2.inRange", "cv2.bitwise_and", "cv2.contourArea", "cv2.imshow", "numpy.array", "cv2.waitKey", "cv2.destroyAllWindows", "cv2.cvtColor", "cv2.moments", "cv2.findContours", "os.system", "cv2.imread" ]
[((52, 108), 'os.system', 'os.system', (['"""fswebcam -r 507x456 --no-banner image11.jpg"""'], {}), "('fswebcam -r 507x456 --no-banner image11.jpg')\n", (61, 108), False, 'import os\n'), ((217, 246), 'cv2.imread', 'cv2.imread', (['"""image11.jpg"""', '(-1)'], {}), "('image11.jpg', -1)\n", (227, 246), False, 'import cv2...
import json from optimism.JaxConfig import * from optimism import Mesh def read_json_mesh(meshFileName): with open(meshFileName, 'r', encoding='utf-8') as jsonFile: meshData = json.load(jsonFile) coordinates = np.array(meshData['coordinates']) connectivity = np.array(meshData['connectivi...
[ "json.load", "optimism.Mesh.construct_mesh_from_basic_data" ]
[((763, 857), 'optimism.Mesh.construct_mesh_from_basic_data', 'Mesh.construct_mesh_from_basic_data', (['coordinates', 'connectivity', 'blocks', 'nodeSets', 'sideSets'], {}), '(coordinates, connectivity, blocks,\n nodeSets, sideSets)\n', (798, 857), False, 'from optimism import Mesh\n'), ((191, 210), 'json.load', 'js...
"""Linux-specific code""" from pysyte.types import paths def xdg_home(): """path to $XDG_CONFIG_HOME >>> assert xdg_home() == paths.path('~/.config').expand() """ return paths.environ_path("XDG_CONFIG_HOME", "~/.config") def xdg_home_config(filename): """path to that file in $XDG_CONFIG_HOME ...
[ "pysyte.types.paths.environ_paths", "pysyte.types.paths.environ_path" ]
[((191, 241), 'pysyte.types.paths.environ_path', 'paths.environ_path', (['"""XDG_CONFIG_HOME"""', '"""~/.config"""'], {}), "('XDG_CONFIG_HOME', '~/.config')\n", (209, 241), False, 'from pysyte.types import paths\n'), ((507, 545), 'pysyte.types.paths.environ_paths', 'paths.environ_paths', (['"""XDG_CONFIG_DIRS"""'], {})...
# Copyright 2018 The TensorFlow Authors. 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 applica...
[ "six.add_metaclass" ]
[((788, 818), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (805, 818), False, 'import six\n')]
# Standard imports import sys # Project imports from icecreamscrape.cli import cli from icecreamscrape.webdriver import driver_factory from icecreamscrape import composites as comps from icecreamscrape.composites import create_timestamped_dir def main(args=sys.argv[1:]): """ Main function. :param: args is used for ...
[ "icecreamscrape.cli.cli", "icecreamscrape.webdriver.driver_factory", "icecreamscrape.composites.create_timestamped_dir" ]
[((347, 356), 'icecreamscrape.cli.cli', 'cli', (['args'], {}), '(args)\n', (350, 356), False, 'from icecreamscrape.cli import cli\n'), ((477, 501), 'icecreamscrape.composites.create_timestamped_dir', 'create_timestamped_dir', ([], {}), '()\n', (499, 501), False, 'from icecreamscrape.composites import create_timestamped...
# pylint: skip-file # type: ignore # -*- coding: utf-8 -*- # # tests.controllers.mission.mission_unit_test.py is part of The # RAMSTK Project # # All rights reserved. # Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com """Test class for testing Mission module algorithms ...
[ "pytest.mark.skip", "pytest.mark.usefixtures", "pubsub.pub.isSubscribed" ]
[((708, 777), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""test_record_model"""', '"""unit_test_table_model"""'], {}), "('test_record_model', 'unit_test_table_model')\n", (731, 777), False, 'import pytest\n'), ((3035, 3102), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""test_attributes"""',...
from pheasant.renderers.jupyter.jupyter import Jupyter jupyter = Jupyter() jupyter.findall("{{3}}3{{5}}") jupyter.page
[ "pheasant.renderers.jupyter.jupyter.Jupyter" ]
[((66, 75), 'pheasant.renderers.jupyter.jupyter.Jupyter', 'Jupyter', ([], {}), '()\n', (73, 75), False, 'from pheasant.renderers.jupyter.jupyter import Jupyter\n')]
from app.app import create_app from config import BaseConfig app = create_app(BaseConfig)
[ "app.app.create_app" ]
[((68, 90), 'app.app.create_app', 'create_app', (['BaseConfig'], {}), '(BaseConfig)\n', (78, 90), False, 'from app.app import create_app\n')]
# This file is part of Pynguin. # # Pynguin is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Pynguin is distributed in the ho...
[ "pynguin.testcase.variable.variablereferenceimpl.VariableReferenceImpl", "pynguin.testcase.statements.primitivestatements.FloatPrimitiveStatement", "pynguin.testcase.defaulttestcase.DefaultTestCase", "unittest.mock.MagicMock", "pynguin.testcase.statements.primitivestatements.StringPrimitiveStatement", "py...
[((4564, 4575), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (4573, 4575), False, 'from unittest.mock import MagicMock\n'), ((5053, 5075), 'unittest.mock.MagicMock', 'MagicMock', (['tc.TestCase'], {}), '(tc.TestCase)\n', (5062, 5075), False, 'from unittest.mock import MagicMock\n'), ((5555, 5577), 'unittes...
from pathlib import Path from src import constants from src.data.download.utils.download_dataset_zip import download_dataset_zip def download_tencent_test( tmp_dir: Path = None, tqdm_name: str = None, tqdm_idx: int = None, ): """Download the test set of the Tencent Corpus and extract it to the ap...
[ "src.data.download.utils.download_dataset_zip.download_dataset_zip" ]
[((349, 588), 'src.data.download.utils.download_dataset_zip.download_dataset_zip', 'download_dataset_zip', ([], {'name': '"""tencent_test"""', 'data_url': 'constants.TENCENT_TEST_URL', 'output_dir': 'constants.TENCENT_TEST_DIR', 'extracted_name': 'constants.TENCENT_TEST_ZIP_FOLDER', 'tmp_dir': 'tmp_dir', 'tqdm_name': '...