code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from contextlib import contextmanager import torch.nn.functional as F import torch.nn as nn import torch import math # Initializes a layer with normally-distributed weights. def normal_weights(layer): classname = layer.__class__.__name__ if classname.find('Linear') != -1: n = layer.in_features ...
[ "torch.nn.ReLU", "math.sqrt", "torch.manual_seed", "torch.nn.BatchNorm1d", "torch.nn.Linear", "torch.no_grad" ]
[((550, 573), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (567, 573), False, 'import torch\n'), ((331, 343), 'math.sqrt', 'math.sqrt', (['n'], {}), '(n)\n', (340, 343), False, 'import math\n'), ((951, 993), 'torch.nn.Linear', 'nn.Linear', (['state_val_net_layer_dims[-1]', '(1)'], {}), '(state_...
############################################################################## # # Copyright (c) 2017 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
[ "OFS.PropertyManager.PropertyManager", "ZPublisher.utils.fix_properties", "ZPublisher.utils.safe_unicode" ]
[((795, 814), 'ZPublisher.utils.safe_unicode', 'safe_unicode', (['value'], {}), '(value)\n', (807, 814), False, 'from ZPublisher.utils import safe_unicode\n'), ((2792, 2809), 'OFS.PropertyManager.PropertyManager', 'PropertyManager', ([], {}), '()\n', (2807, 2809), False, 'from OFS.PropertyManager import PropertyManager...
import random from random import randint from app import app from models import ( db, Actor, Movie, Role, ETHNICITY_TYPE, HAIR_COLOR_TYPE, BODY_TYPE, GENDER_TYPE, EYE_COLOR_TYPE ) PHONES = [ '+1-202-555-0169', '+1-202-555-0125', '+1-202-555-0133', '+1-202-555-0143',...
[ "models.Role", "models.Movie", "random.randint", "random.choice", "models.Actor" ]
[((774, 866), 'models.Movie', 'Movie', ([], {'title': 'title', 'release_date': 'release_date', 'company': 'company', 'description': 'description'}), '(title=title, release_date=release_date, company=company, description=\n description)\n', (779, 866), False, 'from models import db, Actor, Movie, Role, ETHNICITY_TYPE...
import logging import numpy as np from .dataset import DataSet from .markers import markers_to_events def sliding_window_indices(window_size, window_step, sig_len): '''Returns indices for a sliding window with shape [nwindows x window_size]''' nwindows = int(np.floor((sig_len - window_size + window_step) / f...
[ "numpy.fft.rfft", "numpy.abs", "numpy.log2", "numpy.asarray", "numpy.zeros", "numpy.argsort", "numpy.diff", "numpy.arange", "numpy.hanning", "logging.getLogger" ]
[((627, 645), 'numpy.asarray', 'np.asarray', (['signal'], {}), '(signal)\n', (637, 645), True, 'import numpy as np\n'), ((1364, 1389), 'numpy.fft.rfft', 'np.fft.rfft', (['wins'], {'axis': '(1)'}), '(wins, axis=1)\n', (1375, 1389), True, 'import numpy as np\n'), ((4481, 4491), 'numpy.log2', 'np.log2', (['N'], {}), '(N)\...
from boa3.neo.cryptography import hash160 from boa3.neo.vm.type.String import String from boa3_test.tests.boa_test import BoaTest from boa3_test.tests.test_classes.testengine import TestEngine class TestClass(BoaTest): default_folder: str = 'test_sc/class_test' def test_notification_get_variables(self): ...
[ "boa3.neo.vm.type.String.String", "boa3_test.tests.test_classes.testengine.TestEngine", "boa3.neo.cryptography.hash160" ]
[((459, 474), 'boa3.neo.cryptography.hash160', 'hash160', (['output'], {}), '(output)\n', (466, 474), False, 'from boa3.neo.cryptography import hash160\n'), ((493, 505), 'boa3_test.tests.test_classes.testengine.TestEngine', 'TestEngine', ([], {}), '()\n', (503, 505), False, 'from boa3_test.tests.test_classes.testengine...
# Generated by Django 3.0.8 on 2020-09-13 18:33 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('auctions', '0001_initial'), ] operations = [ migrations.CreateModel( ...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.FloatField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField" ]
[((394, 487), '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", (410, 487), False, 'from django.db import migrations, models\...
# -*- coding: utf-8 -*- """ Created on Mon Nov 2 01:28:58 2020 """ import unittest from htsinfer.read_motif_v6 import find_overlaps class Test_Inputs(unittest.TestCase): def test_call(self): # 0 arguments, not acceptable with self.assertRaises(TypeError): find_overlaps() # 1...
[ "unittest.main", "htsinfer.read_motif_v6.find_overlaps" ]
[((6663, 6678), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6676, 6678), False, 'import unittest\n'), ((584, 610), 'htsinfer.read_motif_v6.find_overlaps', 'find_overlaps', (['"""A"""', '"""A"""', '(1)'], {}), "('A', 'A', 1)\n", (597, 610), False, 'from htsinfer.read_motif_v6 import find_overlaps\n'), ((619, 65...
# todo 13. Jogo da palavra embaralhada. Desenvolva um jogo em que o usuário tenha que adivinhar uma palavra que será mostrada com as letras embaralhadas. O programa terá uma lista de palavras lidas de um arquivo texto e escolherá uma aleatoriamente. O jogador terá seis tentativas para adivinhar a palavra. Ao final a p...
[ "random.shuffle", "random.choice", "os.system" ]
[((663, 676), 'os.system', 'system', (['"""cls"""'], {}), "('cls')\n", (669, 676), False, 'from os import system\n'), ((741, 755), 'random.shuffle', 'shuffle', (['lista'], {}), '(lista)\n', (748, 755), False, 'from random import shuffle, choice\n'), ((608, 621), 'random.choice', 'choice', (['words'], {}), '(words)\n', ...
""" This module contains all the required backend stuff (logic) required to handle and download from the wallpaper website. URL signature looks like: https://wall.alphacoders.com/search.php?search={searchKey}&page={PageNo} The website may internally store some popular keywords like 'spiderman' in collections and...
[ "threading.Thread", "os.makedirs", "os.path.basename", "os.path.getsize", "requests.Session", "os.path.exists", "time.time", "threading.Lock", "exceptions.MaxRetriesCrossed", "exceptions.SearchReturnedNone", "bs4.BeautifulSoup", "logging.getLogger" ]
[((628, 664), 'logging.getLogger', 'logging.getLogger', (['"""main.downloader"""'], {}), "('main.downloader')\n", (645, 664), False, 'import os, sys, logging, time\n'), ((1745, 1761), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (1759, 1761), False, 'import threading, requests, bs4\n'), ((1829, 1847), 'request...
from enigma import ePicLoad, eTimer, eWindowAnimationSet, eFloatAnimation, eLinearInterpolator, eWindowAnimationManager, ePixmap, eActionMap, getDesktop from Components.config import config from Components.ActionMap import ActionMap from Components.GUIComponent import GUIComponent from Components.Pixmap import Pixmap f...
[ "enigma.eWindowAnimationManager.setAnimationSet", "Tools.Log.Log.i", "enigma.eActionMap.getInstance", "Components.config.config.plugins.screensaver.photo.speed.removeNotifier", "enigma.getDesktop", "enigma.eFloatAnimation.create", "Components.config.config.plugins.screensaver.photo.speed.addNotifier", ...
[((531, 570), 'Components.Pixmap.Pixmap.postWidgetCreate', 'Pixmap.postWidgetCreate', (['self', 'instance'], {}), '(self, instance)\n', (554, 570), False, 'from Components.Pixmap import Pixmap\n'), ((1155, 1185), 'Screens.Screen.Screen.__init__', 'Screen.__init__', (['self', 'session'], {}), '(self, session)\n', (1170,...
from common import SUNNY, CLOUDY, RAINY, SNOWY """ MATRIX = " MINUSACHTNOLL" + \ "EINZWOIVIERDRÜ" + \ "ZWÖLFNÜN FÖFÜF" + \ "ESEBENSÄCHSEIS" + \ "DRISGIVIERTELF" + \ "ZWÄNZGZÄHKOMMA" + \ "VORAB ESCHALBI" + \ "ELFI R...
[ "time.time" ]
[((9473, 9484), 'time.time', 'time.time', ([], {}), '()\n', (9482, 9484), False, 'import time\n'), ((9682, 9693), 'time.time', 'time.time', ([], {}), '()\n', (9691, 9693), False, 'import time\n')]
#!/usr/bin/env python3 from setuptools import setup setup( packages = ['ARIMA','LSTM'] )
[ "setuptools.setup" ]
[((52, 85), 'setuptools.setup', 'setup', ([], {'packages': "['ARIMA', 'LSTM']"}), "(packages=['ARIMA', 'LSTM'])\n", (57, 85), False, 'from setuptools import setup\n')]
# coding: utf-8 '''CLONE DATASETS – <NAME> – Esri Canada 2017 Creates new datasets (feature classes, tables, or relationship classes plus domains) using existing datasets as templates''' # All literal strings will be Unicode instead of bytes from __future__ import unicode_literals # Import modules import arcpy ## I...
[ "arcpy.CreateFeatureclass_management", "arcpy.CreateRelationshipClass_management", "arcpy.GetParameterAsText", "arcpy.TableToRelationshipClass_management", "arcpy.Describe", "arcpy.management.SetValueForRangeDomain", "arcpy.management.AddCodedValueToDomain", "arcpy.da.ListDomains", "arcpy.CreateTabl...
[((3862, 3884), 'arcpy.Describe', 'arcpy.Describe', (['outGDB'], {}), '(outGDB)\n', (3876, 3884), False, 'import arcpy\n'), ((8276, 8297), 'arcpy.Exists', 'arcpy.Exists', (['dataset'], {}), '(dataset)\n', (8288, 8297), False, 'import arcpy\n'), ((8999, 9026), 'arcpy.GetParameterAsText', 'arcpy.GetParameterAsText', (['(...
import click @click.group('delete') @click.pass_obj def delete(ctx): """Delete Azure DevOps resources""" @delete.command('repo') @click.option('-p', '--project', 'project', help='Project name or id the repository in') @click.argument('repository_names', nargs=-1, required=True) @click.pass_obj def...
[ "click.argument", "click.confirm", "click.option", "click.echo", "click.UsageError", "click.group" ]
[((16, 37), 'click.group', 'click.group', (['"""delete"""'], {}), "('delete')\n", (27, 37), False, 'import click\n'), ((138, 230), 'click.option', 'click.option', (['"""-p"""', '"""--project"""', '"""project"""'], {'help': '"""Project name or id the repository in"""'}), "('-p', '--project', 'project', help=\n 'Proje...
import tensorflow.keras import tensorflow.keras.models import tensorflow.keras.layers import tensorflow.keras.regularizers import json def model_skeleton_from_simple_config_file(config_filename): with open(config_filename) as f: configuration = json.load(f) return model_skeleton_from_simple_confi...
[ "json.load" ]
[((260, 272), 'json.load', 'json.load', (['f'], {}), '(f)\n', (269, 272), False, 'import json\n')]
#!/usr/bin/python3 from db_query import DBQuery from trigger import Trigger import time import os service_interval=list(map(float,os.environ["SERVICE_INTERVAL"].split(","))) office=list(map(float, os.environ["OFFICE"].split(","))) dbhost=os.environ["DBHOST"] class ImbalanceTrigger(Trigger): def __init__(self): ...
[ "db_query.DBQuery", "time.sleep" ]
[((385, 437), 'db_query.DBQuery', 'DBQuery', ([], {'index': '"""sensors"""', 'office': 'office', 'host': 'dbhost'}), "(index='sensors', office=office, host=dbhost)\n", (392, 437), False, 'from db_query import DBQuery\n'), ((454, 509), 'db_query.DBQuery', 'DBQuery', ([], {'index': '"""algorithms"""', 'office': 'office',...
from SimulatorExceptions import ValueOutOfRangeException class BoundedInteger: def __init__(self, minimum, maximum, default): assert (minimum <= maximum) assert (default >= minimum) assert (default <= maximum) self.minimum = minimum self.maximum = maximum self.defa...
[ "SimulatorExceptions.ValueOutOfRangeException" ]
[((665, 696), 'SimulatorExceptions.ValueOutOfRangeException', 'ValueOutOfRangeException', (['value'], {}), '(value)\n', (689, 696), False, 'from SimulatorExceptions import ValueOutOfRangeException\n')]
# Copyright (c) 2017 Cloudbase Solutions Srl # # 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 ...
[ "coriolisclient.exceptions.CoriolisException", "coriolisclient.exceptions.EndpointConnectionValidationFailed", "json.loads" ]
[((3136, 3244), 'coriolisclient.exceptions.CoriolisException', 'exceptions.CoriolisException', (['"""Please specify either --connection or --connection-secret, but not both"""'], {}), "(\n 'Please specify either --connection or --connection-secret, but not both')\n", (3164, 3244), False, 'from coriolisclient import ...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'about.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
[ "PyQt5.QtWidgets.QTextBrowser", "PyQt5.QtWidgets.QLabel", "PyQt5.QtGui.QIcon", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtCore.QSize", "PyQt5.QtGui.QFont", "PyQt5.QtWidgets.QSpacerItem", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtGui.QPixmap", "PyQt5.QtCore.QMetaObject.c...
[((627, 640), 'PyQt5.QtGui.QIcon', 'QtGui.QIcon', ([], {}), '()\n', (638, 640), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((848, 883), 'PyQt5.QtWidgets.QVBoxLayout', 'QtWidgets.QVBoxLayout', (['about_dialog'], {}), '(about_dialog)\n', (869, 883), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((9...
from flask import request, jsonify from server import app from server.database import * from server.utils import json_abort, list_exists, has_json from server.models import * # MARK: Task routes @app.route('/api/lists/<string:list_id>/tasks', methods=['GET']) @list_exists def get_tasks(list_id): response = {} ...
[ "server.app.route", "flask.jsonify", "flask.request.get_json", "server.utils.json_abort" ]
[((198, 261), 'server.app.route', 'app.route', (['"""/api/lists/<string:list_id>/tasks"""'], {'methods': "['GET']"}), "('/api/lists/<string:list_id>/tasks', methods=['GET'])\n", (207, 261), False, 'from server import app\n'), ((440, 504), 'server.app.route', 'app.route', (['"""/api/lists/<string:list_id>/tasks"""'], {'...
from config import * from flask import Flask, request app = Flask(__name__) @app.route('/ping', methods=['GET', 'POST']) def index(): if request.method == 'GET': print('received a get request') else: print(request.json()) return b'success', 200
[ "flask.request.json", "flask.Flask" ]
[((62, 77), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (67, 77), False, 'from flask import Flask, request\n'), ((234, 248), 'flask.request.json', 'request.json', ([], {}), '()\n', (246, 248), False, 'from flask import Flask, request\n')]
from directory_components.mixins import CountryDisplayMixin, GA360Mixin from django.views.generic import TemplateView from django.views.generic.edit import FormView from django.urls import reverse_lazy from django.conf import settings from contact import forms from core.mixins import LocalisedURLsMixin, InvestEnableT...
[ "django.urls.reverse_lazy" ]
[((743, 774), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""contact-success"""'], {}), "('contact-success')\n", (755, 774), False, 'from django.urls import reverse_lazy\n')]
import tkinter as tk chlamydia_info = """ General Facts A common sexually transmitted infection caused by the bacteria Chlamydia trachomatis. The infection is transmitted through vaginal, oral, and anal unprotected sex. It can be passed on from an infected mother to the child during childbirth. ...
[ "tkinter.Button", "tkinter.Toplevel", "tkinter.Label", "tkinter.Tk" ]
[((6539, 6546), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (6544, 6546), True, 'import tkinter as tk\n'), ((2941, 2965), 'tkinter.Toplevel', 'tk.Toplevel', (['main_window'], {}), '(main_window)\n', (2952, 2965), True, 'import tkinter as tk\n'), ((3019, 3076), 'tkinter.Label', 'tk.Label', (['window'], {'text': 'chlamydia_...
from meta_requests.utils.request import * from tests.utils import get_response_with_text def test_response_detect_blocking_messages(): blocked_message: str = "You got blocked" text = get_response_with_text(blocked_message) assert response_detect_blocking_messages(text, [blocked_message])
[ "tests.utils.get_response_with_text" ]
[((193, 232), 'tests.utils.get_response_with_text', 'get_response_with_text', (['blocked_message'], {}), '(blocked_message)\n', (215, 232), False, 'from tests.utils import get_response_with_text\n')]
import pandas as pd import numpy as np from GPfates import GPfates etpm = pd.read_table('tapio_tcell_tpm.txt', index_col=0) etpm = etpm[(etpm > 2).sum(1) > 2] logexp = np.log10(etpm + 1) tcells = pd.read_csv('tcells_rebuttal.csv', index_col=0) m = GPfates.GPfates(tcells, logexp) # m.dimensionality_reduction() # # ...
[ "pandas.read_csv", "GPfates.GPfates.GPfates", "GPfates.GPfates.plt.show", "pandas.read_table", "numpy.log10" ]
[((76, 125), 'pandas.read_table', 'pd.read_table', (['"""tapio_tcell_tpm.txt"""'], {'index_col': '(0)'}), "('tapio_tcell_tpm.txt', index_col=0)\n", (89, 125), True, 'import pandas as pd\n'), ((170, 188), 'numpy.log10', 'np.log10', (['(etpm + 1)'], {}), '(etpm + 1)\n', (178, 188), True, 'import numpy as np\n'), ((199, 2...
# $Id$ # # Copyright (C) 2003 <NAME> and Rational Discovery LLC # All Rights Reserved # """ functionality to allow adjusting composite model contents """ from __future__ import print_function import copy import numpy def BalanceComposite(model, set1, set2, weight, targetSize, names1=None, names2=None): """ a...
[ "numpy.zeros", "numpy.argsort", "copy.copy" ]
[((1217, 1233), 'copy.copy', 'copy.copy', (['model'], {}), '(model)\n', (1226, 1233), False, 'import copy\n'), ((1368, 1403), 'numpy.zeros', 'numpy.zeros', (['startSize', 'numpy.float'], {}), '(startSize, numpy.float)\n', (1379, 1403), False, 'import numpy\n'), ((2215, 2236), 'numpy.argsort', 'numpy.argsort', (['scores...
#!/usr/bin/python """ This application simply reads a config file created by the HackPSUconfig module and prints the output to the console """ import HackPSUconfig as config configFile = input('Please enter the name of a configuration file: ') dict = config.getProperties(configFile) print('Dictionary:') for key in d...
[ "HackPSUconfig.getProperties" ]
[((253, 285), 'HackPSUconfig.getProperties', 'config.getProperties', (['configFile'], {}), '(configFile)\n', (273, 285), True, 'import HackPSUconfig as config\n')]
from django.http import HttpResponse from django.shortcuts import render from django.db.models import Q from applications.movies.models import * import applications.utils as utils import visualizer.settings as settings import json import os def index(request): return render(request, 'movies/index.html', {}) def top...
[ "applications.utils.filter_unique", "django.db.models.Q", "json.dumps", "applications.utils.get_plot_values", "applications.utils.get_top_neighbours", "django.shortcuts.render", "applications.utils.bokeh_plot" ]
[((271, 311), 'django.shortcuts.render', 'render', (['request', '"""movies/index.html"""', '{}'], {}), "(request, 'movies/index.html', {})\n", (277, 311), False, 'from django.shortcuts import render\n'), ((352, 403), 'django.shortcuts.render', 'render', (['request', '"""movies/top_k_neighbours.html"""', '{}'], {}), "(r...
''' Reference: <NAME>, et al., "IRGAN: A Minimax Game for Unifying Generative and Discriminative Information Retrieval Models." SIGIR 2017. @author: <NAME> ''' from neurec.model.AbstractRecommender import AbstractRecommender import tensorflow as tf import pickle import numpy as np from concurrent.futures import ThreadP...
[ "numpy.sum", "tensorflow.reshape", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.multiply", "tensorflow.matmul", "pickle.load", "numpy.arange", "numpy.exp", "tensorflow.Variable", "neurec.util.data_gen._get_pointwise_batch_data", "tensorflow.gather", "tensorflow.variable_scope...
[((1778, 1802), 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), '(tf.int32)\n', (1792, 1802), True, 'import tensorflow as tf\n'), ((1820, 1844), 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), '(tf.int32)\n', (1834, 1844), True, 'import tensorflow as tf\n'), ((1867, 1893), 'tensorflow.pl...
# PyFluids # Copyright (c) 2021 <NAME> import pytest from pyfluids import * class TestHAInputs: @pytest.mark.parametrize("name", list(HAInput)) def test_with_value(self, name): assert name.with_value(0).value == 0 @pytest.mark.parametrize( "name, coolprop_key", [ (...
[ "pytest.mark.parametrize" ]
[((242, 593), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""name, coolprop_key"""', "[(HAInput.Density, 'Vha'), (HAInput.DewTemperature, 'D'), (HAInput.Enthalpy,\n 'Hha'), (HAInput.Entropy, 'Sha'), (HAInput.Humidity, 'W'), (HAInput.\n PartialPressure, 'P_w'), (HAInput.Pressure, 'P'), (HAInput.\n ...
import pandas as pd from ..utils import constants, plot, utils import numpy as np from warnings import warn from shapely.geometry import Polygon, Point import geopandas as gpd from .flowdataframe import FlowDataFrame from skmob.preprocessing import routing class TrajSeries(pd.Series): @property def _construc...
[ "pandas.DataFrame", "pandas.DataFrame.from_dict", "pandas.core.dtypes.common.is_float_dtype", "pandas.read_csv", "geopandas.sjoin", "pandas.to_datetime", "skmob.preprocessing.routing.route", "geopandas.points_from_xy", "pandas.core.dtypes.common.is_datetime64_any_dtype", "warnings.warn" ]
[((16078, 16125), 'pandas.DataFrame', 'pd.DataFrame', (['trajectory_array'], {'columns': 'columns'}), '(trajectory_array, columns=columns)\n', (16090, 16125), True, 'import pandas as pd\n'), ((7820, 7882), 'pandas.read_csv', 'pd.read_csv', (['filename'], {'sep': 'sep', 'header': 'header', 'usecols': 'usecols'}), '(file...
"""Definitions for the primitive `composite_full`.""" from myia.lib import ( SHAPE, TYPE, VALUE, AbstractArray, AbstractScalar, AbstractType, abstract_array, distribute, force_pending, scalar_cast, u64tup_typecheck, ) from myia.operations import primitives as P from myia.xtyp...
[ "myia.lib.abstract_array", "myia.lib.scalar_cast" ]
[((464, 509), 'myia.lib.scalar_cast', 'scalar_cast', (['fill_value', 'abstract_scalar_type'], {}), '(fill_value, abstract_scalar_type)\n', (475, 509), False, 'from myia.lib import SHAPE, TYPE, VALUE, AbstractArray, AbstractScalar, AbstractType, abstract_array, distribute, force_pending, scalar_cast, u64tup_typecheck\n'...
import abc import six from typing import Any, Union, List, Optional, Tuple @six.add_metaclass(abc.ABCMeta) class ICache(object): @abc.abstractmethod def put(self, key, value, expiry=None): # type: (str, Any, Optional[int]) -> dict raise NotImplementedError @abc.abstractmethod def put...
[ "six.add_metaclass" ]
[((78, 108), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (95, 108), False, 'import six\n')]
import numpy as np import os import h5py import sys import scipy import scipy.io.wavfile from scipy.signal import butter # Reconsider the Handling of SN_L, Gp_L, and Gp in the Freq_Bin Commands # Command for Initiallizing work space with Access to both: All the Data and Ephysflow Commands def initiate_path(): """...
[ "os.listdir", "os.path.join", "scipy.signal.butter", "scipy.signal.filtfilt" ]
[((537, 579), 'os.path.join', 'os.path.join', (['experiment_folder', '"""ss_data"""'], {}), "(experiment_folder, 'ss_data')\n", (549, 579), False, 'import os\n'), ((1385, 1433), 'os.path.join', 'os.path.join', (['ss_data_folder', 'bird_id', 'sess_name'], {}), '(ss_data_folder, bird_id, sess_name)\n', (1397, 1433), Fals...
import tensorflow as tf from tensorflow import keras from utils import data_utils, argmanager from utils.loss import multinomial_nll import numpy as np import os import json import scipy import sklearn.metrics import scipy.stats from collections import OrderedDict def softmax(x, temp=1): norm_x = x - np.mean(x,ax...
[ "json.dump", "tensorflow.keras.utils.CustomObjectScope", "tensorflow.keras.models.load_model", "scipy.spatial.distance.jensenshannon", "utils.argmanager.fetch_metrics_args", "scipy.stats.spearmanr", "scipy.stats.pearsonr", "numpy.mean", "numpy.exp", "utils.data_utils.load_test_data", "numpy.rand...
[((629, 660), 'utils.argmanager.fetch_metrics_args', 'argmanager.fetch_metrics_args', ([], {}), '()\n', (658, 660), False, 'from utils import data_utils, argmanager\n'), ((1020, 1139), 'utils.data_utils.load_test_data', 'data_utils.load_test_data', (['args.peaks', 'args.nonpeaks', 'args.genome', 'args.bigwig', 'args.te...
# Generated by Django 3.2.1 on 2021-06-01 13:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tr_ars', '0001_initial'), ] operations = [ migrations.AddField( model_name='actor', name='active', field...
[ "django.db.models.BooleanField" ]
[((321, 386), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(True)', 'verbose_name': '"""actor is active"""'}), "(default=True, verbose_name='actor is active')\n", (340, 386), False, 'from django.db import migrations, models\n')]
from ckanext.issues import model try: from ckan.new_tests import factories, helpers except ImportError: from ckan.tests import factories, helpers import factory class Issue(factory.Factory): class Meta: model = model.Issue abstract = False title = factory.Sequence(lambda n: 'Test Is...
[ "ckan.tests.helpers.call_action", "ckan.tests.factories.Dataset", "ckan.tests.factories._get_action_user_name" ]
[((994, 1059), 'ckan.tests.helpers.call_action', 'helpers.call_action', (['"""issue_create"""'], {'context': 'context'}), "('issue_create', context=context, **data_dict)\n", (1013, 1059), False, 'from ckan.tests import factories, helpers\n'), ((1718, 1788), 'ckan.tests.helpers.call_action', 'helpers.call_action', (['""...
import logging from tqdm import tqdm import random import re import xml.etree.ElementTree as ET def process_posts(fd_in,fd_out_train,fd_out_test,target_tag,split): line_num = 1 for line in tqdm(fd_in): try: fd_out = fd_out_train if random.random() > split else fd_out_test ...
[ "random.random", "tqdm.tqdm", "logging.exception", "xml.etree.ElementTree.fromstring" ]
[((204, 215), 'tqdm.tqdm', 'tqdm', (['fd_in'], {}), '(fd_in)\n', (208, 215), False, 'from tqdm import tqdm\n'), ((327, 346), 'xml.etree.ElementTree.fromstring', 'ET.fromstring', (['line'], {}), '(line)\n', (340, 346), True, 'import xml.etree.ElementTree as ET\n'), ((816, 836), 'logging.exception', 'logging.exception', ...
#!/usr/bin/env python """ """ import numpy as np from scipy.odr import Model from scipy.optimize import leastsq from scipy import ndimage from scipy.ndimage import gaussian_gradient_magnitude from scipy.ndimage import map_coordinates from common import PIX_ERR from features import line_profile def contour(img, A0, R...
[ "scipy.ndimage.gaussian_filter1d", "numpy.argmax", "scipy.odr.Model", "numpy.empty", "numpy.asarray", "features.line_profile", "scipy.ndimage.gaussian_gradient_magnitude", "numpy.fabs", "numpy.arange", "numpy.sin", "numpy.linspace", "numpy.cos", "numpy.tan", "scipy.ndimage.map_coordinates"...
[((2221, 2341), 'scipy.odr.Model', 'Model', (['circle_fcn'], {'estimate': '_circle_est', 'fjacb': '_circle_fjacb', 'fjacd': '_circle_fjacd', 'meta': '_circle_meta', 'implicit': '(True)'}), '(circle_fcn, estimate=_circle_est, fjacb=_circle_fjacb, fjacd=\n _circle_fjacd, meta=_circle_meta, implicit=True)\n', (2226, 23...
# Copyright (c) 2017-2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 from dazl import connect from dazl.ledger import ActAs, Admin, ReadAs, User import pytest @pytest.mark.asyncio async def test_ledger_create_user(sandbox_v2) -> None: async w...
[ "dazl.ledger.ActAs", "dazl.connect", "dazl.ledger.ReadAs", "dazl.ledger.User" ]
[((324, 359), 'dazl.connect', 'connect', ([], {'url': 'sandbox_v2', 'admin': '(True)'}), '(url=sandbox_v2, admin=True)\n', (331, 359), False, 'from dazl import connect\n'), ((591, 626), 'dazl.connect', 'connect', ([], {'url': 'sandbox_v2', 'admin': '(True)'}), '(url=sandbox_v2, admin=True)\n', (598, 626), False, 'from ...
#shazi.py from ShazamAPI import Shazam from threading import Thread import traceback from pydub import AudioSegment import time # class Shazi(object): ''' None-blocking function to get title, artist, and other shazam data from a file ''' def shazam(mp3path, outDict = None, checkFull = False): if outDict is None: ...
[ "threading.Thread", "pydub.AudioSegment.from_mp3", "traceback.print_exc", "time.time", "ShazamAPI.Shazam" ]
[((349, 413), 'threading.Thread', 'Thread', ([], {'target': 'shazamAsync', 'args': '[[mp3path, outDict, checkFull]]'}), '(target=shazamAsync, args=[[mp3path, outDict, checkFull]])\n', (355, 413), False, 'from threading import Thread\n'), ((628, 639), 'time.time', 'time.time', ([], {}), '()\n', (637, 639), False, 'impor...
import os import pickle import pandas as pd import matplotlib.pyplot as plt from datetime import datetime from datetime import timedelta from sklearn import preprocessing, svm from lassofeatsel import Lasso_wrapper, edit_features ##################### # Wrapper Function ##################### def model_exploration(df...
[ "matplotlib.pyplot.title", "os.path.isfile", "matplotlib.pyplot.figure", "pandas.DataFrame", "datetime.timedelta", "pandas.concat", "sklearn.svm.LinearSVR", "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "sklearn.preprocessing.normalize", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.s...
[((13735, 13778), 'sklearn.preprocessing.normalize', 'preprocessing.normalize', (['train_x'], {'norm': '"""l1"""'}), "(train_x, norm='l1')\n", (13758, 13778), False, 'from sklearn import preprocessing, svm\n'), ((13798, 13839), 'sklearn.preprocessing.normalize', 'preprocessing.normalize', (['val_x'], {'norm': '"""l1"""...
import os import sys import copy import enum import time import uuid import argparse import subprocess from dataclasses import dataclass, field from typing import List, Dict, Set, Tuple class PlinkWrapper: class InputType(enum.Enum): BED = 1 PED = 2 VCF = 3 def get_plink_flag(self...
[ "subprocess.run", "copy.deepcopy", "os.remove", "os.mkdir", "argparse.ArgumentParser", "uuid.uuid4", "time.time", "sys.exit" ]
[((10892, 10912), 'copy.deepcopy', 'copy.deepcopy', (['plink'], {}), '(plink)\n', (10905, 10912), False, 'import copy\n'), ((12419, 12460), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'desc'}), '(description=desc)\n', (12442, 12460), False, 'import argparse\n'), ((2012, 2062), 'subprocess...
import os import typing from .types import Author def write_log(path, log: str): path = os.path.expanduser(path) base_path = os.path.dirname(path) if not os.path.exists(base_path): os.makedirs(base_path) with open(path, 'w') as f: f.write(log) def write_avatars(dirname, avatars_by_a...
[ "os.path.expanduser", "os.makedirs", "os.path.dirname", "os.path.exists", "os.path.join" ]
[((95, 119), 'os.path.expanduser', 'os.path.expanduser', (['path'], {}), '(path)\n', (113, 119), False, 'import os\n'), ((136, 157), 'os.path.dirname', 'os.path.dirname', (['path'], {}), '(path)\n', (151, 157), False, 'import os\n'), ((370, 397), 'os.path.expanduser', 'os.path.expanduser', (['dirname'], {}), '(dirname)...
import torch from torch import nn import torch.optim as optim import torch.nn.functional as F import math import numpy as np from config import parameters as conf from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence if conf.pretrained_model == "bert": from transformers import BertModel elif con...
[ "torch.nn.Dropout", "torch.argmax", "torch.nn.Embedding", "torch.cat", "torch.arange", "torch.nn.utils.rnn.pad_packed_sequence", "torch.nn.utils.rnn.pack_padded_sequence", "transformers.LongformerModel.from_pretrained", "torch.ones", "torch.repeat_interleave", "torch.gather", "torch.squeeze", ...
[((3980, 4026), 'torch.nn.Linear', 'nn.Linear', (['hidden_size', 'hidden_size'], {'bias': '(True)'}), '(hidden_size, hidden_size, bias=True)\n', (3989, 4026), False, 'from torch import nn\n'), ((4054, 4078), 'torch.nn.Dropout', 'nn.Dropout', (['dropout_rate'], {}), '(dropout_rate)\n', (4064, 4078), False, 'from torch i...
#!/usr/bin/env python """Test gracefully exiting if no study genes are in assc or population.""" import os # from goatools.rpt.goea_nt_xfrm import MgrNtGOEAs # get_goea_nts_all from goatools.test_data.genes_NCBI_10090_ProteinCoding import GENEID2NT as GeneID2nt_mus from goatools.test_data.nature3102_goea import get_g...
[ "goatools.test_data.nature3102_goea.get_geneid2symbol", "os.path.abspath", "goatools.test_data.nature3102_goea.get_goeaobj", "goatools.test_data.genes_NCBI_10090_ProteinCoding.GENEID2NT.keys" ]
[((1023, 1043), 'goatools.test_data.genes_NCBI_10090_ProteinCoding.GENEID2NT.keys', 'GeneID2nt_mus.keys', ([], {}), '()\n', (1041, 1043), True, 'from goatools.test_data.genes_NCBI_10090_ProteinCoding import GENEID2NT as GeneID2nt_mus\n'), ((1071, 1116), 'goatools.test_data.nature3102_goea.get_geneid2symbol', 'get_genei...
# -*- coding: utf8 -*- import pandas as pd from fix_spanish_title_case import fix_spanish_title_case from classification import ( Hierarchy, parent_code_table_to_parent_id_table, Classification, ) if __name__ == "__main__": df = pd.read_csv( "in/ubigeo-data-titlecased.csv", encoding="utf-8",...
[ "pandas.DataFrame", "pandas.read_csv", "classification.Classification", "pandas.Series", "classification.parent_code_table_to_parent_id_table", "classification.Hierarchy" ]
[((249, 337), 'pandas.read_csv', 'pd.read_csv', (['"""in/ubigeo-data-titlecased.csv"""'], {'encoding': '"""utf-8"""', 'dtype': "{'inei': str}"}), "('in/ubigeo-data-titlecased.csv', encoding='utf-8', dtype={\n 'inei': str})\n", (260, 337), True, 'import pandas as pd\n'), ((756, 898), 'pandas.Series', 'pd.Series', (["...
# MIT License # # Copyright (c) 2019 <NAME> <https://github.com/delivrance> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to...
[ "PIL.Image.new", "os.remove", "uuid.uuid4", "random.Random", "PIL.Image.open", "pathlib.Path", "logging.getLogger" ]
[((1533, 1560), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1550, 1560), False, 'import logging\n'), ((3400, 3412), 'random.Random', 'Random', (['seed'], {}), '(seed)\n', (3406, 3412), False, 'from random import Random\n'), ((4887, 4930), 'PIL.Image.new', 'Image.new', (['"""RGB"""', '...
from mininet.topo import Topo from mininet.net import OVSKernelSwitch class GedungSatu(Topo): def __init__(self, **opts): Topo.__init__(self, **opts) # tambah client sebanyak 15 komputer h1 = self.addHost(name="h1", mac="00:00:00:00:0h:01", ip="192.168.100.10/27") h2 = self.addHost...
[ "mininet.topo.Topo.__init__" ]
[((135, 162), 'mininet.topo.Topo.__init__', 'Topo.__init__', (['self'], {}), '(self, **opts)\n', (148, 162), False, 'from mininet.topo import Topo\n')]
""" Django settings for example project. """ import os from pathlib import Path # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = Path.cwd() # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = "a_not_so_secret_key" # SECURITY WARNING: don't run with debug ...
[ "pathlib.Path.cwd", "os.path.join", "os.getenv" ]
[((165, 175), 'pathlib.Path.cwd', 'Path.cwd', ([], {}), '()\n', (173, 175), False, 'from pathlib import Path\n'), ((3175, 3211), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""db.sqlite3"""'], {}), "(BASE_DIR, 'db.sqlite3')\n", (3187, 3211), False, 'import os\n'), ((1217, 1252), 'os.path.join', 'os.path.join', (['BA...
import argparse import codecs import csv from utils.sparql_queries import load_dataset, clean_dataset from utils.sparql_queries import get_uri_suffix, exec_ner_query import filepath_config as RDFfiles CSV_DELIMITER = '|' REPLACE_DELIMITER = ' ' def results_to_csv(results, filename): with codecs.open(filename, "...
[ "utils.sparql_queries.get_uri_suffix", "codecs.open", "argparse.ArgumentParser", "csv.writer", "utils.sparql_queries.load_dataset", "utils.sparql_queries.exec_ner_query", "utils.sparql_queries.clean_dataset" ]
[((1762, 1802), 'utils.sparql_queries.load_dataset', 'load_dataset', (['RDFfiles.DBPEDIA_LABELS_EN'], {}), '(RDFfiles.DBPEDIA_LABELS_EN)\n', (1774, 1802), False, 'from utils.sparql_queries import load_dataset, clean_dataset\n'), ((1817, 1867), 'utils.sparql_queries.load_dataset', 'load_dataset', (['RDFfiles.DBPEDIA_TRA...
''' Created on 01 Oct 2018 @author: <NAME> ''' import logging import pandas from glamod.parser.settings import (INPUT_ENCODING, INPUT_DELIMITER, VERBOSE_LOGGING, CHUNK_SIZE) logger = logging.getLogger(__name__) class FileParser(object): def __init__(self, fpath, delimiter=INPUT_DELIMITER, encoding=...
[ "pandas.read_csv", "logging.getLogger" ]
[((193, 220), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (210, 220), False, 'import logging\n'), ((1193, 1365), 'pandas.read_csv', 'pandas.read_csv', (['self._fh'], {'encoding': 'self.encoding', 'delimiter': 'self.delimiter', 'converters': 'convertors', 'usecols': 'columns', 'skipinit...
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla.org/MPL/ # # Softwa...
[ "django.db.models.Max", "django.core.urlresolvers.reverse", "django.db.models.Min", "django.contrib.auth.models.User.objects.filter", "datetime.date.today", "datetime.date", "collections.defaultdict", "datetime.timedelta", "django.http.Http404", "roster.models.Slot.objects.filter", "django.short...
[((2062, 2107), 'django.shortcuts.render', 'render', (['request', '"""404.html"""', 'data'], {'status': '(404)'}), "(request, '404.html', data, status=404)\n", (2068, 2107), False, 'from django.shortcuts import render\n'), ((3573, 3594), 'datetime.date.today', 'datetime.date.today', ([], {}), '()\n', (3592, 3594), Fals...
"""Low-level driver for communicating with PurpleDrop via serial messages """ import inspect import fnmatch import logging import queue import struct import serial import serial.tools.list_ports import sys import threading import time from typing import Any, AnyStr, Callable, Dict, List, Optional, Sequence from purple...
[ "purpledrop.protobuf.messages_pb2.PurpleDropEvent", "purpledrop.messages.FeedbackCommandMsg", "serial.Serial", "purpledrop.messages.DataBlobMsg", "purpledrop.messages.ParameterDescriptorMsg", "serial.tools.list_ports.comports", "inspect.isclass", "struct.pack", "threading.Lock", "threading.Thread"...
[((694, 725), 'logging.getLogger', 'logging.getLogger', (['"""purpledrop"""'], {}), "('purpledrop')\n", (711, 725), False, 'import logging\n'), ((1721, 1742), 'inspect.isclass', 'inspect.isclass', (['filt'], {}), '(filt)\n', (1736, 1742), False, 'import inspect\n'), ((2073, 2107), 'serial.tools.list_ports.comports', 's...
import ignore import tensorflow as tf import numpy as np char_arr = [c for c in 'SEPabcdefghijklmnopqrstuvwxyz단어나무놀이소녀키스사랑'] num_dic = {n: i for i, n in enumerate(char_arr)} dic_len = len(num_dic) seq_data = [['word', '단어'], ['wood', '나무'], ['game', '놀이'], ['girl', '소녀'], ['kiss', '키스'], ['lov...
[ "tensorflow.nn.rnn_cell.BasicRNNCell", "tensorflow.nn.dynamic_rnn", "tensorflow.global_variables_initializer", "tensorflow.argmax", "tensorflow.layers.dense", "tensorflow.Session", "tensorflow.variable_scope", "tensorflow.nn.rnn_cell.DropoutWrapper", "tensorflow.placeholder", "numpy.eye", "tenso...
[((912, 961), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, None, n_input]'], {}), '(tf.float32, [None, None, n_input])\n', (926, 961), True, 'import tensorflow as tf\n'), ((974, 1023), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, None, n_input]'], {}), '(tf.float32, [None, ...
from datetime import date, datetime, timedelta from accountancy.helpers import AuditTransaction, get_all_historical_changes from cashbook.models import CashBook from contacts.models import Contact from controls.models import FinancialYear, Period from django.test import TestCase from nominals.models import Nominal fro...
[ "nominals.models.Nominal.objects.create", "contacts.models.Contact.objects.create", "accountancy.helpers.AuditTransaction", "datetime.date", "datetime.date.today", "purchases.models.PurchaseHeader.history.all", "contacts.models.Contact.history.all", "datetime.timedelta", "controls.models.FinancialYe...
[((629, 685), 'contacts.models.Contact.objects.create', 'Contact.objects.create', ([], {'code': '"""1"""', 'name': '"""11"""', 'email': '"""111"""'}), "(code='1', name='11', email='111')\n", (651, 685), False, 'from contacts.models import Contact\n'), ((857, 903), 'accountancy.helpers.get_all_historical_changes', 'get_...
#!/usr/bin/env python3 # # Copyright (c) 2018, NXP # # SPDX-License-Identifier: Apache-2.0 """Import files from an NXP MCUXpresso SDK archive into Zephyr The MCUXpresso SDK provides device header files and peripheral drivers for NXP Kinetis, LPC, and i.MX SoCs. Zephyr drivers for these SoCs are shims that adapt MCUXp...
[ "shutil.unpack_archive", "tempfile.TemporaryDirectory", "os.makedirs", "argparse.ArgumentParser", "shutil.copy2", "os.path.exists", "re.search", "sys.stderr.write", "os.path.join", "os.listdir" ]
[((555, 621), 'sys.stderr.write', 'sys.stderr.write', (['"""$ZEPHYR_BASE environment variable undefined.\n"""'], {}), "('$ZEPHYR_BASE environment variable undefined.\\n')\n", (571, 621), False, 'import sys\n'), ((948, 967), 'os.path.exists', 'os.path.exists', (['src'], {}), '(src)\n', (962, 967), False, 'import os\n'),...
# Copyright (c) 2021 <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, s...
[ "random.Random", "pytest.raises", "tonto.game.Game", "tonto.deck.Deck", "tonto.card.Card" ]
[((5587, 5602), 'tonto.game.Game', 'Game', (['PLAYERS_1'], {}), '(PLAYERS_1)\n', (5591, 5602), False, 'from tonto.game import Game\n'), ((5805, 5813), 'random.Random', 'Random', ([], {}), '()\n', (5811, 5813), False, 'from random import Random\n'), ((5842, 5868), 'tonto.deck.Deck', 'Deck', ([], {'random_instance': 'ran...
from schieber.suit import Suit from schieber.card import Card class Deck: def __init__(self): """ Initializes a deck of cards used for Jassen (from 6 to 10, Jack, Queen, King and Ace; each card in 4 suits) """ self.cards = [] for suit in Suit: self.cards += [Car...
[ "schieber.card.Card" ]
[((317, 341), 'schieber.card.Card', 'Card', ([], {'suit': 'suit', 'value': 'i'}), '(suit=suit, value=i)\n', (321, 341), False, 'from schieber.card import Card\n')]
"""Perform actions related to building flash executables and directories""" # type annotations from __future__ import annotations # internal libraries from ...core.custom import DictApp # external libraries from cmdkit.app import ApplicationGroup from cmdkit.cli import Interface # commands from . import jobs, port,...
[ "cmdkit.cli.Interface" ]
[((1043, 1074), 'cmdkit.cli.Interface', 'Interface', (['PROGRAM', 'USAGE', 'HELP'], {}), '(PROGRAM, USAGE, HELP)\n', (1052, 1074), False, 'from cmdkit.cli import Interface\n')]
import zipfile import argparse from threading import Thread import time def extract_zip(zip_file, password): try: with open(password, 'r') as a: for i in a.readlines(): passw = i.strip('\n') time.sleep(0.3) try: with zipfile....
[ "threading.Thread", "zipfile.ZipFile", "argparse.ArgumentParser", "time.sleep" ]
[((706, 731), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (729, 731), False, 'import argparse\n'), ((930, 982), 'threading.Thread', 'Thread', ([], {'target': 'extract_zip', 'args': '(zipname, passname)'}), '(target=extract_zip, args=(zipname, passname))\n', (936, 982), False, 'from threading...
"""This exposes the analytics API.""" from http import HTTPStatus import requests from flask import current_app class RedashAPIService: # pylint: disable=too-few-public-methods """This class manages all the Redash analytics service API calls.""" @staticmethod def get_request(url_path, page_no=None, lim...
[ "flask.current_app.config.get", "requests.get" ]
[((716, 759), 'flask.current_app.config.get', 'current_app.config.get', (['"""ANALYTICS_API_KEY"""'], {}), "('ANALYTICS_API_KEY')\n", (738, 759), False, 'from flask import current_app\n'), ((838, 872), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (850, 872), False, 'imp...
""" dariah.topics.utils ~~~~~~~~~~~~~~~~~~~ This module implements helper functions for topic modeling. """ from typing import Generator, List from pathlib import Path import cophi def read_mallet_topics(path: Path, num_words: int) -> Generator[List[str], None, None]: """Read a MALLET topics file. Args: ...
[ "cophi.text.utils.find_tokens" ]
[((612, 650), 'cophi.text.utils.find_tokens', 'cophi.text.utils.find_tokens', (['sequence'], {}), '(sequence)\n', (640, 650), False, 'import cophi\n')]
# coding: utf-8 """ Control-M Services Provides access to BMC Control-M Services # noqa: E501 OpenAPI spec version: 9.20.30 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from ctm_saas_client.configuratio...
[ "ctm_saas_client.configuration.Configuration", "six.iteritems" ]
[((7308, 7341), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (7321, 7341), False, 'import six\n'), ((1780, 1795), 'ctm_saas_client.configuration.Configuration', 'Configuration', ([], {}), '()\n', (1793, 1795), False, 'from ctm_saas_client.configuration import Configuration\n...
from mock import MagicMock from baelfire.parrented import parrented class TestParrented(object): @property def parented(self): def method(self): return self return method def test_parrented_method_without_parent(self): """ parrented should return own method i...
[ "mock.MagicMock", "baelfire.parrented.parrented" ]
[((364, 375), 'mock.MagicMock', 'MagicMock', ([], {}), '()\n', (373, 375), False, 'from mock import MagicMock\n'), ((419, 443), 'baelfire.parrented.parrented', 'parrented', (['self.parented'], {}), '(self.parented)\n', (428, 443), False, 'from baelfire.parrented import parrented\n'), ((635, 646), 'mock.MagicMock', 'Mag...
# Echo server program import socket import pickle HOST = '' # Symbolic name meaning the local host PORT = 50007 # Arbitrary non-privileged port s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) while 1: conn, addr = s.accept() print('Connected b...
[ "socket.socket" ]
[((178, 227), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (191, 227), False, 'import socket\n')]
#!/usr/bin/env python3 from flask import Flask from views import jobs from utils import Config from jobs_queue import queue def register_blueprints(app): app.register_blueprint(jobs.blueprint, url_prefix="/api/jobs") def make_app(cfg_path): app = Flask("AsyncPage") app.cfg = Config() app.cfg.load_f...
[ "flask.Flask", "utils.Config" ]
[((260, 278), 'flask.Flask', 'Flask', (['"""AsyncPage"""'], {}), "('AsyncPage')\n", (265, 278), False, 'from flask import Flask\n'), ((293, 301), 'utils.Config', 'Config', ([], {}), '()\n', (299, 301), False, 'from utils import Config\n')]
import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) class Led(object): """RGB Led control module.""" color = (0, 0, 0) __gpio_module__ = GPIO def __init__(self, red_pin, green_pin, blue_pin): """Module constructor.""" self.gpio = self.__gpio_module__ self.red_pin = r...
[ "RPi.GPIO.setmode", "time.time" ]
[((37, 59), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BCM'], {}), '(GPIO.BCM)\n', (49, 59), True, 'import RPi.GPIO as GPIO\n'), ((3985, 3996), 'time.time', 'time.time', ([], {}), '()\n', (3994, 3996), False, 'import time\n'), ((4104, 4115), 'time.time', 'time.time', ([], {}), '()\n', (4113, 4115), False, 'import time...
from matplotlib import pyplot as plt years = [1950, 1960, 1970, 1980, 1990, 2000, 2010] gdp = [300.2, 543.3, 1075.9, 2862.5, 5979.6, 10289.7, 14958.3] # Crear un gráfico de línea años en el ejec x y gdp en el eje y plt.plot(years, gdp, color ='green', marker='o', linestyle='solid') # -add a atitle plt.title("Nomi...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "matplotlib.pyplot.plot" ]
[((218, 284), 'matplotlib.pyplot.plot', 'plt.plot', (['years', 'gdp'], {'color': '"""green"""', 'marker': '"""o"""', 'linestyle': '"""solid"""'}), "(years, gdp, color='green', marker='o', linestyle='solid')\n", (226, 284), True, 'from matplotlib import pyplot as plt\n'), ((305, 329), 'matplotlib.pyplot.title', 'plt.tit...
from collections import Counter, defaultdict from utils import * from copy import copy with open("input.txt", "r") as file: data = file.read() @test(1588) def part1(data): template, instruction_lines = data.strip().split("\n\n") # data = list(map(int, data)) instructions = {} for line in instruct...
[ "collections.defaultdict" ]
[((1541, 1557), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (1552, 1557), False, 'from collections import Counter, defaultdict\n'), ((2084, 2100), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (2095, 2100), False, 'from collections import Counter, defaultdict\n'), ((1734, 1...
# coding=utf-8 """This module, useful_file_operations, simply contains lots of functions for file + directory operations.""" # Needed for copying files. from shutil import copyfile # Needed for running regular expressions. import re # Needed for system level operations. import os # Has super useful file + directory o...
[ "os.remove", "hashlib.md5", "os.makedirs", "shutil.copytree", "os.stat", "os.path.isdir", "os.path.exists", "PIL.Image.open", "hashlib.sha256", "os.path.isfile", "pathlib.Path", "glob.glob", "shutil.copyfile", "shutil.rmtree", "re.search" ]
[((2082, 2099), 'os.makedirs', 'os.makedirs', (['path'], {}), '(path)\n', (2093, 2099), False, 'import os\n'), ((2198, 2217), 'shutil.rmtree', 'shutil.rmtree', (['path'], {}), '(path)\n', (2211, 2217), False, 'import shutil\n'), ((2353, 2399), 'shutil.copytree', 'shutil.copytree', (['path_source', 'path_destination'], ...
import ipywidgets as widgets import cartopy.crs as ccrs import geoviews as gv import holoviews as hv import numpy as np import panel as pn import param from shapely.geometry import Polygon as sPolygon, LineString as sLineString from .interface import EDRInterface from .lookup import CRS_LOOKUP class EDRExplorer(par...
[ "param.Magnitude", "cartopy.crs.Mercator", "holoviews.Polygons", "geoviews.Image", "ipywidgets.Text", "geoviews.tile_sources.Wikipedia.opts", "panel.widgets.Checkbox", "panel.Row", "param.String", "ipywidgets.SelectionSlider", "ipywidgets.Button", "geoviews.DynamicMap", "param.Boolean", "i...
[((483, 557), 'ipywidgets.Text', 'widgets.Text', ([], {'placeholder': '"""Specify an EDR Server..."""', 'description': '"""Server"""'}), "(placeholder='Specify an EDR Server...', description='Server')\n", (495, 557), True, 'import ipywidgets as widgets\n'), ((569, 639), 'ipywidgets.Dropdown', 'widgets.Dropdown', ([], {...
# -*- coding: utf-8 -*- """ Created on Fri Aug 27 10:35:53 2021 @author: Peace4Lv """ from pyecharts.components import Image from pyecharts.options import ComponentTitleOpts from os import path import matplotlib.pyplot as plt import numpy as np from datetime import datetime, timedelta plt.rcParams['font.sans-serif']...
[ "datetime.datetime.strftime", "pyecharts.components.Image", "matplotlib.pyplot.show", "pyecharts.options.ComponentTitleOpts", "datetime.datetime.now", "datetime.datetime.strptime", "os.path.isfile", "numpy.array", "datetime.timedelta", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ]
[((452, 459), 'pyecharts.components.Image', 'Image', ([], {}), '()\n', (457, 459), False, 'from pyecharts.components import Image\n'), ((2129, 2160), 'numpy.array', 'np.array', (['[-5, 5, -3, 3, -1, 1]'], {}), '([-5, 5, -3, 3, -1, 1])\n', (2137, 2160), True, 'import numpy as np\n'), ((2175, 2244), 'matplotlib.pyplot.su...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-18 22:52 from __future__ import unicode_literals import about.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ ...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.BooleanField", "django.db.models.ImageField", "django.db.models.DateField" ]
[((418, 511), '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", (434, 511), False, 'from django.db import migrations, models\...
import re import statistics import sys from collections import defaultdict from sys import getsizeof from timeit import default_timer from types import BuiltinFunctionType, FunctionType, MethodType from typing import Any, Dict, Iterable, Optional, Tuple, Union from penchmark._defs import ( AnyCallee, AnyInData...
[ "statistics.median", "timeit.default_timer", "collections.defaultdict", "statistics.mean", "penchmark._defs.ReportItem", "sys.getsizeof", "re.compile" ]
[((1417, 1434), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (1428, 1434), False, 'from collections import defaultdict\n'), ((2432, 2448), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (2443, 2448), False, 'from collections import defaultdict\n'), ((3026, 3067), 're.compil...
""" PagerMaid module to handle jd command. """ from pagermaid import version from pagermaid.listener import listener from pagermaid.utils import lang, alias_command, obtain_message, client @listener(is_plugin=False, outgoing=True, command=alias_command("jd_cmd"), description="解析 JD 口令", parameter...
[ "pagermaid.utils.client.post", "pagermaid.utils.obtain_message", "pagermaid.utils.lang", "pagermaid.utils.alias_command" ]
[((242, 265), 'pagermaid.utils.alias_command', 'alias_command', (['"""jd_cmd"""'], {}), "('jd_cmd')\n", (255, 265), False, 'from pagermaid.utils import lang, alias_command, obtain_message, client\n'), ((390, 413), 'pagermaid.utils.obtain_message', 'obtain_message', (['context'], {}), '(context)\n', (404, 413), False, '...
import sys import argparse import asyncio import gc import os import fastthreadpool from socket import socket, AF_UNIX, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR, IPPROTO_TCP, TCP_NODELAY PRINT = 0 def pool_echo_server(address, unix, threads, size): if unix: sock = socket(AF_UNIX, SOCK_STREAM) ...
[ "asyncio.start_server", "os.remove", "argparse.ArgumentParser", "asyncio.new_event_loop", "asyncio.sleep", "asyncio.set_event_loop", "socket.socket", "os.path.exists", "fastthreadpool.Pool", "os.cpu_count", "gc.collect", "uvloop.new_event_loop", "asyncio.start_unix_server", "sys.exit" ]
[((2996, 3021), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3019, 3021), False, 'import argparse\n'), ((4772, 4800), 'asyncio.set_event_loop', 'asyncio.set_event_loop', (['loop'], {}), '(loop)\n', (4794, 4800), False, 'import asyncio\n'), ((288, 316), 'socket.socket', 'socket', (['AF_UNIX',...
import numpy as np import unittest import ray from ray.rllib.evaluation.postprocessing import adjust_nstep, discount_cumsum from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.utils.test_utils import check class TestPostprocessing(unittest.TestCase): @classmethod def setUpClass(cls) -> None:...
[ "ray.init", "ray.rllib.policy.sample_batch.SampleBatch", "ray.rllib.utils.test_utils.check", "pytest.main", "numpy.random.randint", "ray.shutdown", "numpy.arange", "ray.rllib.evaluation.postprocessing.adjust_nstep", "numpy.array" ]
[((329, 339), 'ray.init', 'ray.init', ([], {}), '()\n', (337, 339), False, 'import ray\n'), ((402, 416), 'ray.shutdown', 'ray.shutdown', ([], {}), '()\n', (414, 416), False, 'import ray\n'), ((822, 984), 'ray.rllib.policy.sample_batch.SampleBatch', 'SampleBatch', (['{SampleBatch.OBS: obs, SampleBatch.ACTIONS: actions, ...
# Copyright (c) 2021 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, ...
[ "bip_utils.utils.misc.CryptoUtils.Sha512_256" ]
[((1663, 1697), 'bip_utils.utils.misc.CryptoUtils.Sha512_256', 'CryptoUtils.Sha512_256', (['data_bytes'], {}), '(data_bytes)\n', (1685, 1697), False, 'from bip_utils.utils.misc import CryptoUtils\n')]
from snake import Snake from snake_curses_view import SnakeCursesView from game import Game import time import curses class SnakeCursesGame: def __init__(self): self.snake = Snake() self.game = Game(80,24) self.game.add_snake(self.snake) self.game.start() self.w = curses.i...
[ "curses.initscr", "time.sleep", "curses.endwin", "snake_curses_view.SnakeCursesView", "snake.Snake", "game.Game" ]
[((188, 195), 'snake.Snake', 'Snake', ([], {}), '()\n', (193, 195), False, 'from snake import Snake\n'), ((216, 228), 'game.Game', 'Game', (['(80)', '(24)'], {}), '(80, 24)\n', (220, 228), False, 'from game import Game\n'), ((312, 328), 'curses.initscr', 'curses.initscr', ([], {}), '()\n', (326, 328), False, 'import cu...
import torch.nn as nn import torch import numpy as np import torch.nn.functional as F from util import PointNetSetAbstractionOrg, PointNetSetAbstraction,PointNetFeaturePropogation,FlowEmbedding,PointNetSetUpConv class FlowNet3D(nn.Module): def __init__(self,args): super(FlowNet3D,self).__init__() ...
[ "util.PointNetSetAbstraction", "torch.nn.Conv1d", "torch.nn.BatchNorm1d", "torch.randn", "torch.cat", "util.PointNetSetUpConv", "util.PointNetFeaturePropogation", "util.PointNetSetAbstractionOrg", "util.FlowEmbedding" ]
[((3419, 3444), 'torch.randn', 'torch.randn', (['(8, 3, 2048)'], {}), '((8, 3, 2048))\n', (3430, 3444), False, 'import torch\n'), ((3455, 3473), 'torch.randn', 'torch.randn', (['(8)', '(16)'], {}), '(8, 16)\n', (3466, 3473), False, 'import torch\n'), ((869, 985), 'util.PointNetSetAbstractionOrg', 'PointNetSetAbstractio...
from arch._version import get_versions from arch.univariate.mean import arch_model from arch.utility import test __version__ = get_versions()["version"] del get_versions def doc() -> None: import webbrowser webbrowser.open("http://arch.readthedocs.org/en/latest/") __all__ = ["arch_model", "__version__", "...
[ "webbrowser.open", "arch._version.get_versions" ]
[((128, 142), 'arch._version.get_versions', 'get_versions', ([], {}), '()\n', (140, 142), False, 'from arch._version import get_versions\n'), ((219, 276), 'webbrowser.open', 'webbrowser.open', (['"""http://arch.readthedocs.org/en/latest/"""'], {}), "('http://arch.readthedocs.org/en/latest/')\n", (234, 276), False, 'imp...
from __future__ import division import os import pandas as pd from pyomo.environ import ( ConcreteModel, Constraint, Integers, NonNegativeReals, Objective, Param, RangeSet, Set, SolverFactory, Suffix, TransformationFactory, Var, exp, log, sqrt, summation, value ) from .util import alphanum_sorted from py...
[ "pyomo.environ.log", "pyomo.environ.Suffix", "pyomo.environ.Constraint", "pyomo.environ.RangeSet", "pyomo.environ.Var", "pyomo.environ.sqrt", "os.path.dirname", "pyomo.environ.Objective", "pyomo.environ.exp", "pyomo.environ.summation", "pyomo.environ.Param", "pyomo.environ.ConcreteModel", "p...
[((395, 410), 'pyomo.environ.ConcreteModel', 'ConcreteModel', ([], {}), '()\n', (408, 410), False, 'from pyomo.environ import ConcreteModel, Constraint, Integers, NonNegativeReals, Objective, Param, RangeSet, Set, SolverFactory, Suffix, TransformationFactory, Var, exp, log, sqrt, summation, value\n'), ((424, 454), 'pyo...
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import os import re import shutil import sys import tempfile import zipfile import dex import dex_jdk_libs from util...
[ "os.mkdir", "util.build_utils.DoZip", "argparse.ArgumentParser", "util.build_utils.ExpandFileArgs", "os.path.join", "shutil.copy", "os.path.abspath", "util.build_utils.CalledProcessError", "util.build_utils.AddDepfileOption", "re.sub", "util.build_utils.Touch", "util.diff_utils.CheckExpectatio...
[((584, 641), 're.compile', 're.compile', (['"""^\\\\s*-checkdiscard[\\\\s\\\\S]*?}"""', 're.MULTILINE'], {}), "('^\\\\s*-checkdiscard[\\\\s\\\\S]*?}', re.MULTILINE)\n", (594, 641), False, 'import re\n'), ((656, 690), 're.compile', 're.compile', (['"""^\\\\s*-"""', 're.MULTILINE'], {}), "('^\\\\s*-', re.MULTILINE)\n", ...
import getpass import keyring KEYRING_SERVICE = "wantan" def setup_args(args): """Add our args to a subgroup of the main script's.""" auth_verbs = args.add_mutually_exclusive_group(required=True) auth_verbs.add_argument("--dump", action="store_true", help="Dump the API key associated with a us...
[ "getpass.getpass", "keyring.get_password", "keyring.set_password" ]
[((668, 711), 'keyring.get_password', 'keyring.get_password', (['KEYRING_SERVICE', 'user'], {}), '(KEYRING_SERVICE, user)\n', (688, 711), False, 'import keyring\n'), ((912, 965), 'keyring.set_password', 'keyring.set_password', (['KEYRING_SERVICE', 'args.user', 'key'], {}), '(KEYRING_SERVICE, args.user, key)\n', (932, 9...
# -*-coding = utf-8 -*- import json import os import subprocess if __name__ == "__main__": whereFfmpeg = "" toDir = "" beginPath = "" paths = os.listdir(beginPath) videoName = "\\video.m4s" audioName = "\\audio.m4s" for path in paths: secondPath = os.path.join(beginPath, path) liTaskPath = os.listdir(second...
[ "os.mkdir", "subprocess.Popen", "json.load", "os.path.isdir", "os.path.exists", "os.path.join", "os.listdir" ]
[((147, 168), 'os.listdir', 'os.listdir', (['beginPath'], {}), '(beginPath)\n', (157, 168), False, 'import os\n'), ((258, 287), 'os.path.join', 'os.path.join', (['beginPath', 'path'], {}), '(beginPath, path)\n', (270, 287), False, 'import os\n'), ((303, 325), 'os.listdir', 'os.listdir', (['secondPath'], {}), '(secondPa...
#!/opt/homebrew/bin/python3.9 ## ## Icebreaker and IceSugar RSMB5 project - RV32I for Lattice iCE40 ## With complete open-source toolchain flow using: ## -> yosys ## -> icarus verilog ## -> icestorm project ## ## Tests are written in several languages ## -> Systemverilog Pure Testbench (Vivado) ## -> UVM testbench ...
[ "pandas.DataFrame", "json.load", "string.Template" ]
[((4498, 4566), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': "{'TYPE': t_reg, 'NAME': name, 'ADDRESS': address}"}), "(data={'TYPE': t_reg, 'NAME': name, 'ADDRESS': address})\n", (4510, 4566), True, 'import pandas as pd\n'), ((4702, 4738), 'string.Template', 'Template', (["(temp.param_template + '\\n')"], {}), "(te...
import json import requests # POST payload = {'userId': 6622, 'title': 'Something', 'body': 'some body'} response = requests.post('https://jsonplaceholder.typicode.com/posts', data=json.dumps(payload)) assert response.status_code == 201, f'POST: Received status code {response.status_code}' print(response.text) # GET...
[ "json.loads", "requests.get", "json.dumps" ]
[((328, 386), 'requests.get', 'requests.get', (['"""https://jsonplaceholder.typicode.com/todos"""'], {}), "('https://jsonplaceholder.typicode.com/todos')\n", (340, 386), False, 'import requests\n'), ((480, 501), 'json.loads', 'json.loads', (['data.text'], {}), '(data.text)\n', (490, 501), False, 'import json\n'), ((183...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ "openstack.resource.QueryParameters", "openstack.resource.URI", "openstack.resource.Body" ]
[((1051, 1124), 'openstack.resource.QueryParameters', 'resource.QueryParameters', (['"""internal_port_id"""', '"""external_port"""', '"""protocol"""'], {}), "('internal_port_id', 'external_port', 'protocol')\n", (1075, 1124), False, 'from openstack import resource\n'), ((1214, 1243), 'openstack.resource.URI', 'resource...
import glob import json import os import aiohttp from ruamel.yaml import YAML from . import with_loop, log from ..dictionary import loader @with_loop async def main(args, loop): if args.url.startswith("http"): log.critical("Downloading dictionary JSON...") async with aiohttp.ClientSession(loop=l...
[ "json.load", "os.path.basename", "ruamel.yaml.YAML", "aiohttp.ClientSession", "os.path.isfile", "glob.glob" ]
[((442, 466), 'os.path.isfile', 'os.path.isfile', (['args.url'], {}), '(args.url)\n', (456, 466), False, 'import os\n'), ((292, 324), 'aiohttp.ClientSession', 'aiohttp.ClientSession', ([], {'loop': 'loop'}), '(loop=loop)\n', (313, 324), False, 'import aiohttp\n'), ((687, 703), 'ruamel.yaml.YAML', 'YAML', ([], {'typ': '...
# -*- coding: utf-8 -*- """ Created on Thu Mar 12 14:27:05 2020 @author: ricardoguimaraes """ import numpy as np import pandas as pd import geopandas as gpd from gdf_heatmap import gdf_heatmap from array_to_tiff import array_to_tiff if '__main__' == __name__ : from shapely.geometry import Point impor...
[ "shapely.geometry.Point", "matplotlib.pyplot.close", "geopandas.GeoDataFrame", "numpy.random.normal", "gdf_heatmap.gdf_heatmap", "array_to_tiff.array_to_tiff" ]
[((665, 685), 'geopandas.GeoDataFrame', 'gpd.GeoDataFrame', (['df'], {}), '(df)\n', (681, 685), True, 'import geopandas as gpd\n'), ((704, 802), 'gdf_heatmap.gdf_heatmap', 'gdf_heatmap', (['gdf'], {'df_column': '"""z"""', 'dx': '(0.5)', 'dy': '(0.5)', 'verbose': '(True)', 'smooth': '(0.3)', 'function': '"""gaussian"""'...
from keras.layers import Input, Dense, Dropout, LSTM from keras.models import Model, Sequential from keras.optimizers import SGD from keras import regularizers def feedforward(layer_spec=[64],num_labels=5,activ='sigmoid', optim='adam',loss='categorical_crossentropy', droprate=None,loss_...
[ "keras.layers.Dropout", "keras.layers.LSTM", "keras.layers.Dense", "keras.regularizers.l1", "keras.models.Sequential" ]
[((363, 375), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (373, 375), False, 'from keras.models import Model, Sequential\n'), ((1183, 1195), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (1193, 1195), False, 'from keras.models import Model, Sequential\n'), ((812, 851), 'keras.layers.Dense', ...
import re stages = { "Battlefield": re.compile(r"battle", flags=re.I), "Dream Land N64": re.compile(r"land", flags=re.I), "Final Destination": re.compile(r"final|fd", flags=re.I), "Fountain of Dreams": re.compile(r"fount|fod", flags=re.I), "Yoshi's Story": re.compile(r"yoshi", flags=re.I),...
[ "re.compile" ]
[((46, 78), 're.compile', 're.compile', (['"""battle"""'], {'flags': 're.I'}), "('battle', flags=re.I)\n", (56, 78), False, 'import re\n'), ((104, 134), 're.compile', 're.compile', (['"""land"""'], {'flags': 're.I'}), "('land', flags=re.I)\n", (114, 134), False, 'import re\n'), ((163, 197), 're.compile', 're.compile', ...
import tensorflow as tf from . import utils from . import base def l2(params=None): if params is None: params = base.find_variables(weight=True) return utils.smart_sum([tf.nn.l2_loss(x) for x in params])
[ "tensorflow.nn.l2_loss" ]
[((188, 204), 'tensorflow.nn.l2_loss', 'tf.nn.l2_loss', (['x'], {}), '(x)\n', (201, 204), True, 'import tensorflow as tf\n')]
# -*- coding: utf-8 -*- import sys import os from datetime import datetime sys.path.append(os.path.abspath('..')) sys.path.append(os.path.abspath('.')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' ...
[ "os.path.abspath", "datetime.datetime.now" ]
[((92, 113), 'os.path.abspath', 'os.path.abspath', (['""".."""'], {}), "('..')\n", (107, 113), False, 'import os\n'), ((131, 151), 'os.path.abspath', 'os.path.abspath', (['"""."""'], {}), "('.')\n", (146, 151), False, 'import os\n'), ((360, 374), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (372, 374), Fa...
from hltv.api.match.request import MatchRequest from hltv.models.team.lib import Team from hltv.libs.helper import * class Match: def __init__(self, match_id: int): self.body: Any = MatchRequest(match_id)() self.results: dict = dict() self.match_id = match_id self._canonicalize_bod...
[ "hltv.api.match.request.MatchRequest" ]
[((196, 218), 'hltv.api.match.request.MatchRequest', 'MatchRequest', (['match_id'], {}), '(match_id)\n', (208, 218), False, 'from hltv.api.match.request import MatchRequest\n')]
import numpy as np from scipy.integrate import quad import pandas as pd # calculate the k-corrention in erg.s-1.cm-2: def NE(E,Epeak,alpha,beita): if (alpha-beita)*Epeak/(2+alpha)>=E: NE=(E/100)**alpha*np.exp(-E*(2+alpha)/Epeak) return NE elif (alpha-beita)*Epeak/(2+alpha)<=E: NE=(((al...
[ "numpy.sum", "scipy.integrate.quad", "random.uniform", "pandas.read_excel", "numpy.append", "numpy.mean", "numpy.exp", "numpy.cos", "numpy.log10", "numpy.arccos", "numpy.sqrt" ]
[((1513, 1540), 'numpy.arccos', 'np.arccos', (['(1 - Egama / eiso)'], {}), '(1 - Egama / eiso)\n', (1522, 1540), True, 'import numpy as np\n'), ((1816, 1843), 'numpy.arccos', 'np.arccos', (['(1 - Egama / eiso)'], {}), '(1 - Egama / eiso)\n', (1825, 1843), True, 'import numpy as np\n'), ((2965, 2992), 'numpy.arccos', 'n...
''' Created on Jun 1, 2011 @author: Peter ''' from numpy import * import matplotlib import matplotlib.pyplot as plt import pca dataMat = pca.loadDataSet('testSet.txt') lowDMat, reconMat = pca.pca(dataMat, 1) fig = plt.figure() ax = fig.add_subplot(111) ax.scatter(dataMat[:,0], dataMat[:,1], marker='^'...
[ "matplotlib.pyplot.figure", "pca.pca", "pca.loadDataSet", "matplotlib.pyplot.show" ]
[((149, 179), 'pca.loadDataSet', 'pca.loadDataSet', (['"""testSet.txt"""'], {}), "('testSet.txt')\n", (164, 179), False, 'import pca\n'), ((201, 220), 'pca.pca', 'pca.pca', (['dataMat', '(1)'], {}), '(dataMat, 1)\n', (208, 220), False, 'import pca\n'), ((230, 242), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '(...
""" Fixed Maximum Cost (FMC) baseline """ import logging from collections import defaultdict from typing import Tuple, List import time import numpy as np from pup.algorithms import privacy_helper from pup.algorithms.uniform_prior import cal_prob_dists_num_users_for_grid from pup.algorithms.util import get_linear_pr...
[ "numpy.average", "pup.io.dataio.read_costs", "pup.algorithms.util.get_linear_profit_fixed_cost", "pup.algorithms.privacy_helper.buy_data_at_price", "pup.algorithms.uniform_prior.cal_prob_dists_num_users_for_grid", "time.time", "pup.experiment.exp_util.cal_num_data_points", "collections.defaultdict", ...
[((559, 586), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (576, 586), False, 'import logging\n'), ((1185, 1196), 'time.time', 'time.time', ([], {}), '()\n', (1194, 1196), False, 'import time\n'), ((2441, 2517), 'pup.algorithms.uniform_prior.cal_prob_dists_num_users_for_grid', 'cal_prob...
import requests from pprint import pprint from requests.auth import HTTPBasicAuth from getpass import getpass from urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) if __name__ == "__main__": username = "k19ran" password = getpass()...
[ "requests.packages.urllib3.disable_warnings", "requests.get", "getpass.getpass" ]
[((166, 241), 'requests.packages.urllib3.disable_warnings', 'requests.packages.urllib3.disable_warnings', ([], {'category': 'InsecureRequestWarning'}), '(category=InsecureRequestWarning)\n', (208, 241), False, 'import requests\n'), ((311, 320), 'getpass.getpass', 'getpass', ([], {}), '()\n', (318, 320), False, 'from ge...