code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
"""URBAN-SED Dataset Loader .. admonition:: Dataset Info :class: dropdown URBAN-SED ========= URBAN-SED (c) by <NAME>, <NAME>, <NAME>, <NAME>, and <NAME>. URBAN-SED is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). You should have received a copy of the l...
[ "os.path.join", "jams.load", "soundata.core.copy_docs", "soundata.core.docstring_inherit", "numpy.array", "soundata.download_utils.RemoteFileMetadata", "os.path.basename", "csv.reader", "librosa.load" ]
[((12525, 12561), 'soundata.core.docstring_inherit', 'core.docstring_inherit', (['core.Dataset'], {}), '(core.Dataset)\n', (12547, 12561), False, 'from soundata import core\n'), ((9146, 9398), 'soundata.download_utils.RemoteFileMetadata', 'download_utils.RemoteFileMetadata', ([], {'filename': '"""URBAN-SED_v2.0.0.tar.g...
import pytest import subprocess import server from random import SystemRandom import string from unittest import mock from multiprocessing import Process from time import sleep from sparkbot import SparkBot, receiver from sparkbot.exceptions import CommandSetupError from wsgiref import simple_server import requests fro...
[ "logging.getLogger", "requests.post", "zipfile.ZipFile", "multiprocessing.Process", "time.sleep", "pytest.fail", "pytest.fixture", "urllib.request.urlretrieve", "sparkbot.SparkBot", "sparkbot.receiver.create", "subprocess.run", "os.mkdir", "wsgiref.simple_server.make_server", "unittest.moc...
[((797, 828), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (811, 828), False, 'import pytest\n'), ((1233, 1264), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (1247, 1264), False, 'import pytest\n'), ((3789, 3820), 'pytest.fi...
#!/usr/bin/python import subprocess import distutils.spawn from os.path import exists import psutil from ansible.module_utils.basic import AnsibleModule DOCUMENTATION = r''' --- module: sysinfo version_added: "0.1" short_description: Get system information. description: Module which gathers summarized information ...
[ "subprocess.check_output", "os.path.exists", "ansible.module_utils.basic.AnsibleModule", "psutil.disk_usage" ]
[((1150, 1198), 'subprocess.check_output', 'subprocess.check_output', (['command'], {'shell': 'in_shell'}), '(command, shell=in_shell)\n', (1173, 1198), False, 'import subprocess\n'), ((3429, 3496), 'ansible.module_utils.basic.AnsibleModule', 'AnsibleModule', ([], {'argument_spec': 'module_args', 'supports_check_mode':...
import discord from discord.ext import commands from discord.ext.commands import Bot from datetime import datetime import sqlite3 now = datetime.now() class mod_events(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_member_join(self, member): if m...
[ "discord.ext.commands.Cog.listener", "datetime.datetime.now", "discord.Embed", "sqlite3.connect" ]
[((143, 157), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (155, 157), False, 'from datetime import datetime\n'), ((247, 270), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (268, 270), False, 'from discord.ext import commands\n'), ((475, 498), 'discord.ext.commands.Cog.li...
import pytest class Dummy: pass def test_assert_max_version(): from eventio.version_handling import assert_max_version fake_object = Dummy() fake_object.header = Dummy() for i in range(3): fake_object.header.version = i assert_max_version(fake_object, 2) with pytest.raises...
[ "eventio.version_handling.assert_version_in", "pytest.raises", "eventio.version_handling.assert_max_version", "eventio.version_handling.assert_exact_version" ]
[((695, 731), 'eventio.version_handling.assert_exact_version', 'assert_exact_version', (['fake_object', '(1)'], {}), '(fake_object, 1)\n', (715, 731), False, 'from eventio.version_handling import assert_exact_version\n'), ((1037, 1075), 'eventio.version_handling.assert_version_in', 'assert_version_in', (['fake_object',...
# Generated by Django 3.1.3 on 2020-11-06 11:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('weather', '0001_initial'), ] operations = [ migrations.DeleteModel( name='City', ), ]
[ "django.db.migrations.DeleteModel" ]
[((216, 251), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""City"""'}), "(name='City')\n", (238, 251), False, 'from django.db import migrations\n')]
#!/usr/bin/env python # encoding: utf-8 ''' @author: zhoujun @time: 2019/12/17 上午11:02 ''' from mxnet.gluon import HybridBlock, nn import mxnet as mx import gluoncv.model_zoo as gcv_model_zoo from gluoncv.nn.feature import FPNFeatureExpander class ResNetFPN(HybridBlock): def __init__(self, backbone, channels=1, c...
[ "mxnet.gluon.nn.Conv2D", "mxnet.gluon.nn.BatchNorm", "mxnet.cpu", "mxnet.gluon.nn.HybridSequential", "gluoncv.nn.feature.FPNFeatureExpander", "mxnet.init.Normal", "mxnet.gluon.nn.Activation" ]
[((323, 331), 'mxnet.cpu', 'mx.cpu', ([], {}), '()\n', (329, 331), True, 'import mxnet as mx\n'), ((943, 1166), 'gluoncv.nn.feature.FPNFeatureExpander', 'FPNFeatureExpander', ([], {'network': 'base_network', 'outputs': 'backbone_outputs', 'num_filters': '[256, 256, 256, 256]', 'use_1x1': '(True)', 'use_upsample': '(Tru...
# -*- coding: utf-8 -*- ######################################################################## # NSAp - Copyright (C) CEA, 2021 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # f...
[ "logging.getLogger", "pandas.read_csv", "numpy.save", "numpy.savez", "pandas.DataFrame", "collections.namedtuple", "sklearn.model_selection.train_test_split", "pickle.load", "os.path.isfile", "numpy.isnan", "neurocombat_sklearn.CombatModel", "sklearn.linear_model.LinearRegression", "pandas.i...
[((1061, 1169), 'collections.namedtuple', 'namedtuple', (['"""Item"""', "['train_input_path', 'test_input_path', 'train_metadata_path',\n 'test_metadata_path']"], {}), "('Item', ['train_input_path', 'test_input_path',\n 'train_metadata_path', 'test_metadata_path'])\n", (1071, 1169), False, 'from collections impor...
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import pytest from specfile.sections import Section, Sections def test_find(): sections = Sections([Section("package"), Section("prep"), Section("changelog")]) assert sections.find("prep") == 1 with pytest.raises(ValueError):...
[ "specfile.sections.Sections.parse", "pytest.raises", "specfile.sections.Section" ]
[((389, 459), 'specfile.sections.Sections.parse', 'Sections.parse', (['"""0\n\n%prep\n0\n1\n2\n\n%package x\n%files y\n0\n%changelog"""'], {}), '("""0\n\n%prep\n0\n1\n2\n\n%package x\n%files y\n0\n%changelog""")\n', (403, 459), False, 'from specfile.sections import Section, Sections\n'), ((294, 319), 'pytest.raises', '...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ "mindspore.nn.CellList", "mindspore.nn.Dense", "mindspore.ops.Abs", "numpy.arange", "mindspore.ops.Select", "mindspore.ops.ReduceSum", "mindspore.ops.Square", "numpy.random.uniform", "mindspore.nn.ReLU", "mindspore.ops.Ones", "mindspore.ops.MatMul", "mindspore.ops.shape", "mindspore.nn.Batch...
[((1899, 1909), 'mindspore.ops.MatMul', 'P.MatMul', ([], {}), '()\n', (1907, 1909), True, 'from mindspore import ops as P\n'), ((1929, 1956), 'mindspore.ops.ReduceSum', 'P.ReduceSum', ([], {'keep_dims': '(True)'}), '(keep_dims=True)\n', (1940, 1956), True, 'from mindspore import ops as P\n'), ((3204, 3226), 'mindspore....
""" A JSON encoder and decoder to simplify working with the RPC's datatypes. """ import json import calendar import datetime class UTC(datetime.tzinfo): """UTC""" def utcoffset(self, dt): return datetime.timedelta(0) def tzname(self, dt): return 'UTC' def dst(sel...
[ "datetime.datetime", "datetime.timedelta" ]
[((229, 250), 'datetime.timedelta', 'datetime.timedelta', (['(0)'], {}), '(0)\n', (247, 250), False, 'import datetime\n'), ((344, 365), 'datetime.timedelta', 'datetime.timedelta', (['(0)'], {}), '(0)\n', (362, 365), False, 'import datetime\n'), ((995, 1048), 'datetime.datetime', 'datetime.datetime', (['value.year', 'va...
from koko import NAME, VERSION, HASH import wx def show_about_box(event=None): '''Displays an About box with information about this program.''' info = wx.AboutDialogInfo() info.SetName(NAME) info.SetVersion(VERSION) if HASH is None: info.SetDescription('An interactive design tool for .ko...
[ "wx.AboutDialogInfo", "wx.AboutBox" ]
[((162, 182), 'wx.AboutDialogInfo', 'wx.AboutDialogInfo', ([], {}), '()\n', (180, 182), False, 'import wx\n'), ((626, 643), 'wx.AboutBox', 'wx.AboutBox', (['info'], {}), '(info)\n', (637, 643), False, 'import wx\n')]
#!/usr/bin/env python import os import shutil import sys src, dst = sys.argv[1:] if os.path.exists(dst): if os.path.isdir(dst): shutil.rmtree(dst) else: os.remove(dst) if os.path.isdir(src): shutil.copytree(src, dst) else: shutil.copy2(src, dst)
[ "os.path.exists", "shutil.copy2", "shutil.copytree", "os.path.isdir", "shutil.rmtree", "os.remove" ]
[((87, 106), 'os.path.exists', 'os.path.exists', (['dst'], {}), '(dst)\n', (101, 106), False, 'import os\n'), ((187, 205), 'os.path.isdir', 'os.path.isdir', (['src'], {}), '(src)\n', (200, 205), False, 'import os\n'), ((113, 131), 'os.path.isdir', 'os.path.isdir', (['dst'], {}), '(dst)\n', (126, 131), False, 'import os...
import threading import os import pigpio import sys from datetime import time as timestruct from datetime import datetime import dataclasses import struct import subprocess # structure for the event data # holds the sign of the change and the time of update @dataclasses.dataclass class EventData: """ datac...
[ "subprocess.run", "sys.exc_info", "datetime.datetime.now", "pigpio.pi", "threading.Thread" ]
[((1418, 1429), 'pigpio.pi', 'pigpio.pi', ([], {}), '()\n', (1427, 1429), False, 'import pigpio\n'), ((1910, 1987), 'threading.Thread', 'threading.Thread', ([], {'target': 'ThermalPig.update_wrapper', 'args': '(self,)', 'daemon': '(True)'}), '(target=ThermalPig.update_wrapper, args=(self,), daemon=True)\n', (1926, 1987...
# * train.py: # main file of the program, concludes "__main__" entry. # * Config the arguments and run this file. # # * Test Status: Not tested # #-*- coding: utf-8 -* from trainer.trainer import Trainer import argparse import os def parse_args(): ''' - To parse arguments - Used in __main__ :return...
[ "argparse.ArgumentParser", "trainer.trainer.Trainer" ]
[((370, 427), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Keypoints Training"""'}), "(description='Keypoints Training')\n", (393, 427), False, 'import argparse\n'), ((3325, 3338), 'trainer.trainer.Trainer', 'Trainer', (['args'], {}), '(args)\n', (3332, 3338), False, 'from trainer.trai...
import time from typing import Dict import tensorflow as tf from .helpers import get_mnist, MNIST_CLASSES, MNIST_FEATURES def full_precision_net(features: tf.placeholder, weights: Dict[str, tf.Variable]): """ Constructs full precision model :param features: model input in form of placeholder :param ...
[ "tensorflow.random_normal", "tensorflow.nn.relu", "tensorflow.placeholder", "tensorflow.Session", "tensorflow.global_variables_initializer", "tensorflow.argmax", "tensorflow.matmul", "tensorflow.nn.softmax", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.train.AdamOptimizer", "te...
[((394, 428), 'tensorflow.matmul', 'tf.matmul', (['features', "weights['h1']"], {}), "(features, weights['h1'])\n", (403, 428), True, 'import tensorflow as tf\n'), ((439, 454), 'tensorflow.nn.relu', 'tf.nn.relu', (['z_1'], {}), '(z_1)\n', (449, 454), True, 'import tensorflow as tf\n'), ((492, 521), 'tensorflow.matmul',...
# Copyright (c) 2013, SELCO and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details from frappe import msgprint import datetime from datetime import tim...
[ "frappe.db.get_value", "dateutil.relativedelta.relativedelta", "frappe._", "frappe.db.sql", "frappe.utils.cint", "datetime.timedelta", "frappe.utils.getdate" ]
[((2108, 2174), 'frappe.db.get_value', 'frappe.db.get_value', (['"""Fiscal Year"""', 'fiscal_year', '"""year_start_date"""'], {}), "('Fiscal Year', fiscal_year, 'year_start_date')\n", (2127, 2174), False, 'import frappe\n'), ((2736, 3264), 'frappe.db.sql', 'frappe.db.sql', (['"""select name, selco_complaint_received_da...
import os import sys import numpy as np def get_malware_dataset(valid=False): def get_monthly_data(file_path, num_feature=483): '''Each row of `x_mat` is a datapoint. It adds a constant one for another dimension at the end for the bias term. Returns: two numpy arrays, one...
[ "numpy.mean", "numpy.where", "numpy.log", "numpy.array", "numpy.concatenate", "numpy.std" ]
[((7147, 7180), 'numpy.mean', 'np.mean', (['X'], {'axis': '(0)', 'keepdims': '(True)'}), '(X, axis=0, keepdims=True)\n', (7154, 7180), True, 'import numpy as np\n'), ((7215, 7247), 'numpy.std', 'np.std', (['X'], {'axis': '(0)', 'keepdims': '(True)'}), '(X, axis=0, keepdims=True)\n', (7221, 7247), True, 'import numpy as...
import argparse import logging import os import random import math import ransac.core as ransac from ransac.models.conic_section import ConicSection import cv2 import numpy as np logging.basicConfig(level=logging.DEBUG, format='%(asctime)-15s [%(levelname)s] %(message)s') parser = argparse.ArgumentParser() parser.add...
[ "logging.basicConfig", "cv2.min", "os.path.exists", "argparse.ArgumentParser", "os.makedirs", "cv2.line", "os.path.join", "logging.info", "random.seed", "ransac.core.Modeler", "numpy.zeros", "cv2.circle", "cv2.cvtColor", "cv2.Canny", "cv2.imread", "cv2.blur" ]
[((180, 278), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG', 'format': '"""%(asctime)-15s [%(levelname)s] %(message)s"""'}), "(level=logging.DEBUG, format=\n '%(asctime)-15s [%(levelname)s] %(message)s')\n", (199, 278), False, 'import logging\n'), ((284, 309), 'argparse.ArgumentParser'...
from django.db import models # Create your models here. class Image(models.Model): image = models.ImageField(upload_to = 'gallery/') name = models.CharField(max_length=30) description = models.CharField(max_length=100) location = models.ForeignKey('location',on_delete = models.CASCADE) category = m...
[ "django.db.models.ImageField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((96, 135), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': '"""gallery/"""'}), "(upload_to='gallery/')\n", (113, 135), False, 'from django.db import models\n'), ((149, 180), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)'}), '(max_length=30)\n', (165, 180), False, '...
import re from nltk.corpus import stopwords from nltk.data import PathPointer import pandas from sklearn.feature_extraction.text import TfidfVectorizer , CountVectorizer from nltk.tokenize import word_tokenize import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer,CountVectorizer qsn=input("En...
[ "sklearn.feature_extraction.text.TfidfVectorizer" ]
[((977, 1031), 'sklearn.feature_extraction.text.TfidfVectorizer', 'TfidfVectorizer', ([], {'analyzer': '"""word"""', 'stop_words': '"""english"""'}), "(analyzer='word', stop_words='english')\n", (992, 1031), False, 'from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer\n')]
""" Google Cloud Messaging Previously known as C2DM Documentation is available on the Android Developer website: https://developer.android.com/google/gcm/index.html """ import json from .models import GCMDevice try: from urllib.request import Request, urlopen from urllib.parse import urlencode except ImportError: ...
[ "urllib2.Request", "json.dumps", "django.core.exceptions.ImproperlyConfigured", "urllib2.urlopen" ]
[((1088, 1136), 'urllib2.Request', 'Request', (["SETTINGS['GCM_POST_URL']", 'data', 'headers'], {}), "(SETTINGS['GCM_POST_URL'], data, headers)\n", (1095, 1136), False, 'from urllib2 import Request, urlopen\n'), ((841, 963), 'django.core.exceptions.ImproperlyConfigured', 'ImproperlyConfigured', (['"""You need to set PU...
# This is a template for your project 2 submission. # Please fill in the get_predictions method to return key-value pairs # for each parcelid and the predicted log-error. # Import the libraries and give them abbreviated names: import pandas as pd import numpy as np import statsmodels.api as sm # load the data, us...
[ "pandas.read_csv" ]
[((401, 435), 'pandas.read_csv', 'pd.read_csv', (['"""properties_2017.csv"""'], {}), "('properties_2017.csv')\n", (412, 435), True, 'import pandas as pd\n'), ((448, 510), 'pandas.read_csv', 'pd.read_csv', (['"""train_2017.csv"""'], {'parse_dates': "['transactiondate']"}), "('train_2017.csv', parse_dates=['transactionda...
import math import os import torch import numpy as np ## Code taken from https://github.com/hassony2/kinetics_i3d_pytorch/blob/master/src/i3dpt.py def get_padding_shape(filter_shape, stride, mod=0): """Fetch a tuple describing the input padding shape. NOTES: To replicate "TF SAME" style padding, the padding ...
[ "torch.nn.Dropout", "torch.nn.Softmax", "torch.nn.AvgPool3d", "torch.nn.Sequential", "torch.nn.MaxPool3d", "torch.nn.functional.relu", "torch.nn.ConstantPad3d", "torch.nn.BatchNorm3d", "torch.cat", "torch.nn.Conv3d" ]
[((5465, 5520), 'torch.nn.MaxPool3d', 'torch.nn.MaxPool3d', (['kernel_size', 'stride'], {'ceil_mode': '(True)'}), '(kernel_size, stride, ceil_mode=True)\n', (5483, 5520), False, 'import torch\n'), ((6195, 6246), 'torch.nn.Sequential', 'torch.nn.Sequential', (['branch_1_conv1', 'branch_1_conv2'], {}), '(branch_1_conv1, ...
import boto3 import logging import json logger = logging.getLogger() logger.setLevel(logging.INFO) sm_client = boto3.client('sagemaker') #Retrieve Hyperparameters Tuning Job infomation. def lambda_handler(event, context): if ('HpoJobName' in event): hpo_job_name = event['HpoJobName'] else: r...
[ "logging.getLogger", "json.dumps", "boto3.client" ]
[((50, 69), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (67, 69), False, 'import logging\n'), ((112, 137), 'boto3.client', 'boto3.client', (['"""sagemaker"""'], {}), "('sagemaker')\n", (124, 137), False, 'import boto3\n'), ((441, 458), 'json.dumps', 'json.dumps', (['event'], {}), '(event)\n', (451, 458)...
""" Copyright (C) Cortic Technology Corp. - All Rights Reserved Written by <NAME> <<EMAIL>>, 2021 """ import picamera import logging import time import base64 import io import threading from curt.modules.vision.base_vision_input import BaseVisionInput from collections import deque class PicamInput(BaseVisionInput)...
[ "collections.deque", "base64.b64encode", "io.BytesIO", "picamera.PiCamera", "logging.warning", "threading.Event", "threading.Thread" ]
[((449, 464), 'collections.deque', 'deque', ([], {'maxlen': '(3)'}), '(maxlen=3)\n', (454, 464), False, 'from collections import deque\n'), ((486, 503), 'threading.Event', 'threading.Event', ([], {}), '()\n', (501, 503), False, 'import threading\n'), ((950, 969), 'picamera.PiCamera', 'picamera.PiCamera', ([], {}), '()\...
""" process_abundances Author: <NAME> Notes: script and functions to process stellar abundane output from a simulation where chemical tags of stars are written to stdout. This loops through all files that could contain this info in the given directory (or files that match ...
[ "galaxy_analysis.utilities.utilities.species_from_fields", "numpy.sum", "yt.load", "subprocess.call", "numpy.genfromtxt", "glob.glob" ]
[((1751, 1774), 'numpy.genfromtxt', 'np.genfromtxt', (['"""sf.dat"""'], {}), "('sf.dat')\n", (1764, 1774), True, 'import numpy as np\n'), ((2772, 2864), 'numpy.genfromtxt', 'np.genfromtxt', (["(directory + '/StellarAbundances.dat')"], {'dtype': '_ndtypes', 'invalid_raise': '(False)'}), "(directory + '/StellarAbundances...
import logging import unittest from observer import Hobbits, Orcs, Weather, WeatherType class TestObserver(unittest.TestCase): def test_observable(self): weather = Weather() # register observable orcs, hobbits = Orcs(), Hobbits() weather.add_observer(orcs) weather.add_obs...
[ "observer.Weather", "observer.Orcs", "observer.Hobbits" ]
[((179, 188), 'observer.Weather', 'Weather', ([], {}), '()\n', (186, 188), False, 'from observer import Hobbits, Orcs, Weather, WeatherType\n'), ((244, 250), 'observer.Orcs', 'Orcs', ([], {}), '()\n', (248, 250), False, 'from observer import Hobbits, Orcs, Weather, WeatherType\n'), ((252, 261), 'observer.Hobbits', 'Hob...
import hashlib import json import sys import time import types import warnings try: from urllib.request import build_opener, HTTPRedirectHandler from urllib.parse import urlencode from urllib.error import URLError, HTTPError string_types = str, integer_types = int, numeric_types = (int, float) ...
[ "json.loads", "hashlib.md5", "sys.exc_info", "urllib.urlencode", "warnings.warn", "time.gmtime" ]
[((4158, 4251), 'warnings.warn', 'warnings.warn', (['"""/v3/clicks is depricated in favor of /v3/link/clicks"""', 'DeprecationWarning'], {}), "('/v3/clicks is depricated in favor of /v3/link/clicks',\n DeprecationWarning)\n", (4171, 4251), False, 'import warnings\n'), ((4789, 4888), 'warnings.warn', 'warnings.warn',...
# -*- coding: utf-8 -*- """ Coil module Created on Tue Jan 26 08:31:05 2021 @author: <NAME> """ from __future__ import annotations from typing import List import numpy as np import os import matplotlib.pyplot as plt from ..segment.segment import Segment, Arc, Circle, Line from ..wire.wire import Wire, WireRect, Wi...
[ "os.path.exists", "matplotlib.pyplot.savefig", "numpy.array", "matplotlib.pyplot.figure", "numpy.linspace", "matplotlib.pyplot.show" ]
[((784, 809), 'numpy.array', 'np.array', (['[0.0, 0.0, 0.0]'], {}), '([0.0, 0.0, 0.0])\n', (792, 809), True, 'import numpy as np\n'), ((819, 844), 'numpy.array', 'np.array', (['[1.0, 0.0, 0.0]'], {}), '([1.0, 0.0, 0.0])\n', (827, 844), True, 'import numpy as np\n'), ((854, 879), 'numpy.array', 'np.array', (['[0.0, 1.0,...
import math import torch import pyro from pyro import poutine from pyro.poutine.util import prune_subsample_sites from pyro.util import warn_if_nan from pyro.infer.util import torch_item from pyro.contrib.util import lexpand, rexpand class BlackBoxMutualInformation(object): def __init__( self, model, cr...
[ "torch.randperm", "pyro.plate_stack", "pyro.util.warn_if_nan", "pyro.poutine.util.prune_subsample_sites", "torch.stack", "math.log", "pyro.poutine.trace", "pyro.module", "math.exp", "torch.cat" ]
[((2848, 2876), 'pyro.poutine.util.prune_subsample_sites', 'prune_subsample_sites', (['trace'], {}), '(trace)\n', (2869, 2876), False, 'from pyro.poutine.util import prune_subsample_sites\n'), ((3602, 3629), 'torch.cat', 'torch.cat', (['latents'], {'axis': '(-1)'}), '(latents, axis=-1)\n', (3611, 3629), False, 'import ...
import config config.setup_examples() import infermedica_api if __name__ == '__main__': api = infermedica_api.get_api() print('Laboratory tests list:') print(api.lab_tests_list(), end="\n\n") print('\n\nLaboratory test details:') print(api.lab_test_details('lt_81'), end="\n\n") print('Non-...
[ "infermedica_api.get_api", "config.setup_examples" ]
[((15, 38), 'config.setup_examples', 'config.setup_examples', ([], {}), '()\n', (36, 38), False, 'import config\n'), ((101, 126), 'infermedica_api.get_api', 'infermedica_api.get_api', ([], {}), '()\n', (124, 126), False, 'import infermedica_api\n')]
from pathlib import Path import json folder = Path(__file__).parent.parent / 'others' / 'numpy_journey' out_folder = Path(__file__).parent.parent.parent / 'Desktop' / 'python_folder' def load_data(file): with file.open('r') as fr: data = json.load(fr) file_name = file.name.split('.')[0] wr...
[ "json.load", "pathlib.Path" ]
[((252, 265), 'json.load', 'json.load', (['fr'], {}), '(fr)\n', (261, 265), False, 'import json\n'), ((47, 61), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (51, 61), False, 'from pathlib import Path\n'), ((118, 132), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (122, 132), False, 'from pa...
import random import time def game(comp, a): if comp == 'S': if a == 'P': print('You loss as computer choosen',comp,'\nso better luck next time') #return False elif a == 'R': print('You Won as computer choosen',comp) #return True el...
[ "random.randint", "time.sleep" ]
[((1346, 1366), 'random.randint', 'random.randint', (['(1)', '(3)'], {}), '(1, 3)\n', (1360, 1366), False, 'import random\n'), ((1529, 1542), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (1539, 1542), False, 'import time\n'), ((1600, 1615), 'time.sleep', 'time.sleep', (['(0.3)'], {}), '(0.3)\n', (1610, 1615), Fa...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import glob from setuptools import setup setup( name='Sensorgan', packages=['utils', 'utils.core', 'utils.data', 'utils.helpers', 'utils.models'] )
[ "setuptools.setup" ]
[((154, 262), 'setuptools.setup', 'setup', ([], {'name': '"""Sensorgan"""', 'packages': "['utils', 'utils.core', 'utils.data', 'utils.helpers', 'utils.models']"}), "(name='Sensorgan', packages=['utils', 'utils.core', 'utils.data',\n 'utils.helpers', 'utils.models'])\n", (159, 262), False, 'from setuptools import set...
################################# # # NOTE: Do not edit this file. # import sys from nqueens import solve import time if len(sys.argv) != 2: print("\n\tUsage: python3 run.py <test-file>\n") exit(1) in_file = sys.argv[1] problems = [] with open(in_file) as f: problems = map(int, f.readlines()) def p...
[ "nqueens.solve", "time.time" ]
[((1340, 1351), 'time.time', 'time.time', ([], {}), '()\n', (1349, 1351), False, 'import time\n'), ((1365, 1373), 'nqueens.solve', 'solve', (['p'], {}), '(p)\n', (1370, 1373), False, 'from nqueens import solve\n'), ((1383, 1394), 'time.time', 'time.time', ([], {}), '()\n', (1392, 1394), False, 'import time\n')]
from gtts import gTTS import os tts = gTTS(text='temperatura a 30 grados', lang='es') tts.save('apagado.mp3')
[ "gtts.gTTS" ]
[((38, 85), 'gtts.gTTS', 'gTTS', ([], {'text': '"""temperatura a 30 grados"""', 'lang': '"""es"""'}), "(text='temperatura a 30 grados', lang='es')\n", (42, 85), False, 'from gtts import gTTS\n')]
from dataclasses import dataclass from typing import List from pydantic import BaseModel from xpresso import ( App, ExtractRepeatedField, FromFile, FromFormField, FromMultipart, Path, UploadFile, ) class JsonModel(BaseModel): foo: str @dataclass(frozen=True) class FormDataModel: ...
[ "dataclasses.dataclass", "xpresso.Path" ]
[((274, 296), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (283, 296), False, 'from dataclasses import dataclass\n'), ((842, 878), 'xpresso.Path', 'Path', ([], {'path': '"""/form"""', 'post': 'upload_data'}), "(path='/form', post=upload_data)\n", (846, 878), False, 'from xpresso ...
#!/usr/bin/env python from setuptools import setup, find_packages version = '0.6' setup( name='webstruct', version=version, description="A library for creating statistical NER systems that work on HTML data", long_description=open('README.rst').read(), author='<NAME>, <NAME>', author_email='<E...
[ "setuptools.find_packages" ]
[((402, 417), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (415, 417), False, 'from setuptools import setup, find_packages\n')]
from django.shortcuts import render from django.http.response import HttpResponse, HttpResponseRedirect from neighborhoodapp.models import Business, Post, Profile, Neighbourhood from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contrib.auth import login, a...
[ "django.shortcuts.render", "django.contrib.auth.authenticate", "neighborhoodapp.models.Business.search_business", "neighborhoodapp.forms.NewBusinessForm", "django.http.response.HttpResponseRedirect", "neighborhoodapp.forms.PostForm", "django.shortcuts.get_object_or_404", "django.contrib.auth.login", ...
[((701, 745), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""/accounts/login/"""'}), "(login_url='/accounts/login/')\n", (715, 745), False, 'from django.contrib.auth.decorators import login_required\n'), ((1090, 1134), 'django.contrib.auth.decorators.login_required', 'login_re...
from training import * from functions import * import os import csv cwd = os.getcwd() ############ Hyper-parameters num_run = 2 pve_int = 1.0; sparsity = 0.1; num_hidden_nodes = 200 learning_rate = 2*1e-3; num_epoch = 200 ############################# print('Prior pve is: '+str(pve_int)+', sparsity leve...
[ "csv.reader", "os.getcwd" ]
[((80, 91), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (89, 91), False, 'import os\n'), ((482, 495), 'csv.reader', 'csv.reader', (['f'], {}), '(f)\n', (492, 495), False, 'import csv\n')]
import logging from FunctionParserBase import FunctionParserBase class GenericFunctionParser(FunctionParserBase): """ A generic function parser. This parser parses arguments by their index order. """ def __init__(self, function): """ @param function: A Function instance "...
[ "logging.getLogger" ]
[((407, 434), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (424, 434), False, 'import logging\n')]
from user_lib.exec_cmd import ExeCmd from user_lib.const_values import ConstValues class Entity: def __init__(self): self._exec_cmd = ExeCmd() self._monitored = {} self._settings = None def set_settings(self, settings): self._settings = settings def handle_notification(se...
[ "user_lib.exec_cmd.ExeCmd" ]
[((148, 156), 'user_lib.exec_cmd.ExeCmd', 'ExeCmd', ([], {}), '()\n', (154, 156), False, 'from user_lib.exec_cmd import ExeCmd\n')]
from russian_g2p import Grapheme2Phoneme from russian_g2p import Accentor import json import codecs words = open('/home/a117/Документы/Linguistics/russian_g2p/corpus/wordlist') words = words.readlines() # words = ['я'] # acc = Accentor() g2p = Grapheme2Phoneme() new_simple_words = {} with open('new', 'w') as f: fo...
[ "russian_g2p.Grapheme2Phoneme" ]
[((245, 263), 'russian_g2p.Grapheme2Phoneme', 'Grapheme2Phoneme', ([], {}), '()\n', (261, 263), False, 'from russian_g2p import Grapheme2Phoneme\n')]
from gamechangerml.src.search.sent_transformer.finetune import STFinetuner from gamechangerml.configs.config import EmbedderConfig from gamechangerml.api.utils.pathselect import get_model_paths from gamechangerml.api.utils.logger import logger import argparse import os from datetime import datetime model_path_dict = g...
[ "gamechangerml.api.utils.logger.logger.info", "argparse.ArgumentParser", "os.path.join", "gamechangerml.api.utils.pathselect.get_model_paths", "datetime.datetime.now", "gamechangerml.src.search.sent_transformer.finetune.STFinetuner" ]
[((319, 336), 'gamechangerml.api.utils.pathselect.get_model_paths', 'get_model_paths', ([], {}), '()\n', (334, 336), False, 'from gamechangerml.api.utils.pathselect import get_model_paths\n'), ((508, 617), 'gamechangerml.src.search.sent_transformer.finetune.STFinetuner', 'STFinetuner', ([], {'model_load_path': 'model_l...
# -*- coding: utf-8 -*- """ Created on Wed Mar 20 21:20:48 2019 INSTITUTO FEDERAL DE EDUCAÇÃO, CIÊNCIA E TECNOLOGIA DO PÁRA - IFPA ANANINDEUA @author: Prof. Dr. <NAME> Discentes: <NAME> <NAME> Grupo de Pesquisa: Gradiente de Mo...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.linspace", "numpy.cos", "matplotlib.pyplot.title", "matplotlib.pyplot.show" ]
[((786, 825), 'numpy.linspace', 'np.linspace', (['(-2 * np.pi)', '(2 * np.pi)', '(100)'], {}), '(-2 * np.pi, 2 * np.pi, 100)\n', (797, 825), True, 'import numpy as np\n'), ((853, 862), 'numpy.cos', 'np.cos', (['x'], {}), '(x)\n', (859, 862), True, 'import numpy as np\n'), ((1056, 1076), 'matplotlib.pyplot.plot', 'plt.p...
from typing import Callable, Dict, Iterable, Optional, Tuple, Type from urllib.parse import parse_qs, urlparse import pytest from rest_registration.utils.signers import URLParamsSigner from tests.helpers.timer import Timer def assert_valid_verification_url( url: str, expected_path: Optional[str] = N...
[ "urllib.parse.parse_qs", "urllib.parse.urlparse" ]
[((1464, 1477), 'urllib.parse.urlparse', 'urlparse', (['url'], {}), '(url)\n', (1472, 1477), False, 'from urllib.parse import parse_qs, urlparse\n'), ((1490, 1537), 'urllib.parse.parse_qs', 'parse_qs', (['parsed_url.query'], {'strict_parsing': '(True)'}), '(parsed_url.query, strict_parsing=True)\n', (1498, 1537), False...
import numpy as np import argparse # from rllab.envs.normalized_env import normalize from maci.learners import MADDPG, MAVBAC, MASQL from maci.misc.kernel import adaptive_isotropic_gaussian_kernel from maci.replay_buffers import SimpleReplayBuffer from maci.value_functions.sq_value_function import NNQFunction, NNJoin...
[ "maci.value_functions.sq_value_function.NNQFunction", "maci.replay_buffers.SimpleReplayBuffer", "maci.policies.StochasticNNConditionalPolicy", "gtimer.reset", "gtimer.rename_root", "numpy.array", "maci.policies.StochasticNNPolicy", "copy.deepcopy", "rllab.misc.logger.set_snapshot_dir", "gtimer.sta...
[((790, 887), 'maci.replay_buffers.SimpleReplayBuffer', 'SimpleReplayBuffer', (['env.env_specs'], {'max_replay_buffer_size': '(1000000.0)', 'joint': 'joint', 'agent_id': 'i'}), '(env.env_specs, max_replay_buffer_size=1000000.0, joint=\n joint, agent_id=i)\n', (808, 887), False, 'from maci.replay_buffers import Simpl...
# Copyright 2013 Rackspace # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the...
[ "raxcli.models.Attribute" ]
[((921, 932), 'raxcli.models.Attribute', 'Attribute', ([], {}), '()\n', (930, 932), False, 'from raxcli.models import Attribute, Model\n'), ((945, 956), 'raxcli.models.Attribute', 'Attribute', ([], {}), '()\n', (954, 956), False, 'from raxcli.models import Attribute, Model\n'), ((968, 979), 'raxcli.models.Attribute', '...
############################### # Import Python modules ############################### import os, sys, datetime, inspect ############################### # Import Scapy and Goose Modules ############################### # We have to tell script where to find the Goose module in parent directory currentdir = os.path.dir...
[ "sys.path.insert", "inspect.currentframe", "os.path.dirname", "scapy.all.rdpcap", "goose.goose.GOOSE" ]
[((395, 422), 'os.path.dirname', 'os.path.dirname', (['currentdir'], {}), '(currentdir)\n', (410, 422), False, 'import os, sys, datetime, inspect\n'), ((423, 452), 'sys.path.insert', 'sys.path.insert', (['(0)', 'parentdir'], {}), '(0, parentdir)\n', (438, 452), False, 'import os, sys, datetime, inspect\n'), ((1050, 106...
import os import torch import torch.nn as nn import struct import numpy as np import json from time import perf_counter from pprint import pprint from lstm_rnnt_dec import PluginLstmRnntDec start_setup_time = perf_counter() # Setup. output_bin = os.environ.get('CK_OUT_RAW_DATA', 'tmp-ck-output.bin') output_json = ou...
[ "os.path.exists", "pprint.pprint", "torch.load", "json.dumps", "os.environ.get", "time.perf_counter", "torch.from_numpy", "lstm_rnnt_dec.PluginLstmRnntDec", "torch.zeros", "numpy.random.RandomState" ]
[((211, 225), 'time.perf_counter', 'perf_counter', ([], {}), '()\n', (223, 225), False, 'from time import perf_counter\n'), ((249, 303), 'os.environ.get', 'os.environ.get', (['"""CK_OUT_RAW_DATA"""', '"""tmp-ck-output.bin"""'], {}), "('CK_OUT_RAW_DATA', 'tmp-ck-output.bin')\n", (263, 303), False, 'import os\n'), ((368,...
# 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 the Li...
[ "numpy.mean", "numpy.random.default_rng", "numpy.array", "numpy.apply_along_axis", "numpy.concatenate", "copy.deepcopy", "pandas.concat" ]
[((2802, 2836), 'numpy.random.default_rng', 'np.random.default_rng', (['random_seed'], {}), '(random_seed)\n', (2823, 2836), True, 'import numpy as np\n'), ((12769, 12833), 'numpy.concatenate', 'np.concatenate', (['(treated_covariates, control_covariates)'], {'axis': '(1)'}), '((treated_covariates, control_covariates),...
#! /usr/bin/env python3 # # Copyright (c) 2022 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # import logging import os import subprocess import keyring import keyring.backend import keyring.errors log = logging.getLogger("keyring_keyctl") class keyring_keyctl_c(keyring.backend.KeyringBackend): """ ...
[ "logging.getLogger", "random.choice", "keyring.errors.PasswordSetError", "subprocess.run", "keyring.backend.KeyringBackend.__init__", "keyring.errors.KeyringError" ]
[((218, 253), 'logging.getLogger', 'logging.getLogger', (['"""keyring_keyctl"""'], {}), "('keyring_keyctl')\n", (235, 253), False, 'import logging\n'), ((783, 828), 'keyring.backend.KeyringBackend.__init__', 'keyring.backend.KeyringBackend.__init__', (['self'], {}), '(self)\n', (822, 828), False, 'import keyring\n'), (...
""" Example inferring multiple exponential decay models arranged into a 4D voxelwise image. This example uses the main() interface as used by the command line application to simplify running the inference and saving the output """ import sys import numpy as np import nibabel as nib from vaby_avb import run import va...
[ "numpy.random.normal", "numpy.identity", "numpy.sqrt", "numpy.array", "vaby_avb.run", "vaby.get_model_class" ]
[((599, 623), 'numpy.sqrt', 'np.sqrt', (['NOISE_VAR_TRUTH'], {}), '(NOISE_VAR_TRUTH)\n', (606, 623), True, 'import numpy as np\n'), ((1800, 1866), 'vaby_avb.run', 'run', (['"""data_exp_noisy.nii.gz"""', '"""exp"""', '"""exps_example_out"""'], {}), "('data_exp_noisy.nii.gz', 'exp', 'exps_example_out', **options)\n", (18...
from django.shortcuts import render, redirect from django.contrib import messages from django.contrib.auth.decorators import login_required from django.http import JsonResponse from .models import Neighbourhood,Post,Contact, Business from .forms import NeighbourhoodForm, ContactForm, PostForm, BusinessForm # Create y...
[ "django.shortcuts.render", "django.http.JsonResponse", "django.shortcuts.redirect", "django.contrib.auth.decorators.login_required", "django.contrib.messages.success" ]
[((337, 370), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""login"""'}), "(login_url='login')\n", (351, 370), False, 'from django.contrib.auth.decorators import login_required\n'), ((748, 781), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_ur...
import os import sys from abc import ABCMeta, abstractmethod from datetime import datetime from pathlib import Path from typing import Union import joblib from sklearn.linear_model import LogisticRegression from sklearn.metrics import classification_report from .. import __version__ from ..utils import CANARY_MODEL_S...
[ "os.makedirs", "pathlib.Path", "sklearn.metrics.classification_report", "sklearn.linear_model.LogisticRegression", "datetime.datetime.now" ]
[((1098, 1142), 'os.makedirs', 'os.makedirs', (['self.__model_dir'], {'exist_ok': '(True)'}), '(self.__model_dir, exist_ok=True)\n', (1109, 1142), False, 'import os\n'), ((6304, 6369), 'sklearn.metrics.classification_report', 'classification_report', (['test_targets', 'prediction'], {'output_dict': '(True)'}), '(test_t...
import yaml # 填充默认设置 default_config = { 'debug_mode': False, 'save_manifest_file': True, 'output_path': './output', 'proxy': None, 'downloader_max_connection_number': 5, 'downloader_max_retry_number': 5, 'friendly_console_output': False, 'header': { 'referer': 'https://manhua.dm...
[ "yaml.load" ]
[((544, 559), 'yaml.load', 'yaml.load', (['text'], {}), '(text)\n', (553, 559), False, 'import yaml\n')]
# Create By : <NAME> # Uses : Manage Role from flask import jsonify, request import socket from datetime import datetime, date, time, timedelta import pymongo from database import DB import json from bson import json_util, ObjectId class VendorSubscription: def __init__(self,vendor_id=None,user_id=None): ...
[ "database.DB.insert", "bson.ObjectId", "socket.gethostname", "datetime.datetime.now" ]
[((2325, 2353), 'bson.ObjectId', 'ObjectId', (["subData['user_id']"], {}), "(subData['user_id'])\n", (2333, 2353), False, 'from bson import json_util, ObjectId\n'), ((2388, 2418), 'bson.ObjectId', 'ObjectId', (["subData['vendor_id']"], {}), "(subData['vendor_id'])\n", (2396, 2418), False, 'from bson import json_util, O...
#!/usr/bin/env python """ AER1415 Computer Optimization - Assignment 1 Author: <NAME> Submitted: Feb 25, 2021 Email: <EMAIL> Descripton: """ from numpy import * import os from matplotlib import pyplot as plt from IPython import embed from mpl_toolkits import mplot3d from matplotlib import cm import...
[ "matplotlib.use", "cmath.sqrt", "IPython.embed", "matplotlib.pyplot.figure", "matplotlib.pyplot.axes", "matplotlib.pyplot.subplots", "warnings.filterwarnings", "matplotlib.pyplot.show" ]
[((366, 424), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'RuntimeWarning'}), "('ignore', category=RuntimeWarning)\n", (389, 424), False, 'import warnings\n'), ((429, 452), 'matplotlib.use', 'matplotlib.use', (['"""TkAgg"""'], {}), "('TkAgg')\n", (443, 452), False, 'import matp...
from unittest import TestCase from bricklayer.doctor.metrics import Metrics import os class MetricsTest(TestCase): def setUp(self): self.metrics = Metrics() filename = os.path.dirname(os.path.realpath(__file__)) + '/simple_module.py' self.metrics.collect_metrics(filename) def test_it_...
[ "os.path.realpath", "bricklayer.doctor.metrics.Metrics" ]
[((161, 170), 'bricklayer.doctor.metrics.Metrics', 'Metrics', ([], {}), '()\n', (168, 170), False, 'from bricklayer.doctor.metrics import Metrics\n'), ((206, 232), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (222, 232), False, 'import os\n'), ((845, 871), 'os.path.realpath', 'os.path.rea...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 _utilities __a...
[ "pulumi.get", "pulumi.getter", "pulumi.set", "pulumi.InvokeOptions", "pulumi.runtime.invoke" ]
[((1297, 1327), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""authType"""'}), "(name='authType')\n", (1310, 1327), False, 'import pulumi\n'), ((743, 787), 'pulumi.set', 'pulumi.set', (['__self__', '"""auth_type"""', 'auth_type'], {}), "(__self__, 'auth_type', auth_type)\n", (753, 787), False, 'import pulumi\n'), ...
import math import numpy as np import scipy.optimize as opt import matplotlib.pyplot as plt import matplotlib.gridspec as gdsc class concreteSection: def __init__(self,sct,units='mm'): ''' Imports section. Parameters ---------- sct : Section Object ...
[ "numpy.array", "numpy.arange", "numpy.where", "matplotlib.pyplot.plot", "numpy.asarray", "numpy.linspace", "numpy.concatenate", "numpy.tile", "numpy.geomspace", "numpy.sign", "numpy.interp", "scipy.optimize.root", "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "numpy.absolute", ...
[((3792, 3905), 'numpy.interp', 'np.interp', (['self.steelHeights', '[self.concreteHeights[0], self.concreteHeights[-1]]', '[bottomStrain, topStrain]'], {}), '(self.steelHeights, [self.concreteHeights[0], self.concreteHeights\n [-1]], [bottomStrain, topStrain])\n', (3801, 3905), True, 'import numpy as np\n'), ((3950...
#------------------------------------------------------------------------------ # Copyright 2014 Esri # 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/LICENS...
[ "arcpy.CopyFeatures_management", "arcpy.UpdateCursor", "arcpy.mapping.MapDocument", "arcpy.AddMessage", "arcpy.MakeFeatureLayer_management", "arcpy.Describe", "arcpy.RefreshActiveView", "arcpy.Sort_management", "arcpy.SelectLayerByAttribute_management", "arcpy.mp.ArcGISProject", "os.path.basenam...
[((1075, 1102), 'arcpy.GetParameterAsText', 'arcpy.GetParameterAsText', (['(0)'], {}), '(0)\n', (1099, 1102), False, 'import arcpy\n'), ((1119, 1146), 'arcpy.GetParameterAsText', 'arcpy.GetParameterAsText', (['(1)'], {}), '(1)\n', (1143, 1146), False, 'import arcpy\n'), ((1164, 1191), 'arcpy.GetParameterAsText', 'arcpy...
from django.shortcuts import render import sqlite3 conn = sqlite3.connect('test.db') c = conn.cursor() # c.execute("INSERT INTO test2 VALUES ('Hejo')") # c.execute("SELECT * FROM test2") # print(c.fetchone()) conn.commit() conn.close() def home(request): conn = sqlite3.connect('test.db') c = conn.curso...
[ "django.shortcuts.render", "sqlite3.connect" ]
[((59, 85), 'sqlite3.connect', 'sqlite3.connect', (['"""test.db"""'], {}), "('test.db')\n", (74, 85), False, 'import sqlite3\n'), ((275, 301), 'sqlite3.connect', 'sqlite3.connect', (['"""test.db"""'], {}), "('test.db')\n", (290, 301), False, 'import sqlite3\n'), ((4249, 4288), 'django.shortcuts.render', 'render', (['re...
from .target import Target import src.resources as res class Kiwi(Target): def __init__(self, pos, screen, debug: bool = False): kiwi = res.gfx('kiwi.png', convert=True) Target.__init__(self, kiwi, pos, screen, debug) w, _h = kiwi.get_size() self.radius = int(w / 2.1) sel...
[ "src.resources.gfx" ]
[((151, 184), 'src.resources.gfx', 'res.gfx', (['"""kiwi.png"""'], {'convert': '(True)'}), "('kiwi.png', convert=True)\n", (158, 184), True, 'import src.resources as res\n'), ((395, 428), 'src.resources.gfx', 'res.gfx', (['"""kiwi.png"""'], {'convert': '(True)'}), "('kiwi.png', convert=True)\n", (402, 428), True, 'impo...
#Time Practice import datetime # Define the current date and print with different formats CurDate = datetime.datetime.now() print() print("Current date based on the system date") print("Note how it prints the date and time") print(CurDate) print() print("Different formats when printing out a date") print(CurDate....
[ "datetime.datetime.strptime", "datetime.datetime.now", "datetime.timedelta" ]
[((105, 128), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (126, 128), False, 'import datetime\n'), ((951, 1001), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['arrivalstr', '"""%Y-%m-%d"""'], {}), "(arrivalstr, '%Y-%m-%d')\n", (977, 1001), False, 'import datetime\n'), ((1108, 116...
from webu import ( Webu, WebsocketProvider, ) w3 = Webu(WebsocketProvider())
[ "webu.WebsocketProvider" ]
[((65, 84), 'webu.WebsocketProvider', 'WebsocketProvider', ([], {}), '()\n', (82, 84), False, 'from webu import Webu, WebsocketProvider\n')]
from io import StringIO from .data_objects import UnknownFile from .transit_data_object import TransitData def clone_transit_data(transit_data): """ :rtype: TransitData :type transit_data: TransitData """ new_transit_data = TransitData() for service in transit_data.calendar: new_tran...
[ "io.StringIO" ]
[((1352, 1362), 'io.StringIO', 'StringIO', ([], {}), '()\n', (1360, 1362), False, 'from io import StringIO\n'), ((3513, 3523), 'io.StringIO', 'StringIO', ([], {}), '()\n', (3521, 3523), False, 'from io import StringIO\n')]
""" Detection of trends: Given prices of X previous hours, will price increase or decrease Y% amount within next Z hours? (1) X = previous prices (2) y = next prices (3) X_norm = X \ X[0] - 1 # Normalize X (4) y_norm = y \ X[0] - 1 # Normalize y (5) Given X_norm, which decision should we take if we know y_norm ? (5....
[ "torch.manual_seed", "coinpy.PredictPriceDataset", "torch.nn.L1Loss", "matplotlib.pyplot.plot", "torch.from_numpy", "torch.no_grad", "coinpy.DataFramesHolder", "numpy.zeros", "numpy.array", "numpy.random.seed", "torch.nn.Linear", "torch.utils.data.DataLoader", "matplotlib.pyplot.scatter", ...
[((1123, 1143), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (1137, 1143), True, 'import numpy as np\n'), ((1144, 1167), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (1161, 1167), False, 'import torch\n'), ((2059, 2081), 'matplotlib.pyplot.plot', 'plt.plot', (['d'], {'alph...
# 导入python 自带库 # 导入自定义模块 from speech.baidu import Speech from Mainwindow.Mainwindow import Ui_mainWindow from PyQt5 import QtWidgets, QtGui from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QFileDialog import os class BaiduSpeech(QtWidgets.QMainWindow, Ui_mainWindow): def __init__(self): sup...
[ "os.path.exists", "PyQt5.QtGui.QIcon", "os.makedirs", "PyQt5.QtCore.pyqtSlot", "os.getcwd", "PyQt5.QtWidgets.QApplication", "os.system", "speech.baidu.Speech" ]
[((1132, 1142), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (1140, 1142), False, 'from PyQt5.QtCore import pyqtSlot\n'), ((1295, 1305), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (1303, 1305), False, 'from PyQt5.QtCore import pyqtSlot\n'), ((2195, 2227), 'PyQt5.QtWidgets.QApplication', 'QtWidgets...
from abc import ABC, abstractmethod from typing import Union import pandas as pd from sklearn.feature_selection import VarianceThreshold from .abstract import ReducerAbstract class LowVariance(ReducerAbstract): reducer: VarianceThreshold def transform(self, df: pd.DataFrame, ...
[ "sklearn.feature_selection.VarianceThreshold" ]
[((597, 625), 'sklearn.feature_selection.VarianceThreshold', 'VarianceThreshold', (['threshold'], {}), '(threshold)\n', (614, 625), False, 'from sklearn.feature_selection import VarianceThreshold\n')]
import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from gunicornserver import GunicornServer from flask_script import Manager, Server from flask_migrate import MigrateCommand from app import create_app from drop_datasource import DropDatasource from add_datasource imp...
[ "flask_script.Manager", "os.environ.get", "app.create_app", "os.path.dirname", "gunicornserver.GunicornServer", "settings.get_config_decorator.GetConfig.configure", "create_celery.make_celery" ]
[((487, 519), 'os.environ.get', 'os.environ.get', (['"""MAN_HOST_VALUE"""'], {}), "('MAN_HOST_VALUE')\n", (501, 519), False, 'import os\n'), ((534, 546), 'app.create_app', 'create_app', ([], {}), '()\n', (544, 546), False, 'from app import create_app\n'), ((561, 585), 'create_celery.make_celery', 'make_celery', (['appl...
from django.conf.urls import url, include from aomswork import views from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'products', views.ProductViewSet) router.register(r'colors', views.ColorViewSet) router.register(r'productcolor', views.ProductColorViewSet) router.register(r...
[ "django.conf.urls.include", "rest_framework.routers.DefaultRouter" ]
[((129, 144), 'rest_framework.routers.DefaultRouter', 'DefaultRouter', ([], {}), '()\n', (142, 144), False, 'from rest_framework.routers import DefaultRouter\n'), ((381, 401), 'django.conf.urls.include', 'include', (['router.urls'], {}), '(router.urls)\n', (388, 401), False, 'from django.conf.urls import url, include\n...
__author__ = 'allentran' import json import os import re import datetime import unidecode from spacy.en import English import requests import pandas as pd import numpy as np import allen_utils logger = allen_utils.get_logger(__name__) class Interval(object): def __init__(self, start, end): assert isin...
[ "spacy.en.English", "re.compile", "datetime.datetime.strptime", "os.path.join", "requests.get", "allen_utils.get_logger", "datetime.date", "datetime.timedelta", "os.walk" ]
[((205, 237), 'allen_utils.get_logger', 'allen_utils.get_logger', (['__name__'], {}), '(__name__)\n', (227, 237), False, 'import allen_utils\n'), ((621, 646), 'datetime.date', 'datetime.date', (['(1951)', '(4)', '(2)'], {}), '(1951, 4, 2)\n', (634, 646), False, 'import datetime\n'), ((648, 674), 'datetime.date', 'datet...
# encoding: utf-8 """GroupShape and related objects.""" from __future__ import absolute_import, division, print_function, unicode_literals from fitness.private.pptx.dml.effect import ShadowFormat from fitness.private.pptx.enum.shapes import MSO_SHAPE_TYPE from fitness.private.pptx.shapes.base import BaseShap...
[ "fitness.private.pptx.shapes.shapetree.GroupShapes", "fitness.private.pptx.dml.effect.ShadowFormat" ]
[((1368, 1403), 'fitness.private.pptx.dml.effect.ShadowFormat', 'ShadowFormat', (['self._element.grpSpPr'], {}), '(self._element.grpSpPr)\n', (1380, 1403), False, 'from fitness.private.pptx.dml.effect import ShadowFormat\n'), ((1966, 1998), 'fitness.private.pptx.shapes.shapetree.GroupShapes', 'GroupShapes', (['self._el...
import cvlog as log import cv2 import numpy as np from .utils import read_file, remove_dirs, get_html def test_log_image(): remove_dirs('log/') img = cv2.imread("tests/data/orange.png") log.set_mode(log.Mode.LOG) log.image(log.Level.ERROR, img) logitem = get_html('log/cvlog.html').select('.log-list...
[ "cv2.threshold", "cv2.medianBlur", "cvlog.hough_circles", "cvlog.threshold", "cvlog.hough_lines", "numpy.array", "cvlog.image", "cv2.HoughLines", "cv2.ORB_create", "cv2.cvtColor", "cvlog.keypoints", "cv2.findContours", "cvlog.set_mode", "cv2.Canny", "cv2.imread", "cvlog.contours", "c...
[((159, 194), 'cv2.imread', 'cv2.imread', (['"""tests/data/orange.png"""'], {}), "('tests/data/orange.png')\n", (169, 194), False, 'import cv2\n'), ((199, 225), 'cvlog.set_mode', 'log.set_mode', (['log.Mode.LOG'], {}), '(log.Mode.LOG)\n', (211, 225), True, 'import cvlog as log\n'), ((230, 261), 'cvlog.image', 'log.imag...
import os import yaml import pickle import glob import torch import numpy as np from torch.autograd import Variable from torchvision.utils import save_image Tensor = torch.cuda.FloatTensor if torch.cuda.is_available() else torch.FloatTensor def weights_init_normal(m): classname = m.__class__.__name__ if cla...
[ "os.path.exists", "os.makedirs", "torch.nn.init.constant_", "yaml.load", "os.path.isfile", "os.path.dirname", "torch.cat", "torch.cuda.is_available", "torch.nn.init.normal_", "torchvision.utils.save_image", "glob.glob" ]
[((193, 218), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (216, 218), False, 'import torch\n'), ((739, 765), 'os.path.dirname', 'os.path.dirname', (['file_path'], {}), '(file_path)\n', (754, 765), False, 'import os\n'), ((1058, 1112), 'torch.cat', 'torch.cat', (['(real_A.data, fake_B.data, r...
import cPickle CLASSES = ['__background__', # always index 0 'tibetan flag', 'guns','knives','not terror','islamic flag','isis flag'] cache_file = 'qiniuV5_test_detections.pkl' thresh_old = 0.9 with open('qiniuv5.txt') as fid: filenamelist = fid.readlines() fout = open('res.txt','w') with open(cac...
[ "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylabel", "matplotlib.use", "sklearn.metrics.average_precision_score", "matplotlib.pyplot.xlabel", "sklearn.metrics.precision_recall_curve", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.ylim", "matplotlib.pyplot.xlim", "cPickle.load", "matpl...
[((1334, 1374), 'sklearn.metrics.precision_recall_curve', 'precision_recall_curve', (['y_true', 'y_scores'], {}), '(y_true, y_scores)\n', (1356, 1374), False, 'from sklearn.metrics import precision_recall_curve\n'), ((1393, 1414), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (1407, 1414), False...
from __future__ import absolute_import, division, print_function from abc import abstractmethod as abstract_method import attr from boltun.engine.grammar.nodes import Node as BaseNode, \ NodeFilter as BaseFilter from boltun.engine.template.context import FilterContext @attr.s class Node(BaseNode): start = ...
[ "boltun.engine.template.context.FilterContext", "attr.ib" ]
[((320, 363), 'attr.ib', 'attr.ib', ([], {'type': 'int', 'default': 'None', 'init': '(False)'}), '(type=int, default=None, init=False)\n', (327, 363), False, 'import attr\n'), ((375, 418), 'attr.ib', 'attr.ib', ([], {'type': 'int', 'default': 'None', 'init': '(False)'}), '(type=int, default=None, init=False)\n', (382, ...
from django.db import models import datetime # Create your models here. class Produit(models.Model): nom_bouteille = models.CharField(max_length=40, default='') description_bouteille = models.CharField(max_length=500, default='') millésime = models.IntegerField(default=datetime.date.today().year) sais...
[ "django.db.models.FloatField", "django.db.models.DateField", "django.db.models.ImageField", "datetime.date.today", "django.db.models.URLField", "django.db.models.CharField" ]
[((123, 166), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(40)', 'default': '""""""'}), "(max_length=40, default='')\n", (139, 166), False, 'from django.db import models\n'), ((195, 239), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(500)', 'default': '""""""'}), "(m...
import logging import os import psycopg2 from progress.bar import Bar from bloat_my_db.utilities.file import FileUtility from bloat_my_db.utilities import display_in_table __author__ = "<NAME>" __copyright__ = "<NAME>" __license__ = "MIT" _logger = logging.getLogger(__name__) class PgSchemaAnalyzer: def __init...
[ "logging.getLogger", "psycopg2.connect", "bloat_my_db.utilities.display_in_table", "bloat_my_db.utilities.file.FileUtility.is_generated_file_exist", "os.path.dirname", "bloat_my_db.utilities.file.FileUtility.get_filename", "bloat_my_db.utilities.file.FileUtility.read_file", "bloat_my_db.utilities.file...
[((251, 278), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (268, 278), False, 'import logging\n'), ((375, 404), 'psycopg2.connect', 'psycopg2.connect', ([], {}), '(**conn_info)\n', (391, 404), False, 'import psycopg2\n'), ((2011, 2112), 'bloat_my_db.utilities.display_in_table', 'display...
#!/usr/bin/python import re import sys def rmd(nb): path = ( f"C:\\Users\\jamang\\Documents\\GitHub\\jamangstangs.github.io\\_jupyter\\{nb}" ) with open(path, "r") as file: filedata = file.read() filedata = re.sub('src="', 'src="/assets/images/', filedata) with open(path, "w") as ...
[ "re.sub" ]
[((242, 291), 're.sub', 're.sub', (['"""src=\\""""', '"""src="/assets/images/"""', 'filedata'], {}), '(\'src="\', \'src="/assets/images/\', filedata)\n', (248, 291), False, 'import re\n'), ((668, 730), 're.sub', 're.sub', (['"""!\\\\[svg\\\\]\\\\("""', '"""<img src="/assets/images/"""', 'filedata'], {}), '(\'!\\\\[svg\...
import asyncio import functools import logging import app.db.base as base import app.models as mdl import databases import fastapi_users as fastusr import sqlalchemy as sqa from app.main import DATABASE_URL, env logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def async_adapter(wrapped_f...
[ "logging.basicConfig", "logging.getLogger", "databases.Database", "sqlalchemy.create_engine", "fastapi_users.db.SQLAlchemyUserDatabase", "asyncio.new_event_loop", "functools.wraps", "app.main.env", "app.db.base.Base.metadata.create_all" ]
[((214, 253), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (233, 253), False, 'import logging\n'), ((263, 290), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (280, 290), False, 'import logging\n'), ((331, 360), 'functools.wraps'...
#!/usr/bin/env python3 # # Copyright 2017-2020 GridGain Systems. # # 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 applicab...
[ "tiden.runner.upload_artifacts", "tiden.ansiblepool.AnsiblePool", "time.strftime", "optparse.OptionParser", "tiden.runner.init_remote_hosts", "os.getcwd", "tiden.tidenrunner.TidenRunner", "tiden.artifacts.prepare", "tiden.localpool.LocalPool", "os.cpu_count", "tiden.tidenpluginmanager.PluginMana...
[((1355, 1412), 'optparse.OptionParser', 'OptionParser', ([], {'usage': 'SUPPRESS_USAGE', 'add_help_option': '(False)'}), '(usage=SUPPRESS_USAGE, add_help_option=False)\n', (1367, 1412), False, 'from optparse import OptionParser, SUPPRESS_USAGE\n'), ((11103, 11124), 'tiden.tidenpluginmanager.PluginManager', 'PluginMana...
from timeit import default_timer as timer import revkit def lhrs(filename, configuration): revkit.read_aiger(filename = filename) synthesis = revkit.lhrs(**configuration).dict() circuit = revkit.ps(circuit = True, silent = True).dict() revkit.store(clear = True, aig = True, circuit = True) retur...
[ "revkit.cbs", "revkit.ps", "timeit.default_timer", "revkit.store", "revkit.hdbs", "revkit.lhrs", "revkit.dxs", "revkit.xmglut", "revkit.read_aiger", "revkit.convert" ]
[((97, 133), 'revkit.read_aiger', 'revkit.read_aiger', ([], {'filename': 'filename'}), '(filename=filename)\n', (114, 133), False, 'import revkit\n'), ((255, 303), 'revkit.store', 'revkit.store', ([], {'clear': '(True)', 'aig': '(True)', 'circuit': '(True)'}), '(clear=True, aig=True, circuit=True)\n', (267, 303), False...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "0.1.0" import time import logging import sys import subprocess import os from amrtime import utils from amrtime import parsers #from amrtime import database from amrtime import model # how do I make params that only evaluate once again? RANDOM_STATE = 42 ...
[ "amrtime.model.prepare_data", "os.path.exists", "amrtime.model.GeneFamilyLevelClassifier", "amrtime.model.score", "logging.StreamHandler", "amrtime.model.generate_training_data", "amrtime.model.SubGeneFamilyModel", "amrtime.parsers.CARD", "time.time", "amrtime.utils.check_dependencies", "amrtime...
[((1891, 1976), 'logging.info', 'logging.info', (['f"""Started AMRtime \'{run_name}\' outputting to {args.output_folder}"""'], {}), '(f"Started AMRtime \'{run_name}\' outputting to {args.output_folder}"\n )\n', (1903, 1976), False, 'import logging\n'), ((1976, 2002), 'amrtime.utils.check_dependencies', 'utils.check_...
""" Tests for salt.modules.boto3_route53 """ import random import string import salt.loader import salt.modules.boto3_route53 as boto3_route53 from salt.utils.versions import LooseVersion from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.uni...
[ "salt.modules.boto3_route53.get_resource_records", "salt.modules.boto3_route53.__init__", "random.choice", "tests.support.mock.patch", "tests.support.mock.MagicMock", "tests.support.mock.patch.object", "salt.utils.versions.LooseVersion", "tests.support.unit.skipIf" ]
[((1826, 1890), 'tests.support.unit.skipIf', 'skipIf', (['(HAS_BOTO3 is False)', '"""The boto module must be installed."""'], {}), "(HAS_BOTO3 is False, 'The boto module must be installed.')\n", (1832, 1890), False, 'from tests.support.unit import TestCase, skipIf\n'), ((824, 855), 'salt.utils.versions.LooseVersion', '...
from bitcoin.core.serialize import Hash import config import re from datetime import datetime import logging import pytz from multiprocessing import Pool from itertools import repeat from chunker import Chunker import write class Parser: def __init__(self, context, writer): self._context = context ...
[ "chunker.Chunker.read", "write.write_header_csv", "datetime.datetime.strptime", "re.match", "multiprocessing.Pool", "chunker.Chunker.chunkify", "logging.info", "itertools.repeat" ]
[((2220, 2272), 'datetime.datetime.strptime', 'datetime.strptime', (['date_time', 'config.log_time_format'], {}), '(date_time, config.log_time_format)\n', (2237, 2272), False, 'from datetime import datetime\n'), ((541, 569), 'multiprocessing.Pool', 'Pool', (['config.pool_processors'], {}), '(config.pool_processors)\n',...
import hashlib import math import struct import time class CurryError(BaseException): def __init__(self, error_message): self.error_message = error_message class SeedGenerator: def __init__(self, validator): self._validator = validator self._seed_base = time.time() * 1000 sel...
[ "hashlib.sha256", "struct.unpack", "time.time", "math.floor" ]
[((336, 363), 'math.floor', 'math.floor', (['self._seed_base'], {}), '(self._seed_base)\n', (346, 363), False, 'import math\n'), ((2531, 2547), 'hashlib.sha256', 'hashlib.sha256', ([], {}), '()\n', (2545, 2547), False, 'import hashlib\n'), ((290, 301), 'time.time', 'time.time', ([], {}), '()\n', (299, 301), False, 'imp...
# DETECT HTML TAGS # https://www.hackerrank.com/challenges/detect-html-tags/problem # Some link to practice: # https://hr-testcases-us-east-1.s3.amazonaws.com/722/input04.txt?AWSAccessKeyId=<KEY>&Expires=1612935160&Signature=Ikg943k%2FiTfoeKJn1Gt9I6SXnBQ%3D&response-content-type=text%2Fplain import re import sys pa...
[ "re.findall" ]
[((432, 457), 're.findall', 're.findall', (['pattern', 'raw_'], {}), '(pattern, raw_)\n', (442, 457), False, 'import re\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2017-01-18 19:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('twitterfeed', '0001_initial'), ] operations = [ migrations.RemoveField( ...
[ "django.db.migrations.RemoveField", "django.db.models.BigIntegerField" ]
[((292, 349), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""tweet"""', 'name': '"""id_str"""'}), "(model_name='tweet', name='id_str')\n", (314, 349), False, 'from django.db import migrations, models\n'), ((496, 542), 'django.db.models.BigIntegerField', 'models.BigIntegerField', (...
import tstcommon.commondata2d as cd import torch import torch.nn as nn from utils import to_cpp in_feat = 8 out_feat = 4 fc = nn.Linear(in_feat, out_feat, bias=False) fc.weight.data = cd.weights output = fc(cd.inp.reshape((3,8))) fakeloss = torch.tensor([[0.13770211, 0.28582627, 0.86899745, 0.27578735], [0...
[ "utils.to_cpp", "tstcommon.commondata2d.inp.reshape", "torch.tensor", "torch.nn.Linear", "tstcommon.commondata2d.inp.grad.zero_" ]
[((128, 168), 'torch.nn.Linear', 'nn.Linear', (['in_feat', 'out_feat'], {'bias': '(False)'}), '(in_feat, out_feat, bias=False)\n', (137, 168), True, 'import torch.nn as nn\n'), ((246, 437), 'torch.tensor', 'torch.tensor', (['[[0.13770211, 0.28582627, 0.86899745, 0.27578735], [0.04713255, 0.51820499,\n 0.27709258, 0....
import matplotlib as mpl mpl.use('Qt5Agg') import matplotlib.pyplot as plt import pandas as pd from math import log, exp, pi, sqrt, log10 import numpy as np from matplotlib.ticker import MultipleLocator, FormatStrFormatter from decimal import Decimal import bisect plt.rcParams.update({'font.size': 16}) # velocity: 0...
[ "pandas.read_csv", "matplotlib.use", "math.sqrt", "matplotlib.pyplot.rcParams.update", "matplotlib.pyplot.figure", "matplotlib.pyplot.show" ]
[((25, 42), 'matplotlib.use', 'mpl.use', (['"""Qt5Agg"""'], {}), "('Qt5Agg')\n", (32, 42), True, 'import matplotlib as mpl\n'), ((266, 304), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 16}"], {}), "({'font.size': 16})\n", (285, 304), True, 'import matplotlib.pyplot as plt\n'), ((7941, 7...
# -*- coding: utf-8 -*- import scrapy from scrapy.utils.response import get_base_url from jobot.items import JobItem from jobot.item_loaders import JobsCZItemLoader class JobsczSpider(scrapy.Spider): name = "JobsCZ" allowed_domains = ["jobs.cz"] start_urls = ( 'http://www.jobs.cz/prace/brno/?q[]=p...
[ "scrapy.utils.response.get_base_url", "jobot.items.JobItem", "scrapy.Request" ]
[((918, 927), 'jobot.items.JobItem', 'JobItem', ([], {}), '()\n', (925, 927), False, 'from jobot.items import JobItem\n'), ((802, 842), 'scrapy.Request', 'scrapy.Request', (['url'], {'callback': 'self.parse'}), '(url, callback=self.parse)\n', (816, 842), False, 'import scrapy\n'), ((952, 974), 'scrapy.utils.response.ge...
""" @name: Modules/Web/web_server.py @author: <NAME> @contact: <EMAIL> @copyright: 2012-2020 by <NAME> @note: Created on Apr 3, 2012 @license: MIT License @summary: This module provides the web server(s) service of PyHouse. This is a Main Module - always present. Open 2 web servers. open server...
[ "klein.Klein", "Modules.Core.logging_pyh.getLogger", "Modules.Computer.Web.web_mainpage.MainPage", "twisted.internet.endpoints.serverFromString", "Modules.Core.Utilities.debug_tools.PrettyFormatAny.form" ]
[((1334, 1377), 'Modules.Core.logging_pyh.getLogger', 'Logger.getLogger', (['"""PyHouse.WebServer """'], {}), "('PyHouse.WebServer ')\n", (1350, 1377), True, 'from Modules.Core import logging_pyh as Logger\n'), ((1391, 1398), 'klein.Klein', 'Klein', ([], {}), '()\n', (1396, 1398), False, 'from klein import Kl...
import signal import sys import threading import pytest from dask.datasets import timeseries dd = pytest.importorskip("dask.dataframe") pyspark = pytest.importorskip("pyspark") pytest.importorskip("pyarrow") pytest.importorskip("fastparquet") from dask.dataframe.utils import assert_eq if not sys.platform.startswit...
[ "signal.signal", "threading.current_thread", "signal.getsignal", "dask.dataframe.utils.assert_eq", "sys.platform.startswith", "pytest.mark.parametrize", "dask.datasets.timeseries", "pytest.importorskip", "threading.main_thread", "pytest.fixture", "pytest.skip" ]
[((101, 138), 'pytest.importorskip', 'pytest.importorskip', (['"""dask.dataframe"""'], {}), "('dask.dataframe')\n", (120, 138), False, 'import pytest\n'), ((149, 179), 'pytest.importorskip', 'pytest.importorskip', (['"""pyspark"""'], {}), "('pyspark')\n", (168, 179), False, 'import pytest\n'), ((180, 210), 'pytest.impo...
import json import requests import speech_recognition as sr YOUR_API_KEY = '<KEY>' YOUR_AUDIO_FILE = 'output.mp3' REGION = 'northeurope' # westus, eastasia, northeurope MODE = 'interactive' LANG = 'en-US' FORMAT = 'simple' def handler(): # 1. Get an Authorization Token token = get_token() # 2. Perform ...
[ "speech_recognition.Recognizer", "speech_recognition.Microphone", "json.loads", "requests.post" ]
[((704, 739), 'requests.post', 'requests.post', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (717, 739), False, 'import requests\n'), ((1474, 1495), 'json.loads', 'json.loads', (['r.content'], {}), '(r.content)\n', (1484, 1495), False, 'import json\n'), ((1541, 1556), 'speech_recognition.Recognizer', ...
import pygame from data.clip import clip def load_tileset(path): tileset_img = pygame.image.load(path + 'tileset.png').convert() tileset_img.set_colorkey((0, 0, 0)) width = tileset_img.get_width() tile_size = [16, 16] tile_count = int((width + 1) / (tile_size[0] + 1)) images = [clip(tileset_img...
[ "pygame.image.load", "data.clip.clip" ]
[((304, 376), 'data.clip.clip', 'clip', (['tileset_img', '(i * (tile_size[0] + 1))', '(0)', 'tile_size[0]', 'tile_size[1]'], {}), '(tileset_img, i * (tile_size[0] + 1), 0, tile_size[0], tile_size[1])\n', (308, 376), False, 'from data.clip import clip\n'), ((84, 123), 'pygame.image.load', 'pygame.image.load', (["(path +...
import pygame import random class stobs: def __init__(self, x, y): self.x = x self.y = y self.wd = 50 self.ht = 50 self.plimg = pygame.image.load('./images/cone.jpeg') self.plimg = pygame.transform.scale( self.plimg, (self.wd, self.ht)) self.surf...
[ "pygame.display.set_caption", "pygame.init", "pygame.time.delay", "pygame.event.get", "pygame.Surface", "pygame.display.set_mode", "pygame.time.get_ticks", "pygame.sprite.collide_rect", "pygame.font.SysFont", "pygame.display.quit", "pygame.draw.rect", "pygame.key.get_pressed", "pygame.time.C...
[((3825, 3838), 'pygame.init', 'pygame.init', ([], {}), '()\n', (3836, 3838), False, 'import pygame\n'), ((3869, 3906), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(winx, winy)'], {}), '((winx, winy))\n', (3892, 3906), False, 'import pygame\n'), ((3907, 3944), 'pygame.display.set_caption', 'pygame.display....
# Copyright 2022 <NAME> # # 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, so...
[ "thortils.ai2thor_version", "setuptools.find_packages" ]
[((676, 691), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (689, 691), False, 'from setuptools import setup, find_packages\n'), ((892, 918), 'thortils.ai2thor_version', 'thortils.ai2thor_version', ([], {}), '()\n', (916, 918), False, 'import thortils\n')]