code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" The package for scikits.cuda initialization Global variables: initSuccess providing CUBLAS handle: cublas_handle """ gpu_initialized = False gpu_device = None gpu_context = None MPI_enabled = False try: from mpi4py import MPI MPI_enabled = True except: pass def initGPU(): try: if MPI_e...
[ "mpi4py.MPI.Get_processor_name" ]
[((592, 616), 'mpi4py.MPI.Get_processor_name', 'MPI.Get_processor_name', ([], {}), '()\n', (614, 616), False, 'from mpi4py import MPI\n')]
from __future__ import absolute_import import os from .addon import Addon from .generator import Generator from .blueprint import Blueprint from .dependency import DependencyManager, Dependency from .blueprint import get_core_blueprints from .utils.system import ( get_directories, get_last_touched, find_n...
[ "os.path.basename", "os.getcwd", "os.path.dirname", "os.path.exists", "os.path.join" ]
[((615, 626), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (624, 626), False, 'import os\n'), ((894, 934), 'os.path.join', 'os.path.join', (['self.directory', '"""setup.py"""'], {}), "(self.directory, 'setup.py')\n", (906, 934), False, 'import os\n'), ((5411, 5477), 'os.path.join', 'os.path.join', (['self.environment.vi...
# export SLACK_SDK_TEST_CLASSIC_APP_BOT_TOKEN=<KEY> # python3 integration_tests/samples/issues/issue_522.py import asyncio import logging import os from slack_sdk.rtm import RTMClient logging.basicConfig(level=logging.DEBUG) LOGGER = logging.getLogger(__name__) token = os.environ["SLACK_SDK_TEST_CLASSIC_APP_BOT_TOK...
[ "asyncio.gather", "os.getpid", "asyncio.sleep", "logging.basicConfig", "slack_sdk.rtm.RTMClient", "logging.getLogger" ]
[((187, 227), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (206, 227), False, 'import logging\n'), ((237, 264), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (254, 264), False, 'import logging\n'), ((577, 615), 'slack_sdk.rtm....
import os from datetime import datetime, timedelta import configparser import smtplib import upwork class Job(object): def __init__(self, job_info): self.job_info = job_info def __str__(self): job_info = "New job: %s \nType: %s" %(self.job_info['title'], ...
[ "upwork.search_jobs", "smtplib.SMTP", "os.path.dirname", "datetime.datetime.now", "upwork.Client", "datetime.datetime.strptime", "datetime.timedelta", "upwork.provider_v2.search_jobs", "configparser.ConfigParser", "os.path.join" ]
[((4124, 4153), 'upwork.search_jobs', 'upwork.search_jobs', (['job_query'], {}), '(job_query)\n', (4142, 4153), False, 'import upwork\n'), ((756, 783), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (781, 783), False, 'import configparser\n'), ((2363, 2390), 'configparser.ConfigParser', 'co...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib import itertools...
[ "numpy.random.seed", "numpy.random.get_state", "numpy.random.set_state", "time.time", "itertools.islice", "os.listdir", "numpy.random.shuffle" ]
[((761, 777), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (771, 777), False, 'import os\n'), ((24225, 24246), 'numpy.random.get_state', 'np.random.get_state', ([], {}), '()\n', (24244, 24246), True, 'import numpy as np\n'), ((24251, 24271), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', ...
"""Official evaluation script for v1.1 of the SQuAD dataset. From the SQuAD website: https://rajpurkar.github.io/SQuAD-explorer/ """ from collections import Counter import string import re import argparse import json import sys def normalize_answer(s): """Lower text and remove punctuation, articles and extra whi...
[ "collections.Counter", "json.load", "re.sub", "argparse.ArgumentParser" ]
[((4355, 4434), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': "('Evaluation for SQuAD ' + expected_version)"}), "(description='Evaluation for SQuAD ' + expected_version)\n", (4378, 4434), False, 'import argparse\n'), ((378, 415), 're.sub', 're.sub', (['"""\\\\b(a|an|the)\\\\b"""', '""" """'...
#!/usr/bin/env python import os import roslib; roslib.load_manifest('freemovr_engine') import rosbag import sensor_msgs.msg import geometry_msgs.msg import pymvg import numpy as np def test_bag(): for i in range(1000): bagout = rosbag.Bag('/tmp/testbag.bag', 'w') topic = '/tf' extrinsic...
[ "rosbag.Bag", "pymvg.CameraModel.load_camera_from_file", "pymvg.CameraModel.load_camera_simple", "os.path.exists", "numpy.random.rand", "roslib.load_manifest" ]
[((48, 87), 'roslib.load_manifest', 'roslib.load_manifest', (['"""freemovr_engine"""'], {}), "('freemovr_engine')\n", (68, 87), False, 'import roslib\n'), ((650, 688), 'pymvg.CameraModel.load_camera_simple', 'pymvg.CameraModel.load_camera_simple', ([], {}), '()\n', (686, 688), False, 'import pymvg\n'), ((809, 830), 'os...
import os import platform import shutil import importlib # This sub-package is a proxy for the extensension file that abstracts the platform. # Here we check what platform we are on and we import the appropriate extension from # yet another sub-package, of which there is one for each supported platform. # Then we pull...
[ "importlib.import_module", "platform.architecture" ]
[((795, 818), 'platform.architecture', 'platform.architecture', ([], {}), '()\n', (816, 818), False, 'import platform\n'), ((1261, 1330), 'importlib.import_module', 'importlib.import_module', (["('runviewer.resample.%s.resample' % plat_name)"], {}), "('runviewer.resample.%s.resample' % plat_name)\n", (1284, 1330), Fals...
from bottle import run, route, debug, template, static_file, get, request import requests, time, sys, pyinfodb #alternate open_weather_app_id = ###### # Static Routes """@get('/<filename:re:.*\.js>') def javascripts(filename): return static_file(filename, root='static/js')""" @get('/<filename:re:.*\.css>') def s...
[ "bottle.static_file", "bottle.get", "bottle.run", "bottle.route", "time.time", "pyinfodb.IPInfo", "requests.get", "bottle.debug", "bottle.template" ]
[((285, 315), 'bottle.get', 'get', (['"""/<filename:re:.*\\\\.css>"""'], {}), "('/<filename:re:.*\\\\.css>')\n", (288, 315), False, 'from bottle import run, route, debug, template, static_file, get, request\n'), ((396, 447), 'bottle.get', 'get', (['"""/images/<filename:re:.*\\\\.(jpg|png|gif|ico)>"""'], {}), "('/images...
from dataclasses import dataclass from ludere.core import Ludere l = Ludere() Register = l.register @Register @dataclass class Config: x: int = 5 def __post_init__(self): print("Config got instantiated!") @Register @dataclass class App: config: Config def __post_init__(self): pr...
[ "ludere.core.Ludere" ]
[((72, 80), 'ludere.core.Ludere', 'Ludere', ([], {}), '()\n', (78, 80), False, 'from ludere.core import Ludere\n')]
from setuptools import setup setup( name = 'evohomeclient', version = '0.2.8', description = 'Python client for connecting to the Evohome webservice', url = 'https://github.com/watchforstock/evohome-client/', download_url = 'https://github.com/watchforstock/evohome-client/tarball/0.2.8', author = '<NAME>', auth...
[ "setuptools.setup" ]
[((30, 517), 'setuptools.setup', 'setup', ([], {'name': '"""evohomeclient"""', 'version': '"""0.2.8"""', 'description': '"""Python client for connecting to the Evohome webservice"""', 'url': '"""https://github.com/watchforstock/evohome-client/"""', 'download_url': '"""https://github.com/watchforstock/evohome-client/tar...
# Copyright 2019 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ "utils.data_utils.source_pad_concat_convert", "argparse.ArgumentParser", "utils.utils.get_logger", "texar.modules.Transformer", "random.shuffle", "texar.utils.maybe_create_dir", "texar.utils.str_join", "torchtext.data.iterator.RandomShuffler", "pickle.load", "torch.optim.lr_scheduler.LambdaLR", ...
[((962, 987), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (985, 987), False, 'import argparse\n'), ((1887, 1929), 'importlib.import_module', 'importlib.import_module', (['args.config_model'], {}), '(args.config_model)\n', (1910, 1929), False, 'import importlib\n'), ((1944, 1985), 'importlib....
# coding: utf-8 # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import codecs from collections import defaultdict import errno import io import locale import os import re from subprocess import check_output, CalledProcessError import sys from contextlib import cont...
[ "sys.platform.startswith", "os.environ.copy", "nbformat.read", "os.path.join", "os.chdir", "colorama.init", "os.path.abspath", "os.path.dirname", "os.path.exists", "os.path.normpath", "io.open", "locale.getpreferredencoding", "subprocess.check_output", "codecs.getwriter", "os.path.expand...
[((3922, 3947), 're.compile', 're.compile', (['"""^[-+]?\\\\d+$"""'], {}), "('^[-+]?\\\\d+$')\n", (3932, 3947), False, 'import re\n'), ((8198, 8227), 'os.getenv', 'os.getenv', (['"""PYTHONIOENCODING"""'], {}), "('PYTHONIOENCODING')\n", (8207, 8227), False, 'import os\n'), ((9461, 9491), 'sys.platform.startswith', 'sys....
import datetime import sys if sys.version_info < (3, 9): # importlib.resources either doesn't exist or lacks the files() # function, so use the PyPI version: import importlib_resources else: # importlib.resources has files(), so use that: import importlib.resources as importlib_resources import nu...
[ "importlib.resources.files", "skyfield.almanac.moon_phases", "skyfield.api.load.timescale", "skyfield.api.Loader", "skyfield.almanac.dark_twilight_day", "skyfield.almanac.moon_phase", "skyfield.api.load_file", "skyfield.api.Topos" ]
[((523, 543), 'skyfield.api.load.timescale', 'api.load.timescale', ([], {}), '()\n', (541, 543), False, 'from skyfield import almanac, api\n'), ((887, 915), 'skyfield.api.load_file', 'api.load_file', (['self.bsp_file'], {}), '(self.bsp_file)\n', (900, 915), False, 'from skyfield import almanac, api\n'), ((2211, 2306), ...
import asyncio import json import websockets import queue import threading import time import ssl import sqlite3 import sys if len(sys.argv) < 2: sys.exit("You must specify your domain name as an argument") domainname = sys.argv[1] certPathPrefix = "/etc/letsencrypt/live/{:s}/".format(domainname) CLIENTS = [] CLIEN...
[ "threading.Thread", "ssl.SSLContext", "websockets.serve", "asyncio.get_event_loop", "json.loads", "sqlite3.connect", "queue.Queue", "sys.exit" ]
[((1483, 1508), 'queue.Queue', 'queue.Queue', ([], {'maxsize': '(1000)'}), '(maxsize=1000)\n', (1494, 1508), False, 'import queue\n'), ((5403, 5442), 'ssl.SSLContext', 'ssl.SSLContext', (['ssl.PROTOCOL_TLS_SERVER'], {}), '(ssl.PROTOCOL_TLS_SERVER)\n', (5417, 5442), False, 'import ssl\n'), ((5561, 5623), 'threading.Thre...
from firebase import firebase from datetime import date from datetime import datetime import numpy as np import cv2 import imghdr import base64 import json ''' Stucture of Our Main Object Note that a unique id will be created when we save it for the first time in db, its not show currently. We will use...
[ "firebase.firebase.FirebaseApplication", "datetime.datetime.now", "datetime.date.today", "numpy.array" ]
[((541, 553), 'datetime.date.today', 'date.today', ([], {}), '()\n', (551, 553), False, 'from datetime import date\n'), ((606, 620), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (618, 620), False, 'from datetime import datetime\n'), ((739, 811), 'firebase.firebase.FirebaseApplication', 'firebase.FirebaseA...
# -*- coding: utf-8 -*- import random from src.sprites.characters.behaviours.RavenBehaviourState import * from src.sprites.Character import * from src.sprites.MySprite import * from src.sprites.EnemyRange import * # ------------------------------------------------------------------------------ # Clase RavenFollowPlay...
[ "random.randint" ]
[((487, 507), 'random.randint', 'random.randint', (['(4)', '(6)'], {}), '(4, 6)\n', (501, 507), False, 'import random\n')]
import nlptasks as nt import nlptasks.dephead def test_01(): seqs_token = [[ "Der", "Helmut", "Kohl", "spe<PASSWORD>", "<PASSWORD>", "mit", "Kohl", "."]] target = [ (46, 0), (46, 1), (47, 2), (47, 3), (47, 4), (47, 5), (49, 6), (47, 7), (19, 0), (31, 1), (36, 2), (42, 3), (21, 4), (17,...
[ "nlptasks.dephead.get_model", "nlptasks.dephead.factory" ]
[((1453, 1485), 'nlptasks.dephead.get_model', 'nt.dephead.get_model', (['identifier'], {}), '(identifier)\n', (1473, 1485), True, 'import nlptasks as nt\n'), ((1495, 1525), 'nlptasks.dephead.factory', 'nt.dephead.factory', (['identifier'], {}), '(identifier)\n', (1513, 1525), True, 'import nlptasks as nt\n'), ((3104, 3...
import numpy as np import scipy import scipy.sparse import matplotlib.pyplot as plt # part 2 - read sparse matrix from csv file def read_coo(fname): Y = np.loadtxt(fname, delimiter=',') rows = np.array(Y[:, 0], int) cols = np.array(Y[:, 1], int) V = Y[:, 2] return scipy.sparse.coo_matrix((np.array...
[ "matplotlib.pyplot.show", "numpy.abs", "numpy.array", "numpy.loadtxt", "numpy.random.normal", "numpy.linalg.norm", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ]
[((1567, 1602), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(1)'], {'figsize': '(10, 8)'}), '(1, 1, figsize=(10, 8))\n', (1579, 1602), True, 'import matplotlib.pyplot as plt\n'), ((1707, 1729), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""sbm.png"""'], {}), "('sbm.png')\n", (1718, 1729), True, 'import ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # generated by wxGlade # import wx # begin wxGlade: dependencies import gettext # end wxGlade # begin wxGlade: extracode # end wxGlade class Frame194(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: Frame194.__init__ kwds["style"] = ...
[ "wx.GridSizer", "wx.Frame.__init__", "gettext.install" ]
[((2588, 2610), 'gettext.install', 'gettext.install', (['"""app"""'], {}), "('app')\n", (2603, 2610), False, 'import gettext\n'), ((349, 387), 'wx.Frame.__init__', 'wx.Frame.__init__', (['self', '*args'], {}), '(self, *args, **kwds)\n', (366, 387), False, 'import wx\n'), ((1775, 1799), 'wx.GridSizer', 'wx.GridSizer', (...
# Thanks to KKiller on Kaggle for designing this model. from torch.utils.data import Dataset, DataLoader from abc import ABC from pathlib import Path from numcodecs import blosc import pandas as pd, numpy as np import bisect import itertools as it from tqdm import tqdm import logzero import json import torch from to...
[ "torch.bmm", "torch.sqrt", "torch.cat", "gc.collect", "pathlib.Path", "torch.no_grad", "torch.square", "torch.utils.data.DataLoader", "torch.nn.Conv1d", "torch.softmax", "torch.optim.lr_scheduler.CosineAnnealingLR", "torch.exp", "torch.nn.Linear", "numpy.random.choice", "datetime.datetim...
[((782, 838), 'pathlib.Path', 'Path', (['"""/data/lyft-motion-prediction-autonomous-vehicles"""'], {}), "('/data/lyft-motion-prediction-autonomous-vehicles')\n", (786, 838), False, 'from pathlib import Path\n'), ((748, 768), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (757, 768), False, 'import json...
import sys import os root = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src') sys.path.insert(0, root)
[ "os.path.abspath", "sys.path.insert" ]
[((93, 117), 'sys.path.insert', 'sys.path.insert', (['(0)', 'root'], {}), '(0, root)\n', (108, 117), False, 'import sys\n'), ((58, 83), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (73, 83), False, 'import os\n')]
from blockchain_parser.blockchain import Blockchain import os import multiprocessing import json from constants import * CPU_CORES = int(multiprocessing.cpu_count() / 2 + 1) # for overnight processing set something like multiprocessing.cpu_count() def satoshi2btc(value): # A satoshi is the smallest unit of a bit...
[ "blockchain_parser.blockchain.Blockchain", "json.dumps", "os.path.isfile", "multiprocessing.Pool", "os.path.join", "os.listdir", "multiprocessing.cpu_count" ]
[((955, 975), 'blockchain_parser.blockchain.Blockchain', 'Blockchain', (['filename'], {}), '(filename)\n', (965, 975), False, 'from blockchain_parser.blockchain import Blockchain\n'), ((1747, 1782), 'os.listdir', 'os.listdir', (['BITCOIN_BLOCKCHAIN_PATH'], {}), '(BITCOIN_BLOCKCHAIN_PATH)\n', (1757, 1782), False, 'impor...
import time from pubnub.models.consumer.history import PNFetchMessagesResult from pubnub.models.consumer.pubsub import PNPublishResult from pubnub.pubnub import PubNub from tests.helper import pnconf_copy from tests.integrational.vcr_helper import use_cassette_and_stub_time_sleep_native COUNT = 120 class TestFetchM...
[ "tests.helper.pnconf_copy", "tests.integrational.vcr_helper.use_cassette_and_stub_time_sleep_native", "time.sleep" ]
[((334, 514), 'tests.integrational.vcr_helper.use_cassette_and_stub_time_sleep_native', 'use_cassette_and_stub_time_sleep_native', (['"""tests/integrational/fixtures/native_sync/fetch_messages/max_100_single.yaml"""'], {'filter_query_parameters': "['uuid', 'pnsdk', 'l_pub']"}), "(\n 'tests/integrational/fixtures/nat...
import json import time from unittest.mock import patch from changebot.webapp import app from changebot.github.github_api import RepoHandler, IssueHandler from changebot.blueprints.stale_issues import (process_issues, ISSUE_CLOSE_EPILOGUE, ...
[ "unittest.mock.patch.object", "changebot.blueprints.stale_issues.process_issues", "changebot.webapp.app.test_client", "json.dumps", "time.time", "unittest.mock.patch", "changebot.blueprints.stale_issues.is_close_epilogue", "changebot.webapp.app.app_context", "changebot.blueprints.stale_issues.is_clo...
[((2274, 2318), 'unittest.mock.patch.object', 'patch.object', (['app', '"""stale_issue_close"""', '(True)'], {}), "(app, 'stale_issue_close', True)\n", (2286, 2318), False, 'from unittest.mock import patch\n'), ((2320, 2373), 'unittest.mock.patch.object', 'patch.object', (['app', '"""stale_issue_close_seconds"""', '(34...
import copy from pddlstream.algorithms.downward import fact_from_fd from pddlstream.algorithms.reorder import get_partial_orders from pddlstream.language.conversion import pddl_from_object from pddlstream.language.object import OptimisticObject, UniqueOptValue from pddlstream.utils import neighbors_from_orders, get_ma...
[ "copy.copy" ]
[((2712, 2747), 'copy.copy', 'copy.copy', (['action_plan[state_index]'], {}), '(action_plan[state_index])\n', (2721, 2747), False, 'import copy\n')]
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import numpy as np from ..sine_wave_generator import SineWaveChannelConfig, SineWaveGenerator def test_generate_sinusoid() -> None: """ Tests that the samples generated from each channel matches the parameters specified in th...
[ "numpy.testing.assert_almost_equal", "numpy.expand_dims", "numpy.sin", "numpy.array", "numpy.arange" ]
[((477, 497), 'numpy.array', 'np.array', (['[5.0, 3.0]'], {}), '([5.0, 3.0])\n', (485, 497), True, 'import numpy as np\n'), ((516, 533), 'numpy.array', 'np.array', (['[5, 10]'], {}), '([5, 10])\n', (524, 533), True, 'import numpy as np\n'), ((553, 573), 'numpy.array', 'np.array', (['[1.0, 5.0]'], {}), '([1.0, 5.0])\n',...
import json import unittest from rivr.test import Client from palaverapi import app from palaverapi.models import Device, Token class ViewTests(unittest.TestCase): def setUp(self) -> None: self.client = Client(app) def test_status(self) -> None: assert self.client.get('/').status_code == 20...
[ "palaverapi.models.Device.get", "palaverapi.models.Token.select", "rivr.test.Client", "json.dumps" ]
[((219, 230), 'rivr.test.Client', 'Client', (['app'], {}), '(app)\n', (225, 230), False, 'from rivr.test import Client\n'), ((857, 892), 'palaverapi.models.Device.get', 'Device.get', ([], {'apns_token': '"""test_token"""'}), "(apns_token='test_token')\n", (867, 892), False, 'from palaverapi.models import Device, Token\...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "README.md")) as f: README = f.read() with open(os.path.join(here, "CHANGES.txt")) as f: CHANGES = f.read() requires = [ "climmob", ] tests_require = [ "WebTest >= 1.3...
[ "os.path.dirname", "os.path.join", "setuptools.find_packages" ]
[((79, 104), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (94, 104), False, 'import os\n'), ((116, 147), 'os.path.join', 'os.path.join', (['here', '"""README.md"""'], {}), "(here, 'README.md')\n", (128, 147), False, 'import os\n'), ((187, 220), 'os.path.join', 'os.path.join', (['here', '"""...
# Copyright 2017 Catalyst IT Limited # # 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...
[ "qinling.db.api.create_function_alias", "qinling.db.api.increase_function_version", "mock.patch" ]
[((969, 1024), 'mock.patch', 'mock.patch', (['"""qinling.rpc.EngineClient.create_execution"""'], {}), "('qinling.rpc.EngineClient.create_execution')\n", (979, 1024), False, 'import mock\n'), ((1370, 1425), 'mock.patch', 'mock.patch', (['"""qinling.rpc.EngineClient.create_execution"""'], {}), "('qinling.rpc.EngineClient...
"""Tests for [the `cli` module][pytkdocs.cli].""" import io import json from pytkdocs import cli def test_show_help(capsys): """ Shows help. Arguments: capsys: Pytest fixture to capture output. """ with pytest.raises(SystemExit): cli.main(["-h"]) captured = capsys.readouterr...
[ "io.StringIO", "pytkdocs.cli.main", "json.loads" ]
[((835, 845), 'pytkdocs.cli.main', 'cli.main', ([], {}), '()\n', (843, 845), False, 'from pytkdocs import cli\n'), ((1140, 1168), 'pytkdocs.cli.main', 'cli.main', (["['--line-by-line']"], {}), "(['--line-by-line'])\n", (1148, 1168), False, 'from pytkdocs import cli\n'), ((1351, 1379), 'pytkdocs.cli.main', 'cli.main', (...
from django.conf import settings from django.utils.module_loading import import_string from rest_framework.exceptions import AuthenticationFailed from game.authentication.base_websocket_authentication import ( AbstractWebsocketAuthentication, ) from game.models import AppUser def authenticate_websocket(auth_head...
[ "django.utils.module_loading.import_string", "rest_framework.exceptions.AuthenticationFailed" ]
[((876, 987), 'rest_framework.exceptions.AuthenticationFailed', 'AuthenticationFailed', (['f"""No suitable AUTHENTICATION_CLASS to authenticate auth header "{auth_header}\\""""'], {}), '(\n f\'No suitable AUTHENTICATION_CLASS to authenticate auth header "{auth_header}"\'\n )\n', (896, 987), False, 'from rest_fram...
from rockstar import RockStar ocaml_code = 'print_string "Hello world!\n";;' rock_it_bro = RockStar(days=400, file_name='hello.ml', code=ocaml_code) rock_it_bro.make_me_a_rockstar()
[ "rockstar.RockStar" ]
[((92, 149), 'rockstar.RockStar', 'RockStar', ([], {'days': '(400)', 'file_name': '"""hello.ml"""', 'code': 'ocaml_code'}), "(days=400, file_name='hello.ml', code=ocaml_code)\n", (100, 149), False, 'from rockstar import RockStar\n')]
# -*- coding: utf-8 -*- """ Extract dependencies from a Semantic Dependency Parsing treebank. Usage: extract_sdp.py [--sep sep] [--first_arg_col first_arg_col] IN_FILE OUT_TEXT_FILE OUT_HEAD_FILE OUT_DEPREL_FILE Arguments: IN_FILE SDP file in sdp format OUT_TEXT_FILE File to write raw texts, one s...
[ "codecs.open", "docopt.docopt" ]
[((3769, 3784), 'docopt.docopt', 'docopt', (['__doc__'], {}), '(__doc__)\n', (3775, 3784), False, 'from docopt import docopt\n'), ((1111, 1151), 'codecs.open', 'codecs.open', (['sdp_file'], {'encoding': 'encoding'}), '(sdp_file, encoding=encoding)\n', (1122, 1151), False, 'import codecs\n'), ((1175, 1225), 'codecs.open...
import os import json from django.core.management.base import BaseCommand, CommandError from django.db import IntegrityError from laptimes.models import Car class Command(BaseCommand): help = 'Seed the database with AC cars.' def add_arguments(self, parser): parser.add_argument('--path', type=str)...
[ "json.loads", "os.path.isdir", "os.path.isfile", "laptimes.models.Car", "os.path.join", "os.listdir" ]
[((2054, 2070), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (2064, 2070), False, 'import json\n'), ((2310, 2344), 'os.path.join', 'os.path.join', (['cars_path', 'car', '"""ui"""'], {}), "(cars_path, car, 'ui')\n", (2322, 2344), False, 'import os\n'), ((2359, 2394), 'os.path.join', 'os.path.join', (['ui_dir'...
"""The console module contains the :class:`Command` class that's useful for building command-line scripts. Consider a function `myfunc` that you want to call directly from the command-line, but you want to avoid writing glue that deals with argument parsing, converting those arguments to Python types and passing them ...
[ "warnings.warn", "traceback.print_exc", "pdb.post_mortem", "docopt.docopt" ]
[((2227, 2475), 'warnings.warn', 'warnings.warn', (['"""\nThe nolearn.console module will be removed in nolearn 0.6. If you\nwant to continue using this module, please consider copying the code\ninto your own project. And take a look at alternatives like the click\nlibrary.\n"""'], {}), '(\n """\nThe nolearn.conso...
# GUI Application automation and testing library # Copyright (C) 2006-2018 <NAME> and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or without # ...
[ "sys.path.append", "unittest.main", "pywinauto.findwindows.find_window", "os.path.dirname", "pywinauto.sysinfo.is_x64_Python", "pywinauto.timings.Timings.defaults", "pywinauto.application.Application", "os.path.join", "pywinauto.findwindows.find_windows" ]
[((1850, 1870), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (1865, 1870), False, 'import sys, os\n'), ((2276, 2291), 'pywinauto.sysinfo.is_x64_Python', 'is_x64_Python', ([], {}), '()\n', (2289, 2291), False, 'from pywinauto.sysinfo import is_x64_Python\n'), ((2372, 2421), 'os.path.join', 'os.pat...
from timeit import default_timer as timer import rx import rxsci as rs def progress(name, threshold, measure_throughput=True): '''Prints the progress on item processing Prints the number of items that have been processed every threshold items. The source can be an Observable or a MuxObservable. Arg...
[ "timeit.default_timer", "rxsci.ops.map", "rxsci.ops.scan" ]
[((1218, 1251), 'rxsci.ops.scan', 'rs.ops.scan', (['_progress'], {'seed': 'None'}), '(_progress, seed=None)\n', (1229, 1251), True, 'import rxsci as rs\n'), ((1261, 1287), 'rxsci.ops.map', 'rs.ops.map', (['(lambda i: i[0])'], {}), '(lambda i: i[0])\n', (1271, 1287), True, 'import rxsci as rs\n'), ((776, 783), 'timeit.d...
#!/usr/bin/env python3 import os import sys import struct import parser from collections import namedtuple import ctypes import argparse import re from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSection # global variables pd_complete = '' inputfile = '' outputfile = '' list_of_p...
[ "argparse.ArgumentParser", "struct.calcsize", "ctypes.create_string_buffer", "elftools.elf.elffile.ELFFile", "parser.add_argument", "collections.namedtuple", "parser.parse_args", "struct.pack_into", "sys.exit", "struct.unpack_from" ]
[((398, 461), 'collections.namedtuple', 'namedtuple', (['"""mmu_region_details"""', '"""pde_index page_entries_info"""'], {}), "('mmu_region_details', 'pde_index page_entries_info')\n", (408, 461), False, 'from collections import namedtuple\n'), ((520, 732), 'collections.namedtuple', 'namedtuple', (['"""valid_pages_ins...
import json def api_position(db,cursor,temp,principal5,principal30,principal60,principal300,principal900,principal1800,coin_number5,coin_number30,coin_number60,coin_number300,coin_number900,coin_number1800,judge_position,sell_amount,buy_amount,current_price): all_buyamount = 0 all_sellamount = 0 trade_amon...
[ "json.dumps" ]
[((4903, 5367), 'json.dumps', 'json.dumps', (["{'principal5': principal5, 'coin_number5': coin_number5, 'principal30':\n principal30, 'coin_number30': coin_number30, 'principal60': principal60,\n 'coin_number60': coin_number60, 'principal300': principal300,\n 'coin_number300': coin_number300, 'principal900': p...
import pytest import json from mindmeld.server import MindMeldServer from mindmeld.app_manager import ApplicationManager @pytest.fixture def app_manager(kwik_e_mart_app_path, kwik_e_mart_nlp): return ApplicationManager(kwik_e_mart_app_path, nlp=kwik_e_mart_nlp) @pytest.fixture def client(app_manager): serv...
[ "mindmeld.server.MindMeldServer", "mindmeld.app_manager.ApplicationManager", "json.dumps" ]
[((207, 268), 'mindmeld.app_manager.ApplicationManager', 'ApplicationManager', (['kwik_e_mart_app_path'], {'nlp': 'kwik_e_mart_nlp'}), '(kwik_e_mart_app_path, nlp=kwik_e_mart_nlp)\n', (225, 268), False, 'from mindmeld.app_manager import ApplicationManager\n'), ((550, 574), 'json.dumps', 'json.dumps', (['test_request'],...
from datetime import datetime from lxml import etree from urllib.parse import unquote def parse_ls(xml_content): t = etree.fromstring(xml_content) responses = t.findall(".//d:response", t.nsmap) results = [] for response in responses: href = response.findtext(".//d:href", None, t.nsmap) ...
[ "urllib.parse.unquote", "datetime.datetime.strptime", "lxml.etree.fromstring" ]
[((124, 153), 'lxml.etree.fromstring', 'etree.fromstring', (['xml_content'], {}), '(xml_content)\n', (140, 153), False, 'from lxml import etree\n'), ((2107, 2136), 'lxml.etree.fromstring', 'etree.fromstring', (['xml_content'], {}), '(xml_content)\n', (2123, 2136), False, 'from lxml import etree\n'), ((3458, 3487), 'lxm...
# coding: utf-8 # --- # @File: model.py # @description: 模型类 # @Author: <NAME> # @E-mail: <EMAIL> # @Time: 3月18, 2019 # --- import tensorflow as tf from PIL import Image import scipy.misc import os from linear_3d_layer import Linear3DLayer class Model_X(tf.keras.Model): """ 继承自基类 tf.keras.Model """ d...
[ "tensorflow.keras.layers.BatchNormalization", "tensorflow.unstack", "os.makedirs", "tensorflow.keras.layers.GRU", "os.path.exists", "tensorflow.concat", "linear_3d_layer.Linear3DLayer", "numpy.hstack", "PIL.Image.fromarray", "tensorflow.squeeze", "numpy.squeeze", "tensorflow.keras.layers.MaxPo...
[((525, 632), 'linear_3d_layer.Linear3DLayer', 'Linear3DLayer', ([], {'filters': '(8)', 'kernel_size': '[1, 3, 75, 6]', 'activate_size': '[3, 1, 2]', 'activate_stride': '[3, 1, 1]'}), '(filters=8, kernel_size=[1, 3, 75, 6], activate_size=[3, 1, 2],\n activate_stride=[3, 1, 1])\n', (538, 632), False, 'from linear_3d_...
#!/usr/bin/python ''' A pipeline for loading SPL data into ElasticSearch ''' import collections import csv import glob import logging import os from os.path import basename, join, dirname import simplejson as json import sys import time import arrow import elasticsearch import luigi from openfda import common, elas...
[ "arrow.get", "openfda.index_util.LoadJSONMapper", "os.popen", "arrow.Arrow.range", "openfda.parallel.Collection.from_glob", "collections.defaultdict", "openfda.common.cmd", "openfda.parallel.Collection.from_sharded", "luigi.LocalTarget", "luigi.Parameter", "openfda.parallel.IdentityReducer", "...
[((638, 664), 'os.path.join', 'join', (['BASE_DIR', '"""spl/meta"""'], {}), "(BASE_DIR, 'spl/meta')\n", (642, 664), False, 'from os.path import basename, join, dirname\n'), ((720, 761), 'openfda.common.shell_cmd', 'common.shell_cmd', (['"""mkdir -p %s"""', 'META_DIR'], {}), "('mkdir -p %s', META_DIR)\n", (736, 761), Fa...
import datetime from flask import Blueprint, render_template, flash, redirect, request, session, abort, jsonify from ..core.db import connect from ..core.db.users import Users from ..core.db.tasks import Tasks from ..core.db.task_logs import TaskLogs from ..core.db.task_assigns import TaskAssigns from ..core.utils i...
[ "flask.render_template", "flask.Blueprint", "flask.session.get", "flask.redirect" ]
[((344, 434), 'flask.Blueprint', 'Blueprint', (['"""developer"""', '__name__'], {'template_folder': '"""templates"""', 'static_folder': '"""static"""'}), "('developer', __name__, template_folder='templates', static_folder\n ='static')\n", (353, 434), False, 'from flask import Blueprint, render_template, flash, redir...
# BSD 2-Clause License # # Copyright (c) 2021-2022, Hewlett Packard Enterprise # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright...
[ "os.remove", "os.path.exists", "time.sleep", "os.path.isfile", "os.path.join" ]
[((5053, 5092), 'os.path.join', 'osp.join', (['self.path', "(self.name + '.out')"], {}), "(self.path, self.name + '.out')\n", (5061, 5092), True, 'import os.path as osp\n'), ((3514, 3558), 'os.path.join', 'osp.join', (['self.path', '(self.name + file_ending)'], {}), '(self.path, self.name + file_ending)\n', (3522, 3558...
""" Global variables for all scripts and parts of project. """ from absl import flags import os # Flag names are globally defined! So in general, we need to be # careful to pick names that are unlikely to be used by other libraries. # If there is a conflict, we'll get an error at import time. """ flags.DEFINE_string...
[ "absl.flags.DEFINE_string", "os.path.abspath", "absl.flags.DEFINE_enum", "absl.flags.DEFINE_integer" ]
[((571, 609), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""f"""', '""""""', '"""kernel"""'], {}), "('f', '', 'kernel')\n", (590, 609), False, 'from absl import flags\n'), ((919, 1026), 'absl.flags.DEFINE_enum', 'flags.DEFINE_enum', (['"""image_input_mode"""', '"""folder"""', "['camera', 'video', 'folder']",...
# new cookies.py from cookies import Cookies, Cookie cookies = Cookies(rocky='road') # Can also write explicitly: cookies['rocky'] = Cookie['road'] cookies['rocky'].path = "/cookie" assert cookies.render_request() == 'rocky=road'
[ "cookies.Cookies" ]
[((64, 85), 'cookies.Cookies', 'Cookies', ([], {'rocky': '"""road"""'}), "(rocky='road')\n", (71, 85), False, 'from cookies import Cookies, Cookie\n')]
import inspect class Singleton(type): # _instances is organized first by class and then by arguments. # for a class with: # class Foo: # def __init__(self, a, b): # pass # The _instances can look like: # { Foo : # {dict_items([('self', None), ('a', 1), ('b', 0)]): foo_instanc...
[ "inspect.getcallargs" ]
[((546, 602), 'inspect.getcallargs', 'inspect.getcallargs', (['cls.__init__', 'None', '*args'], {}), '(cls.__init__, None, *args, **kwargs)\n', (565, 602), False, 'import inspect\n')]
import os import getpass from .scraper import BetfairScraper as Betfair __version__ = '1.0' SECRETS_DIR = os.path.expanduser('~') + '/.betfair/' SECRETS_FILE = SECRETS_DIR + 'secrets' if not os.path.isdir(SECRETS_DIR): os.mkdir(SECRETS_DIR) if not os.path.isfile(SECRETS_FILE): with open(SECRETS_FILE, 'w'...
[ "os.mkdir", "os.path.isdir", "getpass.getpass", "os.path.isfile", "os.path.expanduser" ]
[((109, 132), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (127, 132), False, 'import os\n'), ((196, 222), 'os.path.isdir', 'os.path.isdir', (['SECRETS_DIR'], {}), '(SECRETS_DIR)\n', (209, 222), False, 'import os\n'), ((228, 249), 'os.mkdir', 'os.mkdir', (['SECRETS_DIR'], {}), '(SECRETS_DIR...
"""Support for Renault services.""" import logging from typing import Any, Dict from homeassistant.helpers import config_validation as cv from homeassistant.helpers.typing import HomeAssistantType from renault_api.kamereon.exceptions import KamereonResponseException import voluptuous as vol from .const import DOMAIN,...
[ "voluptuous.Required", "voluptuous.Optional", "homeassistant.helpers.config_validation.matches_regex", "logging.getLogger" ]
[((427, 454), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (444, 454), False, 'import logging\n'), ((722, 746), 'voluptuous.Required', 'vol.Required', (['SCHEMA_VIN'], {}), '(SCHEMA_VIN)\n', (734, 746), True, 'import voluptuous as vol\n'), ((748, 775), 'homeassistant.helpers.config_vali...
from strawberry_django.legacy import utils def test_basic_filters(): filter, exclude = utils.process_filters(['id__gt=5', 'name="you"', 'name__contains!="me"']) assert filter == { 'id__gt': 5, 'name': 'you' } assert exclude == { 'name__contains': 'me' } def test_is_in_filter(): filter, exclude = utils...
[ "strawberry_django.legacy.utils.process_filters" ]
[((92, 165), 'strawberry_django.legacy.utils.process_filters', 'utils.process_filters', (['[\'id__gt=5\', \'name="you"\', \'name__contains!="me"\']'], {}), '([\'id__gt=5\', \'name="you"\', \'name__contains!="me"\'])\n', (113, 165), False, 'from strawberry_django.legacy import utils\n'), ((315, 392), 'strawberry_django....
import argparse import numpy as np import time from datetime import datetime import os from copy import deepcopy import functools import typing import pickle from .. import Chem from .. import chemutils import rdkit from rdkit.Chem import Draw import rdkit.RDLogger import torch from ..chemutils import get_mol, get_sm...
[ "copy.deepcopy", "pickle.dump", "os.path.abspath", "os.makedirs", "argparse.ArgumentParser", "torch.manual_seed", "os.path.dirname", "torch.load", "os.path.exists", "numpy.random.RandomState", "rdkit.RDLogger.logger", "torch.autograd.set_grad_enabled", "numpy.random.randint", "torch.device...
[((11356, 11391), 'os.makedirs', 'os.makedirs', (['savedir'], {'exist_ok': '(True)'}), '(savedir, exist_ok=True)\n', (11367, 11391), False, 'import os\n'), ((11751, 11774), 'rdkit.RDLogger.logger', 'rdkit.RDLogger.logger', ([], {}), '()\n', (11772, 11774), False, 'import rdkit\n'), ((11830, 11855), 'argparse.ArgumentPa...
import numpy as np import tensorflow as tf import os graph_def = tf.GraphDef() labels = ["0","1","2"] # Import the TF graph with tf.gfile.FastGFile("model.pb", 'rb') as f: graph_def.ParseFromString(f.read()) tf.import_graph_def(graph_def, name='') # Create a list of labels. with open("labels.txt", 'rt') as ...
[ "tensorflow.gfile.FastGFile", "tensorflow.import_graph_def", "tensorflow.GraphDef" ]
[((67, 80), 'tensorflow.GraphDef', 'tf.GraphDef', ([], {}), '()\n', (78, 80), True, 'import tensorflow as tf\n'), ((132, 168), 'tensorflow.gfile.FastGFile', 'tf.gfile.FastGFile', (['"""model.pb"""', '"""rb"""'], {}), "('model.pb', 'rb')\n", (150, 168), True, 'import tensorflow as tf\n'), ((219, 258), 'tensorflow.import...
import copy import pylab import numpy as np from environment import Env from keras.layers import Dense from keras.optimizers import Adam from keras.models import Sequential from keras import backend as K EPISODES = 2500 class ReinforceAgent: def __init__(self): self.render = False self.load_model...
[ "keras.backend.placeholder", "numpy.random.choice", "numpy.zeros_like", "copy.deepcopy", "numpy.std", "keras.backend.function", "keras.backend.sum", "keras.optimizers.Adam", "numpy.zeros", "pylab.savefig", "keras.backend.log", "numpy.mean", "environment.Env", "numpy.reshape", "keras.laye...
[((2784, 2789), 'environment.Env', 'Env', ([], {}), '()\n', (2787, 2789), False, 'from environment import Env\n'), ((827, 839), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (837, 839), False, 'from keras.models import Sequential\n'), ((1116, 1146), 'keras.backend.placeholder', 'K.placeholder', ([], {'shap...
"""Various utilities dealing with hex coordinates mapping onto tensors representing the environment. See: https://arxiv.org/pdf/1803.02108.pdf Authors: <NAME> and <NAME> """ import os import time import math from dataclasses import dataclass import torch from agent.environment import position from ..map_transformat...
[ "torch.bmm", "torch.eye", "torch.stack", "math.radians", "torch.meshgrid", "agent.environment.position.Position", "torch.zeros", "torch.linspace", "torch.matmul" ]
[((1631, 1669), 'agent.environment.position.Position', 'position.Position', (['x', 'axial_position.v'], {}), '(x, axial_position.v)\n', (1648, 1669), False, 'from agent.environment import position\n'), ((2887, 2930), 'torch.linspace', 'torch.linspace', (['(0)', '(env_width - 1)', 'env_width'], {}), '(0, env_width - 1, ...
import http.client import json from config import conn, headers, version, print_json # Fetch all Subnets # Spec: https://pages.github.ibm.com/riaas/api-spec/spec_2019-05-07/#/Subnets/list_subnets def fetch_subnets(): payload = "" try: # Connect to api endpoint for subnets conn.request("GET", ...
[ "config.conn.request", "config.conn.getresponse" ]
[((300, 371), 'config.conn.request', 'conn.request', (['"""GET"""', "('/v1/subnets?version=' + version)", 'payload', 'headers'], {}), "('GET', '/v1/subnets?version=' + version, payload, headers)\n", (312, 371), False, 'from config import conn, headers, version, print_json\n'), ((424, 442), 'config.conn.getresponse', 'c...
from pickle import load from bayes_implicit_solvent.continuous_parameter_experiments.gd_vs_langevin.autograd_based_experiment import Experiment, experiments, train_test_split, train_test_rmse, unreduce, expt_means def load_expt_result(path): with open(path, 'rb') as f: result = load(f) return result ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "numpy.load", "bayes_implicit_solvent.continuous_parameter_experiments.gd_vs_langevin.autograd_based_experiment.train_test_split", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "matplotlib.pyplot.scatter", "matplotlib.pyplot.legend", "ba...
[((387, 414), 'numpy.load', 'np.load', (['"""expt_dataset.npz"""'], {}), "('expt_dataset.npz')\n", (394, 414), True, 'import numpy as np\n'), ((505, 532), 'bayes_implicit_solvent.continuous_parameter_experiments.gd_vs_langevin.autograd_based_experiment.unreduce', 'unreduce', (['predictions[inds]'], {}), '(predictions[i...
import numpy as np import pandas as pd from samplics.sae.eblup_unit_model import EblupUnitModel cornsoybean = pd.read_csv("./tests/sae/cornsoybean.csv") cornsoybean_mean = pd.read_csv("./tests/sae/cornsoybeanmeans.csv") cornsoybean = cornsoybean.sample(frac=1) # shuffle the data to remove the # print(cornsoybean) ...
[ "numpy.random.seed", "pandas.read_csv", "numpy.isclose", "numpy.array", "numpy.linspace", "samplics.sae.eblup_unit_model.EblupUnitModel", "numpy.unique" ]
[((113, 155), 'pandas.read_csv', 'pd.read_csv', (['"""./tests/sae/cornsoybean.csv"""'], {}), "('./tests/sae/cornsoybean.csv')\n", (124, 155), True, 'import pandas as pd\n'), ((175, 222), 'pandas.read_csv', 'pd.read_csv', (['"""./tests/sae/cornsoybeanmeans.csv"""'], {}), "('./tests/sae/cornsoybeanmeans.csv')\n", (186, 2...
#! /usr/bin/env python import sys import runpy sys.path.insert(0, "/Users/jblackford/Development/agent") if __name__ == '__main__': runpy.run_module("agent.main", run_name="__main__")
[ "sys.path.insert", "runpy.run_module" ]
[((49, 106), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""/Users/jblackford/Development/agent"""'], {}), "(0, '/Users/jblackford/Development/agent')\n", (64, 106), False, 'import sys\n'), ((139, 190), 'runpy.run_module', 'runpy.run_module', (['"""agent.main"""'], {'run_name': '"""__main__"""'}), "('agent.main', r...
from pyrave.base import BaseRaveAPI from pyrave.encryption import RaveEncryption class Preauth(BaseRaveAPI): """ Preauthorization Class """ def __init__(self): super(Preauth, self).__init__() self.rave_enc = RaveEncryption() def preauthorise_card(self, log_url=False, **kwargs): ...
[ "pyrave.encryption.RaveEncryption" ]
[((244, 260), 'pyrave.encryption.RaveEncryption', 'RaveEncryption', ([], {}), '()\n', (258, 260), False, 'from pyrave.encryption import RaveEncryption\n')]
# Encoding: utf-8 # -- # Copyright (c) 2008-2021 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- import os import time import copy import threading from base64 import urlsafe...
[ "nagare.log.get_logger", "copy.deepcopy", "jwcrypto.jwk.JWKSet.from_json", "jwcrypto.jwk.JWKSet", "python_jwt.process_jwt", "jwcrypto.jwk.JWK", "time.time", "nagare.partial.max_number_of_args", "threading.Lock", "urllib.urlencode", "python_jwt.generate_jwt", "python_jwt.verify_jwt", "request...
[((1059, 1088), 'nagare.partial.max_number_of_args', 'partial.max_number_of_args', (['(2)'], {}), '(2)\n', (1085, 1088), False, 'from nagare import partial, log\n'), ((2498, 2551), 'copy.deepcopy', 'copy.deepcopy', (['cookie_auth.Authentication.CONFIG_SPEC'], {}), '(cookie_auth.Authentication.CONFIG_SPEC)\n', (2511, 25...
from pypresence import Presence import handler import time client_id = "807964106673225748" rich_presence = Presence(client_id) def connect(): return rich_presence.connect() def connect_loop(retries=0): if retries > 10: return try: connect() except: print("Wher...
[ "pypresence.Presence", "time.sleep", "handler.get_rpc_update", "time.time" ]
[((114, 133), 'pypresence.Presence', 'Presence', (['client_id'], {}), '(client_id)\n', (122, 133), False, 'from pypresence import Presence\n'), ((541, 552), 'time.time', 'time.time', ([], {}), '()\n', (550, 552), False, 'import time\n'), ((345, 359), 'time.sleep', 'time.sleep', (['(10)'], {}), '(10)\n', (355, 359), Fal...
''' This file implements the detection algorithms (message passing) on markov random field of graphs generated by ER model. The algorithms defined in this file would be imported by bin/varying_loopy.py For the specifics about the algorithms, please see the description in manuscript/amp.pdf. ''' import numpy as np imp...
[ "factorgraph.Graph", "numpy.sum", "numpy.power", "numpy.array", "numpy.exp", "itertools.product", "alphaBP.alphaGraph", "numpy.eye" ]
[((1426, 1445), 'numpy.array', 'np.array', (['proposals'], {}), '(proposals)\n', (1434, 1445), True, 'import numpy as np\n'), ((1630, 1644), 'numpy.array', 'np.array', (['prob'], {}), '(prob)\n', (1638, 1644), True, 'import numpy as np\n'), ((2155, 2174), 'numpy.array', 'np.array', (['marginals'], {}), '(marginals)\n',...
import sys import os import inspect from pathlib import Path from collections import defaultdict from easydict import EasyDict as ED from .trace_utils import get_function_name_from_frame from typed_ast import ast3 as ast from ..common.ast_utils import expr2ann from ..common.log_utils import log, debug_log from .shape...
[ "astpretty.pprint", "inspect.getsourcelines", "inspect.getframeinfo", "sys.settrace", "tsalib.tsn.tsn_to_tuple", "pathlib.Path", "easydict.EasyDict", "fnmatch.fnmatch" ]
[((589, 595), 'easydict.EasyDict', 'ED', (['{}'], {}), '({})\n', (591, 595), True, 'from easydict import EasyDict as ED\n'), ((4489, 4525), 'inspect.getsourcelines', 'inspect.getsourcelines', (['frame.f_code'], {}), '(frame.f_code)\n', (4511, 4525), False, 'import inspect\n'), ((5439, 5475), 'inspect.getsourcelines', '...
from django.test import SimpleTestCase from django.urls import reverse class HomePageTests(SimpleTestCase): def test_home_page_status_code(self): response = self.client.get('/') self.assertEqual(response.status_code, 200) def test_view_url_by_name(self): response = self.client.get(re...
[ "django.urls.reverse" ]
[((318, 339), 'django.urls.reverse', 'reverse', (['"""core:index"""'], {}), "('core:index')\n", (325, 339), False, 'from django.urls import reverse\n'), ((476, 497), 'django.urls.reverse', 'reverse', (['"""core:index"""'], {}), "('core:index')\n", (483, 497), False, 'from django.urls import reverse\n'), ((1072, 1095), ...
"""Test that hidden ivars in a shared library are visible from the main executable.""" import os, time import unittest2 import lldb from lldbtest import * import lldbutil import subprocess class HiddenIvarsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin @dsym_test def ...
[ "os.getcwd", "lldbutil.run_break_set_by_file_and_line", "unittest2.main", "lldb.SBDebugger.Initialize", "unittest2.expectedFailure", "lldb.SBDebugger.Terminate", "subprocess.call" ]
[((1835, 1879), 'unittest2.expectedFailure', 'unittest2.expectedFailure', (['"""rdar://18683637"""'], {}), "('rdar://18683637')\n", (1860, 1879), False, 'import unittest2\n'), ((2184, 2228), 'unittest2.expectedFailure', 'unittest2.expectedFailure', (['"""rdar://18683637"""'], {}), "('rdar://18683637')\n", (2209, 2228),...
import torch import torch.nn as nn import numpy as np import json import shutil import sys import torch.nn.functional as F from torch.autograd import Variable from os import path as op from matplotlib import pyplot, patches MAX_LEN = 140 # Lenth of a tweet BATCH_SIZE = 512 EPOCH = 250 # With epoch 0, we ...
[ "matplotlib.pyplot.title", "pandas.read_csv", "torch.nn.Embedding", "numpy.argmin", "matplotlib.patches.Patch", "os.path.join", "numpy.unique", "os.path.dirname", "torch.load", "os.path.exists", "torch.nn.Linear", "shutil.copyfile", "torch.zeros", "torch.nn.GRU", "matplotlib.pyplot.show"...
[((636, 656), 'os.path.dirname', 'op.dirname', (['__file__'], {}), '(__file__)\n', (646, 656), True, 'from os import path as op\n'), ((708, 728), 'os.path.dirname', 'op.dirname', (['__file__'], {}), '(__file__)\n', (718, 728), True, 'from os import path as op\n'), ((879, 940), 'pandas.read_csv', 'pandas.read_csv', (['f...
import logging import time from datetime import datetime from dateutil.parser import parse from sqlalchemy.sql import text from src.trending_strategies.base_trending_strategy import BaseTrendingStrategy from src.trending_strategies.trending_type_and_version import ( TrendingType, TrendingVersion, ) logger = l...
[ "dateutil.parser.parse", "sqlalchemy.sql.text", "time.time", "datetime.datetime.now", "logging.getLogger" ]
[((319, 346), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (336, 346), False, 'import logging\n'), ((939, 953), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (951, 953), False, 'from datetime import datetime\n'), ((962, 970), 'dateutil.parser.parse', 'parse', (['o'], {}), '...
# Generated by Django 2.2.3 on 2019-07-22 02:31 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('mud', '0019_users_loggedin'), ] operations = [ migrations.RemoveField( model_name='users', name='loggedIn', ), ]...
[ "django.db.migrations.RemoveField" ]
[((219, 278), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""users"""', 'name': '"""loggedIn"""'}), "(model_name='users', name='loggedIn')\n", (241, 278), False, 'from django.db import migrations\n')]
# Python related libraries import numpy as np import random # ROS2 msgs from autonomous_exploration_msgs.msg import PointGroup class PointsGroup: """ Class similar to the one used in unity, created to handle each area in the interactive map """ def __init__(self, pG : PointGroup) -> None...
[ "numpy.zeros" ]
[((698, 729), 'numpy.zeros', 'np.zeros', (['[self.numOfPoints, 2]'], {}), '([self.numOfPoints, 2])\n', (706, 729), True, 'import numpy as np\n')]
'''OpenGL extension EXT.separate_shader_objects This module customises the behaviour of the OpenGL.raw.GL.EXT.separate_shader_objects to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/EXT/separate_shader_objects.txt ''' f...
[ "OpenGL.wrapper.wrapper", "OpenGL.extensions.hasGLExtension" ]
[((752, 794), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['_EXTENSION_NAME'], {}), '(_EXTENSION_NAME)\n', (777, 794), False, 'from OpenGL import extensions\n'), ((900, 942), 'OpenGL.wrapper.wrapper', 'wrapper.wrapper', (['glCreateShaderProgramvEXT'], {}), '(glCreateShaderProgramvEXT)\n', (915, 94...
""" All rights reserved to cnvrg.io http://www.cnvrg.io cnvrg.io - AI library Written by: <NAME> Last update: Oct 06, 2019 Updated by: <NAME> random_forest_classifier.py ============================================================================== """ import argparse import pandas as pd from SKTrainer import...
[ "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.ensemble.RandomForestClassifier", "argparse.ArgumentParser" ]
[((2671, 2706), 'pandas.read_csv', 'pd.read_csv', (['args.data'], {'index_col': '(0)'}), '(args.data, index_col=0)\n', (2682, 2706), True, 'import pandas as pd\n'), ((3204, 3252), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': 'args.test_size'}), '(X, y, test_size=args.test_s...
import requests from twilio.rest import Client STOCK_NAME = "TSLA" COMPANY_NAME = "Tesla" account_sid = "Your Twilio acc_sid" auth_token = "Your Twilio acc token" STOCK_ENDPOINT = "https://www.alphavantage.co/query" NEWS_ENDPOINT = "https://newsapi.org/v2/everything" STOCK_API = "your_av_api_token" NEWS_API = "your_n...
[ "twilio.rest.Client", "requests.get" ]
[((461, 515), 'requests.get', 'requests.get', ([], {'url': 'STOCK_ENDPOINT', 'params': 'stocks_params'}), '(url=STOCK_ENDPOINT, params=stocks_params)\n', (473, 515), False, 'import requests\n'), ((1146, 1196), 'requests.get', 'requests.get', ([], {'url': 'NEWS_ENDPOINT', 'params': 'news_param'}), '(url=NEWS_ENDPOINT, p...
# -*- coding: utf-8 -*- from numpy import exp, arcsin, tan, cos, sqrt, sin def comp_surface(self): """Compute the surface of the Hole Parameters ---------- self : HoleMLSRPM A HoleMLSRPM object Returns ------- S: float Surface of the Magnet. [m**2] """ Rbo = sel...
[ "numpy.arcsin", "numpy.tan", "numpy.sin", "numpy.exp", "numpy.cos", "numpy.sqrt" ]
[((355, 404), 'numpy.arcsin', 'arcsin', (['((self.R1 + self.W2) / (self.R1 + self.R3))'], {}), '((self.R1 + self.W2) / (self.R1 + self.R3))\n', (361, 404), False, 'from numpy import exp, arcsin, tan, cos, sqrt, sin\n'), ((454, 473), 'numpy.exp', 'exp', (['(-1.0j * alpha1)'], {}), '(-1.0j * alpha1)\n', (457, 473), False...
import numpy as np import matplotlib.patches class Roi(): """A class to represent a ROI """ def __init__(self, axis:int, first_slice:int, last_slice:int, roi_number:int, type_number:int, list_point:list, volume_dimension:tuple): """constructor Args: axis (int): [1 for axial, ...
[ "numpy.asarray", "numpy.zeros", "numpy.transpose" ]
[((1146, 1173), 'numpy.asarray', 'np.asarray', (['self.list_point'], {}), '(self.list_point)\n', (1156, 1173), True, 'import numpy as np\n'), ((3103, 3137), 'numpy.zeros', 'np.zeros', (['(self.x, self.y, self.z)'], {}), '((self.x, self.y, self.z))\n', (3111, 3137), True, 'import numpy as np\n'), ((3432, 3468), 'numpy.t...
# -*- coding: utf-8 -*- # Script for verifying the format of a manifest.yaml file that is part of a Door43 Resource Container. # Should check the following: # Manifest file does not have a BOM. # Valid YAML syntax. # Manifest contains all the required fields. # conformsto 'rc0.2' # contributor is a list of at leas...
[ "sys.stdout.write", "os.path.basename", "os.path.isdir", "os.path.exists", "datetime.date.today", "re.match", "os.path.isfile", "pathlib.Path", "yaml.safe_load", "datetime.datetime.strptime", "datetime.timedelta", "io.open", "sys.stderr.write", "os.path.join", "os.listdir", "re.compile...
[((7806, 7836), 're.compile', 're.compile', (['"""[0-8][0-9]\\\\.md$"""'], {}), "('[0-8][0-9]\\\\.md$')\n", (7816, 7836), False, 'import re\n'), ((7849, 7884), 're.compile', 're.compile', (['"""[0-1][0-9][0-9]\\\\.md$"""'], {}), "('[0-1][0-9][0-9]\\\\.md$')\n", (7859, 7884), False, 'import re\n'), ((9408, 9445), 're.co...
from random import choice, sample, seed from typing import List from datavalidation import data_validator, PASS, FAIL, NA from django.db import models from .base import BaseModel seed(1234) class Relation(BaseModel): fkey = models.ForeignKey( "RelatedFields", on_delete=models.CASCADE, blank=True, null...
[ "django.db.models.OneToOneField", "django.db.models.ManyToManyField", "django.db.models.ForeignKey", "random.sample", "random.choice", "random.seed", "datavalidation.data_validator" ]
[((183, 193), 'random.seed', 'seed', (['(1234)'], {}), '(1234)\n', (187, 193), False, 'from random import choice, sample, seed\n'), ((234, 321), 'django.db.models.ForeignKey', 'models.ForeignKey', (['"""RelatedFields"""'], {'on_delete': 'models.CASCADE', 'blank': '(True)', 'null': '(True)'}), "('RelatedFields', on_dele...
# coding: utf-8 # In[ ]: from __future__ import print_function import numpy as np import tensorflow as tf from autoencoder import model import pickle import os # In[ ]: DEBUG = False PLOTTING_SUPPORT = True RUN_AS_PY_SCRIPT = False SET_EULER_PARAMS = False SET_MARMOT_PARAMS = False # Handle arguments (When ex...
[ "matplotlib.pyplot.title", "visuals.visuals_of_matches", "pickle.dump", "numpy.abs", "random.sample", "numpy.empty", "voxelize.create_twins", "ipywidgets.widgets.Dropdown", "numpy.isnan", "matplotlib.pyplot.figure", "numpy.exp", "matplotlib.pyplot.gca", "voxelize.create_rotations", "iterto...
[((1498, 1517), 'autoencoder.model.ModelParams', 'model.ModelParams', ([], {}), '()\n', (1515, 1517), False, 'from autoencoder import model\n'), ((1587, 1610), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (1605, 1610), False, 'import os\n'), ((4489, 4518), 'utilities.list_runs', 'utilities....
import numpy as np from rllab.core.serializable import Serializable from .replay_buffer import ReplayBuffer class SimpleReplayBuffer(ReplayBuffer, Serializable): def __init__(self, env_spec, max_replay_buffer_size): super(SimpleReplayBuffer, self).__init__() Serializable.quick_init(self, locals(...
[ "numpy.random.randint", "numpy.zeros", "numpy.fromstring" ]
[((630, 687), 'numpy.zeros', 'np.zeros', (['(max_replay_buffer_size, self._observation_dim)'], {}), '((max_replay_buffer_size, self._observation_dim))\n', (638, 687), True, 'import numpy as np\n'), ((944, 1001), 'numpy.zeros', 'np.zeros', (['(max_replay_buffer_size, self._observation_dim)'], {}), '((max_replay_buffer_s...
#! /usr/bin/env python3 #! -*- coding: utf-8 -*- from taggregator import printer from pathlib import Path import itertools import os import re import sys class Match: NO_PRIORITY = -1 def __init__(self, file_name, line_number, line, tag, priority): self.file_name = file_name self.line_number...
[ "os.path.isdir", "os.getcwd", "taggregator.printer.print_matches", "os.walk", "re.escape", "os.path.join", "re.compile" ]
[((1541, 1580), 're.compile', 're.compile', (['regex_string', 're.IGNORECASE'], {}), '(regex_string, re.IGNORECASE)\n', (1551, 1580), False, 'import re\n'), ((1753, 1777), 'os.path.isdir', 'os.path.isdir', (['file_name'], {}), '(file_name)\n', (1766, 1777), False, 'import os\n'), ((3721, 3756), 're.escape', 're.escape'...
""" conftest.py according to pytest docs: https://docs.pytest.org/en/2.7.3/plugins.html?highlight=re#conftest-py-plugins """ import pytest from datetime import datetime, timedelta, timezone from origin.api import Application from origin.models.auth import InternalToken from origin.tokens import TokenEncoder @pytest....
[ "pytest.fixture", "datetime.timedelta", "origin.tokens.TokenEncoder", "datetime.datetime.now", "origin.api.Application.create" ]
[((313, 345), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (327, 345), False, 'import pytest\n'), ((517, 549), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (531, 549), False, 'import pytest\n'), ((634, 666), 'pytest.fixt...
import sys import os.path from setuptools import setup from sansio_multipart import __version__, __author__, __doc__ setup( name="sansio_multipart", version=__version__, description="Parser for multipart/form-data.", long_description=__doc__, author=__author__, author_email="<EMAIL>", url=...
[ "setuptools.setup" ]
[((119, 957), 'setuptools.setup', 'setup', ([], {'name': '"""sansio_multipart"""', 'version': '__version__', 'description': '"""Parser for multipart/form-data."""', 'long_description': '__doc__', 'author': '__author__', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/theelous3/sansio-multipart-parser"""'...
from grapl_analyzerlib.schemas.schema_builder import NodeSchema, ManyToOne class IpConnectionSchema(NodeSchema): def __init__(self) -> None: super(IpConnectionSchema, self).__init__() ( self.with_str_prop("src_ip_address") .with_str_prop("src_port") .with_str_pr...
[ "grapl_analyzerlib.schemas.schema_builder.ManyToOne" ]
[((621, 647), 'grapl_analyzerlib.schemas.schema_builder.ManyToOne', 'ManyToOne', (['IpAddressSchema'], {}), '(IpAddressSchema)\n', (630, 647), False, 'from grapl_analyzerlib.schemas.schema_builder import NodeSchema, ManyToOne\n')]
#!/usr/bin/env python3 from sys import argv, exit import tempfile import os.path import subprocess tpl = """ .equ ENC_PAYLOAD_ADDR, {payload_addr} .equ ENC_PAYLOAD_SIZE, {payload_size} .equ BASE, {sysmem_base} .equ SECOND_PAYLOAD, {second_payload} """ prefix = "arm-vita-eabi-" def build(tmp, code): src_file = o...
[ "tempfile.TemporaryDirectory", "subprocess.check_call" ]
[((507, 571), 'subprocess.check_call', 'subprocess.check_call', (["[prefix + 'as', src_file, '-o', obj_file]"], {}), "([prefix + 'as', src_file, '-o', obj_file])\n", (528, 571), False, 'import subprocess\n'), ((576, 655), 'subprocess.check_call', 'subprocess.check_call', (["[prefix + 'objcopy', '-O', 'binary', obj_file...
import tensorflow as tf import os import sklearn.metrics import numpy as np import sys import time def average_gradients(tower_grads): """Calculate the average gradient for each shared variable across all towers. Note that this function provides a synchronization point across all towers. Args: to...
[ "os.mkdir", "tensorflow.get_collection", "tensorflow.ConfigProto", "sys.stdout.flush", "os.path.join", "tensorflow.add_n", "tensorflow.not_equal", "tensorflow.concat", "tensorflow.placeholder", "tensorflow.summary.FileWriter", "tensorflow.name_scope", "tensorflow.summary.merge_all", "tensorf...
[((1196, 1227), 'tensorflow.concat', 'tf.concat', ([], {'axis': '(0)', 'values': 'grads'}), '(axis=0, values=grads)\n', (1205, 1227), True, 'import tensorflow as tf\n'), ((1243, 1266), 'tensorflow.reduce_mean', 'tf.reduce_mean', (['grad', '(0)'], {}), '(grad, 0)\n', (1257, 1266), True, 'import tensorflow as tf\n'), ((2...
from grafana_backup.api_checks import main as api_checks from grafana_backup.save_dashboards import main as save_dashboards from grafana_backup.save_datasources import main as save_datasources from grafana_backup.save_folders import main as save_folders from grafana_backup.save_alert_channels import main as save_alert_...
[ "grafana_backup.archive.main", "os.path.exists", "grafana_backup.api_checks.main", "shutil.rmtree", "sys.exit" ]
[((1103, 1123), 'grafana_backup.api_checks.main', 'api_checks', (['settings'], {}), '(settings)\n', (1113, 1123), True, 'from grafana_backup.api_checks import main as api_checks\n'), ((1289, 1300), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1297, 1300), False, 'import sys\n'), ((1949, 1992), 'os.path.exists', 'pa...
import argparse import cv2 import glog import json import numpy as np import os from tqdm import tqdm from pycocotools import coco as coco_loader def parse_args(): """Parse arguments of command line""" parser = argparse.ArgumentParser( description='Merge annotations in COCO representation into one' ...
[ "json.dump", "tqdm.tqdm", "json.load", "cv2.putText", "argparse.ArgumentParser", "os.makedirs", "os.path.basename", "os.path.commonpath", "cv2.imwrite", "glog.info", "os.path.dirname", "os.path.exists", "cv2.imread", "pycocotools.coco.COCO", "numpy.int32", "cv2.rectangle", "os.path.j...
[((223, 316), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Merge annotations in COCO representation into one"""'}), "(description=\n 'Merge annotations in COCO representation into one')\n", (246, 316), False, 'import argparse\n'), ((1246, 1287), 'os.path.join', 'os.path.join', (['in...
# 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 # "License"); you may not u...
[ "tvm.tir.const", "tvm.runtime.convert", "math.ceil" ]
[((9908, 9940), 'tvm.runtime.convert', 'tvm.runtime.convert', (['pooled_size'], {}), '(pooled_size)\n', (9927, 9940), False, 'import tvm\n'), ((9961, 10000), 'tvm.tir.const', 'tvm.tir.const', (['spatial_scale', '"""float32"""'], {}), "(spatial_scale, 'float32')\n", (9974, 10000), False, 'import tvm\n'), ((10020, 10056)...
import bmeg.enrichers.gene_enricher as gene_enricher def test_simple(): """ straightforward """ tp53 = gene_enricher.get_gene('TP53') assert(tp53), 'Should exist' assert tp53 == {'symbol': u'TP53', 'entrez_id': u'7157', 'ensembl_gene_id': u'ENSG00000141510', 'hg...
[ "bmeg.enrichers.gene_enricher.get_gene" ]
[((113, 143), 'bmeg.enrichers.gene_enricher.get_gene', 'gene_enricher.get_gene', (['"""TP53"""'], {}), "('TP53')\n", (135, 143), True, 'import bmeg.enrichers.gene_enricher as gene_enricher\n'), ((631, 662), 'bmeg.enrichers.gene_enricher.get_gene', 'gene_enricher.get_gene', (['"""ZUFSP"""'], {}), "('ZUFSP')\n", (653, 66...
import math from sympy import sin, solve, symbols, Symbol, Limit # Solve for T u, t, g, theta = symbols( 'u, t, g, theta' ) solve( u * sin( theta ) -g*t, t ) x = Symbol( 'x', positive = True ) if( x + 5 ) > 0: print( '+' ) else: print( '-' ) # Indeterminant Form Limit( sin(x) / x, x, 0 ).doit()
[ "sympy.sin", "sympy.symbols", "sympy.Symbol" ]
[((97, 122), 'sympy.symbols', 'symbols', (['"""u, t, g, theta"""'], {}), "('u, t, g, theta')\n", (104, 122), False, 'from sympy import sin, solve, symbols, Symbol, Limit\n'), ((164, 190), 'sympy.Symbol', 'Symbol', (['"""x"""'], {'positive': '(True)'}), "('x', positive=True)\n", (170, 190), False, 'from sympy import sin...
# -*- coding: UTF-8 -*- # !/usr/bin/python # @time :2019/4/1 10:35 # @author :Mo # @function :cut sentences from conf.path_config import chicken_and_gossip_path, td_idf_cut_path, td_idf_cut_pinyin from utils.text_tools import txtWrite, txtRead, get_syboml, strQ2B from conf.path_config import projectdir...
[ "pickle.dump", "utils.text_tools.get_syboml", "utils.text_tools.txtRead", "gensim.models.TfidfModel", "gensim.corpora.Dictionary", "xpinyin.Pinyin", "jieba.lcut", "utils.text_tools.txtWrite" ]
[((562, 583), 'utils.text_tools.txtRead', 'txtRead', (['sources_path'], {}), '(sources_path)\n', (569, 583), False, 'from utils.text_tools import txtWrite, txtRead, get_syboml, strQ2B\n'), ((1156, 1193), 'utils.text_tools.txtWrite', 'txtWrite', (['topic_ques_all', 'target_path'], {}), '(topic_ques_all, target_path)\n',...
from django import forms from user.models import User # Skip implementing InviteProspectForm at this moment class InviteProspectForm(forms.ModelForm): type = forms.CharField(max_length=255, required=True, widget=forms.TextInput( attrs={ 'placeholder': '<NAME>', 'class': 'width-150 form-control', ...
[ "django.forms.TextInput" ]
[((216, 303), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'placeholder': '<NAME>', 'class': 'width-150 form-control'}"}), "(attrs={'placeholder': '<NAME>', 'class':\n 'width-150 form-control'})\n", (231, 303), False, 'from django import forms\n')]
import _expresso as core from _expresso import associative,left_associative,right_associative,non_associative,commutative,non_commutative,postfix,prefix class Expression(core.Expression): def __init__(self,expr,S): if isinstance(expr,(core.Expression,Expression)): super(Expression,self).__init...
[ "_expresso.postorder_traversal", "_expresso.preorder_traversal", "_expresso.replacement_map", "_expresso.Field", "_expresso.MulplicityList", "_expresso.replace", "_expresso.match", "_expresso.commutative_permutations" ]
[((2755, 2792), '_expresso.commutative_permutations', 'core.commutative_permutations', (['search'], {}), '(search)\n', (2784, 2792), True, 'import _expresso as core\n'), ((7609, 7671), '_expresso.Field', 'core.Field', (['additive_group._group', 'multiplicative_group._group'], {}), '(additive_group._group, multiplicativ...
""" Test __str__ methods. """ import pexpect from . import PexpectTestCase class TestCaseMisc(PexpectTestCase.PexpectTestCase): def test_str_spawnu(self): """ Exercise spawnu.__str__() """ # given, p = pexpect.spawnu('cat') # exercise, value = str(p) # verify ...
[ "pexpect.spawn", "pexpect.spawnu" ]
[((234, 255), 'pexpect.spawnu', 'pexpect.spawnu', (['"""cat"""'], {}), "('cat')\n", (248, 255), False, 'import pexpect\n'), ((455, 475), 'pexpect.spawn', 'pexpect.spawn', (['"""cat"""'], {}), "('cat')\n", (468, 475), False, 'import pexpect\n'), ((694, 719), 'pexpect.spawn', 'pexpect.spawn', (['None', 'None'], {}), '(No...
from datetime import date, timedelta from dateutil.relativedelta import relativedelta from dimagi.utils.dates import DateSpan from corehq.apps.userreports.models import ReportConfiguration from corehq.apps.userreports.reports.data_source import ( ConfigurableReportDataSource, ) from corehq.util.couch import get_...
[ "datetime.date", "dimagi.utils.dates.DateSpan", "corehq.apps.userreports.reports.data_source.ConfigurableReportDataSource.from_spec", "dateutil.relativedelta.relativedelta", "corehq.util.couch.get_document_or_not_found", "datetime.timedelta", "corehq.apps.userreports.reports.view.get_filter_values" ]
[((408, 475), 'corehq.util.couch.get_document_or_not_found', 'get_document_or_not_found', (['ReportConfiguration', 'domain_name', 'ucr_id'], {}), '(ReportConfiguration, domain_name, ucr_id)\n', (433, 475), False, 'from corehq.util.couch import get_document_or_not_found\n'), ((1161, 1212), 'datetime.date', 'date', ([], ...
from setuptools import setup setup( name='cmdWrapper', version='0.1', packages=['cmdWrapper'], url='https://github.com/tianer2820/cmdWrapper', license='MIT', author='Toby', author_email='<EMAIL>', description='a vary simple gui lib based on wxpython', requires=['wxPython'] )
[ "setuptools.setup" ]
[((30, 289), 'setuptools.setup', 'setup', ([], {'name': '"""cmdWrapper"""', 'version': '"""0.1"""', 'packages': "['cmdWrapper']", 'url': '"""https://github.com/tianer2820/cmdWrapper"""', 'license': '"""MIT"""', 'author': '"""Toby"""', 'author_email': '"""<EMAIL>"""', 'description': '"""a vary simple gui lib based on wx...
# Generated by Django 2.0 on 2019-07-23 12:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('auth_token', '0009_auto_20190622_1920'), ] operations = [ migrations.AlterFi...
[ "django.db.models.ForeignKey", "django.db.models.DateTimeField", "django.db.models.CharField", "django.db.models.BooleanField" ]
[((410, 476), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)', 'verbose_name': '"""created at"""'}), "(auto_now_add=True, verbose_name='created at')\n", (430, 476), False, 'from django.db import migrations, models\n'), ((604, 663), 'django.db.models.BooleanField', 'models.Boolea...
#!/usr/bin/env python # -*- coding: utf-8 -*- from validate_email import validate_email from random import choice from string import ascii_uppercase as uppercase, digits from settings import * def allowed_file(filename, extensions): """ Check file is image :param filename: string :param extensions: ...
[ "validate_email.validate_email", "random.choice" ]
[((562, 583), 'validate_email.validate_email', 'validate_email', (['email'], {}), '(email)\n', (576, 583), False, 'from validate_email import validate_email\n'), ((712, 738), 'random.choice', 'choice', (['(uppercase + digits)'], {}), '(uppercase + digits)\n', (718, 738), False, 'from random import choice\n')]
# Generated by Django 3.1.2 on 2020-10-27 13:28 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('pets', '0001_initial'), ] operations = [ migrations.AddField( model_name='like', na...
[ "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((350, 394), 'django.db.models.CharField', 'models.CharField', ([], {'default': '"""aa"""', 'max_length': '(2)'}), "(default='aa', max_length=2)\n", (366, 394), False, 'from django.db import migrations, models\n'), ((511, 588), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.de...