code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import copy from time import gmtime, strftime import torch import torch.nn as nn from torch.utils.data import DataLoader from tqdm import tqdm import numpy as np import nni from nni.compression.pytorch import ModelSpeedup from nni.algo...
[ "tqdm.tqdm", "os.remove", "copy.deepcopy", "nni.compression.pytorch.ModelSpeedup", "torch.utils.data.DataLoader", "time.gmtime", "torch.nn.CrossEntropyLoss", "os.path.exists", "torch.set_num_threads", "torch.cuda.is_available", "numpy.array", "torch.rand", "torch.no_grad" ]
[((2044, 2065), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (2063, 2065), True, 'import torch.nn as nn\n'), ((2733, 2754), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (2752, 2754), True, 'import torch.nn as nn\n'), ((3492, 3513), 'torch.nn.CrossEntropyLoss', 'nn.Cross...
# Get dependencies import sys import dependencies sys.path.append('yolo') sys.path.append('core') import math import glob import os import time import cv2 import numpy as np from PIL import Image import torch import torchvision.models as models import torchvision.transforms as transforms from raft import RAFT from util...
[ "matplotlib.pyplot.title", "numpy.maximum", "argparse.ArgumentParser", "cv2.VideoWriter_fourcc", "cv2.calcOpticalFlowFarneback", "cv2.normalize", "numpy.interp", "cv2.imshow", "os.path.join", "torch.no_grad", "sys.path.append", "numpy.full", "inference.post_process", "numpy.zeros_like", ...
[((50, 73), 'sys.path.append', 'sys.path.append', (['"""yolo"""'], {}), "('yolo')\n", (65, 73), False, 'import sys\n'), ((74, 97), 'sys.path.append', 'sys.path.append', (['"""core"""'], {}), "('core')\n", (89, 97), False, 'import sys\n'), ((15219, 15233), 'numpy.copy', 'np.copy', (['image'], {}), '(image)\n', (15226, 1...
from django.conf import settings from django.shortcuts import render, get_object_or_404, redirect from django.contrib import messages from django.utils import timezone from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import L...
[ "django.utils.timezone.now", "django.shortcuts.redirect", "django.contrib.messages.error", "random.choices", "django.shortcuts.get_object_or_404", "django.contrib.messages.info", "django.shortcuts.render", "django.contrib.messages.success", "stripe.Charge.create", "django.contrib.messages.warning"...
[((974, 1008), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Item'], {'slug': 'slug'}), '(Item, slug=slug)\n', (991, 1008), False, 'from django.shortcuts import render, get_object_or_404, redirect\n'), ((2075, 2109), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Item'], {'slug': 'slug'})...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-04 13:43 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('probes', '0004_auto_20161103_1728'), ] operat...
[ "django.db.models.CharField", "django.db.models.TextField", "django.db.models.SlugField" ]
[((1039, 1110), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'editable': '(False)', 'max_length': '(255)', 'null': '(True)'}), '(blank=True, editable=False, max_length=255, null=True)\n', (1055, 1110), False, 'from django.db import migrations, models\n'), ((1235, 1267), 'django.db.models.T...
#!/usr/bin/env python # -*- coding: utf-8 -*- from subprocess import call call(["mv", "dotgitignore", ".gitignore"]) print("******* Installling node modules:") call(["npm", "install"]) print("******* Node modules installed.") print("******* Installing python dependancies:") call(["pip", "install", "-r", "requirements...
[ "subprocess.call" ]
[((76, 118), 'subprocess.call', 'call', (["['mv', 'dotgitignore', '.gitignore']"], {}), "(['mv', 'dotgitignore', '.gitignore'])\n", (80, 118), False, 'from subprocess import call\n'), ((162, 186), 'subprocess.call', 'call', (["['npm', 'install']"], {}), "(['npm', 'install'])\n", (166, 186), False, 'from subprocess impo...
#!/usr/bin/env python from __future__ import print_function import sys import struct import hashlib # inspired by C3CTF's POW def pow_hash(challenge, solution): return hashlib.sha256(challenge.encode('ascii') + struct.pack('<Q', solution)).hexdigest() def check_pow(challenge, n, solution): h = pow_hash(chall...
[ "struct.pack" ]
[((217, 244), 'struct.pack', 'struct.pack', (['"""<Q"""', 'solution'], {}), "('<Q', solution)\n", (228, 244), False, 'import struct\n')]
''' run_bbtrim.py Use bbduk to trim adapters and poly(A) from Quant-Seq reads as recommended by Lexogen. ''' import os from snakemake.shell import shell extra = snakemake.params.get('extra', '') log = snakemake.log_fmt_shell(stdout=True, stderr=True) sample = [snakemake.input] if isinstance(snakemake.input, str) els...
[ "snakemake.shell.shell", "os.path.dirname" ]
[((505, 613), 'snakemake.shell.shell', 'shell', (['"""bbduk.sh in={snakemake.input} out={snakemake.output.fastq} {snakemake.params.extra} {log}"""'], {}), "(\n 'bbduk.sh in={snakemake.input} out={snakemake.output.fastq} {snakemake.params.extra} {log}'\n )\n", (510, 613), False, 'from snakemake.shell import shell\...
from datetime import datetime def calculate_bac(drinks, weight, start_time, gender): return ((sum([drink['percentage'] * drink['amount'] for drink in drinks]) * 5.14) / weight * (.73 if gender == 'male' else .66)) - (0.15 * (datetime.now() - start_time).hour)
[ "datetime.datetime.now" ]
[((231, 245), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (243, 245), False, 'from datetime import datetime\n')]
import tensorflow as tf from utils.data import * lang_data = load_data('./data/parallel/wmt14/en_de/spm') print(lang_data['en'][0][0]) data = tf.data.Dataset.from_tensor_slices(lang_data['en'][0])
[ "tensorflow.data.Dataset.from_tensor_slices" ]
[((144, 198), 'tensorflow.data.Dataset.from_tensor_slices', 'tf.data.Dataset.from_tensor_slices', (["lang_data['en'][0]"], {}), "(lang_data['en'][0])\n", (178, 198), True, 'import tensorflow as tf\n')]
from talon import Module # --- Tag definition --- mod = Module() mod.tag("password_manager", desc="Common password manager actions") # --- Define actions --- @mod.action_class class Actions: def password_manager_entry_new(): """Create new password entry""" def password_manager_entry_edit(): "...
[ "talon.Module" ]
[((57, 65), 'talon.Module', 'Module', ([], {}), '()\n', (63, 65), False, 'from talon import Module\n')]
import pandas as pd import datetime from dateutil.relativedelta import relativedelta import scripts.main.importer.importer as importer import scripts.main.config as config import scripts.main.models as models from scripts.main.base_logger import log def total_money_data(data: dict) -> pd.DataFrame: """Get summary ...
[ "pandas.DataFrame", "scripts.main.config.mankkoo_file_path", "scripts.main.base_logger.log.info", "dateutil.relativedelta.relativedelta", "pandas.to_datetime", "scripts.main.importer.importer.load_data_from_file", "pandas.isna", "pandas.concat" ]
[((504, 548), 'scripts.main.base_logger.log.info', 'log.info', (['"""Fetching latest total money data"""'], {}), "('Fetching latest total money data')\n", (512, 548), False, 'from scripts.main.base_logger import log\n'), ((1326, 1806), 'pandas.DataFrame', 'pd.DataFrame', (["[{'Type': 'Checking Account', 'Total': checki...
from unittest import TestCase from Solver import Solver class TestSolver(TestCase): def test_negative_discr(self): s = Solver() self.assertRaises(Exception, s.demo, 2, 1, 2)
[ "Solver.Solver" ]
[((134, 142), 'Solver.Solver', 'Solver', ([], {}), '()\n', (140, 142), False, 'from Solver import Solver\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-10-09 03:24 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('device_management', '0001_initial'), ...
[ "django.db.models.CharField", "datetime.datetime" ]
[((993, 1024), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(64)'}), '(max_length=64)\n', (1009, 1024), False, 'from django.db import migrations, models\n'), ((486, 547), 'datetime.datetime', 'datetime.datetime', (['(2016)', '(10)', '(9)', '(3)', '(24)', '(15)', '(690000)'], {'tzinfo': 'utc'})...
# Generated by Django 2.2.4 on 2019-08-29 20:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('locations', '0003_auto_20190828_1618'), ('gamer_profiles', '0025_gamercommunity_community_logo_description'), ] ...
[ "django.db.models.ForeignKey" ]
[((451, 795), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'help_text': '"""You can optionally list the city where you are to find similar gamers. If your profile is set to private, only your fellow community members and people you are playing games with can see this information."""', 'n...
import pymysql from silence.settings import settings ############################################################################### # The connector fetches the relevant configuration parameters # and uses them to build a connection to the database. ####################################################################...
[ "pymysql.connect" ]
[((360, 560), 'pymysql.connect', 'pymysql.connect', ([], {'host': "settings.DB_CONN['host']", 'port': "settings.DB_CONN['port']", 'user': "settings.DB_CONN['username']", 'password': "settings.DB_CONN['password']", 'database': "settings.DB_CONN['database']"}), "(host=settings.DB_CONN['host'], port=settings.DB_CONN['port...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015 <NAME> <<EMAIL>> Copyright (c) 2020 James 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 with...
[ "pytest.raises", "steam.SteamID" ]
[((7145, 7215), 'steam.SteamID', 'SteamID', (['(123)'], {'type': 'EType.Clan', 'universe': 'EUniverse.Public', 'instance': '(333)'}), '(123, type=EType.Clan, universe=EUniverse.Public, instance=333)\n', (7152, 7215), False, 'from steam import EType, EUniverse, SteamID, InvalidSteamID\n'), ((1781, 1795), 'steam.SteamID'...
import logging from urllib.parse import urlencode from airflow_plugins import utils from slackclient import SlackClient def _compose_title_url(dag_run, env): url = utils.get_variable("airflow_url", "") if not url: url = "https://airflow-{}.stories.bi/admin/airflow/graph?".format(env) return url ...
[ "airflow_plugins.utils.get_variable", "slackclient.SlackClient", "urllib.parse.urlencode" ]
[((171, 208), 'airflow_plugins.utils.get_variable', 'utils.get_variable', (['"""airflow_url"""', '""""""'], {}), "('airflow_url', '')\n", (189, 208), False, 'from airflow_plugins import utils\n'), ((655, 703), 'airflow_plugins.utils.get_variable', 'utils.get_variable', (['"""airflow_environment"""', '"""stg"""'], {}), ...
import nmslib import pickle from inquire_sql_backend.config import INDEXES_DIRECTORY class NMSLibIndex(object): def __init__(self): self.index = nmslib.init(method='hnsw', space='cosinesimil', data_type=nmslib.DataType.DENSE_VECTOR) self._id_counter = 0 self._metadata = {} def add_da...
[ "pickle.dump", "pickle.load", "nmslib.init" ]
[((160, 252), 'nmslib.init', 'nmslib.init', ([], {'method': '"""hnsw"""', 'space': '"""cosinesimil"""', 'data_type': 'nmslib.DataType.DENSE_VECTOR'}), "(method='hnsw', space='cosinesimil', data_type=nmslib.DataType.\n DENSE_VECTOR)\n", (171, 252), False, 'import nmslib\n'), ((1487, 1511), 'pickle.dump', 'pickle.dump...
from ipywidgets import widgets, Layout, ValueWidget, link, HBox from ipywidgets.widgets.widget_description import DescriptionWidget import numpy as np from hdmf.common import DynamicTable from .utils.dynamictable import group_and_sort, infer_categorical_columns from .utils.pynwb import robust_unique from typing import ...
[ "ipywidgets.widgets.HTML", "ipywidgets.widgets.HBox", "ipywidgets.link", "ipywidgets.widgets.Dropdown", "numpy.isnan", "numpy.arange", "ipywidgets.widgets.Layout", "ipywidgets.widgets.IntRangeSlider", "ipywidgets.Layout", "numpy.unique", "ipywidgets.widgets.FloatRangeSlider" ]
[((18058, 18147), 'ipywidgets.widgets.Dropdown', 'widgets.Dropdown', ([], {'options': 'trial_events', 'value': '"""start_time"""', 'description': '"""align to: """'}), "(options=trial_events, value='start_time', description=\n 'align to: ')\n", (18074, 18147), False, 'from ipywidgets import widgets, Layout, ValueWid...
"""Integration tests for lit_nlp.examples.models.glue_models.""" from absl.testing import absltest from lit_nlp.examples.models import glue_models import transformers class GlueModelsIntTest(absltest.TestCase): def test_sst2_model_predict(self): # Create model. model_path = "https://storage.googleapis.co...
[ "transformers.file_utils.cached_path", "absl.testing.absltest.main", "lit_nlp.examples.models.glue_models.SST2Model" ]
[((932, 947), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (945, 947), False, 'from absl.testing import absltest\n'), ((566, 599), 'lit_nlp.examples.models.glue_models.SST2Model', 'glue_models.SST2Model', (['model_path'], {}), '(model_path)\n', (587, 599), False, 'from lit_nlp.examples.models import...
# due to the nature of magnet links, the data may not always be available. therefore we must timeout eventually. MAGNET_TIMEOUT = 70 # in seconds import requests import libtorrent as lt import tempfile import shutil from time import sleep import socket from constants import * ses = None def download_magnet(url): gl...
[ "io.BytesIO", "libtorrent.session", "hashlib.sha1", "struct.pack", "time.sleep", "tempfile.mkdtemp", "libtorrent.create_torrent", "requests.get", "shutil.rmtree", "libtorrent.storage_mode_t", "libtorrent.bencode" ]
[((343, 361), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (359, 361), False, 'import tempfile\n'), ((1014, 1040), 'libtorrent.create_torrent', 'lt.create_torrent', (['torinfo'], {}), '(torinfo)\n', (1031, 1040), True, 'import libtorrent as lt\n'), ((1306, 1328), 'shutil.rmtree', 'shutil.rmtree', (['tempdi...
import re import requests from os import _exit,path from sys import stdin from time import sleep from random import choice,uniform from argparse import ArgumentParser from threading import Thread from traceback import print_exc from fake_useragent import UserAgent from selenium import webdriver from selenium.common.exc...
[ "threading.Thread", "traceback.print_exc", "sys.stdin.read", "argparse.ArgumentParser", "random.uniform", "selenium.webdriver.FirefoxProfile", "selenium.webdriver.Firefox", "fake_useragent.UserAgent", "random.choice", "selenium.webdriver.common.proxy.Proxy", "os._exit", "os.path.isfile", "se...
[((420, 436), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (434, 436), False, 'from argparse import ArgumentParser\n'), ((1248, 1264), 'os._exit', '_exit', (['exit_code'], {}), '(exit_code)\n', (1253, 1264), False, 'from os import _exit, path\n'), ((3689, 3696), 'selenium.webdriver.common.proxy.Proxy'...
import sys def readlines() -> list[str]: return sys.stdin.read().split("\n")
[ "sys.stdin.read" ]
[((54, 70), 'sys.stdin.read', 'sys.stdin.read', ([], {}), '()\n', (68, 70), False, 'import sys\n')]
import numpy as np from td import TD import time class Sarsa(TD): def __init__(self, env, step_size=0.1, gamma=1, eps=0.1, pol_deriv=None): super().__init__(env, None, step_size, gamma) self.pol_deriv = pol_deriv if pol_deriv is not None else self.eps_gre(eps) self.reset() #print(f"step size={self....
[ "numpy.random.random", "numpy.array", "time.time" ]
[((1159, 1170), 'time.time', 'time.time', ([], {}), '()\n', (1168, 1170), False, 'import time\n'), ((671, 689), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (687, 689), True, 'import numpy as np\n'), ((783, 836), 'numpy.array', 'np.array', (['[self.Q[s, a] for a in self.env.moves_d[s]]'], {}), '([self.Q...
#/usr/bin/env/ python #coding=utf8 import os import tornado.ioloop import tornado.web import httplib import md5 import urllib import random from tornado.escape import json_decode import three settings ={ "debug" : True, "static_path" : os.path.join(os.path.dirname(__file__),"static") } class MainHandler(tornado.we...
[ "os.path.dirname" ]
[((253, 278), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (268, 278), False, 'import os\n')]
# -*- coding: utf-8 -*- """ /dms/folder/help_form.py .. enthaelt die kompletten Kontext-Hilfetexte fuer Ordner Django content Management System <NAME> <EMAIL> Die Programme des dms-Systems koennen frei genutzt und den spezifischen Beduerfnissen entsprechend angepasst werden. 0.01 13.01.2007 Beginn der Do...
[ "django.utils.translation.ugettext", "dms.help_form_base.get_help_form" ]
[((510, 525), 'dms.help_form_base.get_help_form', 'get_help_form', ([], {}), '()\n', (523, 525), False, 'from dms.help_form_base import get_help_form\n'), ((636, 653), 'django.utils.translation.ugettext', '_', (['u"""Kurzname/ID"""'], {}), "(u'Kurzname/ID')\n", (637, 653), True, 'from django.utils.translation import ug...
__author__ = "<NAME>" __email__ = "<EMAIL>" __copyright__ = "Copyright 2019." import os class BaseConfig(object): SMTP_CONFIG = { 'MAIL_SERVER': os.environ.get('MAIL_SERVER', 'smtp.googlemail.com'), 'MAIL_SERVER_PORT': os.environ.get('MAIL_SERVER_PORT', 587), 'MAIL_USE_TLS': False, ...
[ "os.environ.get" ]
[((162, 214), 'os.environ.get', 'os.environ.get', (['"""MAIL_SERVER"""', '"""smtp.googlemail.com"""'], {}), "('MAIL_SERVER', 'smtp.googlemail.com')\n", (176, 214), False, 'import os\n'), ((244, 283), 'os.environ.get', 'os.environ.get', (['"""MAIL_SERVER_PORT"""', '(587)'], {}), "('MAIL_SERVER_PORT', 587)\n", (258, 283)...
from collections import OrderedDict from bokeh.sampledata import us_counties, unemployment from bokeh.plotting import figure, show, output_file from bokeh.models import HoverTool county_xs=[ us_counties.data[code]['lons'] for code in us_counties.data if us_counties.data[code]['state'] == 'tx' ] county_ys=[ ...
[ "bokeh.plotting.output_file", "bokeh.plotting.figure", "collections.OrderedDict", "bokeh.plotting.show" ]
[((822, 873), 'bokeh.plotting.output_file', 'output_file', (['"""texas.html"""'], {'title': '"""texas.py example"""'}), "('texas.html', title='texas.py example')\n", (833, 873), False, 'from bokeh.plotting import figure, show, output_file\n'), ((929, 981), 'bokeh.plotting.figure', 'figure', ([], {'title': '"""Texas Une...
"""Treadmill metrics collector. Collects Treadmill metrics and sends them to Graphite. """ import glob import logging import os import time import click from treadmill import appenv from treadmill import exc from treadmill import fs from treadmill import rrdutils from treadmill.metrics import rrd #: Metric collect...
[ "treadmill.appenv.AppEnvironment", "os.unlink", "os.path.basename", "os.path.isdir", "os.path.exists", "click.command", "time.time", "treadmill.fs.mkdir_safe", "click.IntRange", "treadmill.fs.path_to_maj_min", "treadmill.rrdutils.RRDClient", "click.Path", "treadmill.metrics.rrd.update", "g...
[((416, 443), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (433, 443), False, 'import logging\n'), ((831, 846), 'click.command', 'click.command', ([], {}), '()\n', (844, 846), False, 'import click\n'), ((1332, 1367), 'treadmill.appenv.AppEnvironment', 'appenv.AppEnvironment', ([], {'roo...
""" """ import unittest import numpy as np from corvid.types.table import Box, Token, Cell, Table, EMPTY_CAPTION class TestCell(unittest.TestCase): def setUp(self): self.cell = Cell(tokens=[ Token(text='hi', bounding_box=Box(llx=-1.0, lly=-0.5, urx=1.0, ury=1.0)), ...
[ "corvid.types.table.Table", "corvid.types.table.Box", "corvid.types.table.Token", "numpy.array", "corvid.types.table.Table.create_from_grid" ]
[((1279, 1314), 'corvid.types.table.Table', 'Table', ([], {'caption': '"""hi this is caption"""'}), "(caption='hi this is caption')\n", (1284, 1314), False, 'from corvid.types.table import Box, Token, Cell, Table, EMPTY_CAPTION\n'), ((1346, 1408), 'numpy.array', 'np.array', (['[[self.a, self.b, self.c], [self.d, self.e...
""" Файл с функциями взаимодействий с бд. """ from pskgu_bot.db.models import Vk_User def is_vk_user_subscribed(user): """ Проверяет подписан ли человек на группу. """ if user: return user.group != "" return False async def get_users_by_group(group): """ Возвращает и...
[ "pskgu_bot.db.models.Vk_User.find" ]
[((407, 444), 'pskgu_bot.db.models.Vk_User.find', 'Vk_User.find', ([], {'filter': "{'group': group}"}), "(filter={'group': group})\n", (419, 444), False, 'from pskgu_bot.db.models import Vk_User\n')]
from flask import Flask, render_template from settings import ( COMPONENT_NAME, STRICT_SLASHES, MOVIES_ENDPOINT, MOVIES_TEMPLATE_FILENAME, MOVIES_TEMPLATE_SERVICE_PARAMETER_NAME, MOVIES_TEMPLATE_MOVIES_PARAMETER_NAME, ) from database import get_movies_collection app = Flask(__name__) app.url...
[ "database.get_movies_collection", "flask.Flask", "flask.render_template" ]
[((295, 310), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (300, 310), False, 'from flask import Flask, render_template\n'), ((496, 519), 'database.get_movies_collection', 'get_movies_collection', ([], {}), '()\n', (517, 519), False, 'from database import get_movies_collection\n'), ((707, 762), 'flask.re...
#!/usr/bin/env python3 """ttsa.py: Traveling Tournament Problem Using Simulated Annealing""" __author__ = "<NAME>" __copyright__ = "Copyright 2017, Virginia Tech" __credits__ = [""] __license__ = "MIT" __version__ = "1.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "in progress" # Standard Python Li...
[ "copy.deepcopy", "random.randint", "math.sqrt", "random.shuffle", "random.choice", "random.random", "random.seed", "math.log" ]
[((5267, 5287), 'random.randint', 'random.randint', (['(0)', '(4)'], {}), '(0, 4)\n', (5281, 5287), False, 'import random\n'), ((9535, 9564), 'random.shuffle', 'random.shuffle', (['possibilities'], {}), '(possibilities)\n', (9549, 9564), False, 'import random\n'), ((593, 606), 'random.seed', 'random.seed', ([], {}), '(...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Stage2 code generator: internal API to public API. stage2 takes in the generated code from stage1, and possible additional user-defined Fortran interfaces (see ``add_intfs()``). These are treated on equal footing as stage1 code. stage2 analyzes the dependencies betwee...
[ "util.TextMultiBuffer", "os.path.basename", "iterutil.uniqify", "util.fold_fortran_code", "fian.analyze_interface", "os.path.isfile", "re.findall", "os.path.join", "os.listdir" ]
[((23927, 23956), 're.findall', 're.findall', (['pattern', 'filename'], {}), '(pattern, filename)\n', (23937, 23956), False, 'import re\n'), ((24061, 24082), 'os.path.join', 'os.path.join', (['path', 'x'], {}), '(path, x)\n', (24073, 24082), False, 'import os\n'), ((4606, 4645), 'iterutil.uniqify', 'uniqify', (['[arg f...
# Copyright (c) 2015 <NAME> <<EMAIL>> # # 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 ...
[ "twisted.trial.unittest.makeTodo", "eliot.testing.assertContainsFields", "twisted.python.failure.Failure", "sys.exc_info", "eliot.testing.capture_logging" ]
[((1370, 1391), 'eliot.testing.capture_logging', 'capture_logging', (['None'], {}), '(None)\n', (1385, 1391), False, 'from eliot.testing import assertContainsFields, capture_logging\n'), ((1834, 1855), 'eliot.testing.capture_logging', 'capture_logging', (['None'], {}), '(None)\n', (1849, 1855), False, 'from eliot.testi...
# -*- coding: utf-8 -*- """ Created on Sat Apr 18 21:42:54 2020 @author: tbeleyur """ import unittest from itsfm.frequency_tracking import * class PWVDTracking(unittest.TestCase): def test_simple(self): input_signal = np.random.normal(0,1,1000) fs = 1000 freqs, inds = generate_pwvd_fr...
[ "unittest.main" ]
[((693, 708), 'unittest.main', 'unittest.main', ([], {}), '()\n', (706, 708), False, 'import unittest\n')]
import argparse import sqlite3 import os import time VERSION = "VERSION 1.0.0" DOMAIN = "http://hippiezhou.fun" def get_parser(): parser = argparse.ArgumentParser() parser.description = 'Create DB File CLI Tools.' parser.add_argument('name', metavar="name", type=str, nargs="*", h...
[ "os.remove", "src.lunyu.make_db", "argparse.ArgumentParser", "src.shi_tangsong.make_db", "src.ci_song.make_db", "src.shi_tangsong_author.make_db", "os.getcwd", "src.ci_song_author.make_db", "os.path.exists", "time.time", "src.sishuwujing.make_db", "os.path.join", "src.shijing.make_db" ]
[((147, 172), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (170, 172), False, 'import argparse\n'), ((787, 798), 'time.time', 'time.time', ([], {}), '()\n', (796, 798), False, 'import time\n'), ((827, 838), 'time.time', 'time.time', ([], {}), '()\n', (836, 838), False, 'import time\n'), ((102...
import collections class Solution: def findNumOfValidWords(self, words: List[str], puzzles: List[str]) -> List[int]: table = collections.Counter() for word in words: curr = 0 for c in word: curr |= (1 << (ord(c) - ord('a'))) table[curr] += 1 ...
[ "collections.Counter" ]
[((137, 158), 'collections.Counter', 'collections.Counter', ([], {}), '()\n', (156, 158), False, 'import collections\n')]
""" This program grabs text from an image and compares it with 'модули иртибот'. It returns 'Match' if it identifies 'модули иртибот' and 'Not Match' when it doesnt. """ import pytesseract import numpy as np import cv2 import os, sys parent_dir = os.path.dirname(os.path.abspath(__file__)) gparent_dir = os.path.dirname...
[ "os.path.abspath", "os.path.dirname", "pytesseract.image_to_data", "time.time", "numpy.mean", "cv2.rectangle", "os.path.join", "bounding_box.ObjectType" ]
[((305, 332), 'os.path.dirname', 'os.path.dirname', (['parent_dir'], {}), '(parent_dir)\n', (320, 332), False, 'import os\n'), ((348, 376), 'os.path.dirname', 'os.path.dirname', (['gparent_dir'], {}), '(gparent_dir)\n', (363, 376), False, 'import os\n'), ((264, 289), 'os.path.abspath', 'os.path.abspath', (['__file__'],...
# -*- coding: utf-8 -*- """Wrapper for computing expression signatures from counts""" import os.path from snakemake import shell # import pprint # pprint.pprint(snakemake.output.pdf) if len(snakemake.output.pdf) == 1: snakemake.output.pdf = snakemake.output.pdf[0] else: raise sample_tpl = os.path.basename(...
[ "snakemake.shell", "snakemake.shell.executable" ]
[((478, 507), 'snakemake.shell.executable', 'shell.executable', (['"""/bin/bash"""'], {}), "('/bin/bash')\n", (494, 507), False, 'from snakemake import shell\n'), ((509, 2108), 'snakemake.shell', 'shell', (['"""\nset -x\n\nexport TMPDIR=$(mktemp -d)\ntrap "rm -rf $TMPDIR" EXIT\n\n# Also pipe stderr to log file\nif [[ -...
import json from collections import OrderedDict from django.core.exceptions import ObjectDoesNotExist from rest_framework import serializers from contentcuration.models import Channel def no_field_eval_repr(self): """ DRF's default __repr__ implementation prints out all fields, and in the process of tha...
[ "rest_framework.serializers.CharField", "json.loads", "rest_framework.serializers.SerializerMethodField" ]
[((1128, 1184), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', (['"""generate_kind_count"""'], {}), "('generate_kind_count')\n", (1161, 1184), False, 'from rest_framework import serializers\n'), ((1207, 1256), 'rest_framework.serializers.SerializerMethodField', 'serializers.Ser...
# Copyright (c) 2022 <NAME>. All rights reserved. from unittest import TestCase from datetime import datetime import functools import itertools import pandas as pd from ya3_report import weekly INDEX = list(range(3)) @functools.lru_cache() def get_test_data() -> pd.DataFrame: dfs: list[pd.DataFrame] = [] ...
[ "ya3_report.weekly.index_datehour", "functools.lru_cache", "pandas.concat", "datetime.datetime" ]
[((224, 245), 'functools.lru_cache', 'functools.lru_cache', ([], {}), '()\n', (243, 245), False, 'import functools\n'), ((830, 844), 'pandas.concat', 'pd.concat', (['dfs'], {}), '(dfs)\n', (839, 844), True, 'import pandas as pd\n'), ((995, 1025), 'ya3_report.weekly.index_datehour', 'weekly.index_datehour', (['self.df']...
from fastapi import HTTPException from tortoise.exceptions import DoesNotExist from db.models import Nutriments from schemas.nutriments import NutrimentsOutSchema async def get_nutriments(): return await NutrimentsOutSchema.from_queryset(Nutriments.all()) async def get_nutriment(nutriment_id) -> NutrimentsOutS...
[ "schemas.nutriments.NutrimentsOutSchema.from_tortoise_orm", "db.models.Nutriments.create", "db.models.Nutriments.filter", "fastapi.HTTPException", "db.models.Nutriments.get", "db.models.Nutriments.all" ]
[((554, 589), 'db.models.Nutriments.create', 'Nutriments.create', ([], {}), '(**nutriment_dict)\n', (571, 589), False, 'from db.models import Nutriments\n'), ((607, 659), 'schemas.nutriments.NutrimentsOutSchema.from_tortoise_orm', 'NutrimentsOutSchema.from_tortoise_orm', (['nutriment_obj'], {}), '(nutriment_obj)\n', (6...
#!/usr/bin/env python3 import os import sys import telegram_bot import time import json import util import time import socket from dns import resolver import datetime from platform import system as system_name from subprocess import call as system_call def ping(host): """ Returns True if host (str) responds...
[ "telegram_bot.TelegramBot", "socket.socket", "dns.resolver.query", "time.sleep", "util.load_settings", "platform.system" ]
[((4517, 4537), 'util.load_settings', 'util.load_settings', ([], {}), '()\n', (4535, 4537), False, 'import util\n'), ((1099, 1114), 'socket.socket', 'socket.socket', ([], {}), '()\n', (1112, 1114), False, 'import socket\n'), ((4186, 4225), 'time.sleep', 'time.sleep', (["settings['request_timeout']"], {}), "(settings['r...
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister, execute, Aer import math def binary_to_decimal( binary_string ): """ Takes a binary number (as a string) and returns its decimal equivalent """ decimal = 0 for i in range( len( binary_string ) ): decimal += 2**i * int(...
[ "qiskit.QuantumCircuit", "qiskit.ClassicalRegister", "qiskit.execute", "qiskit.Aer.get_backend", "qiskit.QuantumRegister" ]
[((479, 497), 'qiskit.QuantumRegister', 'QuantumRegister', (['(1)'], {}), '(1)\n', (494, 497), False, 'from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister, execute, Aer\n'), ((506, 526), 'qiskit.ClassicalRegister', 'ClassicalRegister', (['(1)'], {}), '(1)\n', (523, 526), False, 'from qiskit import Qua...
import fileinput def prod(string): start = 1 for char in string: start *= int(char) return start def solution(string): lst = [] for i in range(len(string) - 13): lst.append(prod(string[i: i + 13])) return max(lst) print("Enter a string: ") string = '' for line in fileinput.inp...
[ "fileinput.input" ]
[((307, 324), 'fileinput.input', 'fileinput.input', ([], {}), '()\n', (322, 324), False, 'import fileinput\n')]
""" BLS test vectors generator """ from typing import Tuple, Any, Callable, Dict, Generator import argparse from pathlib import Path import json from ruamel.yaml import YAML from hashlib import sha256 import milagro_bls_binding as milagro_bls from py_ecc.bls import G2ProofOfPossession as bls from py_ecc.optimized...
[ "argparse.ArgumentParser", "py_ecc.bls.G2ProofOfPossession.AggregateVerify", "py_ecc.bls.G2ProofOfPossession.Sign", "pathlib.Path", "py_ecc.bls.G2ProofOfPossession.Aggregate", "milagro_bls_binding.Aggregate", "py_ecc.bls.hash.os2ip", "argparse.ArgumentTypeError", "py_ecc.bls.hash_to_curve.hash_to_G2...
[((1896, 1915), 'py_ecc.bls.G2ProofOfPossession.SkToPk', 'bls.SkToPk', (['privkey'], {}), '(privkey)\n', (1906, 1915), True, 'from py_ecc.bls import G2ProofOfPossession as bls\n'), ((2467, 2486), 'py_ecc.bls.G2ProofOfPossession.SkToPk', 'bls.SkToPk', (['privkey'], {}), '(privkey)\n', (2477, 2486), True, 'from py_ecc.bl...
import math #A* Algorithm class PathPlanner(): """Construct a PathPlanner Object""" def __init__(self, M, start=None, goal=None): """ """ self.map = M self.start= start self.goal = goal self.closedSet = self.create_closedSet() if goal != None and start != None else None...
[ "math.sqrt" ]
[((5112, 5170), 'math.sqrt', 'math.sqrt', (['((pt1[0] - pt2[0]) ** 2 + (pt1[1] - pt2[1]) ** 2)'], {}), '((pt1[0] - pt2[0]) ** 2 + (pt1[1] - pt2[1]) ** 2)\n', (5121, 5170), False, 'import math\n')]
# Simple user input example. Based loosely on [nibalizer/weasley.py] (https://gist.github.com/nibalizer/a6649abee758da3f8d08ef5e164b524c) from datetime import datetime import obspython as obs # I'm not too sure what these assignment statements do, except perhaps create # the global variables corresponding to the scri...
[ "obspython.obs_properties_add_int", "datetime.datetime.today", "obspython.obs_data_set_default_int", "obspython.obs_properties_add_button", "obspython.obs_data_get_int", "obspython.obs_properties_create" ]
[((1387, 1403), 'datetime.datetime.today', 'datetime.today', ([], {}), '()\n', (1401, 1403), False, 'from datetime import datetime\n'), ((1408, 1466), 'obspython.obs_data_set_default_int', 'obs.obs_data_set_default_int', (['settings', '"""year"""', 'today.year'], {}), "(settings, 'year', today.year)\n", (1436, 1466), T...
#--------------------------------------------- # Title: chronodesign_props.py # Author: <NAME> @2019 #--------------------------------------------- # ########################### # IMPORT MODULES # ########################### import bpy from bpy.types import ( AddonPreferences, Operator, Panel, M...
[ "bpy.props.IntProperty", "bpy.props.BoolProperty", "bpy.props.FloatVectorProperty", "bpy.props.StringProperty" ]
[((666, 679), 'bpy.props.IntProperty', 'IntProperty', ([], {}), '()\n', (677, 679), False, 'from bpy.props import StringProperty, BoolProperty, IntProperty, FloatProperty, FloatVectorProperty, EnumProperty, PointerProperty, CollectionProperty\n'), ((692, 728), 'bpy.props.StringProperty', 'StringProperty', ([], {'defaul...
#可以使用rasterio 这个包 #安装方法 #pip3 install rasterio #help doc #https://rasterio.readthedocs.io/en/latest #使用方法分为命令行和python脚本 ##命令行使用 ##https://rasterio.readthedocs.io/en/latest/cli.html ##举个例子,查看info ''' rio info HWSD_RASTER/hwsd.bil --indent 2 --verbose { "bounds": [ -180.0, -89.99999999999997, 179.999999999...
[ "rasterio.open" ]
[((1091, 1128), 'rasterio.open', 'rasterio.open', (['"""HWSD_RASTER/hwsd.bil"""'], {}), "('HWSD_RASTER/hwsd.bil')\n", (1104, 1128), False, 'import rasterio\n')]
import math import maya.api.OpenMaya as om import maya.OpenMaya as oom from maya import cmds class RayArrow(object): def __init__(self): self.botHandle = None self.topHandle = None self.__arrowMesh = None self.create() self.moveToGroup() def create(self): ha...
[ "maya.cmds.move", "maya.cmds.aimConstraint", "maya.cmds.polyCone", "maya.cmds.parentConstraint", "math.pow", "maya.cmds.polyPlane", "maya.cmds.pointConstraint", "maya.cmds.rotate", "maya.cmds.polyCylinder", "maya.api.OpenMaya.MFloatPoint", "maya.cmds.file", "maya.cmds.polyUnite", "maya.cmds....
[((2430, 2450), 'maya.OpenMaya.MSelectionList', 'oom.MSelectionList', ([], {}), '()\n', (2448, 2450), True, 'import maya.OpenMaya as oom\n'), ((2493, 2507), 'maya.OpenMaya.MDagPath', 'oom.MDagPath', ([], {}), '()\n', (2505, 2507), True, 'import maya.OpenMaya as oom\n'), ((2563, 2593), 'maya.OpenMaya.MFnSpotLight', 'oom...
from pathlib import Path from shutil import rmtree from runcommands import command from runcommands.commands import local as _local __all__ = ["install"] VENV = ".venv" BIN = f"./{VENV}/bin" @command def install(): _local("poetry install") @command def update(): _local(f"{BIN}/pip install --upgrade --u...
[ "shutil.rmtree", "pathlib.Path", "runcommands.commands.local" ]
[((226, 250), 'runcommands.commands.local', '_local', (['"""poetry install"""'], {}), "('poetry install')\n", (232, 250), True, 'from runcommands.commands import local as _local\n'), ((280, 347), 'runcommands.commands.local', '_local', (['f"""{BIN}/pip install --upgrade --upgrade-strategy eager pip"""'], {}), "(f'{BIN}...
''' Library of Helper functions ''' import sys import os import re import ConfigParser from flatten_dict import flatten def underscore_reducer(key1, key2): ''' Underscore reducer for flatten dictionary ''' if key1 is None: return key2 return key1 + "_" + key2 def verify_status_dir(): ...
[ "os.makedirs", "os.path.exists", "re.match", "ConfigParser.RawConfigParser", "flatten_dict.flatten" ]
[((1135, 1182), 'flatten_dict.flatten', 'flatten', (['given_dict'], {'reducer': 'underscore_reducer'}), '(given_dict, reducer=underscore_reducer)\n', (1142, 1182), False, 'from flatten_dict import flatten\n'), ((1282, 1312), 'ConfigParser.RawConfigParser', 'ConfigParser.RawConfigParser', ([], {}), '()\n', (1310, 1312),...
import pygame def main(): """ Set up the game and run the main game loop """ pygame.init() # Prepare the pygame module for use surfaceSize = 1000 # Desired physical surface size, in pixels. clock = pygame.time.Clock() #Force frame rate to be slower # Create surface of (width, height), and...
[ "pygame.quit", "pygame.display.set_mode", "pygame.init", "pygame.display.flip", "pygame.mask.from_surface", "pygame.image.load", "pygame.mouse.get_pos", "pygame.time.Clock", "pygame.event.poll" ]
[((86, 99), 'pygame.init', 'pygame.init', ([], {}), '()\n', (97, 99), False, 'import pygame\n'), ((223, 242), 'pygame.time.Clock', 'pygame.time.Clock', ([], {}), '()\n', (240, 242), False, 'import pygame\n'), ((351, 402), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(surfaceSize, surfaceSize)'], {}), '((sur...
import Source.protobuf.system_builder_serializable as sb import Source.protobuf.make_util as make import Source.io_util as io import Source.system_evaluator as ev import Source.genetic_algorithm.selection as selection import Source.genetic_algorithm.fitting_functions as fit_fun import Source.genetic_algorithm.operation...
[ "Examples.compute.chain_genetic_algorithm.utils.pick_random_threshold", "Source.genetic_algorithm.fitting_functions.f2_time_param_penalization", "Source.iotnets.main_run_chain.chain_inference_time", "argparse.ArgumentParser", "Source.genetic_algorithm.operations_mutation.replace_classifier_merger", "Sourc...
[((548, 699), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'usage': '"""main.py [options]"""', 'description': '"""Genetic algorithm for finding the best chain under environment constraints."""'}), "(usage='main.py [options]', description=\n 'Genetic algorithm for finding the best chain under environme...
# author: Bartlomiej "furas" Burek (https://blog.furas.pl) # date: 2021.10.04 # # title: Scrapy returning None on querying by xpath # url: https://stackoverflow.com/questions/69442962/scrapy-returning-none-on-querying-by-xpath/69443343#69443343 # [Scrapy returning None on querying by xpath](https://stackoverflow.com/...
[ "scrapy.crawler.CrawlerProcess" ]
[((1496, 1590), 'scrapy.crawler.CrawlerProcess', 'CrawlerProcess', (["{'USER_AGENT': 'Mozilla/5.0', 'FEEDS': {'output.csv': {'format': 'csv'}}}"], {}), "({'USER_AGENT': 'Mozilla/5.0', 'FEEDS': {'output.csv': {\n 'format': 'csv'}}})\n", (1510, 1590), False, 'from scrapy.crawler import CrawlerProcess\n')]
import torch import numpy as np import argparse from models import FlowNet2 from utils.frame_utils import read_gen class Args(): fp16 = False rgb_max = 255. def get_flow(img1, img2, weights): # initial a Net args = Args() net = FlowNet2(args).cuda() # load the state_dict d...
[ "torch.load", "utils.frame_utils.read_gen", "numpy.array", "models.FlowNet2" ]
[((326, 345), 'torch.load', 'torch.load', (['weights'], {}), '(weights)\n', (336, 345), False, 'import torch\n'), ((475, 489), 'utils.frame_utils.read_gen', 'read_gen', (['img1'], {}), '(img1)\n', (483, 489), False, 'from utils.frame_utils import read_gen\n'), ((502, 516), 'utils.frame_utils.read_gen', 'read_gen', (['i...
#!/usr/bin/python3 from typing import Tuple, Any, Dict, Sequence, List, TextIO, Optional, Mapping, Union from dataclasses import dataclass, field from dateutil import relativedelta from decimal import Decimal, ROUND_HALF_UP from datetime import datetime, timedelta, date import json import sys import subprocess impor...
[ "sys.stdout.write", "subprocess.run", "datetime.date.date", "logging.FileHandler", "logging.basicConfig", "decimal.Decimal", "argparse.ArgumentParser", "logging.StreamHandler", "datetime.date.today", "dataclasses.field", "datetime.datetime.strptime", "datetime.timedelta", "datetime.datetime....
[((429, 444), 'decimal.Decimal', 'Decimal', (['"""0.01"""'], {}), "('0.01')\n", (436, 444), False, 'from decimal import Decimal, ROUND_HALF_UP\n'), ((380, 397), 'datetime.timedelta', 'timedelta', ([], {'days': '(1)'}), '(days=1)\n', (389, 397), False, 'from datetime import datetime, timedelta, date\n'), ((400, 420), 'd...
# ========================= # kwzImage.py version 1.0.0 # ========================= # # Exports a Flipnote audio track and converts it to WAV # # Usage: # python kwzImage.py <input path> <frame index> <output path> import glob from sys import argv import os from kwz import KWZParser, PALETTE from PIL import Image d...
[ "os.path.basename", "os.path.dirname", "os.path.splitext", "glob.glob", "PIL.Image.fromarray", "kwz.KWZParser" ]
[((440, 467), 'PIL.Image.fromarray', 'Image.fromarray', (['frame', '"""P"""'], {}), "(frame, 'P')\n", (455, 467), False, 'from PIL import Image\n'), ((821, 832), 'kwz.KWZParser', 'KWZParser', ([], {}), '()\n', (830, 832), False, 'from kwz import KWZParser, PALETTE\n'), ((846, 880), 'glob.glob', 'glob.glob', (['argv[1]'...
from setuptools import setup setup( name = 'chestella', packages = ['chestella', 'chestella.directory', 'chestella.project', 'chestella.makefile'], # this must be the same as the name above entry_points = { "console_scripts": ['chestella = chestella.chestella:main'] }, version = '0.4.1', description = ...
[ "setuptools.setup" ]
[((30, 551), 'setuptools.setup', 'setup', ([], {'name': '"""chestella"""', 'packages': "['chestella', 'chestella.directory', 'chestella.project', 'chestella.makefile']", 'entry_points': "{'console_scripts': ['chestella = chestella.chestella:main']}", 'version': '"""0.4.1"""', 'description': '"""A C-Projects manager"""'...
from flask import Flask, redirect, url_for from flask_restplus import Resource, Api app = Flask(__name__) api = Api(app, version='1.0', title='UKWA API', description='API services for interacting with UKWA content. (PROTOTYPE)') ns = api.namespace('access', description='Access operations') @ns.route('/resolve/ark:/...
[ "flask.url_for", "flask.Flask", "flask_restplus.Api" ]
[((91, 106), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (96, 106), False, 'from flask import Flask, redirect, url_for\n'), ((113, 234), 'flask_restplus.Api', 'Api', (['app'], {'version': '"""1.0"""', 'title': '"""UKWA API"""', 'description': '"""API services for interacting with UKWA content. (PROTOTYP...
#!/usr/bin/env python3 import json import numpy as np import matplotlib.pyplot as plt import equations data_output = 'data/simulations/single_ligand.json' tspan = np.array([0, 120 * 60]) # 2 hour window units = 1e9 # 1e9 for nM, 1e6 for μM, etc L1 = 30e-9 R = 800e-9 alpha = 0.06 m = np.array([R, L1, 0]) * units...
[ "equations.simulate_one_ligand_one_receptor_binding", "numpy.array", "json.dumps" ]
[((167, 190), 'numpy.array', 'np.array', (['[0, 120 * 60]'], {}), '([0, 120 * 60])\n', (175, 190), True, 'import numpy as np\n'), ((326, 352), 'numpy.array', 'np.array', (['[1e-05, 0.00022]'], {}), '([1e-05, 0.00022])\n', (334, 352), True, 'import numpy as np\n'), ((448, 518), 'equations.simulate_one_ligand_one_recepto...
import requests import json import csv import time def read_csv(): visited_players = [] with open('data/processed/player_data.csv') as dota_data_file: csv_reader = csv.reader(dota_data_file, delimiter=',') line_count = 0 for row in csv_reader: if line_count == 0: ...
[ "csv.reader", "csv.writer", "time.sleep" ]
[((2656, 2669), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (2666, 2669), False, 'import time\n'), ((2730, 2743), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (2740, 2743), False, 'import time\n'), ((182, 223), 'csv.reader', 'csv.reader', (['dota_data_file'], {'delimiter': '""","""'}), "(dota_data_file, ...
import os import sys import time import ptvsd if os.getenv('PTVSD_ENABLE_ATTACH', None) is not None: ptvsd.enable_attach((sys.argv[1], sys.argv[2])) if os.getenv('PTVSD_WAIT_FOR_ATTACH', None) is not None: print('waiting for attach') ptvsd.wait_for_attach() elif os.getenv('PTVSD_IS_ATTACHED', None) is not...
[ "ptvsd.enable_attach", "ptvsd.break_into_debugger", "time.sleep", "ptvsd.is_attached", "ptvsd.wait_for_attach", "os.getenv" ]
[((50, 88), 'os.getenv', 'os.getenv', (['"""PTVSD_ENABLE_ATTACH"""', 'None'], {}), "('PTVSD_ENABLE_ATTACH', None)\n", (59, 88), False, 'import os\n'), ((106, 153), 'ptvsd.enable_attach', 'ptvsd.enable_attach', (['(sys.argv[1], sys.argv[2])'], {}), '((sys.argv[1], sys.argv[2]))\n', (125, 153), False, 'import ptvsd\n'), ...
#!/usr/bin/env python # TODO: Add type hints and doc strings # TODO: Write Unit Tests __author__ = "<NAME>" __email__ = "<EMAIL>" __license__ = "MIT" import sys import os import argparse import logging import numpy as np from typing import Dict, List, Tuple from functools import partial from scipy import signal from en...
[ "functools.partial", "numpy.radians", "argparse.ArgumentParser", "pyfiglet.Figlet", "logging.StreamHandler", "os.path.exists", "tempfile.gettempdir", "logging.Formatter", "numpy.min", "numpy.max", "pathlib.Path", "numpy.linspace", "sys.exit", "os.path.join", "logging.getLogger", "argpa...
[((827, 859), 'logging.getLogger', 'logging.getLogger', (['"""pattern_gen"""'], {}), "('pattern_gen')\n", (844, 859), False, 'import logging\n'), ((1184, 1207), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (1205, 1207), False, 'import logging\n'), ((1246, 1319), 'logging.Formatter', 'logging.Form...
import pandas as pd df_d = pd.read_csv('../Data_Science_Post/survey_results_public.csv') df_q = pd.read_csv('../Data_Science_Post/survey_results_schema.csv') # Creating an excel spreadsheet for easier raw data visualization: with pd.ExcelWriter('stack_data.xlsx',mode='w') as writer: df_d.to_excel(writer,sheet_na...
[ "pandas.read_csv", "pandas.ExcelWriter" ]
[((28, 89), 'pandas.read_csv', 'pd.read_csv', (['"""../Data_Science_Post/survey_results_public.csv"""'], {}), "('../Data_Science_Post/survey_results_public.csv')\n", (39, 89), True, 'import pandas as pd\n'), ((97, 158), 'pandas.read_csv', 'pd.read_csv', (['"""../Data_Science_Post/survey_results_schema.csv"""'], {}), "(...
# coding: latin-1 """ @brief test log(time=1s) """ import sys import os import unittest from pyquickhelper.loghelper.flog import fLOG import pyquickhelper.filehelper.synchelper as foldermod class TestFolder (unittest.TestCase): def test_synchronize(self): fLOG( __file__, se...
[ "unittest.main", "os.mkdir", "os.remove", "pyquickhelper.loghelper.flog.fLOG", "os.path.exists", "pyquickhelper.filehelper.synchelper.remove_folder", "os.path.split", "os.path.join", "os.listdir", "pyquickhelper.filehelper.synchelper.synchronize_folder" ]
[((3783, 3798), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3796, 3798), False, 'import unittest\n'), ((278, 350), 'pyquickhelper.loghelper.flog.fLOG', 'fLOG', (['__file__', 'self._testMethodName'], {'OutputPrint': "(__name__ == '__main__')"}), "(__file__, self._testMethodName, OutputPrint=__name__ == '__main_...
"""HVAC systems with DOAS, separating ventilation and meeting thermal demand.""" from pydantic import Field, constr from typing import Union from enum import Enum from ._template import _TemplateSystem from ...altnumber import Autosize class _DOASBase(_TemplateSystem): """Base class for DOAS systems.""" sen...
[ "pydantic.constr", "pydantic.Field" ]
[((2988, 3017), 'pydantic.constr', 'constr', ([], {'regex': '"""^FCUwithDOAS$"""'}), "(regex='^FCUwithDOAS$')\n", (2994, 3017), False, 'from pydantic import Field, constr\n'), ((3082, 3245), 'pydantic.Field', 'Field', (['FCUwithDOASEquipmentType.fcu_chill_gb'], {'description': '"""Text for the specific type of system e...
import requests import os import json # To set your environment variables in your terminal run the following line: # export 'BEARER_TOKEN'='<your_bearer_token>' # The TwitterAPI Class allows you to pull tweets from a specific user and # to see the replies to the tweets from that user class TwitterAPI(): def...
[ "os.environ.get", "requests.request", "json.dumps" ]
[((3583, 3634), 'json.dumps', 'json.dumps', (['json_response'], {'indent': '(4)', 'sort_keys': '(True)'}), '(json_response, indent=4, sort_keys=True)\n', (3593, 3634), False, 'import json\n'), ((577, 607), 'os.environ.get', 'os.environ.get', (['"""BEARER_TOKEN"""'], {}), "('BEARER_TOKEN')\n", (591, 607), False, 'import...
# -*- coding: utf-8 -*- """ Created on Mon Nov 29 19:53:59 2021 @author: kkrao """ import geopandas as gpd import seaborn as sns import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd from mpl_toolkits.axes_grid1 import make_axes_locatable mpl.rcParams['axes.linewidth'] = 0.5 #set the value g...
[ "mpl_toolkits.axes_grid1.make_axes_locatable", "seaborn.heatmap", "matplotlib.colors.BoundaryNorm", "matplotlib.pyplot.subplots", "pandas.to_datetime", "seaborn.color_palette", "seaborn.set", "matplotlib.colors.ListedColormap", "geopandas.read_file" ]
[((453, 489), 'seaborn.set', 'sns.set', ([], {'style': '"""white"""', 'font_scale': '(1)'}), "(style='white', font_scale=1)\n", (460, 489), True, 'import seaborn as sns\n'), ((498, 658), 'geopandas.read_file', 'gpd.read_file', (['"""D:/Krishna/projects/lfmc_for_ignitions/data/fire_history/Wildfires_1878_2019_Polygon_Da...
import unittest from vwapp_eda.stack import Stack class StackTestCase(unittest.TestCase): """ Casos de teste do projeto pilha. """ def setUp(self): """ Método executado a cada teste. """ self.stack = Stack() def tearDown(self): """ Método executad...
[ "unittest.main", "vwapp_eda.stack.Stack" ]
[((662, 677), 'unittest.main', 'unittest.main', ([], {}), '()\n', (675, 677), False, 'import unittest\n'), ((252, 259), 'vwapp_eda.stack.Stack', 'Stack', ([], {}), '()\n', (257, 259), False, 'from vwapp_eda.stack import Stack\n')]
# frameworks/packages #This script applies a deep convolutional network including box-convolution to the C-Mapss Turbofan dataset (FD001) #Module box_convolution is from shrubb/box-convolutions #Required packages: libgcc, pyqt, git, pytorch, torchvision, C Compiler, OpenCV, requests, gxx_linux-64, scikit-learn #Tested ...
[ "matplotlib.pyplot.title", "torch.nn.Dropout", "pandas.read_csv", "torch.cat", "matplotlib.pyplot.figure", "torchsummary.summary", "torch.nn.MSELoss", "torch.Tensor", "torch.nn.Linear", "box_convolution.BoxConv2d", "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "torch.nn.Conv2d", "t...
[((797, 874), 'pandas.read_csv', 'pd.read_csv', (['"""FD001train_V2.txt"""'], {'sep': '""" """', 'header': 'None', 'skipinitialspace': '(True)'}), "('FD001train_V2.txt', sep=' ', header=None, skipinitialspace=True)\n", (808, 874), True, 'import pandas as pd\n'), ((889, 965), 'pandas.read_csv', 'pd.read_csv', (['"""FD00...
from __future__ import division, print_function, absolute_import import math import numpy as np import scipy.special import mafipy.function # ---------------------------------------------------------------------------- # Black scholes european call/put # --------------------------------------------------------------...
[ "math.log", "math.exp", "math.sqrt", "numpy.isclose" ]
[((6272, 6298), 'math.exp', 'math.exp', (['(-rate * maturity)'], {}), '(-rate * maturity)\n', (6280, 6298), False, 'import math\n'), ((9071, 9093), 'math.exp', 'math.exp', (['(-rate * time)'], {}), '(-rate * time)\n', (9079, 9093), False, 'import math\n'), ((10285, 10311), 'math.exp', 'math.exp', (['(-rate * maturity)'...
import os import shutil from lbann.contrib.riken.systems import * import lbann.launcher from lbann.util import make_iterable def run(*args, **kwargs): """Run LBANN with RIKEN-specific optimizations (deprecated). This is deprecated. Use `lbann.contrib.launcher.run` instead. """ import warnings wa...
[ "warnings.warn", "os.getenv", "shutil.which", "lbann.util.make_iterable" ]
[((318, 448), 'warnings.warn', 'warnings.warn', (['"""Using deprecated function `lbann.contrib.riken.launcher.run`. Use `lbann.contrib.launcher.run` instead."""'], {}), "(\n 'Using deprecated function `lbann.contrib.riken.launcher.run`. Use `lbann.contrib.launcher.run` instead.'\n )\n", (331, 448), False, 'import...
import uwuizer uwuizer.owoize("hello")
[ "uwuizer.owoize" ]
[((18, 41), 'uwuizer.owoize', 'uwuizer.owoize', (['"""hello"""'], {}), "('hello')\n", (32, 41), False, 'import uwuizer\n')]
#!/usr/bin/env python3 import cgi, cgitb import os, json from templates import login_page, secret_page, after_login_incorrect, _wrapper from secret import username, password from http.cookies import SimpleCookie # Python 3.7 versus Python 3.8 try: from cgi import escape #v3.7 except: from html import escape #v...
[ "templates.login_page", "cgitb.enable", "cgi.FieldStorage", "http.cookies.SimpleCookie", "os.environ.keys", "templates.after_login_incorrect", "templates.secret_page" ]
[((325, 339), 'cgitb.enable', 'cgitb.enable', ([], {}), '()\n', (337, 339), False, 'import cgi, cgitb\n'), ((382, 400), 'cgi.FieldStorage', 'cgi.FieldStorage', ([], {}), '()\n', (398, 400), False, 'import cgi, cgitb\n'), ((433, 472), 'http.cookies.SimpleCookie', 'SimpleCookie', (["os.environ['HTTP_COOKIE']"], {}), "(os...
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name = 'shuffled_stats', version = '1.0.6', description = 'Python library for performing inference on datasets with shuffled labels', author = '<NAME>', author_email = '<EMAIL>', url = 'https:/...
[ "distutils.core.setup" ]
[((96, 559), 'distutils.core.setup', 'setup', ([], {'name': '"""shuffled_stats"""', 'version': '"""1.0.6"""', 'description': '"""Python library for performing inference on datasets with shuffled labels"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/abidlabs/shuffled-stats"...
import tensorflow as tf from utils.saveLoader import load_train_dataset, load_test_dataset, Vocab from utils.config import VOCAB_PAD from utils.config_gpu import config_gpu from utils.params import get_params def beam_test_batch_generator(beam_size): # 加载数据集 test_x = load_test_dataset() for row in test_x: ...
[ "utils.config_gpu.config_gpu", "utils.saveLoader.load_test_dataset", "tensorflow.data.Dataset.zip", "utils.saveLoader.Vocab", "utils.params.get_params", "tensorflow.data.TextLineDataset" ]
[((276, 295), 'utils.saveLoader.load_test_dataset', 'load_test_dataset', ([], {}), '()\n', (293, 295), False, 'from utils.saveLoader import load_train_dataset, load_test_dataset, Vocab\n'), ((13029, 13041), 'utils.config_gpu.config_gpu', 'config_gpu', ([], {}), '()\n', (13039, 13041), False, 'from utils.config_gpu impo...
import logging from flask import request from flask_restplus import Resource from biolink.datamodel.serializers import association from biolink.api.restplus import api from ontobio.sparql.sparql_ontol_utils import batch_fetch_labels import pysolr log = logging.getLogger(__name__) parser = api.parser() parser.add_arg...
[ "ontobio.sparql.sparql_ontol_utils.batch_fetch_labels", "biolink.api.restplus.api.parser", "biolink.api.restplus.api.expect", "logging.getLogger" ]
[((255, 282), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (272, 282), False, 'import logging\n'), ((293, 305), 'biolink.api.restplus.api.parser', 'api.parser', ([], {}), '()\n', (303, 305), False, 'from biolink.api.restplus import api\n'), ((414, 432), 'biolink.api.restplus.api.expect'...
from models.models import Empleado from models.models import db def create(empleado): e = Empleado( empleado['ci'], empleado['nombre_completo'], empleado['correo'], empleado['contrasena'], empleado['tlf'], empleado['direccion'], empleado['fecha_nacimiento']...
[ "models.models.db.session.commit", "models.models.db.session.add", "models.models.Empleado" ]
[((97, 373), 'models.models.Empleado', 'Empleado', (["empleado['ci']", "empleado['nombre_completo']", "empleado['correo']", "empleado['contrasena']", "empleado['tlf']", "empleado['direccion']", "empleado['fecha_nacimiento']", "empleado['sexo']", "empleado['estado']", "empleado['dept_id']", "empleado['rol_id']", "emplea...
# File: gitn_log.py # Author: kmnk <kmnknmk at <EMAIL>> # License: MIT license from gitn.enum import Window from gitn.util.gitn import Gitn from denite.process import Process import os import re import time from .gitn import Source as Base DATE_GRAPH_HIGHLIGHT = { 'container': { 'name': 'gitnLog_dateGrap...
[ "time.gmtime", "gitn.util.gitn.Gitn.highlight", "re.search", "gitn.enum.Window.has" ]
[((2274, 2320), 'gitn.util.gitn.Gitn.highlight', 'Gitn.highlight', (['self.vim', 'DATE_GRAPH_HIGHLIGHT'], {}), '(self.vim, DATE_GRAPH_HIGHLIGHT)\n', (2288, 2320), False, 'from gitn.util.gitn import Gitn\n'), ((2329, 2376), 'gitn.util.gitn.Gitn.highlight', 'Gitn.highlight', (['self.vim', 'AUTHOR_NAME_HIGHLIGHT'], {}), '...
# # Chapter 4: Discrete Cosine / Wavelet Transform and Deconvolution # Author: <NAME> ########################################### # ## Problems # ## 1. Template matching with Phase-Correlation in Frequency Domain get_ipython().run_line_magic('matplotlib', 'inline') import scipy.fftpack as fp from skimage.io import...
[ "pywt.coeffs_to_array", "numpy.sum", "pywt.threshold", "numpy.abs", "matplotlib.pylab.imshow", "numpy.maximum", "numpy.allclose", "scipy.fftpack.dct", "numpy.ones", "numpy.clip", "matplotlib.pylab.axis", "matplotlib.pylab.gca", "cv2.warpAffine", "numpy.sin", "numpy.arange", "matplotlib...
[((1542, 1553), 'scipy.fftpack.fftn', 'fp.fftn', (['im'], {}), '(im)\n', (1549, 1553), True, 'import scipy.fftpack as fp\n'), ((1561, 1591), 'scipy.fftpack.fftn', 'fp.fftn', (['im_tm'], {'shape': 'im.shape'}), '(im_tm, shape=im.shape)\n', (1568, 1591), True, 'import scipy.fftpack as fp\n'), ((1762, 1855), 'skimage.draw...
import sys import math from augury.settings import BASE_DIR if BASE_DIR not in sys.path: sys.path.append(BASE_DIR) from augury.data_import import FitzroyDataImporter from augury.data_processors import TeamDataStacker, FeatureBuilder from augury.data_processors.feature_functions import ( add_shifted_team_feat...
[ "sys.path.append", "augury.data_processors.TeamDataStacker", "augury.data_import.FitzroyDataImporter", "augury.data_processors.feature_functions.add_shifted_team_features", "math.sqrt", "math.radians", "augury.data_processors.feature_calculation.feature_calculator", "math.sin", "augury.data_processo...
[((95, 120), 'sys.path.append', 'sys.path.append', (['BASE_DIR'], {}), '(BASE_DIR)\n', (110, 120), False, 'import sys\n'), ((4167, 4188), 'augury.data_import.FitzroyDataImporter', 'FitzroyDataImporter', ([], {}), '()\n', (4186, 4188), False, 'from augury.data_import import FitzroyDataImporter\n'), ((5209, 5227), 'math....
""" mark domains/boundaries with dolfin MeshFunctions """ from dolfin import * from importlib import import_module from .params_geo import * import numpy synonymes = { "pore":{"poretop", "porecenter", "porebottom"}, "fluid":{"bulkfluid","pore"}, "sin":"membranesin", "au":"membraneau", "sam":"membr...
[ "numpy.tan", "numpy.cos", "numpy.sqrt" ]
[((976, 1003), 'numpy.sqrt', 'numpy.sqrt', (['(x ** 2 + y ** 2)'], {}), '(x ** 2 + y ** 2)\n', (986, 1003), False, 'import numpy\n'), ((1463, 1497), 'numpy.tan', 'numpy.tan', (['(angle2 * numpy.pi / 180)'], {}), '(angle2 * numpy.pi / 180)\n', (1472, 1497), False, 'import numpy\n'), ((1504, 1538), 'numpy.cos', 'numpy.co...
import os import math import codecs import numpy as np from PIL import Image, ImageEnhance from config import train_parameters def resize_img(img, target_size): """ 强制缩放图片 :param img: :param target_size: :return: """ img = img.resize((target_size[1], target_size[2]), Image.BILINEAR) re...
[ "numpy.random.uniform", "PIL.ImageEnhance.Brightness", "codecs.open", "math.sqrt", "PIL.ImageEnhance.Color", "PIL.ImageEnhance.Contrast", "PIL.Image.open", "numpy.random.randint", "numpy.array", "PIL.Image.fromarray", "numpy.random.shuffle" ]
[((872, 894), 'math.sqrt', 'math.sqrt', (['target_area'], {}), '(target_area)\n', (881, 894), False, 'import math\n'), ((962, 1003), 'numpy.random.randint', 'np.random.randint', (['(0)', '(img.size[0] - w + 1)'], {}), '(0, img.size[0] - w + 1)\n', (979, 1003), True, 'import numpy as np\n'), ((1012, 1053), 'numpy.random...
import numpy as np import pandas as pd from ..abstract_base_classes.solver_abc import SolverABC from scipy.optimize import Bounds, LinearConstraint, basinhopping, minimize from ....models.strategy_optimal import StrategyOptimal __all__ = ['StrategyOptimalSolver'] #DIVIDER = 10**6 DIVIDER = { 'SBER': 10**6, ...
[ "scipy.optimize.minimize", "numpy.sum", "scipy.optimize.LinearConstraint", "numpy.cumsum", "scipy.optimize.Bounds", "numpy.min", "numpy.array" ]
[((4572, 4627), 'numpy.array', 'np.array', (['([volume_to_liquidate / num_steps] * num_steps)'], {}), '([volume_to_liquidate / num_steps] * num_steps)\n', (4580, 4627), True, 'import numpy as np\n'), ((4645, 4695), 'scipy.optimize.Bounds', 'Bounds', (['(0)', 'volume_to_liquidate'], {'keep_feasible': '(True)'}), '(0, vo...
from controller.funcoesGlobais import funcoesGlobais from controller.constantes import constantes import csv from datetime import datetime func = funcoesGlobais() const = constantes() dddEstado = const.get_dddEstado() idBroker = const.get_idBroker() mensagensValidas = [] logErros = [] ficheiro = open('exemplo.csv'...
[ "controller.funcoesGlobais.funcoesGlobais", "csv.reader", "datetime.datetime.now", "controller.constantes.constantes" ]
[((148, 164), 'controller.funcoesGlobais.funcoesGlobais', 'funcoesGlobais', ([], {}), '()\n', (162, 164), False, 'from controller.funcoesGlobais import funcoesGlobais\n'), ((173, 185), 'controller.constantes.constantes', 'constantes', ([], {}), '()\n', (183, 185), False, 'from controller.constantes import constantes\n'...
#!/usr/bin/python # # Copyright 2020 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 ag...
[ "google.cloud.datacatalog.Tag" ]
[((1065, 1082), 'google.cloud.datacatalog.Tag', 'datacatalog.Tag', ([], {}), '()\n', (1080, 1082), False, 'from google.cloud import datacatalog\n'), ((2322, 2339), 'google.cloud.datacatalog.Tag', 'datacatalog.Tag', ([], {}), '()\n', (2337, 2339), False, 'from google.cloud import datacatalog\n'), ((3331, 3348), 'google....
#!/usr/bin/env python # Copyright 2018 ADLINK Technology, Inc. # Developer: HaoChih, LIN (<EMAIL>) # # 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/LICEN...
[ "geometry_msgs.msg.PoseStamped", "rospy.Subscriber", "rospy.Time.now", "math.pow", "math.atan2", "rospy.Publisher", "geometry_msgs.msg.Twist", "rospy.sleep", "rospy.loginfo", "rospy.get_param", "rospy.init_node", "geometry_msgs.msg.PoseWithCovarianceStamped", "rospy.spin", "tf.TransformLis...
[((10285, 10330), 'rospy.init_node', 'rospy.init_node', (['"""Follow_me"""'], {'anonymous': '(False)'}), "('Follow_me', anonymous=False)\n", (10300, 10330), False, 'import rospy\n'), ((10337, 10397), 'rospy.loginfo', 'rospy.loginfo', (['"""===== neuronbot following node (legs) ====="""'], {}), "('===== neuronbot follow...
import asyncio import aiozmq.rpc import logging class Publish(object): def __init__(self, name, publisher, *, interval=1, logger=None, loop=None): self.name = name self.publisher = publisher self.interval = interval self.stop = asyncio.Event() self.logger = logger or loggi...
[ "asyncio.sleep", "asyncio.Event", "asyncio.get_event_loop", "logging.getLogger" ]
[((267, 282), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (280, 282), False, 'import asyncio\n'), ((315, 342), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (332, 342), False, 'import logging\n'), ((371, 395), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', ...
import os # import tensorflow as tf # flags = tf.flags # FLAGS = flags.FLAGS print("La prima opzione nella lista è quella di default, ottenibile con input vuoto") nohup = input("nohup: [si no] ") nohup = "nohup" if not nohup else "" train = input("train: [true false] ") train = "true" if not train else train ...
[ "os.system" ]
[((1922, 1936), 'os.system', 'os.system', (['cmd'], {}), '(cmd)\n', (1931, 1936), False, 'import os\n')]
# Copyright 2017 Intel Corporation # # 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 wri...
[ "sawtooth_supplychain.common.addressing.Addressing.agent_namespace", "sawtooth_sdk.protobuf.state_delta_pb2.StateDeltaSubscribeResponse", "sawtooth_sdk.protobuf.state_delta_pb2.StateDeltaUnsubscribeRequest", "sawtooth_supplychain.protobuf.record_pb2.RecordContainer", "math.pow", "sawtooth_supplychain.comm...
[((1776, 1803), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1793, 1803), False, 'import logging\n'), ((1824, 1852), 'sawtooth_supplychain.common.addressing.Addressing.agent_namespace', 'Addressing.agent_namespace', ([], {}), '()\n', (1850, 1852), False, 'from sawtooth_supplychain.comm...
""" Module containing tensorflow ranking metrics. This module conforms to conventions used by tf.metrics.*. In particular, each metric constructs two subgraphs: value_op and update_op: - The value op is used to fetch the current metric value. - The update_op is used to accumulate into the metric. Note: similar to...
[ "tensorflow.python.ops.array_ops.size", "util.math_fns.cal_dcg", "util.math_fns.cal_err", "tensorflow.python.framework.ops.control_dependencies", "tensorflow.variable_scope", "tensorflow.constant", "tensorflow.minimum", "util.math_fns.cal_idcg", "util.math_fns.cal_ndcg", "tensorflow.python.framewo...
[((14466, 14479), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (14477, 14479), False, 'from collections import OrderedDict\n'), ((14542, 14582), 'tensorflow.greater_equal', 'tf.greater_equal', (['predictions', 'threshold'], {}), '(predictions, threshold)\n', (14558, 14582), True, 'import tensorflow as tf...
import logging import hashlib from collections import OrderedDict import json import floto.specs import floto.specs.serializer logger = logging.getLogger(__name__) class Task: """Base class for tasks, e.g. ActivityTask, Timer. Parameters ---------- id_: str The unique id of the timer task ...
[ "logging.getLogger", "json.dumps" ]
[((138, 165), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (155, 165), False, 'import logging\n'), ((928, 961), 'json.dumps', 'json.dumps', (['input'], {'sort_keys': '(True)'}), '(input, sort_keys=True)\n', (938, 961), False, 'import json\n')]
from torchreid import models, utils model = models.build_model(name='mobilenetv3_small', num_classes=10, dropout_cls={"p":0.1,"dist":'gaussian',"mu":0.5,"sigma":0.3}) num_params, flops = utils.compute_model_complexity(model, (1, 3, 48, 48), verbose=True) ''' ------------------------------------------------------- ...
[ "torchreid.utils.compute_model_complexity", "torchreid.models.build_model" ]
[((44, 178), 'torchreid.models.build_model', 'models.build_model', ([], {'name': '"""mobilenetv3_small"""', 'num_classes': '(10)', 'dropout_cls': "{'p': 0.1, 'dist': 'gaussian', 'mu': 0.5, 'sigma': 0.3}"}), "(name='mobilenetv3_small', num_classes=10, dropout_cls={\n 'p': 0.1, 'dist': 'gaussian', 'mu': 0.5, 'sigma': ...
import collections import contextlib import logging import os import pathlib import shutil import jinja2 logger = logging.getLogger(__name__) templates_directory = pathlib.Path(__file__).parent / 'templates' jinja_loader = jinja2.FileSystemLoader('/') jinja_environment = jinja2.Environment(loader=jinja_loader) def...
[ "contextlib.suppress", "jinja2.FileSystemLoader", "pathlib.Path", "jinja2.Environment", "collections.namedtuple", "logging.getLogger" ]
[((116, 143), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (133, 143), False, 'import logging\n'), ((226, 254), 'jinja2.FileSystemLoader', 'jinja2.FileSystemLoader', (['"""/"""'], {}), "('/')\n", (249, 254), False, 'import jinja2\n'), ((275, 314), 'jinja2.Environment', 'jinja2.Environme...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'interfaz_3.ui' # # Created by: PyQt5 UI code generator 5.4.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_instalador_interfaz_3(object): def setupUi(self, instalador_inter...
[ "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QWidget", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtCore.QSize", "PyQt5.QtWidgets.QSpacerItem", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtGui.QPixmap", "PyQt5.QtCore.QMetaOb...
[((655, 694), 'PyQt5.QtWidgets.QLabel', 'QtWidgets.QLabel', (['instalador_interfaz_3'], {}), '(instalador_interfaz_3)\n', (671, 694), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((992, 1031), 'PyQt5.QtWidgets.QLabel', 'QtWidgets.QLabel', (['instalador_interfaz_3'], {}), '(instalador_interfaz_3)\n', (1008, 1...
"""Path related utils.""" import errno import os import shutil import stat import logging logger = logging.getLogger(__name__) def listdir_absolute(directory, skip_paths=None): """Return and iterator of the absolute path.""" if skip_paths is None: skip_paths = [] for dirpath, _, filenames in os.w...
[ "os.chmod", "os.unlink", "os.stat", "os.makedirs", "os.path.join", "os.walk", "os.path.expandvars", "os.path.islink", "shutil.rmtree", "os.path.expanduser", "logging.getLogger" ]
[((100, 127), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (117, 127), False, 'import logging\n'), ((316, 334), 'os.walk', 'os.walk', (['directory'], {}), '(directory)\n', (323, 334), False, 'import os\n'), ((686, 715), 'os.chmod', 'os.chmod', (['path', 'stat.S_IWRITE'], {}), '(path, st...
# -*- coding: utf-8 -*- import os import csv import subprocess import pandas as pd from shutil import copyfile # Implementation of class MasterSimTestGenerator class MasterSimTestGenerator: def __init__(self): self.fmuPath = "" self.simOptions = dict() self.variableInputFile = "" MasterSimTestGenerator.OP...
[ "os.path.abspath", "subprocess.Popen", "os.makedirs", "os.path.basename", "pandas.read_csv", "os.path.exists", "os.path.isfile", "os.path.relpath", "shutil.copyfile", "os.path.split" ]
[((2146, 2168), 'os.path.exists', 'os.path.exists', (['inFile'], {}), '(inFile)\n', (2160, 2168), False, 'import os\n'), ((2877, 2927), 'pandas.read_csv', 'pd.read_csv', (['refFile'], {'delimiter': '""","""', 'quotechar': '"""\\""""'}), '(refFile, delimiter=\',\', quotechar=\'"\')\n', (2888, 2927), True, 'import pandas...