code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
''' This module provides a table of data regarding bachelors degrees earned by women, broken down by field for any given year. It exposes an attribute 'data' which is a pandas dataframe with the following fields: Year Agriculture Architecture Art and Performance Biology Business Communicati...
[ "bokeh.util.dependencies.import_required", "os.path.dirname" ]
[((664, 780), 'bokeh.util.dependencies.import_required', 'import_required', (['"""pandas"""', '"""degrees sample data requires Pandas (http://pandas.pydata.org) to be installed"""'], {}), "('pandas',\n 'degrees sample data requires Pandas (http://pandas.pydata.org) to be installed'\n )\n", (679, 780), False, 'fro...
# Code adapted from https://github.com/google-research/google-research/tree/master/flax_models/cifar # Original copyright statement: # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ...
[ "numpy.prod", "numpy.sqrt", "jax.numpy.pad", "flax.linen.Dense", "jax.numpy.log", "jax.nn.initializers.variance_scaling", "flax.linen.Conv", "flax.linen.swish", "jax.nn.relu", "jax.numpy.mean", "jax.random.split", "jax.nn.initializers.normal", "jax.random.bernoulli", "jax.numpy.sin", "ja...
[((2337, 2399), 'jax.nn.initializers.variance_scaling', 'jax.nn.initializers.variance_scaling', (['(2.0)', '"""fan_out"""', '"""normal"""'], {}), "(2.0, 'fan_out', 'normal')\n", (2373, 2399), False, 'import jax\n'), ((3429, 3457), 'jax.random.split', 'jax.random.split', (['rng'], {'num': '(2)'}), '(rng, num=2)\n', (344...
#========================================================================= # InValRdyRandStallAdapter #========================================================================= # Randomly stalls an input interface. from copy import deepcopy from random import Random from pymtl import * #------------...
[ "random.Random", "copy.deepcopy" ]
[((869, 877), 'random.Random', 'Random', ([], {}), '()\n', (875, 877), False, 'from random import Random\n'), ((1199, 1218), 'copy.deepcopy', 'deepcopy', (['s.in_.msg'], {}), '(s.in_.msg)\n', (1207, 1218), False, 'from copy import deepcopy\n')]
import os from wptools.PhpVariableExtractor import Extractor BASE_PATH = os.path.dirname(os.path.abspath(__file__)) WP_CONFIG_FILE = "wp-config.php" wp_config_file = os.path.join(BASE_PATH, WP_CONFIG_FILE) print("with file handle") with open(wp_config_file, "r") as handle: variables = Extractor.extract(handle) ...
[ "os.path.abspath", "os.path.join", "wptools.PhpVariableExtractor.Extractor.extract" ]
[((169, 208), 'os.path.join', 'os.path.join', (['BASE_PATH', 'WP_CONFIG_FILE'], {}), '(BASE_PATH, WP_CONFIG_FILE)\n', (181, 208), False, 'import os\n'), ((608, 641), 'wptools.PhpVariableExtractor.Extractor.extract', 'Extractor.extract', (['wp_config_file'], {}), '(wp_config_file)\n', (625, 641), False, 'from wptools.Ph...
# -*- coding: utf-8 -*- __author__ = 'study_sun' import requests import sys import urllib reload(sys) sys.setdefaultencoding('utf-8') class SBDownloader(object): def download(self, url, cookie=None, headers=None): if url is None: return None if cookie == None: response = re...
[ "urllib.urlretrieve", "sys.setdefaultencoding", "requests.get" ]
[((102, 133), 'sys.setdefaultencoding', 'sys.setdefaultencoding', (['"""utf-8"""'], {}), "('utf-8')\n", (124, 133), False, 'import sys\n'), ((926, 959), 'urllib.urlretrieve', 'urllib.urlretrieve', (['url', 'filename'], {}), '(url, filename)\n', (944, 959), False, 'import urllib\n'), ((318, 352), 'requests.get', 'reques...
# -*- coding: utf-8 -*- """ Created on Mon Apr 30 10:05:09 2018 @author: Administrator """ from sklearn.datasets import load_files from keras.utils import np_utils import numpy as np from glob import glob from keras.preprocessing import image import keras from sklearn.model_selection import train_tes...
[ "keras.preprocessing.image.img_to_array", "keras.layers.Conv2D", "keras.layers.GlobalMaxPooling2D", "keras.layers.MaxPooling2D", "sklearn.datasets.load_files", "numpy.array", "keras.layers.Input", "keras.applications.nasnet.NASNetLarge", "keras.models.Model", "numpy.expand_dims", "keras.layers.D...
[((1811, 1950), 'keras.applications.nasnet.NASNetLarge', 'keras.applications.nasnet.NASNetLarge', ([], {'input_shape': '(331, 331, 3)', 'include_top': '(True)', 'weights': '"""imagenet"""', 'input_tensor': 'None', 'pooling': 'None'}), "(input_shape=(331, 331, 3),\n include_top=True, weights='imagenet', input_tensor=...
from typing import Tuple from hypothesis import given from tests.bind_tests.hints import BoundSweepLineKey from tests.integration_tests.utils import ( are_bound_ported_sweep_line_keys_equal) from tests.port_tests.hints import PortedSweepLineKey from tests.utils import pickle_round_trip from . import strategies ...
[ "hypothesis.given", "tests.utils.pickle_round_trip" ]
[((321, 360), 'hypothesis.given', 'given', (['strategies.sweep_line_keys_pairs'], {}), '(strategies.sweep_line_keys_pairs)\n', (326, 360), False, 'from hypothesis import given\n'), ((598, 622), 'tests.utils.pickle_round_trip', 'pickle_round_trip', (['bound'], {}), '(bound)\n', (615, 622), False, 'from tests.utils impor...
import os import re import numpy as np from parsefchk import parse_fchk LAST_UPDATE = '201706021601' def gen_fchk(mfn, data, ofn='', title=None, suffix='_rlo', overwrite=False): # text: info, energy, coeff, rest # data: energy, coeff, dim if not ofn: t, ext = os.path.splitext(mfn) ofn...
[ "os.path.exists", "numpy.diagonal", "parsefchk.parse_fchk", "os.path.splitext", "numpy.diag", "numpy.zeros" ]
[((612, 627), 'parsefchk.parse_fchk', 'parse_fchk', (['mfn'], {}), '(mfn)\n', (622, 627), False, 'from parsefchk import parse_fchk\n'), ((287, 308), 'os.path.splitext', 'os.path.splitext', (['mfn'], {}), '(mfn)\n', (303, 308), False, 'import os\n'), ((365, 384), 'os.path.exists', 'os.path.exists', (['ofn'], {}), '(ofn)...
import time # **************** Added for robot file execution ***************** # import sys import os sys.path.insert(0, os.path.join(os.path.abspath(__file__), '../../')) # **************** ****************************** ***************** # import common from common import ConditionCheckFailure from utils import meas...
[ "time.sleep", "utils.meas_check.calc_cmrr", "common.watch_shell.quick_start", "utils.meas_check.calc_dr", "common.set_switch", "common.ConditionCheckFailure", "common.test_logger.error", "common.watch_shell.do_disable_electrode_switch", "common.fg.cfg_waveform", "common.messagebox.showinfo", "co...
[((975, 1026), 'common.watch_shell.do_disable_electrode_switch', 'common.watch_shell.do_disable_electrode_switch', (['"""2"""'], {}), "('2')\n", (1021, 1026), False, 'import common\n'), ((1041, 1092), 'common.watch_shell.do_disable_electrode_switch', 'common.watch_shell.do_disable_electrode_switch', (['"""3"""'], {}), ...
from jax import grad as jax_grad from jax import jit class AutoGrad: def __init__(self, loss, indx): self.loss = loss self.indx = indx # The index of paramter with respect to which we need the gradinet in the loss input parameters def gradient_fun(self): self.loss_autograd_fun = jit(jax...
[ "jax.grad" ]
[((317, 347), 'jax.grad', 'jax_grad', (['self.loss', 'self.indx'], {}), '(self.loss, self.indx)\n', (325, 347), True, 'from jax import grad as jax_grad\n')]
import os import pelutils.jsonl as jsonl from pelutils.tests import MainTest class TestJsonl(MainTest): def test_jsonl(self): data = [{ l: v } for l, v in zip(("a", "b", "c"), (1, 2, 3))] path = os.path.join(self.test_dir, "test.jsonl") # Test single block with open(path, "w") as...
[ "pelutils.jsonl.loads", "os.path.join", "pelutils.jsonl.dumps", "pelutils.jsonl.load" ]
[((218, 259), 'os.path.join', 'os.path.join', (['self.test_dir', '"""test.jsonl"""'], {}), "(self.test_dir, 'test.jsonl')\n", (230, 259), False, 'import os\n'), ((836, 853), 'pelutils.jsonl.dumps', 'jsonl.dumps', (['data'], {}), '(data)\n', (847, 853), True, 'import pelutils.jsonl as jsonl\n'), ((433, 446), 'pelutils.j...
import FWCore.ParameterSet.Config as cms import RecoMuon.MuonRechitClusterProducer.cscRechitClusterProducer_cfi as CSCcluster import RecoMuon.MuonRechitClusterProducer.dtRechitClusterProducer_cfi as DTcluster ca4CSCrechitClusters= CSCcluster.cscRechitClusterProducer.clone( recHitLabel = "csc2DRecHits", nRech...
[ "RecoMuon.MuonRechitClusterProducer.dtRechitClusterProducer_cfi.dtRechitClusterProducer.clone", "RecoMuon.MuonRechitClusterProducer.cscRechitClusterProducer_cfi.cscRechitClusterProducer.clone" ]
[((234, 352), 'RecoMuon.MuonRechitClusterProducer.cscRechitClusterProducer_cfi.cscRechitClusterProducer.clone', 'CSCcluster.cscRechitClusterProducer.clone', ([], {'recHitLabel': '"""csc2DRecHits"""', 'nRechitMin': '(50)', 'rParam': '(0.4)', 'nStationThres': '(10)'}), "(recHitLabel='csc2DRecHits',\n nRechitMin=50, rP...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test for admin view.""" from flask import current_app from invenio_accounts impor...
[ "werkzeug.local.LocalProxy" ]
[((508, 573), 'werkzeug.local.LocalProxy', 'LocalProxy', (["(lambda : current_app.extensions['security'].datastore)"], {}), "(lambda : current_app.extensions['security'].datastore)\n", (518, 573), False, 'from werkzeug.local import LocalProxy\n')]
import json, requests from flask import Flask, request, jsonify, redirect from pymongo import MongoClient from keys import * app = Flask(__name__) client = MongoClient(mongodb) # MongoDB access. webhook = hook # Discord webhook for reporting Settings = { 'domain':'https://crying.world', } ...
[ "flask.request.args.get", "json.loads", "requests.post", "flask.Flask", "flask.request.form.get", "flask.redirect", "pymongo.MongoClient", "flask.jsonify" ]
[((135, 150), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (140, 150), False, 'from flask import Flask, request, jsonify, redirect\n'), ((165, 185), 'pymongo.MongoClient', 'MongoClient', (['mongodb'], {}), '(mongodb)\n', (176, 185), False, 'from pymongo import MongoClient\n'), ((490, 529), 'flask.redirec...
import json def convert(path:str): with open(path, 'r') as f: data = json.load(f) output_path = path.replace('convert', 'triplets').replace('json', 'txt') with open(output_path, 'w') as f: for ins in data: temp_ins = [] for a, o in zip(ins['aspects'], ins['opinions']...
[ "json.load" ]
[((82, 94), 'json.load', 'json.load', (['f'], {}), '(f)\n', (91, 94), False, 'import json\n')]
""" Copyright 2017 Platform9 Systems Inc.(http://www.platform9.com) 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...
[ "logging.getLogger", "credsmgrclient.encrypt.ENCRYPTOR.decrypt" ]
[((723, 750), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (740, 750), False, 'import logging\n'), ((1079, 1099), 'credsmgrclient.encrypt.ENCRYPTOR.decrypt', 'ENCRYPTOR.decrypt', (['v'], {}), '(v)\n', (1096, 1099), False, 'from credsmgrclient.encrypt import ENCRYPTOR\n')]
import streamlit as st def select_block_container_style(): """Add selection section for setting setting the max-width and padding of the main block container""" st.sidebar.header("Block Container Style") max_width_100_percent = st.sidebar.checkbox("Max-width: 100%?", False) if not max_width_100_per...
[ "streamlit.markdown", "streamlit.sidebar.header", "streamlit.sidebar.checkbox", "streamlit.sidebar.slider", "streamlit.sidebar.number_input" ]
[((174, 216), 'streamlit.sidebar.header', 'st.sidebar.header', (['"""Block Container Style"""'], {}), "('Block Container Style')\n", (191, 216), True, 'import streamlit as st\n'), ((245, 291), 'streamlit.sidebar.checkbox', 'st.sidebar.checkbox', (['"""Max-width: 100%?"""', '(False)'], {}), "('Max-width: 100%?', False)\...
#Data cleaning print('Processing started...') import sys import pandas as pd import glob as gl import os.path from datetime import datetime #Constants origin1 = 'ICAO Aeródromo Origem' origin2 = 'ICAO Aerodromo Origem' origin3 = 'sg_icao_origem' destination1 = 'ICAO Aeródromo Destino' destination2 = 'ICAO Aerodromo De...
[ "pandas.get_dummies", "datetime.datetime.now", "pandas.to_datetime", "pandas.read_csv" ]
[((824, 882), 'pandas.to_datetime', 'pd.to_datetime', (["df['Depart Prev']"], {'format': '"""%d/%m/%Y %H:%M"""'}), "(df['Depart Prev'], format='%d/%m/%Y %H:%M')\n", (838, 882), True, 'import pandas as pd\n'), ((909, 966), 'pandas.to_datetime', 'pd.to_datetime', (["df['Depart Act']"], {'format': '"""%d/%m/%Y %H:%M"""'})...
#!/usr/bin/env python """Stitch together the same HiRISE color-filter CCDs from an observation to create a single mosaicked image file. This program: - Optionally performs cubenorm processing on each CCD using a training area that has been selected by the user. Cubenorm processing is required whenever radiome...
[ "logging.getLogger", "hiproc.util.main_exceptions", "csv.DictReader", "hiproc.util.conf_check_count", "hiproc.util.parent_parser", "kalasiris.getkey_k", "kalasiris.hiccdstitch", "hiproc.util.path_w_suffix", "sys.exit", "kalasiris.stats", "kalasiris.crop", "hiproc.util.conf_check_bool", "path...
[((3019, 3046), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (3036, 3046), False, 'import logging\n'), ((10805, 10858), 'hiproc.util.set_logger', 'util.set_logger', (['args.verbose', 'args.logfile', 'args.log'], {}), '(args.verbose, args.logfile, args.log)\n', (10820, 10858), True, 'imp...
""" this is from all imports should be originated """ import sys import os PACKAGE_PARENT = ".." CURRENT_PATH = os.getcwd() THIS_FILE_PATH = os.path.expanduser(__file__) JOINED_PATHS = os.path.join(CURRENT_PATH, THIS_FILE_PATH) THIS_FILE_REAL_PATH = os.path.realpath(JOINED_PATHS) THIS_FILE_OS_PATH = os.path.dirname(T...
[ "os.path.join", "os.getcwd", "os.path.realpath", "os.path.dirname", "os.path.normpath", "os.path.expanduser" ]
[((114, 125), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (123, 125), False, 'import os\n'), ((143, 171), 'os.path.expanduser', 'os.path.expanduser', (['__file__'], {}), '(__file__)\n', (161, 171), False, 'import os\n'), ((187, 229), 'os.path.join', 'os.path.join', (['CURRENT_PATH', 'THIS_FILE_PATH'], {}), '(CURRENT_PA...
# This file is part of Cantera. See License.txt in the top-level directory or # at http://www.cantera.org/license.txt for license and copyright information. import os, math,sys if sys.version_info[0] == 3: from tkinter import * from tkinter.filedialog import askopenfilename else: from Tkinter import * ...
[ "os.path.dirname", "os.path.basename", "os.path.splitext", "tkFileDialog.askopenfilename" ]
[((2054, 2167), 'tkFileDialog.askopenfilename', 'askopenfilename', ([], {'filetypes': "[('Reaction Mechanism Files', ('*.inp', '*.mech', '*.ck2')), ('All Files',\n '*.*')]"}), "(filetypes=[('Reaction Mechanism Files', ('*.inp', '*.mech',\n '*.ck2')), ('All Files', '*.*')])\n", (2069, 2167), False, 'from tkFileDia...
from functools import lru_cache from dataclasses import dataclass from typing import List from translator.translator import _ @dataclass class Product: name: str friendly_name: str description: str extended_description: str picture: str technical: List[str] hilights: List[str] products =...
[ "translator.translator._", "functools.lru_cache" ]
[((11308, 11330), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(128)'}), '(maxsize=128)\n', (11317, 11330), False, 'from functools import lru_cache\n'), ((370, 387), 'translator.translator._', '_', (['"""EyePoint P10"""'], {}), "('EyePoint P10')\n", (371, 387), False, 'from translator.translator import _\n'), ...
""" Sina weibo OAuth support. This contribution adds support for sina weibo OAuth service. The settings SINAWEIBO_APP_ID and SINAWEIBO_API_SECRET must be defined with the values given by sina weibo application registration process. Extended permissions are supported by defining SINAWEIBO_EXTENDED_PERMISSIONS setting,...
[ "logging.getLogger", "django.contrib.auth.authenticate", "urllib2.urlopen", "social_auth.utils.sanitize_log_data", "urllib.urlencode" ]
[((528, 555), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (545, 555), False, 'import logging\n'), ((2175, 2216), 'urllib.urlencode', 'urlencode', (["{'access_token': access_token}"], {}), "({'access_token': access_token})\n", (2184, 2216), False, 'from urllib import urlencode\n'), ((32...
from typing import Union import discord from unidecode import unidecode from rapidfuzz import process from discord.ext.commands.converter import Converter, RoleConverter from redbot.core import commands from redbot.core.commands import BadArgument from redbot.core.utils.chat_formatting import inline class ChannelTog...
[ "redbot.core.commands.BadArgument", "unidecode.unidecode" ]
[((517, 616), 'redbot.core.commands.BadArgument', 'BadArgument', (['f"""`{arg} is not a valid channel state. You use provide `true` or `default`."""'], {}), "(\n f'`{arg} is not a valid channel state. You use provide `true` or `default`.'\n )\n", (528, 616), False, 'from redbot.core.commands import BadArgument\n'...
"""Point and Rectangle classes. This code is in the public domain. Point -- point with (x,y) coordinates Rect -- two points, forming a rectangle Taken from https://wiki.python.org/moin/PointsAndRectangles """ import math from typing import Tuple class Point: """A point identified by (x,y) coordinates. s...
[ "math.sqrt" ]
[((2649, 2685), 'math.sqrt', 'math.sqrt', (['(self.x ** 2 + self.y ** 2)'], {}), '(self.x ** 2 + self.y ** 2)\n', (2658, 2685), False, 'import math\n')]
from pickle import load from numpy import array from numpy import argmax from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.models import load_model from nltk.translate.bleu_score import corpus_bleu import sys import pika import os import urllib.parse # Pa...
[ "keras.preprocessing.text.Tokenizer", "keras.models.load_model", "pika.BlockingConnection", "os.environ.get", "pika.PlainCredentials", "numpy.argmax", "pika.BasicProperties", "keras.preprocessing.sequence.pad_sequences" ]
[((372, 437), 'os.environ.get', 'os.environ.get', (['"""CLOUDAMQP_URL"""', '"""amqp://guest:guest@localhost//"""'], {}), "('CLOUDAMQP_URL', 'amqp://guest:guest@localhost//')\n", (386, 437), False, 'import os\n'), ((637, 668), 'pika.BlockingConnection', 'pika.BlockingConnection', (['params'], {}), '(params)\n', (660, 66...
from selfdrive.mapd.lib.geo import DIRECTION, distance_and_bearing, absoule_delta_with_direction, bearing_delta, bearing from common.numpy_fast import interp from selfdrive.config import Conversions as CV import numpy as np import re _ACCEPTABLE_BEARING_DELTA_V = [40., 20., 10., 5.] _ACCEPTABLE_BEARING_DELTA_BP = [30...
[ "selfdrive.mapd.lib.geo.distance_and_bearing", "numpy.amin", "selfdrive.mapd.lib.geo.bearing", "numpy.less_equal", "re.match", "common.numpy_fast.interp", "numpy.array", "selfdrive.mapd.lib.geo.bearing_delta", "numpy.concatenate", "numpy.amax", "numpy.greater_equal" ]
[((3987, 4029), 'numpy.greater_equal', 'np.greater_equal', (['radians', 'self.bbox[0, :]'], {}), '(radians, self.bbox[0, :])\n', (4003, 4029), True, 'import numpy as np\n'), ((4041, 4080), 'numpy.less_equal', 'np.less_equal', (['radians', 'self.bbox[1, :]'], {}), '(radians, self.bbox[1, :])\n', (4054, 4080), True, 'imp...
from . import tools import os from datetime import datetime import logging import matplotlib.cm as mplcm import matplotlib.pyplot as plt import numpy as np from ipywidgets import Layout import ipywidgets as widgets from IPython.display import display import cv2 DEFAULT_EXTENSIONS = ['jpg', 'png', 'tif', 'iff', '...
[ "logging.getLogger", "IPython.display.display", "ipywidgets.FloatText", "ipywidgets.VBox", "numpy.hstack", "ipywidgets.Tab", "ipywidgets.Dropdown", "ipywidgets.BoundedIntText", "ipywidgets.FloatSlider", "matplotlib.pyplot.imshow", "os.path.exists", "ipywidgets.HBox", "os.listdir", "ipywidg...
[((1281, 1308), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1298, 1308), False, 'import logging\n'), ((3710, 3781), 'cv2.findContours', 'cv2.findContours', (['target_binary', 'cv2.RETR_TREE', 'cv2.CHAIN_APPROX_SIMPLE'], {}), '(target_binary, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)\n',...
import sys import os from PyQt5.QtWidgets import QApplication from PyQt5.QtWidgets import QTextEdit from PyQt5.QtWidgets import QWidget from PyQt5.QtWidgets import QPushButton from PyQt5.QtWidgets import QVBoxLayout from PyQt5.QtWidgets import QHBoxLayout from PyQt5.QtWidgets import QFileDialog from PyQt5.QtWidge...
[ "PyQt5.QtWidgets.QTextEdit", "os.getenv", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QAction", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidgets.QPushButton" ]
[((523, 538), 'PyQt5.QtWidgets.QTextEdit', 'QTextEdit', (['self'], {}), '(self)\n', (532, 538), False, 'from PyQt5.QtWidgets import QTextEdit\n'), ((565, 586), 'PyQt5.QtWidgets.QPushButton', 'QPushButton', (['"""Borrar"""'], {}), "('Borrar')\n", (576, 586), False, 'from PyQt5.QtWidgets import QPushButton\n'), ((614, 63...
import opendbpy as odb import os current_dir = os.path.dirname(os.path.realpath(__file__)) tests_dir = os.path.abspath(os.path.join(current_dir, os.pardir)) opendb_dir = os.path.abspath(os.path.join(tests_dir, os.pardir)) data_dir = os.path.join(tests_dir, "data") db = odb.dbDatabase.create() odb.read_lef(db, os.pat...
[ "opendbpy.write_db", "os.path.join", "os.path.realpath", "opendbpy.db_diff", "opendbpy.dbDatabase.create", "opendbpy.read_db" ]
[((235, 266), 'os.path.join', 'os.path.join', (['tests_dir', '"""data"""'], {}), "(tests_dir, 'data')\n", (247, 266), False, 'import os\n'), ((273, 296), 'opendbpy.dbDatabase.create', 'odb.dbDatabase.create', ([], {}), '()\n', (294, 296), True, 'import opendbpy as odb\n'), ((736, 786), 'os.path.join', 'os.path.join', (...
import os from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base DEBUG = False db_name = os.path.join( os.path.dirname( os.path.abspath(__file__)), 'db_server.sqlite') db_engine = 'sqlite:///{}?check_same_threa...
[ "sqlalchemy.orm.sessionmaker", "sqlalchemy.create_engine", "os.path.abspath", "sqlalchemy.ext.declarative.declarative_base" ]
[((355, 391), 'sqlalchemy.create_engine', 'create_engine', (['db_engine'], {'echo': 'DEBUG'}), '(db_engine, echo=DEBUG)\n', (368, 391), False, 'from sqlalchemy import create_engine\n'), ((400, 418), 'sqlalchemy.ext.declarative.declarative_base', 'declarative_base', ([], {}), '()\n', (416, 418), False, 'from sqlalchemy....
import pickle some_data = [ "a list", "containing", 5, "values including another list", ["inner", "list"], ] with open("pickled_list", "wb") as file: pickle.dump(some_data, file) with open("pickled_list", "rb") as file: loaded_data = pickle.load(file) print(loaded_data) assert loaded_dat...
[ "pickle.load", "pickle.dump" ]
[((176, 204), 'pickle.dump', 'pickle.dump', (['some_data', 'file'], {}), '(some_data, file)\n', (187, 204), False, 'import pickle\n'), ((265, 282), 'pickle.load', 'pickle.load', (['file'], {}), '(file)\n', (276, 282), False, 'import pickle\n'), ((408, 431), 'pickle.dump', 'pickle.dump', (['data', 'file'], {}), '(data, ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-20 03:34 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='CartIt...
[ "django.db.models.AutoField", "django.db.models.IntegerField" ]
[((369, 462), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (385, 462), False, 'from django.db import migrations, models\...
#Copyright (c) 2021 <NAME> import subprocess import os dir='D:\\D\\usr' os.chdir(dir) def dirrem(adir): dirs=os.listdir(adir) for d in dirs: try: p=os.path.join(adir,d) print(p) cmd='cmd /c del /F /Q /S '+p proc=subprocess.Popen(cmd,stdin=s...
[ "os.listdir", "subprocess.Popen", "os.path.join", "os.chdir", "os.path.isdir" ]
[((78, 91), 'os.chdir', 'os.chdir', (['dir'], {}), '(dir)\n', (86, 91), False, 'import os\n'), ((123, 139), 'os.listdir', 'os.listdir', (['adir'], {}), '(adir)\n', (133, 139), False, 'import os\n'), ((189, 210), 'os.path.join', 'os.path.join', (['adir', 'd'], {}), '(adir, d)\n', (201, 210), False, 'import os\n'), ((292...
import sys from typing import List, cast from pkcs11 import PublicKey, lib, Token, Session from pkcs11.util.rsa import encode_rsa_public_key from Crypto.PublicKey import RSA lib = lib('/Library/OpenSC/lib/opensc-pkcs11.so') def get_tokens() -> List[Token]: return list(lib.get_tokens()) def get_auth_pubkey(ses...
[ "Crypto.PublicKey.RSA.importKey", "pkcs11.lib", "pkcs11.lib.get_tokens", "pkcs11.util.rsa.encode_rsa_public_key" ]
[((182, 225), 'pkcs11.lib', 'lib', (['"""/Library/OpenSC/lib/opensc-pkcs11.so"""'], {}), "('/Library/OpenSC/lib/opensc-pkcs11.so')\n", (185, 225), False, 'from pkcs11 import PublicKey, lib, Token, Session\n'), ((587, 616), 'pkcs11.util.rsa.encode_rsa_public_key', 'encode_rsa_public_key', (['pubkey'], {}), '(pubkey)\n',...
import os import caffe import numpy as np import skimage import tensorflow as tf from Preprocessor import Preprocessor from datasets.ImageNet import ImageNet from models.AlexNetConverter import AlexNetConverter from models.SDNet import SDNet from train.SDNetTrainer import SDNetTrainer im_s = 227 def preprocess(img...
[ "datasets.ImageNet.ImageNet", "numpy.copy", "Preprocessor.Preprocessor", "os.path.join", "numpy.linalg.norm", "skimage.io.imread", "models.AlexNetConverter.AlexNetConverter", "train.SDNetTrainer.SDNetTrainer", "numpy.random.seed", "models.SDNet.SDNet", "caffe.Net", "tensorflow.constant", "sk...
[((946, 1033), 'models.SDNet.SDNet', 'SDNet', ([], {'num_layers': '(5)', 'target_shape': '[im_s, im_s, 3]', 'batch_size': '(16)', 'disc_pad': '"""VALID"""'}), "(num_layers=5, target_shape=[im_s, im_s, 3], batch_size=16, disc_pad=\n 'VALID')\n", (951, 1033), False, 'from models.SDNet import SDNet\n'), ((1036, 1046), ...
# Copyright 2022 <NAME>. All rights reserved. from ya3_report import cli if __name__ == "__main__": cli.main()
[ "ya3_report.cli.main" ]
[((105, 115), 'ya3_report.cli.main', 'cli.main', ([], {}), '()\n', (113, 115), False, 'from ya3_report import cli\n')]
from asyncio.futures import Future import pytest from double_check.backends.ramos import configure_ramos @pytest.fixture(autouse=True) def config_ramos(): configure_ramos() @pytest.fixture def setup_future(): def setup(result=None): future = Future() future.set_result(result) retur...
[ "pytest.fixture", "double_check.backends.ramos.configure_ramos", "asyncio.futures.Future" ]
[((110, 138), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (124, 138), False, 'import pytest\n'), ((163, 180), 'double_check.backends.ramos.configure_ramos', 'configure_ramos', ([], {}), '()\n', (178, 180), False, 'from double_check.backends.ramos import configure_ramos\n'), ((26...
#!/usr/bin/env python # <NAME> # Speech # Import management linux system module import sys as sys import os as os import speech_recognition as sr from utility import Utility class VoiceSpeech: def __init__(self): r = sr.Recognizer() with sr.Microphone() as source: print("Say something...
[ "speech_recognition.Recognizer", "speech_recognition.Microphone" ]
[((232, 247), 'speech_recognition.Recognizer', 'sr.Recognizer', ([], {}), '()\n', (245, 247), True, 'import speech_recognition as sr\n'), ((261, 276), 'speech_recognition.Microphone', 'sr.Microphone', ([], {}), '()\n', (274, 276), True, 'import speech_recognition as sr\n')]
from polecat.utils.config import Config from polecat.utils.optiondict import Option from polecat.utils.proxy import Proxy class RootConfig(Config): debug = (bool, False) log_sql = (bool, False) jwt_secret = str database_url = str def mount_config(config, path): segments = path.split('.') cur...
[ "polecat.utils.optiondict.Option" ]
[((794, 822), 'polecat.utils.optiondict.Option', 'Option', (['segments[-1]', 'config'], {}), '(segments[-1], config)\n', (800, 822), False, 'from polecat.utils.optiondict import Option\n')]
''' 间接平差 main.py ''' import pandas as pd import numpy as np import sys np.set_printoptions(threshold=sys.maxsize) #print显示完整array from gnssnet import * import math def Save2Excel(mats,name): data = pd.DataFrame(mats) writer = pd.ExcelWriter("C:\\Users\\sheld\\Desktop\\111\\"+ "间接平差的" +name + ".xlsx")...
[ "numpy.linalg.matrix_rank", "pandas.ExcelWriter", "math.sqrt", "numpy.dot", "numpy.zeros", "pandas.DataFrame", "numpy.matrix", "numpy.set_printoptions" ]
[((72, 114), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'threshold': 'sys.maxsize'}), '(threshold=sys.maxsize)\n', (91, 114), True, 'import numpy as np\n'), ((1115, 1144), 'numpy.zeros', 'np.zeros', (['[n, n]'], {'dtype': 'float'}), '([n, n], dtype=float)\n', (1123, 1144), True, 'import numpy as np\n'), ((1...
import argparse import json import time import sys,os, copy import tensorflow as tf import numpy as np # sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from competitor.common.paths import RESULTS_DIR from competitor.models.loader import load_model, load_env from competitor.heurist...
[ "os.path.exists", "competitor.heuristics.loader.load_heuristics", "tensorflow.reset_default_graph", "argparse.ArgumentParser", "os.makedirs", "competitor.models.loader.load_env", "competitor.recourse.search.SequenceSearch", "tensorflow.Session", "os.path.join", "numpy.argmax", "numpy.array", "...
[((760, 785), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (783, 785), False, 'import argparse\n'), ((6955, 6966), 'time.time', 'time.time', ([], {}), '()\n', (6964, 6966), False, 'import time\n'), ((7382, 7400), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (7398, 7400), False, '...
# -*- coding: utf-8 -*- from common.base_test import BaseTest from project import TESTRPC_URL import lemoncheesecake.api as lcc import requests from lemoncheesecake.matching import ( check_that, equal_to, greater_than, has_length, is_false, is_integer, is_list, is_none, is_true, not_equal_to, require_that, re...
[ "lemoncheesecake.matching.is_false", "lemoncheesecake.matching.has_length", "requests.post", "lemoncheesecake.api.depends_on", "lemoncheesecake.matching.equal_to", "lemoncheesecake.matching.is_true", "lemoncheesecake.api.tags", "lemoncheesecake.api.suite", "lemoncheesecake.matching.greater_than", ...
[((418, 442), 'lemoncheesecake.api.prop', 'lcc.prop', (['"""main"""', '"""type"""'], {}), "('main', 'type')\n", (426, 442), True, 'import lemoncheesecake.api as lcc\n'), ((444, 464), 'lemoncheesecake.api.tags', 'lcc.tags', (['"""test_rpc"""'], {}), "('test_rpc')\n", (452, 464), True, 'import lemoncheesecake.api as lcc\...
import sys import pandas as pd import numpy as np # read data genes = pd.unique(pd.read_csv('./genes.txt')['gene']) pd_raw = pd.read_csv('raw_data.txt', sep='\t', names=['Antibiotic', 'Gene']) pd_raw = pd_raw.dropna() # process data antibiotics = [] knowledge = [] for _, row in pd_raw.iterrows(): knowledge.append(...
[ "pandas.DataFrame", "pandas.read_csv" ]
[((126, 193), 'pandas.read_csv', 'pd.read_csv', (['"""raw_data.txt"""'], {'sep': '"""\t"""', 'names': "['Antibiotic', 'Gene']"}), "('raw_data.txt', sep='\\t', names=['Antibiotic', 'Gene'])\n", (137, 193), True, 'import pandas as pd\n'), ((785, 850), 'pandas.DataFrame', 'pd.DataFrame', (['triples'], {'columns': "['Subje...
# Copyright 2019 United Kingdom Research and Innovation # Author: <NAME> (<EMAIL>) """Architecture-aware wrap for a dense matrix. """ import numpy class AMatrix: def __init__(self, a, arch='cpu', copy_data=False): self.__arch = arch self.__gpu = None if arch[:3] == 'gpu': t...
[ "numpy.amax", "numpy.amin" ]
[((949, 962), 'numpy.amin', 'numpy.amin', (['a'], {}), '(a)\n', (959, 962), False, 'import numpy\n'), ((978, 991), 'numpy.amax', 'numpy.amax', (['a'], {}), '(a)\n', (988, 991), False, 'import numpy\n')]
import time import RPi.GPIO as GPIO ## Import GPIO library GPIO.setmode(GPIO.BOARD) ## Use board pin numbering GPIO.setup(3, GPIO.OUT) GPIO.setup(5, GPIO.OUT) def fanl(): GPIO.output(5,GPIO.LOW) def fanh(): GPIO.output(5,GPIO.HIGH) def lightl(): GPIO.output(3,GPIO.LOW) def lighth(): GPIO.out...
[ "RPi.GPIO.setup", "RPi.GPIO.output", "RPi.GPIO.setmode" ]
[((65, 89), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BOARD'], {}), '(GPIO.BOARD)\n', (77, 89), True, 'import RPi.GPIO as GPIO\n'), ((122, 145), 'RPi.GPIO.setup', 'GPIO.setup', (['(3)', 'GPIO.OUT'], {}), '(3, GPIO.OUT)\n', (132, 145), True, 'import RPi.GPIO as GPIO\n'), ((146, 169), 'RPi.GPIO.setup', 'GPIO.setup', ([...
#!/usr/bin/env python import csv from textwrap import fill from jinja2 import Template from pprint import pprint stig_csv = 'rhel6stig.csv' def reindent(string_to_indent, numSpaces): s = string_to_indent.splitlines() s = [(numSpaces * ' ') + line.lstrip() for line in s] return '\n'.join(s) rst_template =...
[ "textwrap.fill", "csv.reader", "jinja2.Template" ]
[((1187, 1206), 'csv.reader', 'csv.reader', (['csvfile'], {}), '(csvfile)\n', (1197, 1206), False, 'import csv\n'), ((1623, 1645), 'jinja2.Template', 'Template', (['rst_template'], {}), '(rst_template)\n', (1631, 1645), False, 'from jinja2 import Template\n'), ((1462, 1484), 'textwrap.fill', 'fill', (['row[3]'], {'widt...
import numpy as np import tensorflow as tf from keras.preprocessing.image import load_img import matplotlib.pyplot as plt IMG_SIZE = 64 SAVE_PATH = "C:\\Users\\schaefer\\Desktop\\ML\\vehicle-detection\\save\\model" IMG_PATH = "data/vehicles/1.png" img = load_img(IMG_PATH, target_size=(IMG_SIZE, IMG_SIZE)) img = np....
[ "matplotlib.pyplot.imshow", "numpy.asarray", "keras.preprocessing.image.load_img", "tensorflow.keras.models.load_model", "matplotlib.pyplot.show" ]
[((257, 309), 'keras.preprocessing.image.load_img', 'load_img', (['IMG_PATH'], {'target_size': '(IMG_SIZE, IMG_SIZE)'}), '(IMG_PATH, target_size=(IMG_SIZE, IMG_SIZE))\n', (265, 309), False, 'from keras.preprocessing.image import load_img\n'), ((317, 332), 'numpy.asarray', 'np.asarray', (['img'], {}), '(img)\n', (327, 3...
#!/usr/bin/env python # # Copyright 2016 Medoly # # 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 agr...
[ "jinja2.FileSystemBytecodeCache", "jinja2.FileSystemLoader" ]
[((1824, 1869), 'jinja2.FileSystemBytecodeCache', 'FileSystemBytecodeCache', ([], {'directory': 'cache_path'}), '(directory=cache_path)\n', (1847, 1869), False, 'from jinja2 import Environment, FileSystemLoader, FileSystemBytecodeCache\n'), ((1908, 1937), 'jinja2.FileSystemLoader', 'FileSystemLoader', (['directories'],...
from os.path import dirname, abspath, join import pandas as pd import sqlite3 import sys import matplotlib.pyplot as plt import json from datetime import timedelta from dateutil import parser class MV: """ Residential MV for demand response. Baseline is calculated using 10 day average power. """ def ...
[ "dateutil.parser.parse", "matplotlib.pyplot.savefig", "pandas.read_csv", "matplotlib.pyplot.close", "json.load", "matplotlib.pyplot.tight_layout", "sys.exit", "pandas.DataFrame", "datetime.timedelta", "matplotlib.pyplot.subplot", "pandas.to_datetime" ]
[((3468, 3499), 'pandas.to_datetime', 'pd.to_datetime', (['df[self.ts_col]'], {}), '(df[self.ts_col])\n', (3482, 3499), True, 'import pandas as pd\n'), ((4362, 4394), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': 'df.columns'}), '(columns=df.columns)\n', (4374, 4394), True, 'import pandas as pd\n'), ((4415, 4447...
import cv2 as cv import numpy as np import time from timeit import repeat from multiprocessing import Pool import threading backSub = cv.createBackgroundSubtractorMOG2() # list to store clicked coordinates coords = [] # cut the given frame and rect with np array of coords def cut_image(frame, rect, pts): x,y,w...
[ "cv2.createBackgroundSubtractorMOG2", "cv2.drawContours", "cv2.bitwise_and", "numpy.asarray", "numpy.zeros", "cv2.connectedComponentsWithStats", "threading.Thread", "cv2.samples.findFileOrKeep", "cv2.GaussianBlur", "time.time", "cv2.boundingRect" ]
[((138, 173), 'cv2.createBackgroundSubtractorMOG2', 'cv.createBackgroundSubtractorMOG2', ([], {}), '()\n', (171, 173), True, 'import cv2 as cv\n'), ((448, 484), 'numpy.zeros', 'np.zeros', (['croped.shape[:2]', 'np.uint8'], {}), '(croped.shape[:2], np.uint8)\n', (456, 484), True, 'import numpy as np\n'), ((489, 554), 'c...
import numpy as np import random from BoxProposing_utils import * import scipy.spatial.distance as ssd class BoxProposalModule(object): def __init__(self, *args, **kwargs): self.MinimapRatio = kwargs.get('MinimapRatio', 2) # we down-sample the normal boundary map to save computation cost self.min_b...
[ "random.shuffle", "numpy.ones", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.concatenate", "random.random", "numpy.zeros_like", "random.randint", "numpy.arange", "numpy.random.shuffle" ]
[((4774, 4792), 'random.shuffle', 'random.shuffle', (['hs'], {}), '(hs)\n', (4788, 4792), False, 'import random\n'), ((4937, 4955), 'random.shuffle', 'random.shuffle', (['ws'], {}), '(ws)\n', (4951, 4955), False, 'import random\n'), ((5903, 5928), 'random.shuffle', 'random.shuffle', (['Proposals'], {}), '(Proposals)\n'...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Test for the MDF import os import os.path import sys sys.path.append(os.path.join(os.path.dirname(__file__),"..")) from schema import Range,Variable,Table from census_spec_scanner import CensusSpec TEST_FNAME = os.path.join(os.path.dirname(__file__), "docx_test/test_fil...
[ "os.path.dirname", "census_spec_scanner.CensusSpec" ]
[((274, 299), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (289, 299), False, 'import os\n'), ((369, 381), 'census_spec_scanner.CensusSpec', 'CensusSpec', ([], {}), '()\n', (379, 381), False, 'from census_spec_scanner import CensusSpec\n'), ((130, 155), 'os.path.dirname', 'os.path.dirname',...
from uuid import uuid4 from typing import Tuple, List from pathlib import Path import pendulum import pandas as pd import random from tqdm import tqdm from fhir.resources.reference import Reference from fhir.resources.patient import Patient from fhir.resources.humanname import HumanName class PatientGenerator: d...
[ "random.choice", "pathlib.Path", "fhir.resources.humanname.HumanName", "fhir.resources.reference.Reference", "uuid.uuid4", "random.choices", "pendulum.duration", "pendulum.now", "pandas.date_range", "fhir.resources.patient.Patient" ]
[((1952, 2009), 'fhir.resources.humanname.HumanName', 'HumanName', ([], {}), "(**{'family': last_name, 'given': [first_name]})\n", (1961, 2009), False, 'from fhir.resources.humanname import HumanName\n'), ((2414, 2437), 'fhir.resources.patient.Patient', 'Patient', ([], {}), '(**patient_dict)\n', (2421, 2437), False, 'f...
import subprocess import sys config_dir_path = None history_file_path = None log_file_path = None def open(path): if sys.platform == 'darwin': subprocess.Popen(['open', path]) elif sys.platform == 'win32': subprocess.Popen(['start', '', path]) else: subprocess.Popen(['xdg-open', p...
[ "subprocess.Popen" ]
[((158, 190), 'subprocess.Popen', 'subprocess.Popen', (["['open', path]"], {}), "(['open', path])\n", (174, 190), False, 'import subprocess\n'), ((233, 270), 'subprocess.Popen', 'subprocess.Popen', (["['start', '', path]"], {}), "(['start', '', path])\n", (249, 270), False, 'import subprocess\n'), ((289, 325), 'subproc...
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil 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 # # Unles...
[ "core.optimizer.Optimizer", "numpy.abs", "modules.packer.Packer", "numpy.random.rand", "core.data_types.Uint32", "core.data_types.QUANTIZED_NOT_PACKED", "core.data_types.Float32", "numpy.array", "core.graph.Graph", "numpy.sign", "unittest.main" ]
[((20968, 20983), 'unittest.main', 'unittest.main', ([], {}), '()\n', (20981, 20983), False, 'import unittest\n'), ((1370, 1396), 'numpy.random.rand', 'np.random.rand', (['(3)', '(2)', '(2)', '(3)'], {}), '(3, 2, 2, 3)\n', (1384, 1396), True, 'import numpy as np\n'), ((1413, 1439), 'numpy.random.rand', 'np.random.rand'...
# -*- encoding: utf-8 -*- # Copyright (c) 2017 Servionica LTD # # Authors: <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 # # ...
[ "apscheduler.util.maybe_ref", "sqlalchemy.Table", "watcher.common.service.ServiceHeartbeat.get_service_name", "watcher.common.context.make_context", "sqlalchemy.MetaData", "apscheduler.jobstores.base.ConflictingIdError", "sqlalchemy.select", "oslo_serialization.jsonutils.dumps", "apscheduler.util.da...
[((2238, 2301), 'sqlalchemy.Table', 'Table', (['tablename', 'metadata'], {'autoload': '(True)', 'autoload_with': 'engine'}), '(tablename, metadata, autoload=True, autoload_with=engine)\n', (2243, 2301), False, 'from sqlalchemy import Table, MetaData, select, and_\n'), ((2354, 2397), 'watcher.common.service.ServiceHeart...
from django.shortcuts import render, get_object_or_404 from django.http import JsonResponse from django.contrib.contenttypes.models import ContentType from django.contrib.auth.decorators import login_required from .models import LibraryDocument, OnlineCourse, VideoResource from allauth.account.decorators import verif...
[ "django.shortcuts.render", "django.http.JsonResponse" ]
[((819, 875), 'django.shortcuts.render', 'render', (['request', '"""library_documents/index.html"""', 'context'], {}), "(request, 'library_documents/index.html', context)\n", (825, 875), False, 'from django.shortcuts import render, get_object_or_404\n'), ((1555, 1594), 'django.shortcuts.render', 'render', (['request', ...
# Generated by Django 2.2 on 2019-05-07 22:10 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('staff', '0005_auto_20190507_2135'), ('holidays', '0004_auto_20190507_2131'), ] operations = [ migrati...
[ "django.db.models.DateField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((415, 508), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (431, 508), False, 'from django.db import migrations, models\...
############################################################################### # Script for generating results from paper ############################################################################### import subprocess import matplotlib.pyplot as plt import os, sys sizes = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512,...
[ "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "os.getcwd", "matplotlib.pyplot.title", "matplotlib.pyplot.xscale", "matplotlib.pyplot.show" ]
[((732, 766), 'matplotlib.pyplot.title', 'plt.title', (['"""Update Every K-th Int"""'], {}), "('Update Every K-th Int')\n", (741, 766), True, 'import matplotlib.pyplot as plt\n'), ((767, 782), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""K"""'], {}), "('K')\n", (777, 782), True, 'import matplotlib.pyplot as plt\n'),...
# -*- coding: utf-8 -*- """ Money class unittests """ import unittest from money import Money from money.money import BABEL_AVAILABLE from .mixins import * class TestMoneyClass(ClassMixin, unittest.TestCase): MoneyClass = Money class TestMoneyRepresentations(RepresentationsMixin, unittest.TestCase): MoneyCl...
[ "unittest.skipUnless" ]
[((334, 388), 'unittest.skipUnless', 'unittest.skipUnless', (['BABEL_AVAILABLE', '"""requires Babel"""'], {}), "(BABEL_AVAILABLE, 'requires Babel')\n", (353, 388), False, 'import unittest\n')]
from sklearn.metrics import confusion_matrix import seaborn as sns import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression import numpy as np df = pd.read_csv("data.csv") age = df["variance"] heart_attack = d...
[ "pandas.read_csv", "matplotlib.pyplot.show", "sklearn.model_selection.train_test_split", "seaborn.heatmap", "sklearn.linear_model.LogisticRegression", "matplotlib.pyplot.subplot", "sklearn.metrics.confusion_matrix" ]
[((257, 280), 'pandas.read_csv', 'pd.read_csv', (['"""data.csv"""'], {}), "('data.csv')\n", (268, 280), True, 'import pandas as pd\n'), ((373, 440), 'sklearn.model_selection.train_test_split', 'train_test_split', (['age', 'heart_attack'], {'test_size': '(0.25)', 'random_state': '(0)'}), '(age, heart_attack, test_size=0...
from lib import log from lib.log import exception, warning from version import VERSION_FOR_BUG_REPORTS from paths import CLIENT_LOG_PATH log.set_version(VERSION_FOR_BUG_REPORTS) log.add_secure_file_handler(CLIENT_LOG_PATH, "w") log.add_http_handler("http://jlpo.free.fr/soundrts/metaserver") log.add_console_handler() i...
[ "res.worlds_multi", "res.campaigns", "lib.log.add_console_handler", "webbrowser.open", "lib.log.exception", "clientmenu.Menu", "clientmenu.input_string", "clientserver.connect_and_play", "os.path.exists", "os.listdir", "definitions.style.get", "game.TrainingGame", "lib.log.warning", "lib.l...
[((137, 177), 'lib.log.set_version', 'log.set_version', (['VERSION_FOR_BUG_REPORTS'], {}), '(VERSION_FOR_BUG_REPORTS)\n', (152, 177), False, 'from lib import log\n'), ((178, 227), 'lib.log.add_secure_file_handler', 'log.add_secure_file_handler', (['CLIENT_LOG_PATH', '"""w"""'], {}), "(CLIENT_LOG_PATH, 'w')\n", (205, 22...
from lib import sdk import json, requests_mock s = sdk.SDK() def test_version(requests_mock): requests_mock.get("http://localhost/version", json='{"version":"0.15.0"}') v = s.version() assert "0.15.0" == json.loads(v)["version"]
[ "lib.sdk.SDK", "json.loads", "requests_mock.get" ]
[((53, 62), 'lib.sdk.SDK', 'sdk.SDK', ([], {}), '()\n', (60, 62), False, 'from lib import sdk\n'), ((102, 176), 'requests_mock.get', 'requests_mock.get', (['"""http://localhost/version"""'], {'json': '"""{"version":"0.15.0"}"""'}), '(\'http://localhost/version\', json=\'{"version":"0.15.0"}\')\n', (119, 176), False, 'i...
# Distributed with a free-will license. # Use it any way you want, profit or free, provided it fits in the licenses of its associated works. # MCP9808 # This code is designed to work with the MCP9808_I2CS I2C Mini Module available from ControlEverything.com. # https://www.controleverything.com/content/Temperature?sku=M...
[ "smbus.SMBus" ]
[((569, 583), 'smbus.SMBus', 'smbus.SMBus', (['(1)'], {}), '(1)\n', (580, 583), False, 'import smbus\n')]
from django.contrib.gis import admin from .models import (Photographer, PhotoSubcategory, Photo, PhotoFlag, PhotoCategory) from django.utils.safestring import mark_safe from django.contrib.admin import SimpleListFilter from django.contrib.gis.db import models from django.urls.base import reverse fr...
[ "django.urls.base.reverse", "django.utils.html.escape", "django.utils.safestring.mark_safe", "django.contrib.gis.admin.register" ]
[((469, 494), 'django.contrib.gis.admin.register', 'admin.register', (['PhotoFlag'], {}), '(PhotoFlag)\n', (483, 494), False, 'from django.contrib.gis import admin\n'), ((926, 958), 'django.contrib.gis.admin.register', 'admin.register', (['PhotoSubcategory'], {}), '(PhotoSubcategory)\n', (940, 958), False, 'from django...
from packaging import version from .code_cell import Cell from .nbresult import NbResult from .nbglobals import push_globals from .cell_conductor import * import os import sys import errno import warnings import nbformat SUPPORTED_LANGUAGES = [ "python" ] PYTHON_MIN_REQ = "3.5" KNOWN_NBFORMAT = 4 class Noteb...
[ "os.path.isfile", "nbformat.read", "packaging.version.parse", "os.strerror" ]
[((1074, 1107), 'nbformat.read', 'nbformat.read', (['fp', 'KNOWN_NBFORMAT'], {}), '(fp, KNOWN_NBFORMAT)\n', (1087, 1107), False, 'import nbformat\n'), ((636, 660), 'os.path.isfile', 'os.path.isfile', (['filename'], {}), '(filename)\n', (650, 660), False, 'import os\n'), ((1309, 1367), 'packaging.version.parse', 'versio...
import cocotb import random from cocotb.clock import Clock from cocotb.result import TestSuccess from cocotb.triggers import RisingEdge from queue import Queue from poseidon_python import finite_field as ff from cocotb_test import simulator CASES_NUM = 2000 # the number of test cases class MontgomeryMultFlowTester:...
[ "cocotb.test", "cocotb_test.simulator.run", "cocotb.triggers.RisingEdge", "cocotb.clock.Clock", "queue.Queue", "random.randint" ]
[((2411, 2462), 'cocotb.test', 'cocotb.test', ([], {'timeout_time': '(300000)', 'timeout_unit': '"""ns"""'}), "(timeout_time=300000, timeout_unit='ns')\n", (2422, 2462), False, 'import cocotb\n'), ((2936, 3171), 'cocotb_test.simulator.run', 'simulator.run', ([], {'verilog_sources': "['../main/verilog/MontMultiplierPipe...
import chainer import chainer.functions as F import chainer.links as L from chainer import optimizers, cuda, serializers, Variable, initializers, Chain from chainer.functions.connection import convolution_2d from chainer.links.connection.convolution_2d import Convolution2D from chainer.functions.connection import deco...
[ "chainer.functions.connection.linear.linear", "chainer.functions.connection.deconvolution_2d.deconvolution_2d", "numpy.linalg.svd", "chainer.functions.connection.convolution_2d.convolution_2d", "chainer.Parameter", "chainer.functions.array.transpose.transpose" ]
[((2679, 2754), 'chainer.functions.connection.convolution_2d.convolution_2d', 'convolution_2d.convolution_2d', (['x', 'self.W_bar', 'self.b', 'self.stride', 'self.pad'], {}), '(x, self.W_bar, self.b, self.stride, self.pad)\n', (2708, 2754), False, 'from chainer.functions.connection import convolution_2d\n'), ((4429, 45...
"""This module provides classes for performing syntactic aggregation. For example, 'Roman is programming.' and 'Roman is singing' can be put together to create 'Roman is programming and singing.' """ import logging from copy import deepcopy from nlglib.features import NUMBER, category from nlglib.macroplanning imp...
[ "nlglib.macroplanning.Document", "nlglib.macroplanning.Paragraph", "logging.getLogger", "copy.deepcopy" ]
[((2353, 2379), 'nlglib.macroplanning.Document', 'Document', (['title', '*sections'], {}), '(title, *sections)\n', (2361, 2379), False, 'from nlglib.macroplanning import Document, Paragraph\n'), ((2682, 2702), 'nlglib.macroplanning.Paragraph', 'Paragraph', (['*messages'], {}), '(*messages)\n', (2691, 2702), False, 'fro...
#!/usr/bin/env python # Copyright <NAME> 2006. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from Pyste import pyste pyste.main()
[ "Pyste.pyste.main" ]
[((224, 236), 'Pyste.pyste.main', 'pyste.main', ([], {}), '()\n', (234, 236), False, 'from Pyste import pyste\n')]
"""This is a general purpose module containing routines (a) that are used in multiple notebooks; or (b) that are complicated and would thus otherwise clutter notebook design. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import re import socket ######...
[ "tensorflow.compat.v2.keras.losses.SparseCategoricalCrossentropy", "tensorflow.compat.v2.keras.layers.Dense", "tensorflow.compat.v2.keras.models.Model", "socket.getfqdn", "re.compile", "tensorflow.compat.v2.keras.layers.Input", "tensorflow.compat.v2.enable_v2_behavior" ]
[((667, 690), 'tensorflow.compat.v2.enable_v2_behavior', 'tf.enable_v2_behavior', ([], {}), '()\n', (688, 690), True, 'import tensorflow.compat.v2 as tf\n'), ((1652, 1668), 'socket.getfqdn', 'socket.getfqdn', ([], {}), '()\n', (1666, 1668), False, 'import socket\n'), ((1920, 1983), 'tensorflow.compat.v2.keras.losses.Sp...
from django.shortcuts import render, redirect from .models import * from django.http import HttpResponseRedirect # UPLOAD def index(request): # Handle file upload if request.method == 'POST': # print('request', request.FILES) newdoc = Document( docfile=request.FILES['docfile'], ...
[ "django.shortcuts.render", "django.http.HttpResponseRedirect" ]
[((590, 628), 'django.shortcuts.render', 'render', (['request', '"""index.html"""', 'context'], {}), "(request, 'index.html', context)\n", (596, 628), False, 'from django.shortcuts import render, redirect\n'), ((487, 512), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""/"""'], {}), "('/')\n", (507, 5...
# Copyright 2021 The Tensorflow Authors. # # 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...
[ "tensorflow.keras.layers.Conv2D", "tensorflow.keras.callbacks.TensorBoard", "tensorflow.keras.layers.MaxPooling2D", "absl.flags.DEFINE_integer", "tensorflow.keras.layers.Flatten", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "os.environ.get", "absl.app.run", "tensorflow.keras.datasets.ci...
[((951, 996), 'os.environ.get', 'os.environ.get', (['"""AIP_TENSORBOARD_LOG_DIR"""', '""""""'], {}), "('AIP_TENSORBOARD_LOG_DIR', '')\n", (965, 996), False, 'import os\n'), ((1018, 1061), 'absl.flags.DEFINE_integer', 'flags.DEFINE_integer', (['"""epochs"""', '(5)', '"""epochs"""'], {}), "('epochs', 5, 'epochs')\n", (10...
# coding: utf-8 """ Tools to work with variables. """ __all__ = ["Variable"] import six from order.unique import UniqueObject from order.mixins import CopyMixin, AuxDataMixin, TagMixin, SelectionMixin from order.util import ROOT_DEFAULT, typed, to_root_latex, make_list class Variable(UniqueObject, CopyMixin, Au...
[ "order.mixins.TagMixin.__init__", "order.util.to_root_latex", "order.mixins.AuxDataMixin.__init__", "order.mixins.CopyMixin.__init__", "order.mixins.SelectionMixin.__init__", "order.unique.UniqueObject.__init__", "order.util.make_list" ]
[((5853, 5907), 'order.unique.UniqueObject.__init__', 'UniqueObject.__init__', (['self', 'name', 'id'], {'context': 'context'}), '(self, name, id, context=context)\n', (5874, 5907), False, 'from order.unique import UniqueObject\n'), ((5916, 5940), 'order.mixins.CopyMixin.__init__', 'CopyMixin.__init__', (['self'], {}),...
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-08 09:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Person...
[ "django.db.models.AutoField", "django.db.models.CharField" ]
[((367, 460), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (383, 460), False, 'from django.db import migrations, models\...
from ppadb.client import Client from PIL import Image from algo import minimax import math import numpy as np from time import sleep from tabulate import tabulate # red is 1 # yellow is 2 YELLOW = (255, 243, 0) RED = (222, 0, 0) X0, Y0 = (84, 633) DELTA = 94 ROWS, COLS = (6, 7) EMPTY = 0 PLAYER_PIECE = 1 AI_PIECE = ...
[ "numpy.flip", "tabulate.tabulate", "PIL.Image.open", "time.sleep", "algo.minimax", "numpy.array", "ppadb.client.Client" ]
[((2996, 3031), 'ppadb.client.Client', 'Client', ([], {'host': '"""127.0.0.1"""', 'port': '(5037)'}), "(host='127.0.0.1', port=5037)\n", (3002, 3031), False, 'from ppadb.client import Client\n'), ((624, 632), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (629, 632), False, 'from time import sleep\n'), ((1643, 1671), '...
from src.bph_co2.solver import CO2_Simulation, ppm_to_mg_m3, mg_m3_to_ppm from src.bph_co2.timeseries import Timeseries from src.bph_co2.window import Window try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `importlib_resources`. import importlib_resources as p...
[ "src.bph_co2.solver.CO2_Simulation", "src.bph_co2.solver.ppm_to_mg_m3", "src.bph_co2.window.Window", "src.bph_co2.timeseries.Timeseries.from_csv", "importlib_resources.path" ]
[((420, 436), 'src.bph_co2.solver.ppm_to_mg_m3', 'ppm_to_mg_m3', (['c0'], {}), '(c0)\n', (432, 436), False, 'from src.bph_co2.solver import CO2_Simulation, ppm_to_mg_m3, mg_m3_to_ppm\n'), ((1235, 1305), 'src.bph_co2.timeseries.Timeseries.from_csv', 'Timeseries.from_csv', (['persons_filename'], {'interpolation_scheme': ...
#!/usr/bin/env python from bs4 import BeautifulSoup from collections import namedtuple import argparse import re import requests Court = namedtuple('Court', ['id', 'name']) Hit = namedtuple('Hit', ['court_name', 'num_links']) _list_of_courts = [] def _get_links_from_page(page_url, regex_pattern): html_doc = re...
[ "collections.namedtuple", "argparse.ArgumentParser", "re.compile", "requests.get", "bs4.BeautifulSoup" ]
[((139, 174), 'collections.namedtuple', 'namedtuple', (['"""Court"""', "['id', 'name']"], {}), "('Court', ['id', 'name'])\n", (149, 174), False, 'from collections import namedtuple\n'), ((181, 227), 'collections.namedtuple', 'namedtuple', (['"""Hit"""', "['court_name', 'num_links']"], {}), "('Hit', ['court_name', 'num_...
import numpy as np import unittest from specklepy.io.filearchive import FileArchive from specklepy.core.alignment import FrameAlignment from specklepy.plotting.utils import imshow class TestAlignment(unittest.TestCase): def setUp(self): self.path = 'specklepy/tests/files/' self.files = FileArchi...
[ "specklepy.io.filearchive.FileArchive", "numpy.ones", "specklepy.core.alignment.FrameAlignment", "specklepy.plotting.utils.imshow", "unittest.main" ]
[((1171, 1186), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1184, 1186), False, 'import unittest\n'), ((570, 586), 'specklepy.core.alignment.FrameAlignment', 'FrameAlignment', ([], {}), '()\n', (584, 586), False, 'from specklepy.core.alignment import FrameAlignment\n'), ((688, 704), 'specklepy.core.alignment.F...
import time from pathlib import Path from definitions import DATA_DIR, OUTPUT_DIR class PathUtil: """ provide a way to get a path of some common objects """ @classmethod def log_file(cls, log_file_name="test_log"): """ 获取一个可以写log的文件名 :param log_file_name: :return:...
[ "time.localtime", "pathlib.Path" ]
[((1007, 1021), 'pathlib.Path', 'Path', (['DATA_DIR'], {}), '(DATA_DIR)\n', (1011, 1021), False, 'from pathlib import Path\n'), ((1314, 1328), 'pathlib.Path', 'Path', (['DATA_DIR'], {}), '(DATA_DIR)\n', (1318, 1328), False, 'from pathlib import Path\n'), ((358, 374), 'pathlib.Path', 'Path', (['OUTPUT_DIR'], {}), '(OUTP...
#12/13/2018 #This script determines the dependency graph for a simple set of "A before B" type data # and adds a timing component to determine the total process time from collections import defaultdict input = open("day07input.txt") #Note, if using the test data set, change the default value of the dict to 0 (from 60...
[ "collections.defaultdict" ]
[((455, 472), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (466, 472), False, 'from collections import defaultdict\n')]
import ngram_utils import json import os from typing import List, Tuple from collections import defaultdict from io import StringIO class GramCollection: def __init__(self, description, contents, total): self.description: str = description self.contents: List[Tuple[str, int]] = contents se...
[ "os.listdir", "os.path.join", "os.fsencode", "collections.defaultdict", "ngram_utils.compute_distance", "json.load", "ngram_utils.range_ngrams", "io.StringIO", "ngram_utils.compactify", "json.dump" ]
[((2780, 2809), 'os.fsencode', 'os.fsencode', (['"""./models_json/"""'], {}), "('./models_json/')\n", (2791, 2809), False, 'import os\n'), ((2826, 2846), 'os.listdir', 'os.listdir', (['json_dir'], {}), '(json_dir)\n', (2836, 2846), False, 'import os\n'), ((522, 536), 'io.StringIO', 'StringIO', (['text'], {}), '(text)\n...
#!/usr/bin/env python3 # Copyright 2018 The MLPerf Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ "os.path.exists", "configparser.ConfigParser", "argparse.ArgumentParser", "re.compile", "lib.run_server", "subprocess.Popen", "socket.socket", "subprocess.run", "time.time", "base64.b64encode", "time.sleep", "logging.exception", "os.remove", "logging.error", "logging.info", "lib.init",...
[((974, 1166), 're.compile', 're.compile', (['"""^\n Time, [^,]*,\n Watts, [^,]*,\n Volts, (?P<v> [^,]* ),\n Amps, (?P<a> [^,]* ),\n .*,\n Mark, (?P<mark> [^,]* )\n $"""', 're.X'], {}), '(\n """^\n Time, [^,]*,\n Watts, [^,]*,\n Volts, (?P<v> [^,]...
import numpy as np import featureflow as ff import zounds from torch import nn import torch from torch.autograd import Variable import argparse import glob import os from pytorch_wgan2 import \ BaseGenerator, BaseCritic, CriticLayer, GeneratorLayer, FinalGeneratorLayer from scipy.signal import resample, tukey from...
[ "numpy.hanning", "zounds.Milliseconds", "zounds.WassersteinGanTrainer", "numpy.fft.irfft", "zounds.FrequencyDimension", "torch.from_numpy", "torch.nn.BatchNorm1d", "zounds.AudioSamples", "zounds.AWeighting", "zounds.ArrayWithUnits", "zounds.PhatDrumLoops", "zounds.resampled", "featureflow.Pi...
[((440, 456), 'zounds.SR11025', 'zounds.SR11025', ([], {}), '()\n', (454, 456), False, 'import zounds\n'), ((469, 531), 'zounds.resampled', 'zounds.resampled', ([], {'resample_to': 'samplerate', 'store_resampled': '(True)'}), '(resample_to=samplerate, store_resampled=True)\n', (485, 531), False, 'import zounds\n'), ((1...
# Copyright (c) 2012-2018 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the COPYING file. import os import sys from setuptools import setup, find_packages if (sys.version_info.major, sys.version_info.minor) != (2, 7): sys.exit("Error: q...
[ "setuptools.find_packages", "os.path.join", "sys.exit", "os.walk", "os.path.relpath" ]
[((302, 354), 'sys.exit', 'sys.exit', (['"""Error: qibuild only works with Python2.7"""'], {}), "('Error: qibuild only works with Python2.7')\n", (310, 354), False, 'import sys\n'), ((478, 494), 'os.walk', 'os.walk', (['"""cmake"""'], {}), "('cmake')\n", (485, 494), False, 'import os\n'), ((515, 545), 'os.path.relpath'...
from django.shortcuts import get_object_or_404, get_list_or_404 from django.http import Http404 from django.db.models import Q from django.contrib.postgres.search import SearchQuery from django.utils import timezone from rest_framework.views import APIView from rest_framework.response import Response from rest_framewo...
[ "utils.utils.dictHas", "functools.reduce", "django.shortcuts.get_object_or_404", "django.shortcuts.get_list_or_404", "utils.utils.paginate", "rest_framework.response.Response", "utils.utils.dictHasExact", "django.db.models.Q", "re.sub", "datetime.timedelta", "re.search" ]
[((862, 889), 'datetime.timedelta', 'datetime.timedelta', ([], {'hours': '(1)'}), '(hours=1)\n', (880, 889), False, 'import operator, re, random, datetime\n'), ((2332, 2335), 'django.db.models.Q', 'Q', ([], {}), '()\n', (2333, 2335), False, 'from django.db.models import Q\n'), ((2681, 2684), 'django.db.models.Q', 'Q', ...
"""Caso de uso: PasswordHash""" import bcrypt from mitmirror.domain.usecases import PasswordHashInterface class PasswordHash(PasswordHashInterface): """Classe responsavel por realizar o hash de senhas de usuarios""" @staticmethod def hash(password: str) -> str: """Realiza o procesos de hash da se...
[ "bcrypt.gensalt" ]
[((384, 400), 'bcrypt.gensalt', 'bcrypt.gensalt', ([], {}), '()\n', (398, 400), False, 'import bcrypt\n')]
import tensorflow as tf import hyperchamber as hc from hypergan.losses.base_loss import BaseLoss class LogisticLoss(BaseLoss): def _create(self, d_real, d_fake): config = self.config d_loss = tf.nn.softplus(-d_real) + tf.nn.softplus(d_fake) g_loss = tf.nn.softplus(-d_fake) retur...
[ "tensorflow.nn.softplus" ]
[((282, 305), 'tensorflow.nn.softplus', 'tf.nn.softplus', (['(-d_fake)'], {}), '(-d_fake)\n', (296, 305), True, 'import tensorflow as tf\n'), ((216, 239), 'tensorflow.nn.softplus', 'tf.nn.softplus', (['(-d_real)'], {}), '(-d_real)\n', (230, 239), True, 'import tensorflow as tf\n'), ((242, 264), 'tensorflow.nn.softplus'...
#!/usr/bin/env python3 import setuptools with open('README.md', 'r') as f: long_description = f.read() setuptools.setup( name='iwag', version=0.1, scripts=[], author='failsafe89', author_email='', description='(I Want A Gui) Cross platform, pure python GUI library built on top of pydish',...
[ "setuptools.find_packages" ]
[((470, 496), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (494, 496), False, 'import setuptools\n')]
import os from installed_clients.DataFileUtilClient import DataFileUtil class genelistutil: def __init__(self): self.callback_url = os.environ['SDK_CALLBACK_URL'] self.dfu = DataFileUtil(self.callback_url) pass def download_genelist(self, genelistref, genesetfile): get_objects_params = {'o...
[ "installed_clients.DataFileUtilClient.DataFileUtil" ]
[((189, 220), 'installed_clients.DataFileUtilClient.DataFileUtil', 'DataFileUtil', (['self.callback_url'], {}), '(self.callback_url)\n', (201, 220), False, 'from installed_clients.DataFileUtilClient import DataFileUtil\n')]
from __future__ import print_function from datetime import datetime from airflow.models import Variable from bitcoinetl.build_export_dag import build_export_dag start_date = Variable.get('zcash_export_start_date', '2016-10-28') # When searching for DAGs, Airflow will only consider files where the string “airflow” a...
[ "datetime.datetime.strptime", "airflow.models.Variable.get" ]
[((178, 231), 'airflow.models.Variable.get', 'Variable.get', (['"""zcash_export_start_date"""', '"""2016-10-28"""'], {}), "('zcash_export_start_date', '2016-10-28')\n", (190, 231), False, 'from airflow.models import Variable\n'), ((448, 482), 'airflow.models.Variable.get', 'Variable.get', (['"""zcash_provider_uri"""'],...
import argparse import time import serial from tqdm import tqdm def get_parsed_args(): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(title="Operation to perform", dest="operation") program_parser = subparsers.add_parser("program") dump_parser = subparsers.add_parser("dump") ...
[ "argparse.FileType", "time.sleep", "serial.Serial", "argparse.ArgumentParser" ]
[((103, 128), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (126, 128), False, 'import argparse\n'), ((1838, 1870), 'serial.Serial', 'serial.Serial', (['args.port', '(115200)'], {}), '(args.port, 115200)\n', (1851, 1870), False, 'import serial\n'), ((2068, 2081), 'time.sleep', 'time.sleep', ([...
import importlib import site from abc import abstractmethod from typing import ( TYPE_CHECKING, Any, Iterable, Iterator, List, Optional, Set, Tuple, Type, Union, cast, ) import django.core.checks from rest_framework.serializers import ModelSerializer, Serializer from ..ast....
[ "typing.cast", "rest_framework.serializers.Serializer.__subclasses__", "rest_framework.serializers.ModelSerializer.__subclasses__", "importlib.import_module" ]
[((2856, 2893), 'importlib.import_module', 'importlib.import_module', (['s.__module__'], {}), '(s.__module__)\n', (2879, 2893), False, 'import importlib\n'), ((3552, 3615), 'typing.cast', 'cast', (['Iterator[Type[ModelSerializer]]', 'model_serializer_classes'], {}), '(Iterator[Type[ModelSerializer]], model_serializer_c...
from test_fena.test_common import test_cmd def test_effects(): test_cmd("effect @a - *", "effect clear @a") test_cmd("effect @a - saturation", "effect clear @a minecraft:saturation") test_cmd("effect @a + saturation", "effect give @a minecraft:satura...
[ "test_fena.test_common.test_cmd" ]
[((68, 112), 'test_fena.test_common.test_cmd', 'test_cmd', (['"""effect @a - *"""', '"""effect clear @a"""'], {}), "('effect @a - *', 'effect clear @a')\n", (76, 112), False, 'from test_fena.test_common import test_cmd\n'), ((142, 216), 'test_fena.test_common.test_cmd', 'test_cmd', (['"""effect @a - saturation"""', '""...
import tempfile import pytest from pylarky.starlarky import evaluate, FailedEvaluation def test_evaluation(): starlark_script = """ def modify(): return {"body": ctx["body"], "headers": {"accept": "json", "content": "still-json"}} modify() """ script_file = tempfile.NamedTemporaryFile(mode='w+') scri...
[ "pylarky.starlarky.evaluate", "pytest.raises", "tempfile.NamedTemporaryFile" ]
[((273, 311), 'tempfile.NamedTemporaryFile', 'tempfile.NamedTemporaryFile', ([], {'mode': '"""w+"""'}), "(mode='w+')\n", (300, 311), False, 'import tempfile\n'), ((404, 526), 'pylarky.starlarky.evaluate', 'evaluate', (['script_file.name', '"""ctx = {"body": "thisisabody", "headers": {"accept": "xml", "content": "still-...
#!/usr/bin/env python from collections import defaultdict import numpy as np from nltk.corpus import reuters def analyze_data_distribution(cat2count): i = 1 most_frequent_words = sorted(cat2count.items(), key=lambda n: n[1]['train'], reverse=...
[ "reuters.load_data", "reuters.fileids", "reuters.words", "numpy.array", "collections.defaultdict" ]
[((690, 706), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (701, 706), False, 'from collections import defaultdict\n'), ((2361, 2378), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (2372, 2378), False, 'from collections import defaultdict\n'), ((2897, 2913), 'collections.d...
import numpy as np import sys import trisectEdge_171122 as tse import circumcenterSphTri_171123 as ccs import array_tool_171125 as art from scipy.spatial import Delaunay import freeBoundary_171112 as frb ''' v0.3 Nov. 29, 2017 - add Test_trisectTri() v0.2 Nov. 26, 2017 - use np.concatenate() instead of my own conc...
[ "circumcenterSphTri_171123.circumcenterSphTri", "numpy.array", "numpy.sum", "freeBoundary_171112.find_freeBoundary", "numpy.concatenate", "numpy.genfromtxt", "trisectEdge_171122.trisectEdge", "array_tool_171125.get_unique_rows", "scipy.spatial.Delaunay" ]
[((1056, 1092), 'numpy.concatenate', 'np.concatenate', (['(v1, v2, v3)'], {'axis': '(0)'}), '((v1, v2, v3), axis=0)\n', (1070, 1092), True, 'import numpy as np\n'), ((1169, 1201), 'circumcenterSphTri_171123.circumcenterSphTri', 'ccs.circumcenterSphTri', (['tris', 'xs'], {}), '(tris, xs)\n', (1191, 1201), True, 'import ...
# -*- coding: UTF-8 -*- """ This module provides a class for storing properties of points (and therefore also for lines). Properties for points are the same as logs, except there is only one value, not a list of values. They are both derived from the :class:`~geological_toolbox.abstract_log.AbstractLogClass`. """ impo...
[ "geological_toolbox.abstract_log.AbstractLogClass.__repr__", "geological_toolbox.db_handler.AbstractDBObject.__str__", "sqlalchemy.VARCHAR", "sqlalchemy.ForeignKey", "sqlalchemy.Sequence", "sqlalchemy.Column", "geological_toolbox.abstract_log.AbstractLogClass.__init__" ]
[((1359, 1389), 'sqlalchemy.Column', 'sq.Column', (['sq.TEXT'], {'default': '""""""'}), "(sq.TEXT, default='')\n", (1368, 1389), True, 'import sqlalchemy as sq\n'), ((1150, 1182), 'sqlalchemy.Sequence', 'sq.Sequence', (['"""properties_id_seq"""'], {}), "('properties_id_seq')\n", (1161, 1182), True, 'import sqlalchemy a...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
[ "pulumi.getter", "pulumi.set", "pulumi.ResourceOptions", "pulumi.get" ]
[((3736, 3769), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""parseTestId"""'}), "(name='parseTestId')\n", (3749, 3769), False, 'import pulumi\n'), ((4131, 4169), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""parseTestOptions"""'}), "(name='parseTestOptions')\n", (4144, 4169), False, 'import pulumi\n'), ((4...