code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
''' <NAME> 2021 ''' import numpy as np import cv2 from numpy.fft import fftn, ifftn, fft2, ifft2, fftshift from numpy import conj, real from utils import gaussian2d_rolled_labels, cos_window from hog_cpp.fhog.get_hog import get_hog vgg_path = 'model/imagenet-vgg-verydeep-19.mat' def create_model(): from scipy ...
[ "numpy.sqrt", "scipy.io.loadmat", "cv2.imshow", "numpy.array", "numpy.divide", "numpy.mean", "numpy.multiply", "numpy.fft.fftn", "numpy.fft.fft2", "numpy.exp", "numpy.real", "numpy.max", "numpy.dot", "keras.models.Model", "keras.applications.vgg19.VGG19", "numpy.maximum", "cv2.waitKe...
[((423, 443), 'scipy.io.loadmat', 'io.loadmat', (['vgg_path'], {}), '(vgg_path)\n', (433, 443), False, 'from scipy import io\n'), ((456, 466), 'keras.applications.vgg19.VGG19', 'VGG19', (['mat'], {}), '(mat)\n', (461, 466), False, 'from keras.applications.vgg19 import VGG19\n'), ((560, 603), 'keras.models.Model', 'Mode...
import html from tqdm import tqdm from .color_picker import color_for, html_color_for, mean_color_for def export_report(filename, chars, dict_colors, include_key=False): """ Export a HTML report showing all the extraction usages for the file. :param filename: Output filename :param chars: Character...
[ "tqdm.tqdm", "html.escape" ]
[((962, 973), 'tqdm.tqdm', 'tqdm', (['chars'], {}), '(chars)\n', (966, 973), False, 'from tqdm import tqdm\n'), ((2720, 2739), 'html.escape', 'html.escape', (['letter'], {}), '(letter)\n', (2731, 2739), False, 'import html\n')]
"""Utility functions used in Activity 7.""" import random import numpy as np from matplotlib import pyplot as plt from keras.callbacks import TensorBoard def create_groups(data, group_size=7): """Create distinct groups from a continuous series. Parameters ---------- data: np.array Series of...
[ "numpy.abs", "matplotlib.pyplot.xlabel", "numpy.subtract", "keras.callbacks.TensorBoard", "numpy.array", "matplotlib.pyplot.figure", "random.getrandbits", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((779, 796), 'numpy.array', 'np.array', (['samples'], {}), '(samples)\n', (787, 796), True, 'import numpy as np\n'), ((2298, 2321), 'random.getrandbits', 'random.getrandbits', (['(128)'], {}), '(128)\n', (2316, 2321), False, 'import random\n'), ((2447, 2490), 'keras.callbacks.TensorBoard', 'TensorBoard', ([], {'log_di...
import pandas as pd import numpy as np import itertools __metaclass__ = type def prob_incr(species, proj_compressed_data, min_occurences = 10): p = proj_compressed_data['count_incr']/ proj_compressed_data['count'] p[proj_compressed_data['count'] < min_occurences] = -1 return p def score(species,IV, G, ex...
[ "numpy.array", "numpy.setdiff1d", "numpy.unique" ]
[((640, 653), 'numpy.unique', 'np.unique', (['GG'], {}), '(GG)\n', (649, 653), True, 'import numpy as np\n'), ((8443, 8464), 'numpy.unique', 'np.unique', (['binned[sp]'], {}), '(binned[sp])\n', (8452, 8464), True, 'import numpy as np\n'), ((1796, 1829), 'numpy.setdiff1d', 'np.setdiff1d', (['pcd.index', 'idx_base'], {})...
# Copyright 2014 - Rackspace Hosting # # 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 ...
[ "solum.objects.sqlalchemy.models.table_args", "sqlalchemy.ForeignKey", "sqlalchemy.String", "solum.objects.sqlalchemy.models.model_query", "sqlalchemy.Column" ]
[((892, 908), 'solum.objects.sqlalchemy.models.table_args', 'sql.table_args', ([], {}), '()\n', (906, 908), True, 'from solum.objects.sqlalchemy import models as sql\n'), ((919, 978), 'sqlalchemy.Column', 'sa.Column', (['sa.Integer'], {'primary_key': '(True)', 'autoincrement': '(True)'}), '(sa.Integer, primary_key=True...
"""Tools for working with Cryptopunk NFTs; this includes utilities for data analysis and image preparation for training machine learning models using Cryptopunks as training data. Functions: get_punk(id) pixel_to_img(pixel_str, dim) flatten(img) unflatten(img) sort_dict_by_function_of_value(d, f) ...
[ "matplotlib.pyplot.imshow", "collections.OrderedDict", "matplotlib.pyplot.title", "matplotlib.image.imread", "requests.get", "time.sleep", "bs4.BeautifulSoup", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure", "re.sub", "numpy.concatenate", "os.path.abspath", "numpy.full", "numpy.froms...
[((655, 680), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (670, 680), False, 'import os\n'), ((1216, 1269), 'matplotlib.image.imread', 'mpimg.imread', (['f"""{__PUNK_DIR__}/punk{\'%04d\' % id}.png"""'], {}), '(f"{__PUNK_DIR__}/punk{\'%04d\' % id}.png")\n', (1228, 1269), True, 'import matpl...
# # PyGUI - Tasks - Generic # from GUI.Properties import Properties, overridable_property class Task(Properties): """A Task represents an action to be performed after a specified time interval, either once or repeatedly. Constructor: Task(proc, interval, repeat = False, start = True) Creates a task to cal...
[ "GUI.Properties.overridable_property" ]
[((737, 804), 'GUI.Properties.overridable_property', 'overridable_property', (['"""interval"""', '"""Time in seconds between firings"""'], {}), "('interval', 'Time in seconds between firings')\n", (757, 804), False, 'from GUI.Properties import Properties, overridable_property\n'), ((815, 888), 'GUI.Properties.overridab...
# Generated by Django 3.0.11 on 2021-01-01 16:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bpp", "0231_ukryj_status_korekty"), ] operations = [ migrations.AlterField( model_name="autor", name="pseudonim", ...
[ "django.db.models.CharField", "django.db.models.BooleanField" ]
[((337, 685), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'help_text': '"""\n Jeżeli w bazie danych znajdują się autorzy o zbliżonych imionach, nazwiskach i tytułach naukowych,\n skorzystaj z tego pola aby ułatwić ich rozróżnienie. Pseudonim pokaże się w polach wyszukiwania\n ora...
"""This module provides tools for assessing flood risk """ from datetime import timedelta from floodsystem.datafetcher import fetch_measure_levels import numpy as np from floodsystem.analysis import polyfit from matplotlib import dates as date def stations_level_over_threshold(stations, tol): """For a list of Mon...
[ "matplotlib.dates.date2num", "numpy.average", "numpy.polyder", "floodsystem.analysis.polyfit", "datetime.timedelta" ]
[((3640, 3657), 'datetime.timedelta', 'timedelta', ([], {'days': '(2)'}), '(days=2)\n', (3649, 3657), False, 'from datetime import timedelta\n'), ((3860, 3887), 'floodsystem.analysis.polyfit', 'polyfit', (['times', 'values'], {'p': '(4)'}), '(times, values, p=4)\n', (3867, 3887), False, 'from floodsystem.analysis impor...
# A python svg graph plotting library and creating interactive charts ! # PyPi: https://pypi.org/project/pygal/ # Docs: http://www.pygal.org/en/stable/index.html # Chart types: http://www.pygal.org/en/stable/documentation/types/index.html # Maps: http://www.pygal.org/en/stable/documentation/types/maps/pygal_maps_wor...
[ "pygal.Line", "pygal.HorizontalBar", "pygal.maps.world.SupranationalWorld", "pygal.Bar", "seaborn.load_dataset", "pygal.Box", "pygal.maps.world.World", "pygal.Funnel", "pygal.style.Style" ]
[((492, 516), 'seaborn.load_dataset', 'sns.load_dataset', (['"""tips"""'], {}), "('tips')\n", (508, 516), True, 'import seaborn as sns\n'), ((549, 560), 'pygal.Bar', 'pygal.Bar', ([], {}), '()\n', (558, 560), False, 'import pygal\n'), ((758, 805), 'pygal.style.Style', 'Style', ([], {'colors': "('#E80080', '#404040', '#...
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import datetime import telestream_cloud_qc from telestream_cloud_qc.models.video_...
[ "telestream_cloud_qc.models.blanking_test.blanking_test", "telestream_cloud_qc.models.field_order_test.field_order_test", "telestream_cloud_qc.models.digital_dropout_test.digital_dropout_test", "telestream_cloud_qc.models.layout_test.layout_test", "telestream_cloud_qc.models.media_offline_test.media_offline...
[((12759, 12774), 'unittest.main', 'unittest.main', ([], {}), '()\n', (12772, 12774), False, 'import unittest\n'), ((12499, 12512), 'telestream_cloud_qc.models.video_config.VideoConfig', 'VideoConfig', ([], {}), '()\n', (12510, 12512), False, 'from telestream_cloud_qc.models.video_config import VideoConfig\n'), ((996, ...
from datetime import timezone from functools import partial, update_wrapper from django.utils.cache import get_conditional_response from django.utils.http import http_date, quote_etag from rest_framework import status from rest_framework.metadata import BaseMetadata from rest_framework.response import Response from re...
[ "django.utils.http.quote_etag", "django.utils.cache.get_conditional_response", "rest_framework.response.Response", "functools.partial", "scrud_django.utils.get_string_or_evaluate", "scrud_django.utils.link_content", "functools.update_wrapper" ]
[((15482, 15523), 'rest_framework.response.Response', 'Response', (['data'], {'status': 'status.HTTP_200_OK'}), '(data, status=status.HTTP_200_OK)\n', (15490, 15523), False, 'from rest_framework.response import Response\n'), ((1456, 1494), 'functools.update_wrapper', 'update_wrapper', (['self', 'self.view_method'], {})...
#coding=utf-8 import os from bs4 import BeautifulSoup files = [] gestores = { 'EDY11': {'fiis': [], 'vacancia':0} } for r,d,f in os.walk('../gestores_ifix'): for file in f: handle = open(os.path.join(r, file), 'r') html = handle.read() soup = BeautifulSoup(html, 'html.parser') ...
[ "bs4.BeautifulSoup", "os.path.join", "os.walk" ]
[((137, 164), 'os.walk', 'os.walk', (['"""../gestores_ifix"""'], {}), "('../gestores_ifix')\n", (144, 164), False, 'import os\n'), ((279, 313), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (292, 313), False, 'from bs4 import BeautifulSoup\n'), ((207, 228), 'os.pa...
import statsmodels.api as sm import statsmodels.formula.api as smf import numpy as np import pandas as pd from mlxtend.feature_selection import ExhaustiveFeatureSelector as EFS from sklearn.linear_model import LinearRegression import sys; import re def AIC(data,model,model_type,k=2): if model_type=='linear': return...
[ "mlxtend.feature_selection.ExhaustiveFeatureSelector", "numpy.log", "statsmodels.api.families.Binomial", "numpy.array", "statsmodels.api.add_constant", "pandas.DataFrame", "statsmodels.api.OLS", "sklearn.linear_model.LinearRegression", "re.search" ]
[((10412, 10448), 'sklearn.linear_model.LinearRegression', 'LinearRegression', ([], {'fit_intercept': '(True)'}), '(fit_intercept=True)\n', (10428, 10448), False, 'from sklearn.linear_model import LinearRegression\n'), ((10457, 10568), 'mlxtend.feature_selection.ExhaustiveFeatureSelector', 'EFS', (['lm'], {'min_feature...
import os import tempfile from django.core.files.storage import FileSystemStorage import django.core.files.storage # dummy django.conf.settings class Settings(): MEDIA_ROOT = os.path.dirname(os.path.abspath(__file__)) MEDIA_URL = 'http://local/' FILE_UPLOAD_PERMISSIONS = 0o777 FILE_UPLOAD_DIRECTORY_PE...
[ "django.core.files.storage.FileSystemStorage", "tempfile.mkdtemp", "os.path.abspath" ]
[((465, 483), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (481, 483), False, 'import tempfile\n'), ((498, 548), 'django.core.files.storage.FileSystemStorage', 'FileSystemStorage', ([], {'location': 'temp_dir', 'base_url': '"""/"""'}), "(location=temp_dir, base_url='/')\n", (515, 548), False, 'from django....
# data/models.py import datetime from sqlalchemy.ext.hybrid import hybrid_property from app.extensions import db class CallTableModel(db.Model): __tablename__ = 'c_call' __repr_attrs__ = ['call_id', 'calling_party_number', 'dialed_party_number', 'start_time', 'end_time', 'caller_id'] ...
[ "datetime.timedelta", "app.extensions.db.relationship", "app.extensions.db.Column" ]
[((333, 372), 'app.extensions.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (342, 372), False, 'from app.extensions import db\n'), ((394, 415), 'app.extensions.db.Column', 'db.Column', (['db.Integer'], {}), '(db.Integer)\n', (403, 415), False, 'from app.extens...
from django.db import models # Create your models here. class user(models.Model): name = models.CharField(max_length=25) phone = models.CharField(max_length=25,default='+92') email = models.EmailField() city = models.CharField(max_length=20) content = models.TextField() def __str__(self): ...
[ "django.db.models.EmailField", "django.db.models.TextField", "django.db.models.CharField" ]
[((95, 126), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(25)'}), '(max_length=25)\n', (111, 126), False, 'from django.db import models\n'), ((139, 185), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(25)', 'default': '"""+92"""'}), "(max_length=25, default='+92')\n",...
from collections import OrderedDict import numpy as np from pandas import DataFrame from sv import SVData, CorTiming def loadSVDataFromBUGSDataset(filepath, logreturnforward, logreturnscale, dtfilepath=None): dts = None if dtfilepath is not None: with open(dtfilepath) as f: content = f.re...
[ "collections.OrderedDict", "sv.SVData" ]
[((789, 978), 'sv.SVData', 'SVData', ([], {'sourcekind': '"""loader"""', 'source': 'loadSVDataFromBUGSDataset', 'svdf': 'svdf', 'params': 'None', 'cortiming': 'CorTiming.unknown', 'logreturnforward': 'logreturnforward', 'logreturnscale': 'logreturnscale'}), "(sourcekind='loader', source=loadSVDataFromBUGSDataset, svdf=...
from utils import get_matcher from lookup import ROMAN_TO_INT from lines import Dialogue, Character, Instruction, Act, Scene def get_speaking_characters(raw_play_lines, character_matcher): """ Return a set of all character names Parameters ---------- raw_play_lines : list of str lines of th...
[ "utils.get_matcher", "lines.Instruction", "lines.Scene", "lines.Character", "lines.Act" ]
[((1797, 1842), 'utils.get_matcher', 'get_matcher', (['speaking_characters', '"""character"""'], {}), "(speaking_characters, 'character')\n", (1808, 1842), False, 'from utils import get_matcher\n'), ((4922, 4986), 'lines.Instruction', 'Instruction', (['instruction', 'actions', 'characters', 'default_character'], {}), '...
from __future__ import print_function import struct import copy #this class handles different protocol versions class RobotStateRT(object): @staticmethod def unpack(buf): rs = RobotStateRT() (plen, ptype) = struct.unpack_from("!IB", buf) if plen == 756: return RobotStateRT_V...
[ "copy.deepcopy", "struct.unpack_from" ]
[((232, 262), 'struct.unpack_from', 'struct.unpack_from', (['"""!IB"""', 'buf'], {}), "('!IB', buf)\n", (250, 262), False, 'import struct\n'), ((1826, 1851), 'copy.deepcopy', 'copy.deepcopy', (['all_values'], {}), '(all_values)\n', (1839, 1851), False, 'import copy\n'), ((2014, 2039), 'copy.deepcopy', 'copy.deepcopy', ...
# -------------- #Header files import pandas as pd import numpy as np import matplotlib.pyplot as plt data=pd.read_csv(path) #path of the data file- path #Code starts here data.Gender.replace('-','Agender',inplace=True) gender_count=data.Gender.value_counts() gender_count.plot(kind='bar') # ----------...
[ "pandas.DataFrame", "matplotlib.pyplot.subplots", "pandas.read_csv" ]
[((113, 130), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (124, 130), True, 'import pandas as pd\n'), ((456, 506), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {'columns': "['Strength', 'Combat']"}), "(data, columns=['Strength', 'Combat'])\n", (468, 506), True, 'import pandas as pd\n'), ((736, 790),...
import numpy as np import math import pickle def get_data(data, frame_nos, dataset, topic, usernum, fps, milisec, width, height, view_width, view_height): """ Read and return the viewport data """ VIEW_PATH = '../../Viewport/' view_info = pickle.load(open(VIEW_PATH + 'ds{}/viewport_ds{}_topic{}_user...
[ "math.ceil", "numpy.std" ]
[((5199, 5258), 'math.ceil', 'math.ceil', (['((player_width / 2 - tile_width / 2) / tile_width)'], {}), '((player_width / 2 - tile_width / 2) / tile_width)\n', (5208, 5258), False, 'import math\n'), ((5274, 5336), 'math.ceil', 'math.ceil', (['((player_height / 2 - tile_height / 2) / tile_height)'], {}), '((player_heigh...
""".. Line to protect from pydocstyle D205, D400. Plot distribution RNA-map ------------------------- Plot distribution of crosslinks relative to landmark of specific type. """ import os import pandas as pd import iCount # pylint: disable=wrong-import-order import matplotlib # Force matplotlib to not use any Xwind...
[ "pandas.read_csv", "matplotlib.use", "matplotlib.pyplot.subplot", "os.path.dirname", "matplotlib.pyplot.figure", "iCount.files.remove_extension", "os.path.basename", "iCount.analysis.rnamaps.MAP_TYPES.keys" ]
[((333, 354), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (347, 354), False, 'import matplotlib\n'), ((828, 885), 'pandas.read_csv', 'pd.read_csv', (['fname'], {'delimiter': '"""\t"""', 'header': '(1)', 'index_col': '(0)'}), "(fname, delimiter='\\t', header=1, index_col=0)\n", (839, 885), True...
# # Copyright (c) 2021 IBM Corp. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
[ "importlib_resources.read_text", "textwrap.indent" ]
[((2188, 2267), 'importlib_resources.read_text', 'pkg_resources.read_text', (['text_extensions_for_pandas.resources', '"""span_array.css"""'], {}), "(text_extensions_for_pandas.resources, 'span_array.css')\n", (2211, 2267), True, 'import importlib_resources as pkg_resources\n'), ((2291, 2369), 'importlib_resources.read...
""" This file requests a new model from the storage pool. """ import os import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) import requests from requests.auth import HTTPBasicAuth from src.praxxis.sqlite import sqlite_telemetry def update_model(): """TODO: implement this""" ...
[ "urllib3.disable_warnings" ]
[((90, 157), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['urllib3.exceptions.InsecureRequestWarning'], {}), '(urllib3.exceptions.InsecureRequestWarning)\n', (114, 157), False, 'import urllib3\n')]
""" Stockgrid View """ __docformat__ = "numpy" import logging from typing import List, Tuple import pandas as pd import requests from gamestonk_terminal.decorators import log_start_end logger = logging.getLogger(__name__) @log_start_end(log=logger) def get_dark_pool_short_positions(sort_field: str, ascending: boo...
[ "logging.getLogger", "pandas.to_datetime", "gamestonk_terminal.decorators.log_start_end", "requests.get" ]
[((198, 225), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (215, 225), False, 'import logging\n'), ((229, 254), 'gamestonk_terminal.decorators.log_start_end', 'log_start_end', ([], {'log': 'logger'}), '(log=logger)\n', (242, 254), False, 'from gamestonk_terminal.decorators import log_st...
# Copyright (C) 2018 <NAME> # # SPDX-License-Identifier: MIT """This module contains a collection of functions related to geographical data. """ from floodsystem.utils import sorted_by_key # noqa import math def hav(theta): return math.sin(theta*0.5)**2 def r(theta): return math.radians(theta)...
[ "haversine.haversine", "floodsystem.utils.sorted_by_key", "math.sqrt", "math.radians", "math.sin" ]
[((301, 320), 'math.radians', 'math.radians', (['theta'], {}), '(theta)\n', (313, 320), False, 'import math\n'), ((685, 706), 'floodsystem.utils.sorted_by_key', 'sorted_by_key', (['ret', '(1)'], {}), '(ret, 1)\n', (698, 706), False, 'from floodsystem.utils import sorted_by_key\n'), ((1955, 1999), 'floodsystem.utils.sor...
""" Breadth-First Search - Implemented using queues This can be implemented for both Trees / Graphs Here, we will use Trees as examples. """ from collections import deque class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.ri...
[ "collections.deque" ]
[((539, 552), 'collections.deque', 'deque', (['[root]'], {}), '([root])\n', (544, 552), False, 'from collections import deque\n')]
#All Django Imports from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils import timezone #All local imports (libs, contribs, models) from users.models import * #All external imports (libs, packages) import hashlib i...
[ "logging.getLogger", "pytz.timezone", "django.utils.translation.ugettext_lazy", "logging.warn", "django.db.models.ForeignKey", "django.core.exceptions.ValidationError", "uuid.uuid4", "django.utils.timezone.now" ]
[((399, 426), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (416, 426), False, 'import logging\n'), ((1532, 1591), 'django.db.models.ForeignKey', 'models.ForeignKey', (['QuestrUserProfile'], {'related_name': '"""quests"""'}), "(QuestrUserProfile, related_name='quests')\n", (1549, 1591), ...
from banco import con from time import sleep import os # Validação de Valor Inteiro def leiaint(valor): while True: try: ent = int(input(valor)) except: print('\033[1;33mDigite um valor inteiro\033[m') else: break return ent # Validação ...
[ "banco.con.commit", "os.system", "time.sleep", "banco.con.cursor" ]
[((3905, 3917), 'banco.con.cursor', 'con.cursor', ([], {}), '()\n', (3915, 3917), False, 'from banco import con\n'), ((2721, 2733), 'banco.con.cursor', 'con.cursor', ([], {}), '()\n', (2731, 2733), False, 'from banco import con\n'), ((4799, 4811), 'banco.con.commit', 'con.commit', ([], {}), '()\n', (4809, 4811), False,...
import os import os.path import subprocess import sys if __name__ == "__main__": dirname = sys.argv[1] for x in os.listdir(dirname): if x.endswith('.crt'): try: filename = os.path.join(dirname, x) filehash = subprocess.check_output(['openssl', 'x509', '-noout...
[ "subprocess.check_output", "os.path.exists", "os.listdir", "os.path.join", "os.symlink", "os.remove" ]
[((121, 140), 'os.listdir', 'os.listdir', (['dirname'], {}), '(dirname)\n', (131, 140), False, 'import os\n'), ((217, 241), 'os.path.join', 'os.path.join', (['dirname', 'x'], {}), '(dirname, x)\n', (229, 241), False, 'import os\n'), ((423, 454), 'os.path.join', 'os.path.join', (['dirname', 'filehash'], {}), '(dirname, ...
# Copyright 2022 AI Singapore # # 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...
[ "numpy.ones", "numpy.testing.assert_equal", "numpy.array", "pytest.raises", "peekingduck.pipeline.nodes.augment.contrast.Node" ]
[((763, 820), 'peekingduck.pipeline.nodes.augment.contrast.Node', 'Node', (["{'input': ['img'], 'output': ['img'], 'alpha': 1.0}"], {}), "({'input': ['img'], 'output': ['img'], 'alpha': 1.0})\n", (767, 820), False, 'from peekingduck.pipeline.nodes.augment.contrast import Node\n'), ((891, 948), 'peekingduck.pipeline.nod...
# coding=utf-8 # Copyright 2018 The DisentanglementLib 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 # # Un...
[ "wandb.log", "disentanglement_lib.methods.unsupervised.model.train", "disentanglement_lib.methods.unsupervised.model.cuda", "wandb.save", "wandb.Image", "disentanglement_lib.data.ground_truth.named_data.get_named_ground_truth_data", "disentanglement_lib.methods.unsupervised.model.cpu", "gin.query_para...
[((1989, 2027), 'gin.configurable', 'gin.configurable', (['"""train"""'], {'denylist': '[]'}), "('train', denylist=[])\n", (2005, 2027), False, 'import gin\n'), ((3411, 3446), 'gin.query_parameter', 'gin.query_parameter', (['"""dataset.name"""'], {}), "('dataset.name')\n", (3430, 3446), False, 'import gin\n'), ((3536, ...
from django.db import models from django.db.models import Model, TextField, DateTimeField, ForeignKey, CASCADE from accounts.models import User from rooms.models import Room # Create your models here. class MessageModel(Model): """ This class represents a chat message. It has a owner (user), timestamp and ...
[ "django.db.models.DateTimeField", "django.db.models.TextField", "django.db.models.ForeignKey" ]
[((357, 459), 'django.db.models.ForeignKey', 'ForeignKey', (['User'], {'on_delete': 'CASCADE', 'verbose_name': '"""user"""', 'related_name': '"""from_user"""', 'db_index': '(True)'}), "(User, on_delete=CASCADE, verbose_name='user', related_name=\n 'from_user', db_index=True)\n", (367, 459), False, 'from django.db.mo...
# Copyright © 2021 Ingram Micro Inc. All rights reserved. from dj_cqrs.constants import SignalType from dj_cqrs.controller.consumer import route_signal_to_replica_model from dj_cqrs.mixins import ReplicaMixin import pytest def test_bad_model(caplog): route_signal_to_replica_model(SignalType.SAVE, 'invalid', {}...
[ "dj_cqrs.controller.consumer.route_signal_to_replica_model" ]
[((260, 321), 'dj_cqrs.controller.consumer.route_signal_to_replica_model', 'route_signal_to_replica_model', (['SignalType.SAVE', '"""invalid"""', '{}'], {}), "(SignalType.SAVE, 'invalid', {})\n", (289, 321), False, 'from dj_cqrs.controller.consumer import route_signal_to_replica_model\n'), ((445, 498), 'dj_cqrs.control...
"""Models and utilities for processing SMIRNOFF data.""" import abc import copy import functools from collections import defaultdict from typing import ( TYPE_CHECKING, Any, DefaultDict, Dict, List, Tuple, Type, TypeVar, Union, ) import numpy as np from openff.toolkit.topology impor...
[ "openff.units.openmm.from_openmm", "pydantic.Field", "openff.interchange.exceptions.SMIRNOFFParameterAttributeNotImplementedError", "numpy.asarray", "openff.interchange.models.TopologyKey", "openff.toolkit.typing.engines.smirnoff.parameters.LibraryChargeHandler.LibraryChargeType", "numpy.sum", "openff...
[((1814, 1860), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': '"""SMIRNOFFPotentialHandler"""'}), "('T', bound='SMIRNOFFPotentialHandler')\n", (1821, 1860), False, 'from typing import TYPE_CHECKING, Any, DefaultDict, Dict, List, Tuple, Type, TypeVar, Union\n'), ((1866, 1905), 'typing.TypeVar', 'TypeVar', (['"""T...
from __future__ import print_function import pylab as plt import numpy as np from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, QueryDict from django.shortcuts import render_to_response, get_object_or_404, redirect, render from django.template import Context, RequestContext, loader fr...
[ "numpy.clip", "pylab.subplots_adjust", "pylab.imread", "django.http.HttpResponse", "pylab.savefig", "django.shortcuts.get_object_or_404", "numpy.zeros_like", "numpy.diff", "pylab.figure", "numpy.argsort", "numpy.zeros", "numpy.random.uniform", "numpy.cumsum", "numpy.bincount", "pylab.clf...
[((1246, 1258), 'numpy.cumsum', 'np.cumsum', (['h'], {}), '(h)\n', (1255, 1258), True, 'import numpy as np\n'), ((2058, 2091), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Job'], {'pk': 'job_id'}), '(Job, pk=job_id)\n', (2075, 2091), False, 'from django.shortcuts import render_to_response, get_object_o...
# Generated by Django 3.2.5 on 2021-07-26 18:46 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('myhood', '0009_business_created_on'), ] operations = [ migrations.RemoveField( model_name='neighborhood', name='occupants_co...
[ "django.db.migrations.RemoveField" ]
[((227, 300), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""neighborhood"""', 'name': '"""occupants_count"""'}), "(model_name='neighborhood', name='occupants_count')\n", (249, 300), False, 'from django.db import migrations\n')]
import collections import subprocess class Runner(object): """Base object to run linters.""" _runners = collections.defaultdict(lambda: ByFileRunner) def __init__(self): """Runner constructor""" pass @classmethod def new_runner(cls, name): """Return an instance of a Runn...
[ "subprocess.Popen", "collections.OrderedDict", "collections.defaultdict" ]
[((114, 160), 'collections.defaultdict', 'collections.defaultdict', (['(lambda : ByFileRunner)'], {}), '(lambda : ByFileRunner)\n', (137, 160), False, 'import collections\n'), ((1783, 1808), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (1806, 1808), False, 'import collections\n'), ((2181, 225...
from django.db import models # Create your models here. class TestModel(models.Model): test_field = models.IntegerField(default=0)
[ "django.db.models.IntegerField" ]
[((106, 136), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (125, 136), False, 'from django.db import models\n')]
import functools from typing import Callable, TypeVar import jax import jax.numpy as jnp def scan(f, s, as_): bs = [] for a in as_: s, b = f(s, a) bs.append(b) return s, jnp.concatenate(bs) KwArg = TypeVar('KwArg') @functools.partial(jax.jit, static_argnums=(0, 1, 2, 3, 4, 5, 6, 7)) d...
[ "jax.numpy.concatenate", "jax.numpy.arange", "jax.lax.stop_gradient", "jax.numpy.array", "jax.numpy.shape", "functools.partial", "typing.TypeVar", "jax.random.split" ]
[((231, 247), 'typing.TypeVar', 'TypeVar', (['"""KwArg"""'], {}), "('KwArg')\n", (238, 247), False, 'from typing import Callable, TypeVar\n'), ((251, 318), 'functools.partial', 'functools.partial', (['jax.jit'], {'static_argnums': '(0, 1, 2, 3, 4, 5, 6, 7)'}), '(jax.jit, static_argnums=(0, 1, 2, 3, 4, 5, 6, 7))\n', (26...
#!/usr/bin/env python3 from __future__ import print_function import sys import errno import statistics import serial from binho.utils import log_silent, log_verbose, binhoArgumentParser from binho.errors import DeviceNotFoundError, CapabilityError def main(): # Set up a simple argument parser. parser = bi...
[ "statistics.mean", "binho.errors.CapabilityError", "binho.utils.binhoArgumentParser", "sys.exit" ]
[((318, 407), 'binho.utils.binhoArgumentParser', 'binhoArgumentParser', ([], {'description': '"""utility for reading from Binho host adapter\'s ADC"""'}), '(description=\n "utility for reading from Binho host adapter\'s ADC")\n', (337, 407), False, 'from binho.utils import log_silent, log_verbose, binhoArgumentParse...
from viper import * import inspect def GetSource(func): lines = inspect.getsource(func) print(lines)
[ "inspect.getsource" ]
[((69, 92), 'inspect.getsource', 'inspect.getsource', (['func'], {}), '(func)\n', (86, 92), False, 'import inspect\n')]
""" django models utilities""" from django.db import models class CRideModel(models.Model): """ Comparte Ride base model CRideModel acts as an abstract base class from which every other model in the project will inherit. This class provides every table with the following attributes: + creat...
[ "django.db.models.DateTimeField" ]
[((484, 593), 'django.db.models.DateTimeField', 'models.DateTimeField', (['"""created at"""'], {'auto_now_add': '(True)', 'help_text': '"""Date time on which object was created"""'}), "('created at', auto_now_add=True, help_text=\n 'Date time on which object was created')\n", (504, 593), False, 'from django.db impor...
import boto3 import json import uuid from datetime import datetime import logging # Update the root logger to get messages at DEBUG and above logging.getLogger().setLevel(logging.DEBUG) logging.getLogger("botocore").setLevel(logging.CRITICAL) logging.getLogger("boto3").setLevel(logging.CRITICAL) logging.getLogger("url...
[ "logging.getLogger", "json.dumps", "uuid.uuid4", "datetime.datetime.now", "boto3.resource" ]
[((143, 162), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (160, 162), False, 'import logging\n'), ((187, 216), 'logging.getLogger', 'logging.getLogger', (['"""botocore"""'], {}), "('botocore')\n", (204, 216), False, 'import logging\n'), ((244, 270), 'logging.getLogger', 'logging.getLogger', (['"""boto3"...
#!/usr/bin/env python3 from argparse import ArgumentParser, ArgumentError import re, sys # Define a custom argument type `interval_int` to properly parse arguments # https://docs.python.org/3/library/argparse.html#type def interval_int(arg): """ Validate given interval and return as list """ pattern ...
[ "argparse.ArgumentError", "argparse.ArgumentParser", "re.compile" ]
[((322, 397), 're.compile', 're.compile', (['"""^\\\\s*\\\\[?\\\\s*(-?\\\\s*(\\\\d\\\\s*)+,\\\\s*-?\\\\s*(\\\\d\\\\s*)+)\\\\]?\\\\s*$"""'], {}), "('^\\\\s*\\\\[?\\\\s*(-?\\\\s*(\\\\d\\\\s*)+,\\\\s*-?\\\\s*(\\\\d\\\\s*)+)\\\\]?\\\\s*$')\n", (332, 397), False, 'import re, sys\n'), ((2220, 2323), 'argparse.ArgumentParser'...
#!/usr/bin/env python # coding: utf-8 # In[8]: import requests import re import time import json def get_one_page(url): # 根据源码分析,构造请求头 headers = { # 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) ' # 'Chrome/52.0.2743.116 S...
[ "json.dumps", "requests.get" ]
[((708, 724), 'json.dumps', 'json.dumps', (['html'], {}), '(html)\n', (718, 724), False, 'import json\n'), ((432, 466), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (444, 466), False, 'import requests\n')]
# included from libs/mincostflow.py """ Min Cost Flow """ # derived: https://atcoder.jp/contests/practice2/submissions/16726003 from heapq import heappush, heappop class MinCostFlow(): def __init__(self, n): self.n = n self.graph = [[] for _ in range(n)] self.pos = [] def add_edge(s...
[ "sys.setrecursionlimit", "heapq.heappop", "doctest.testmod", "sys.exit", "heapq.heappush", "doctest.run_docstring_examples" ]
[((4699, 4716), 'doctest.testmod', 'doctest.testmod', ([], {}), '()\n', (4714, 4716), False, 'import doctest\n'), ((5228, 5258), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10 ** 6)'], {}), '(10 ** 6)\n', (5249, 5258), False, 'import sys\n'), ((5363, 5373), 'sys.exit', 'sys.exit', ([], {}), '()\n', (5371, 537...
# Generated by Django 3.1.12 on 2021-07-13 00:37 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('reo', '0111_auto_20210708_2144'), ] operations = [ migrations.RenameField( model_name='sitemodel', old_name='year_one_emiss...
[ "django.db.migrations.RenameField" ]
[((224, 394), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""sitemodel"""', 'old_name': '"""year_one_emissions_from_elec_grid_purchase"""', 'new_name': '"""year_one_CO2_emissions_from_elec_grid_purchase"""'}), "(model_name='sitemodel', old_name=\n 'year_one_emissions_from_elec_...
from setuptools import setup if __name__ == '__main__': setup(name='foo', version='1.0.0')
[ "setuptools.setup" ]
[((60, 94), 'setuptools.setup', 'setup', ([], {'name': '"""foo"""', 'version': '"""1.0.0"""'}), "(name='foo', version='1.0.0')\n", (65, 94), False, 'from setuptools import setup\n')]
import time import requests from core.utils.parser import Parser from core.utils.helpers import Helpers from core.models.plugin import BasePlugin class HIBP(BasePlugin): def __init__(self, args): self.args = args self.base_url = "https://haveibeenpwned.com/api/v2/breachedaccount" self.url...
[ "core.utils.parser.Parser", "requests.get", "time.sleep", "core.utils.helpers.Helpers.print_error", "core.utils.helpers.Helpers.print_warning" ]
[((419, 495), 'core.utils.helpers.Helpers.print_warning', 'Helpers.print_warning', (['"""Starting Have I Been Pwned plugin..."""'], {'jumpline': '(True)'}), "('Starting Have I Been Pwned plugin...', jumpline=True)\n", (440, 495), False, 'from core.utils.helpers import Helpers\n'), ((756, 769), 'time.sleep', 'time.sleep...
from re import S from flask import render_template, redirect, url_for, flash, request from flask_paginate import Pagination, get_page_parameter from flask_login import current_user from flask_wtf import FlaskForm from wtforms import SubmitField from flask_babel import _, lazy_gettext as _l from flask_login import curre...
[ "flask.render_template", "flask_paginate.get_page_parameter", "flask.Blueprint", "flask.url_for" ]
[((463, 495), 'flask.Blueprint', 'Blueprint', (['"""purchases"""', '__name__'], {}), "('purchases', __name__)\n", (472, 495), False, 'from flask import Blueprint\n'), ((1168, 1307), 'flask.render_template', 'render_template', (['"""purchases.html"""'], {'purchases': 'past_purchases[start:start + per_page]', 'pagination...
# Copyright (c) 2019 Works Applications Co., Ltd. # # 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 a...
[ "logging.getLogger", "os.path.exists", "logging.StreamHandler", "argparse.ArgumentParser", "fileinput.hook_encoded", "sys.argv.insert" ]
[((3238, 3265), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (3255, 3265), False, 'import logging\n'), ((3280, 3313), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (3301, 3313), False, 'import logging\n'), ((4370, 4440), 'argparse.ArgumentPars...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import unittest from branch_utility import BranchUtility from fake_url_fetcher import FakeUrlFetcher from obj...
[ "unittest.main", "object_store_creator.ObjectStoreCreator.ForTest", "os.path.join" ]
[((6045, 6060), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6058, 6060), False, 'import unittest\n'), ((475, 519), 'os.path.join', 'os.path.join', (['"""branch_utility"""', '"""first.json"""'], {}), "('branch_utility', 'first.json')\n", (487, 519), False, 'import os\n'), ((529, 574), 'os.path.join', 'os.path.j...
""" Created on Dec 16 2021 @author: <NAME> Poisson equation solver for the Hall effect. Includes classes for Hall bars, Hall bars in a nonlocal geometry, and Corbino disks. The Hall bar class has build in methods for longitudinal and Hall 4-probe resistance measurements. Plotting functions assume coordinates are in mic...
[ "matplotlib.pyplot.ylabel", "diff_matrices.Diff_mat_2D", "matplotlib.pyplot.pcolormesh", "numpy.arange", "matplotlib.pyplot.contourf", "scipy.sparse.eye", "numpy.where", "numpy.searchsorted", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.linspace", "numpy.meshgrid", "matplotli...
[((1161, 1193), 'numpy.linspace', 'np.linspace', (['(0)', 'self.Lx', 'self.Nx'], {}), '(0, self.Lx, self.Nx)\n', (1172, 1193), True, 'import numpy as np\n'), ((1203, 1235), 'numpy.linspace', 'np.linspace', (['(0)', 'self.Ly', 'self.Ny'], {}), '(0, self.Ly, self.Ny)\n', (1214, 1235), True, 'import numpy as np\n'), ((141...
from django import forms from core.models import Profile def get_sender_choices(): return list(Profile.objects.all().values_list('pk', 'inn')) class TransactionForm(forms.Form): sender = forms.ChoiceField( label='Отправитель', help_text='Выберите ИНН отправителя', choices=get_sender...
[ "core.models.Profile.objects.filter", "django.forms.CharField", "django.forms.ValidationError", "django.forms.ChoiceField", "core.models.Profile.objects.get", "core.models.Profile.objects.all", "django.forms.DecimalField" ]
[((200, 308), 'django.forms.ChoiceField', 'forms.ChoiceField', ([], {'label': '"""Отправитель"""', 'help_text': '"""Выберите ИНН отправителя"""', 'choices': 'get_sender_choices'}), "(label='Отправитель', help_text='Выберите ИНН отправителя',\n choices=get_sender_choices)\n", (217, 308), False, 'from django import fo...
from fabric2 import Connection from fabric2 import task from fabric2 import config import os import time from xml.etree import ElementTree as ET import uuid import glob import json import urllib.parse import io workflow_components = ['input.xml', 'binding.xml', 'flow.xml', 'result.xml', 'tool.xml'] @task def release_...
[ "xml.etree.ElementTree.parse", "workflow_validator.Workflow", "os.path.join", "os.path.getmtime", "uuid.uuid4", "os.path.isfile", "xml.etree.ElementTree.Element", "xml.etree.ElementTree.SubElement", "os.path.isdir", "os.path.normpath", "os.system", "io.StringIO" ]
[((567, 589), 'os.path.isfile', 'os.path.isfile', (['readme'], {}), '(readme)\n', (581, 589), False, 'import os\n'), ((3061, 3100), 'os.path.join', 'os.path.join', (['workflow_name', '"""Makefile"""'], {}), "(workflow_name, 'Makefile')\n", (3073, 3100), False, 'import os\n'), ((6911, 6969), 'os.path.join', 'os.path.joi...
import unittest from electropy.charge import Charge import numpy as np from electropy import volume class VolumeTest(unittest.TestCase): def setUp(self): self.position_1 = [0, 0, 0] self.position_2 = [-2, 4, 1] self.charge = 7e-9 def tearDown(self): pass # Potential fun...
[ "numpy.testing.assert_equal", "electropy.volume.field", "electropy.charge.Charge", "numpy.testing.assert_almost_equal", "electropy.volume.potential", "electropy.volume._arange", "numpy.arange" ]
[((425, 461), 'electropy.charge.Charge', 'Charge', (['self.position_1', 'self.charge'], {}), '(self.position_1, self.charge)\n', (431, 461), False, 'from electropy.charge import Charge\n'), ((490, 583), 'electropy.volume.potential', 'volume.potential', (['[charge]'], {'x_range': '[-10, 10]', 'y_range': '[-10, 10]', 'z_...
import unittest from concourse_common import testutil import out class TestOut(unittest.TestCase): def test_invalid_json(self): testutil.put_stdin( """ { "source": { "user": "user", "password": "password", "host": "hos...
[ "concourse_common.testutil.put_stdin", "out.execute" ]
[((144, 413), 'concourse_common.testutil.put_stdin', 'testutil.put_stdin', (['"""\n {\n "source": {\n "user": "user",\n "password": "password",\n "host": "hostname"\n },\n "params": {\n }\n }\n ...
"""These are utilities designed for carefully handling communication between processes while multithreading. The code for ``pool_imap_unordered`` is copied nearly wholesale from GrantJ's `Stack Overflow answer here <https://stackoverflow.com/questions/5318936/python-multiprocessing-pool-lazy-iteration?noredirect=1&lq...
[ "multiprocessing.Queue", "multiprocessing.cpu_count", "multiprocessing.Process" ]
[((1066, 1077), 'multiprocessing.cpu_count', 'cpu_count', ([], {}), '()\n', (1075, 1077), False, 'from multiprocessing import Process, Queue, cpu_count\n'), ((1552, 1564), 'multiprocessing.Queue', 'Queue', (['procs'], {}), '(procs)\n', (1557, 1564), False, 'from multiprocessing import Process, Queue, cpu_count\n'), ((1...
#!/usr/bin/env python """ @package mi.dataset.parser.test.test_flcdrpf_ckl_mmp_cds @file marine-integrations/mi/dataset/parser/test/test_flcdrpf_ckl_mmp_cds.py @author <NAME> @brief Test code for a flcdrpf_ckl_mmp_cds data parser """ import os from nose.plugins.attrib import attr from mi.core.exception...
[ "nose.plugins.attrib.attr", "os.path.join", "mi.core.log.get_logger", "mi.dataset.parser.mmp_cds_base.MmpCdsParser", "mi.dataset.test.test_parser.ParserUnitTestCase.setUp" ]
[((642, 654), 'mi.core.log.get_logger', 'get_logger', ([], {}), '()\n', (652, 654), False, 'from mi.core.log import get_logger\n'), ((661, 685), 'nose.plugins.attrib.attr', 'attr', (['"""UNIT"""'], {'group': '"""mi"""'}), "('UNIT', group='mi')\n", (665, 685), False, 'from nose.plugins.attrib import attr\n'), ((840, 870...
# Generated by Django 3.0.8 on 2020-08-16 18:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('app_jumanji', '0006_auto...
[ "django.db.models.FloatField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((467, 560), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
import os import pytest import json import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') @pytest.fixture() def waited_failed_task_name(host): all_variables = host.ansible.get_variables() return all_v...
[ "pytest.fixture", "json.load" ]
[((203, 219), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (217, 219), False, 'import pytest\n'), ((359, 375), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (373, 375), False, 'import pytest\n'), ((517, 533), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (531, 533), False, 'import pytest\n'), (...
from django.shortcuts import render # Create your views here. from django.shortcuts import render,redirect, render_to_response from .models import * from django.views.generic import TemplateView, ListView, DetailView, CreateView, UpdateView, DeleteView from django.urls import reverse from django.http import HttpRespo...
[ "django.shortcuts.render" ]
[((461, 496), 'django.shortcuts.render', 'render', (['request', '"""myApp/login.html"""'], {}), "(request, 'myApp/login.html')\n", (467, 496), False, 'from django.shortcuts import render, redirect, render_to_response\n')]
# -*- encoding: utf-8 -*- """ search_indexex.py: Creacion de los indices de busqueda. @author <NAME> @contact <EMAIL> <EMAIL> @camilortte on Twitter @copyright Copyright 2014-2015, RecomendadorUD @license GPL @date 2014-10-10 @satus ...
[ "haystack.indexes.CharField", "haystack.indexes.EdgeNgramField" ]
[((536, 568), 'haystack.indexes.CharField', 'indexes.CharField', ([], {'document': '(True)'}), '(document=True)\n', (553, 568), False, 'from haystack import indexes\n'), ((583, 626), 'haystack.indexes.EdgeNgramField', 'indexes.EdgeNgramField', ([], {'model_attr': '"""nombre"""'}), "(model_attr='nombre')\n", (605, 626),...
''' Handling the data io ''' from torchvision import transforms, datasets import numpy as np import zipfile from io import open import glob from PIL import Image, ImageOps import os import string # Read data def extractZipFiles(zip_file, extract_to): ''' Extract from zip ''' with zipfile.ZipFile(zip_file, ...
[ "zipfile.ZipFile", "os.path.basename", "glob.glob", "PIL.Image.open" ]
[((476, 491), 'glob.glob', 'glob.glob', (['path'], {}), '(path)\n', (485, 491), False, 'import glob\n'), ((294, 324), 'zipfile.ZipFile', 'zipfile.ZipFile', (['zip_file', '"""r"""'], {}), "(zip_file, 'r')\n", (309, 324), False, 'import zipfile\n'), ((759, 778), 'os.path.basename', 'os.path.basename', (['x'], {}), '(x)\n...
# -*- coding: utf-8 -*- """Tests for the metaregistry.""" import unittest import bioregistry from bioregistry.export.rdf_export import metaresource_to_rdf_str from bioregistry.schema import Registry class TestMetaregistry(unittest.TestCase): """Tests for the metaregistry.""" def test_minimum_metadata(self...
[ "bioregistry.get_registry_url", "bioregistry.get_registry_resolve_url", "bioregistry.get_registry_name", "bioregistry.get_registry", "bioregistry.read_metaregistry", "bioregistry.export.rdf_export.metaresource_to_rdf_str", "bioregistry.get_registry_homepage", "bioregistry.get_registry_description", ...
[((2517, 2553), 'bioregistry.get_registry', 'bioregistry.get_registry', (['metaprefix'], {}), '(metaprefix)\n', (2541, 2553), False, 'import bioregistry\n'), ((3286, 3335), 'bioregistry.get_registry_url', 'bioregistry.get_registry_url', (['metaprefix', 'example'], {}), '(metaprefix, example)\n', (3314, 3335), False, 'i...
from __future__ import print_function import gzip import os import sys from decimal import Decimal def calculate_gc(inpath): inf = gzip.open(inpath) if inpath.endswith('.gz') else open(inpath) ttl_bases = 0 gc_bases = 0 for i, l in enumerate(inf): if i % 4 == 1: s = l.strip().uppe...
[ "os.path.isfile", "sys.stderr.write", "sys.exit", "gzip.open" ]
[((138, 155), 'gzip.open', 'gzip.open', (['inpath'], {}), '(inpath)\n', (147, 155), False, 'import gzip\n'), ((543, 615), 'sys.stderr.write', 'sys.stderr.write', (['"""Usage: gc.py <fastq[.gz] file with no blank lines>\n"""'], {}), "('Usage: gc.py <fastq[.gz] file with no blank lines>\\n')\n", (559, 615), False, 'impor...
import os import time import sys import random user_pass = ('''<PASSWORD> admi admin universo html veggeta Admin bados free-fire royale clang free fire anonimo anonimous anoni bills anonymous Aanonimous pass password wordlist kali linux kali-linux start Hacker parrot ubuntu blacken redhat deepin lubuntu depin gogeta ...
[ "os.system", "sys.stdout.flush", "time.sleep", "sys.stdout.write" ]
[((5726, 5744), 'os.system', 'os.system', (['"""clear"""'], {}), "('clear')\n", (5735, 5744), False, 'import os\n'), ((7620, 7633), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (7630, 7633), False, 'import time\n'), ((7638, 7668), 'os.system', 'os.system', (['"""nano New_Pass.txt"""'], {}), "('nano New_Pass.txt'...
import itertools import math import pprint import sys import typing import map_funcs GOOGLE_EARTH_AIRPORT_IMAGES = { 'GoogleEarth_AirportCamera_C.jpg' : { 'path': 'video_images/GoogleEarth_AirportCamera_C.jpg', 'width': 4800, 'height': 3011, # Originally measured on the 100m legend...
[ "map_funcs.bearing_min_max", "map_funcs.translate_rotate", "map_funcs.distance", "itertools.combinations", "map_funcs.bearing", "map_funcs.Point" ]
[((2377, 2686), 'map_funcs.distance', 'map_funcs.distance', (["GOOGLE_EARTH_AIRPORT_IMAGES['GoogleEarth_AirportCamera_C.jpg']['measurements'][\n 'runway_23_start']", "GOOGLE_EARTH_AIRPORT_IMAGES['GoogleEarth_AirportCamera_C.jpg']['measurements'][\n 'runway_23_end']", "GOOGLE_EARTH_AIRPORT_IMAGES['GoogleEarth_Airp...
import numpy as np import matplotlib.pyplot as plt from sklearn.utils.validation import check_random_state from sklearn.datasets import fetch_olivetti_faces from sklearn.externals import joblib rng = check_random_state(21) dataset = fetch_olivetti_faces() X = dataset.images.reshape(dataset.images.shape[0], -1) trai...
[ "numpy.hstack", "sklearn.utils.validation.check_random_state", "sklearn.externals.joblib.load", "sklearn.datasets.fetch_olivetti_faces", "matplotlib.pyplot.figure", "matplotlib.pyplot.axis", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.show" ]
[((202, 224), 'sklearn.utils.validation.check_random_state', 'check_random_state', (['(21)'], {}), '(21)\n', (220, 224), False, 'from sklearn.utils.validation import check_random_state\n'), ((235, 257), 'sklearn.datasets.fetch_olivetti_faces', 'fetch_olivetti_faces', ([], {}), '()\n', (255, 257), False, 'from sklearn.d...
import newspaper from newspaper import Article def getarticle(url): articleurl = url article = Article(articleurl) try: article.download() article.parse() alltext = article.text return alltext except: return "this website is not available"
[ "newspaper.Article" ]
[((111, 130), 'newspaper.Article', 'Article', (['articleurl'], {}), '(articleurl)\n', (118, 130), False, 'from newspaper import Article\n')]
import tensorflow as tf from tensorflow.keras.applications.vgg16 import VGG16 from tensorflow.keras import models from tensorflow.keras.preprocessing import image from tensorflow.keras.applications.vgg16 import preprocess_input import numpy as np import cv2 # prebuild model with pre-trained weights on imagene...
[ "tensorflow.keras.preprocessing.image.load_img", "tensorflow.keras.applications.vgg16.preprocess_input", "numpy.expand_dims", "tensorflow.keras.applications.vgg16.VGG16", "tensorflow.keras.preprocessing.image.img_to_array" ]
[((336, 379), 'tensorflow.keras.applications.vgg16.VGG16', 'VGG16', ([], {'weights': '"""imagenet"""', 'include_top': '(True)'}), "(weights='imagenet', include_top=True)\n", (341, 379), False, 'from tensorflow.keras.applications.vgg16 import VGG16\n'), ((669, 717), 'tensorflow.keras.preprocessing.image.load_img', 'imag...
""" call in shell: python evaluate.py --dir <rootdir/experiment/> --epoch <epoch to> e.g. in shell: python evaluate.py --dir Runs/se_resnet_trained_final/ --epoch 149 loops over all folds and calculates + stores the accuracies in a file in the root folder of the experiment you might change the model in line 45 from r...
[ "os.listdir", "argparse.ArgumentParser", "senet.baseline.resnet20", "torch.load", "torch.max", "os.path.join", "os.getcwd" ]
[((680, 705), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (703, 705), False, 'import argparse\n'), ((982, 993), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (991, 993), False, 'import os\n'), ((1006, 1033), 'os.path.join', 'join', (['working_dir', 'args.dir'], {}), '(working_dir, args.dir)\n'...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
[ "logging.getLogger", "requests.post", "formencode.validators.URL", "tg.config.get", "time.sleep", "allura.model.AuditLog.log", "six.text_type", "webob.exc.HTTPNotFound", "allura.lib.helpers.cryptographic_nonce", "json.dumps", "tg.redirect", "allura.lib.decorators.task", "six.with_metaclass",...
[((1819, 1846), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1836, 1846), False, 'import logging\n'), ((3635, 3714), 'six.with_metaclass', 'six.with_metaclass', (['WebhookControllerMeta', 'BaseController', 'AdminControllerMixin'], {}), '(WebhookControllerMeta, BaseController, AdminCont...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Apr 7 08:38:28 2020 pyqt realtime plot tutorial source: https://www.learnpyqt.com/courses/graphics-plotting/plotting-pyqtgraph/ @author: nlourie """ from PyQt5 import QtWidgets, QtCore,uic from pyqtgraph import PlotWidget, plot,QtGui import pyqtgra...
[ "PyQt5.QtWidgets.QWidget", "numpy.mean", "adafruit_lps35hw.LPS35HW", "numpy.polyfit", "datetime.datetime.utcnow", "busio.I2C", "PyQt5.QtCore.QTimer", "time.sleep", "scipy.interpolate.interp1d", "numpy.array", "pyqtgraph.PlotWidget", "numpy.cumsum", "PyQt5.QtWidgets.QApplication", "scipy.si...
[((632, 663), 'busio.I2C', 'busio.I2C', (['board.SCL', 'board.SDA'], {}), '(board.SCL, board.SDA)\n', (641, 663), False, 'import busio\n'), ((904, 945), 'adafruit_lps35hw.LPS35HW', 'adafruit_lps35hw.LPS35HW', (['i2c'], {'address': '(92)'}), '(i2c, address=92)\n', (928, 945), False, 'import adafruit_lps35hw\n'), ((953, ...
import pandas as pd import numpy as np print(pd.__version__) # 1.0.0 print(pd.DataFrame.agg is pd.DataFrame.aggregate) # True df = pd.DataFrame({'A': [0, 1, 2], 'B': [3, 4, 5]}) print(df) # A B # 0 0 3 # 1 1 4 # 2 2 5 print(df.agg(['sum', 'mean', 'min', 'max'])) # A B # sum 3.0 12.0 # mean ...
[ "pandas.DataFrame", "numpy.sum", "numpy.amax", "numpy.abs" ]
[((134, 180), 'pandas.DataFrame', 'pd.DataFrame', (["{'A': [0, 1, 2], 'B': [3, 4, 5]}"], {}), "({'A': [0, 1, 2], 'B': [3, 4, 5]})\n", (146, 180), True, 'import pandas as pd\n'), ((2325, 2341), 'numpy.amax', 'np.amax', (["df['A']"], {}), "(df['A'])\n", (2332, 2341), True, 'import numpy as np\n'), ((2754, 2769), 'numpy.s...
from flask_sqlalchemy import SQLAlchemy from flask_user import UserMixin from itsdangerous import (TimedJSONWebSignatureSerializer as Serializer, BadSignature, SignatureExpired) db = SQLAlchemy() class User(db.Model, UserMixin): __tablename__ = 'user' id = db.Column(db.Integer, prima...
[ "flask_sqlalchemy.SQLAlchemy", "itsdangerous.TimedJSONWebSignatureSerializer" ]
[((209, 221), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (219, 221), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((1121, 1183), 'itsdangerous.TimedJSONWebSignatureSerializer', 'Serializer', (["db.app.config['SECRET_KEY']"], {'expires_in': 'expiration'}), "(db.app.config['SECRET_KEY'], expir...
#!/usr/bin/env python3 # (c) 2021 <NAME> from abc import ABC, abstractmethod from enum import Enum from os import linesep from twisted.internet import reactor from twisted.internet.error import ConnectionDone from twisted.internet.protocol import Factory, Protocol from twisted.logger import Logger from twisted.protoc...
[ "os.linesep.encode", "models.Version", "models.NetworkAddress", "models.Message.from_bytes", "twisted.logger.Logger", "models.VerAck", "models.GetAddr" ]
[((755, 763), 'twisted.logger.Logger', 'Logger', ([], {}), '()\n', (761, 763), False, 'from twisted.logger import Logger\n'), ((4863, 4871), 'twisted.logger.Logger', 'Logger', ([], {}), '()\n', (4869, 4871), False, 'from twisted.logger import Logger\n'), ((5555, 5578), 'os.linesep.encode', 'linesep.encode', (['"""utf-8...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import time from math import atan2, degrees import board import busio import adafruit_mpu6050 class GY521_MPU6050(): def __init__(self, id=None, address=0x68) -> None: self.id_sensor = id self.i2c = busio.I2C(board.SCL, board.SDA) self.mpu = adafruit_mpu60...
[ "busio.I2C", "adafruit_mpu6050.MPU6050", "math.atan2", "time.sleep" ]
[((259, 290), 'busio.I2C', 'busio.I2C', (['board.SCL', 'board.SDA'], {}), '(board.SCL, board.SDA)\n', (268, 290), False, 'import busio\n'), ((306, 357), 'adafruit_mpu6050.MPU6050', 'adafruit_mpu6050.MPU6050', (['self.i2c'], {'address': 'address'}), '(self.i2c, address=address)\n', (330, 357), False, 'import adafruit_mp...
""" generates lists of SARS-CoV-2 samples which occurred before a particular date Also generates a dictionary of reference compressed sequences And a subset of these Together, these can be passed to a ram_persistence object which can be used instead of an fn3persistence object to test the performance of PCA, or for o...
[ "findn.common_utils.ConfigManager", "pickle.dump", "pandas.read_csv", "gzip.open", "os.path.join", "findn.mongoStore.fn3persistence", "pandas.DataFrame", "datetime.date.fromisoformat" ]
[((931, 985), 'os.path.join', 'os.path.join', (['"""demos"""', '"""covid"""', '"""covid_config_v3.json"""'], {}), "('demos', 'covid', 'covid_config_v3.json')\n", (943, 985), False, 'import os\n'), ((992, 1018), 'findn.common_utils.ConfigManager', 'ConfigManager', (['config_file'], {}), '(config_file)\n', (1005, 1018), ...
import os import re import pickle import numpy as np import pandas as pd from tqdm import tqdm # Assign labels used in eep conversion eep_params = dict( age = 'Age (yrs)', hydrogen_lum = 'L_H', lum = 'Log L', logg = 'Log g', log_teff = 'Log T', core_hydrogen_frac = 'X_core', # must be added ...
[ "os.path.exists", "os.listdir", "pickle.dump", "numpy.sqrt", "os.makedirs", "tqdm.tqdm", "os.path.join", "numpy.zeros", "pandas.concat", "os.path.basename", "pandas.DataFrame", "numpy.genfromtxt" ]
[((2750, 2761), 'numpy.zeros', 'np.zeros', (['N'], {}), '(N)\n', (2758, 2761), True, 'import numpy as np\n'), ((3554, 3579), 'numpy.genfromtxt', 'np.genfromtxt', (['data_lines'], {}), '(data_lines)\n', (3567, 3579), True, 'import numpy as np\n'), ((3815, 3869), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {'index': '...
from com.vividsolutions.jts.io import WKTReader, WKTWriter from geoscript.util import deprecated def readWKT(wkt): """ Constructs a geometry from Well Known Text. *wkt* is the Well Known Text string representing the geometry as described by http://en.wikipedia.org/wiki/Well-known_text. >>> readWKT('POINT (1...
[ "com.vividsolutions.jts.io.WKTReader", "com.vividsolutions.jts.io.WKTWriter" ]
[((355, 366), 'com.vividsolutions.jts.io.WKTReader', 'WKTReader', ([], {}), '()\n', (364, 366), False, 'from com.vividsolutions.jts.io import WKTReader, WKTWriter\n'), ((664, 675), 'com.vividsolutions.jts.io.WKTWriter', 'WKTWriter', ([], {}), '()\n', (673, 675), False, 'from com.vividsolutions.jts.io import WKTReader, ...
import os import dj_database_url import dotenv from .base import BASE_DIR env = BASE_DIR / '.env' dotenv.read_dotenv(env) # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False ALLOWED_HOSTS = ["multiple-vendor-e-commerce.herokuapp.com"] # Database # https://docs.djangoproject.com/en/3....
[ "dj_database_url.config", "dotenv.read_dotenv" ]
[((102, 125), 'dotenv.read_dotenv', 'dotenv.read_dotenv', (['env'], {}), '(env)\n', (120, 125), False, 'import dotenv\n'), ((490, 514), 'dj_database_url.config', 'dj_database_url.config', ([], {}), '()\n', (512, 514), False, 'import dj_database_url\n')]
from precise.covariance.movingaverage import ema_scov from precise.covariance.matrixfunctions import grand_mean, grand_shrink from sklearn.covariance._shrunk_covariance import ledoit_wolf_shrinkage import numpy as np # Experimental estimator inspired by Ledoit-Wolf # Keeps a buffer of last n_buffer observations # Tra...
[ "numpy.atleast_2d", "sklearn.covariance._shrunk_covariance.ledoit_wolf_shrinkage", "precise.covariance.movingaverage.ema_scov", "numpy.eye", "precise.covariance.matrixfunctions.grand_mean", "numpy.asarray", "numpy.dot", "precise.covariance.matrixfunctions.grand_shrink", "numpy.linalg.norm", "numpy...
[((711, 735), 'precise.covariance.movingaverage.ema_scov', 'ema_scov', (['{}', 'n_dim'], {'r': 'r'}), '({}, n_dim, r=r)\n', (719, 735), False, 'from precise.covariance.movingaverage import ema_scov\n'), ((1017, 1030), 'numpy.asarray', 'np.asarray', (['x'], {}), '(x)\n', (1027, 1030), True, 'import numpy as np\n'), ((10...
import json import os.path import operator import time from multiprocessing import Pool import markovify from tqdm import tqdm removeWords = ['c', 'tsp', 'qt', 'lb', 'pkg', 'oz', 'med', 'tbsp', 'sm'] removeWords2 = [" recipes "," recipe "," mashed "," fat ",' c. ',' c ','grams','gram','chopped','tbsps','tbsp','cups',...
[ "json.dumps", "markovify.Text.from_chain", "markovify.Chain.from_json", "markovify.NewlineText" ]
[((3093, 3130), 'markovify.Chain.from_json', 'markovify.Chain.from_json', (['chain_json'], {}), '(chain_json)\n', (3118, 3130), False, 'import markovify\n'), ((3156, 3193), 'markovify.Text.from_chain', 'markovify.Text.from_chain', (['chain_json'], {}), '(chain_json)\n', (3181, 3193), False, 'import markovify\n'), ((335...
from django.db import models from django.contrib.postgres.fields import ArrayField from django.urls import reverse # Create your models here. class Neighbourhood(models.Model): image = models.ImageField(upload_to='neighbourhood_avatars', default='dummy_neighbourhood.jpg') name = models.CharField(max_length=2...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.urls.reverse", "django.db.models.ImageField", "django.db.models.Q", "django.db.models.PositiveSmallIntegerField", "django.db.models.CharField" ]
[((192, 284), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': '"""neighbourhood_avatars"""', 'default': '"""dummy_neighbourhood.jpg"""'}), "(upload_to='neighbourhood_avatars', default=\n 'dummy_neighbourhood.jpg')\n", (209, 284), False, 'from django.db import models\n'), ((291, 323), 'django.d...
from doubly_linked_list import DoublyLinkedList class TextBuffer: def __init__(self): self.storage = DoublyLinkedList() # return a string to the print function def __str__(self): # build a string s = "" current_node = self.storage.head while current_node: ...
[ "doubly_linked_list.DoublyLinkedList" ]
[((115, 133), 'doubly_linked_list.DoublyLinkedList', 'DoublyLinkedList', ([], {}), '()\n', (131, 133), False, 'from doubly_linked_list import DoublyLinkedList\n')]
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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 appli...
[ "os.path.realpath", "threading.Lock", "json.load" ]
[((792, 808), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (806, 808), False, 'import threading\n'), ((698, 724), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (714, 724), False, 'import os\n'), ((1167, 1187), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (1176, ...
from adjutant.api.v1.models import register_taskview_class from mfa_views import views register_taskview_class(r'^openstack/edit-mfa/?$', views.EditMFA) register_taskview_class(r'^openstack/users/?$', views.UserListMFA)
[ "adjutant.api.v1.models.register_taskview_class" ]
[((90, 154), 'adjutant.api.v1.models.register_taskview_class', 'register_taskview_class', (['"""^openstack/edit-mfa/?$"""', 'views.EditMFA'], {}), "('^openstack/edit-mfa/?$', views.EditMFA)\n", (113, 154), False, 'from adjutant.api.v1.models import register_taskview_class\n'), ((156, 221), 'adjutant.api.v1.models.regis...
# Copyright (c) 2015-2019 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import numpy as np from astropy.io import fits from ..op import Operator from ..timing import function_timer from .tod_mat...
[ "astropy.io.fits.HDUList", "astropy.io.fits.PrimaryHDU", "astropy.io.fits.ImageHDU", "astropy.io.fits.Column", "numpy.isnan" ]
[((1589, 1614), 'astropy.io.fits.ImageHDU', 'fits.ImageHDU', (['gain_table'], {}), '(gain_table)\n', (1602, 1614), False, 'from astropy.io import fits\n'), ((811, 828), 'astropy.io.fits.PrimaryHDU', 'fits.PrimaryHDU', ([], {}), '()\n', (826, 828), False, 'from astropy.io import fits\n'), ((1240, 1307), 'astropy.io.fits...
from django.db import models # classification value objects CHOICES_CLASSIFICATION = [ (0, 'unrelated'), (1, 'simple'), (2, 'complex'), (3, 'substring'), ] class Abbreviation(models.Model): long_form = models.TextField(blank=False) abbreviation = models.CharField(max_length=100, blank=False) classification =...
[ "django.db.models.IntegerField", "django.db.models.TextField", "django.db.models.CharField" ]
[((211, 240), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(False)'}), '(blank=False)\n', (227, 240), False, 'from django.db import models\n'), ((257, 302), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'blank': '(False)'}), '(max_length=100, blank=False)\n', (273, ...
import re from datetime import datetime from PyInquirer import Validator, ValidationError from prompt_toolkit.document import Document # This file contains functions used for validation and Validator classes that use them. # Validators are used by questions. def non_empty(document: Document) -> bool: if not doc...
[ "datetime.datetime.strptime", "re.match" ]
[((555, 599), 'datetime.datetime.strptime', 'datetime.strptime', (['document.text', '"""%Y-%m-%d"""'], {}), "(document.text, '%Y-%m-%d')\n", (572, 599), False, 'from datetime import datetime\n'), ((910, 946), 're.match', 're.match', (['email_regex', 'document.text'], {}), '(email_regex, document.text)\n', (918, 946), F...
import filecmp import os import sys import shutil import subprocess import time import unittest if (sys.version_info > (3, 0)): import urllib.request, urllib.parse, urllib.error else: import urllib from optparse import OptionParser from PyQt4 import QtCore,QtGui parser = OptionParser() parser.add_option("-r",...
[ "urllib.urlretrieve", "PyQt4.QtGui.QLabel", "PyQt4.QtGui.QPushButton", "PyQt4.QtCore.SLOT", "PyQt4.QtGui.QWidget.__init__", "sys.exit", "PyQt4.QtCore.QSize", "unittest.TextTestRunner", "os.walk", "os.path.exists", "shutil.move", "urllib.request.urlretrieve", "subprocess.Popen", "os.path.sp...
[((282, 296), 'optparse.OptionParser', 'OptionParser', ([], {}), '()\n', (294, 296), False, 'from optparse import OptionParser\n'), ((2737, 2777), 'os.path.join', 'os.path.join', (['"""current/"""', 'no_baseline[1]'], {}), "('current/', no_baseline[1])\n", (2749, 2777), False, 'import os\n'), ((3713, 3762), 'subprocess...
import datetime import logging from typing import Optional from .types import CheckerTaskMessage, EnoLogMessage LOGGING_PREFIX = "##ENOLOGMESSAGE " class ELKFormatter(logging.Formatter): def format(self, record: logging.LogRecord) -> str: if type(record.args) is tuple and len(record.args) > 0: ...
[ "datetime.datetime.utcnow" ]
[((1263, 1289), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (1287, 1289), False, 'import datetime\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Apr 30 15:28:09 2018 @author: dataquanty """ import numpy as np from math import sqrt, pi, acos,cos from matplotlib import pyplot as plt from scipy.misc import imsave from bisect import bisect_left h , w = 1000, 1000 img = np.ones((h,w)) center = (...
[ "matplotlib.pyplot.imshow", "numpy.ones", "math.acos", "math.sqrt", "matplotlib.pyplot.figure", "matplotlib.pyplot.show" ]
[((293, 308), 'numpy.ones', 'np.ones', (['(h, w)'], {}), '((h, w))\n', (300, 308), True, 'import numpy as np\n'), ((1265, 1293), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(10, 10)'}), '(figsize=(10, 10))\n', (1275, 1293), True, 'from matplotlib import pyplot as plt\n'), ((1300, 1328), 'matplotlib.pypl...
import os import sys sys.path.append('..') import mitogen VERSION = '%s.%s.%s' % mitogen.__version__ author = u'<NAME>' copyright = u'2018, <NAME>' exclude_patterns = ['_build'] extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinxcontrib.programoutput'] html_show_sourcelink = False html_show_sphinx =...
[ "sys.path.append" ]
[((22, 43), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (37, 43), False, 'import sys\n')]
import pytest from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from core.models import Identity from organizations.models import Organization @pytest.fixture def valid_identity(): id_string = '<EMAIL>' user = get_user_model().objects...
[ "django.contrib.sites.models.Site.objects.get_or_create", "django.contrib.auth.get_user_model", "core.models.Identity.objects.get", "core.models.Identity.objects.create" ]
[((366, 420), 'core.models.Identity.objects.create', 'Identity.objects.create', ([], {'user': 'user', 'identity': 'id_string'}), '(user=user, identity=id_string)\n', (389, 420), False, 'from core.models import Identity\n'), ((636, 690), 'core.models.Identity.objects.create', 'Identity.objects.create', ([], {'user': 'us...
#! /usr/bin/env python3 ''' Examine a CherryTree SQLite database and print out the tree in proper heirarchical form and sequence. ''' import argparse import colorama from colorama import Fore, Back, Style import sqlite3 from ct2ad import * def print_xc_node(xc_node, level): ''' Print the node information to...
[ "sqlite3.connect", "argparse.ArgumentParser", "colorama.init" ]
[((663, 707), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (686, 707), False, 'import argparse\n'), ((788, 817), 'colorama.init', 'colorama.init', ([], {'autoreset': '(True)'}), '(autoreset=True)\n', (801, 817), False, 'import colorama\n'), ((859, 89...
#!/usr/bin/env python import sys sys.path.append('/opt/lib/python2.7/site-packages/') import math import numpy as np import pylab import nest import nest.raster_plot import nest.voltage_trace import nest.topology as tp import ggplot t_sim = 500 populations = [1, 100] no_recurrent = True neuron_model = 'iaf_psc_e...
[ "nest.SetKernelStatus", "nest.topology.ConnectLayers", "nest.ResetKernel", "math.sqrt", "nest.raster_plot.from_device", "nest.topology.CreateLayer", "nest.CopyModel", "nest.Simulate", "sys.path.append", "pylab.show" ]
[((34, 86), 'sys.path.append', 'sys.path.append', (['"""/opt/lib/python2.7/site-packages/"""'], {}), "('/opt/lib/python2.7/site-packages/')\n", (49, 86), False, 'import sys\n'), ((869, 887), 'nest.ResetKernel', 'nest.ResetKernel', ([], {}), '()\n', (885, 887), False, 'import nest\n'), ((888, 934), 'nest.SetKernelStatus...