code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from pathlib import Path from keysmaniac.objects import TimingPoint, SimpleNote notes_4 = [1, 1, 2, 2, 3, 3, 4, 0, 4, 4, 3, 3, 2, 2, 1, 0] bpm = 80 def gen_chart(): result = [] for n in range(0, len(notes_4)): if notes_4[n] == 0: continue beat = TimingPoint(17 + n, 1, bpm) ...
[ "keysmaniac.objects.SimpleNote", "keysmaniac.objects.TimingPoint", "pathlib.Path" ]
[((285, 312), 'keysmaniac.objects.TimingPoint', 'TimingPoint', (['(17 + n)', '(1)', 'bpm'], {}), '(17 + n, 1, bpm)\n', (296, 312), False, 'from keysmaniac.objects import TimingPoint, SimpleNote\n'), ((328, 373), 'keysmaniac.objects.SimpleNote', 'SimpleNote', ([], {'timing_point': 'beat', 'key': 'notes_4[n]'}), '(timing...
""" Application view. """ from datetime import datetime from django.http import Http404 from django.shortcuts import render, redirect from django.views.generic import View from application.models import Application from .forms import Step1RateForm, Step2RateForm, TerminateForm, ApproveForm from .models import User ...
[ "django.shortcuts.render", "application.models.Application.objects.get_unrated2", "datetime.datetime.now", "django.shortcuts.redirect", "application.models.Application.objects.get_unrated" ]
[((1917, 1960), 'application.models.Application.objects.get_unrated', 'Application.objects.get_unrated', (['created_by'], {}), '(created_by)\n', (1948, 1960), False, 'from application.models import Application\n'), ((2337, 2384), 'django.shortcuts.render', 'render', (['request', 'template_name'], {'context': 'context'}...
import os import sys cwd = os.getcwd() sys.path.insert(0, cwd+'/../..') import pandas from plot.box.utils_plot import * from plot.box.paths_cartpoleNoisyA_test import * def sweep_model(): k10_far_cms = { "normal": cpn01_k10_far_reward002, "0.01 terminal": cpn01_k10_far_reward002_risk001, "0...
[ "sys.path.insert", "pandas.read_csv", "os.getcwd" ]
[((27, 38), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (36, 38), False, 'import os\n'), ((39, 73), 'sys.path.insert', 'sys.path.insert', (['(0)', "(cwd + '/../..')"], {}), "(0, cwd + '/../..')\n", (54, 73), False, 'import sys\n'), ((2469, 2490), 'pandas.read_csv', 'pandas.read_csv', (['path'], {}), '(path)\n', (2484, ...
from bs4 import BeautifulSoup class Parser(object): def __init__(self, html: str) -> None: self.html = html @property def soup(self): return BeautifulSoup(self.html, 'html.parser') @property def links(self): data = [] ls = self.soup.find_all('a') for link ...
[ "bs4.BeautifulSoup" ]
[((172, 211), 'bs4.BeautifulSoup', 'BeautifulSoup', (['self.html', '"""html.parser"""'], {}), "(self.html, 'html.parser')\n", (185, 211), False, 'from bs4 import BeautifulSoup\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- """Create the data for the LSTM. """ import os import sys import argparse import numpy as np import h5py import itertools from collections import defaultdict class Indexer: def __init__(self, symbols = ["<blank>","<unk>","<s>","</s>"]): self.vocab = defaultdi...
[ "argparse.ArgumentParser", "h5py.File", "numpy.argsort", "numpy.array", "numpy.zeros", "collections.defaultdict", "numpy.random.permutation" ]
[((9598, 9703), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), '(description=__doc__, formatter_class=argparse.\n ArgumentDefaultsHelpFormatter)\n', (9621, 9703), False, 'import argparse\n'), ((311, 327), 'collectio...
from selenium_test.selenium_utils import * import time def select_languages(from_lang, to_lang): element = driver.find_element_by_id('tta_srcsl') select_element_by_value(element,from_lang) element = driver.find_element_by_id('tta_tgtsl') select_element_by_value(element,to_lang) def send_translate_tex...
[ "time.sleep" ]
[((554, 567), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (564, 567), False, 'import time\n')]
#!/usr/bin/env python3 import subprocess import sys import os import cgi, cgitb # from jinja2 import Environment, FileSystemLoader # Import config.py with open('/etc/footloose-vpc/footloose-vpc.conf') as f: config_path = f.read().split('\n')[0] sys.path.insert(0, config_path) import config as cfg # Import module...
[ "db.is_users_exist", "sys.path.insert", "cgi.FieldStorage", "subprocess.Popen", "htansw.redirect_to", "os.environ.get", "htansw.print_html", "auth_cookie.set_session_cookie", "os.system", "db.create_root" ]
[((251, 282), 'sys.path.insert', 'sys.path.insert', (['(0)', 'config_path'], {}), '(0, config_path)\n', (266, 282), False, 'import sys\n'), ((322, 365), 'sys.path.insert', 'sys.path.insert', (['(0)', "cfg.DIR_PATH['modules']"], {}), "(0, cfg.DIR_PATH['modules'])\n", (337, 365), False, 'import sys\n'), ((445, 477), 'aut...
import re , requests, os from sys import dont_write_bytecode os.system('clear') from bs4 import BeautifulSoup # this will be our starting URL. URLs = open('/home/tanmay/Desktop/NLP Workflow/Working with a big data/new_links.txt','r') i=0 for urls in URLs.readlines(): urls = urls.strip() r = requests.get(urls) ...
[ "bs4.BeautifulSoup", "os.system", "requests.get" ]
[((61, 79), 'os.system', 'os.system', (['"""clear"""'], {}), "('clear')\n", (70, 79), False, 'import re, requests, os\n'), ((301, 319), 'requests.get', 'requests.get', (['urls'], {}), '(urls)\n', (313, 319), False, 'import re, requests, os\n'), ((488, 529), 'bs4.BeautifulSoup', 'BeautifulSoup', (['htmlContent', '"""htm...
import pandas as pd import re import gensim from text_processing import text_normalizer import spacy import os from nltk.stem.wordnet import WordNetLemmatizer from utilities import excel_writer from utilities import excel_reader nlp = spacy.load('en_core_web_sm') lmtzr = WordNetLemmatizer() class CropsSearch: de...
[ "spacy.load", "nltk.stem.wordnet.WordNetLemmatizer", "utilities.excel_reader.ExcelReader" ]
[((236, 264), 'spacy.load', 'spacy.load', (['"""en_core_web_sm"""'], {}), "('en_core_web_sm')\n", (246, 264), False, 'import spacy\n'), ((273, 292), 'nltk.stem.wordnet.WordNetLemmatizer', 'WordNetLemmatizer', ([], {}), '()\n', (290, 292), False, 'from nltk.stem.wordnet import WordNetLemmatizer\n'), ((863, 889), 'utilit...
# coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import sys from io import open from kivy.config import Config Config.set("input", "mouse", "mouse,disable_multitouch") Config.set("graphics", "width", 480) Config.set("graphics", "height", 200) from kivy.app import App f...
[ "kivy.uix.label.Label", "kivy.config.Config.set", "kivy.uix.popup.Popup", "io.open" ]
[((162, 218), 'kivy.config.Config.set', 'Config.set', (['"""input"""', '"""mouse"""', '"""mouse,disable_multitouch"""'], {}), "('input', 'mouse', 'mouse,disable_multitouch')\n", (172, 218), False, 'from kivy.config import Config\n'), ((219, 255), 'kivy.config.Config.set', 'Config.set', (['"""graphics"""', '"""width"""'...
import sys sys.path.append('../') import logging try: import Queue as queue except ImportError: import queue import time from settings import CSV_DATA_DIR class Backtest(object): """ Event driven back-test. """ def __init__ (self, pairs, data_handler, strategy,...
[ "logging.getLogger", "queue.Queue", "sys.path.append", "time.sleep" ]
[((12, 34), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (27, 34), False, 'import sys\n'), ((502, 515), 'queue.Queue', 'queue.Queue', ([], {}), '()\n', (513, 515), False, 'import queue\n'), ((1073, 1100), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1090, 110...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Scraper to collect data from delfi.lt Created: 2021 12 22 Author: lukasp """ # Standard library import requests from datetime import datetime from tqdm import tqdm import random import time # Pypi libraries from bs4 import BeautifulSoup from pymongo import MongoCli...
[ "tqdm.tqdm", "requests.get", "time.sleep", "bs4.BeautifulSoup", "datetime.datetime.now", "utils.get_date", "pymongo.MongoClient", "utils.get_links", "utils.get_text", "random.randint" ]
[((1958, 1998), 'pymongo.MongoClient', 'MongoClient', (['constants.mongo_conn_string'], {}), '(constants.mongo_conn_string)\n', (1969, 1998), False, 'from pymongo import MongoClient\n'), ((2463, 2499), 'requests.get', 'requests.get', (['constants.lt_core_link'], {}), '(constants.lt_core_link)\n', (2475, 2499), False, '...
__author__ = 'las3wh' import helper print("hello") helper.greeting('hello') #another comment
[ "helper.greeting" ]
[((54, 78), 'helper.greeting', 'helper.greeting', (['"""hello"""'], {}), "('hello')\n", (69, 78), False, 'import helper\n')]
from collections import defaultdict import django import csv import sys import os import json os.environ['DJANGO_SETTINGS_MODULE'] = 'carebackend.settings' sys.path.append(os.path.dirname(__file__) + '/..') django.setup() from places.models import EmailSubscription outfl = sys.argv[1] by_place = defaultdict(list) for...
[ "csv.DictWriter", "django.setup", "os.path.dirname", "collections.defaultdict", "places.models.EmailSubscription.objects.filter" ]
[((207, 221), 'django.setup', 'django.setup', ([], {}), '()\n', (219, 221), False, 'import django\n'), ((299, 316), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (310, 316), False, 'from collections import defaultdict\n'), ((328, 451), 'places.models.EmailSubscription.objects.filter', 'EmailSubs...
"""functions related to sampling handful of functions here, related to sampling and checking whether you're sampling correctly, in order to avoid aliasing when doing something like strided convolution or using the pooling windows from plenoptic, you want to make sure you're sampling the image appropriately, in order ...
[ "numpy.ceil", "numpy.diff", "matplotlib.pyplot.close", "numpy.linspace", "numpy.matmul", "numpy.linalg.lstsq", "matplotlib.pyplot.subplots", "torch.linspace" ]
[((679, 705), 'torch.linspace', 'torch.linspace', (['(-5)', '(5)', '(101)'], {}), '(-5, 5, 101)\n', (693, 705), False, 'import torch\n'), ((4638, 4680), 'numpy.linalg.lstsq', 'np.linalg.lstsq', (['sampled', 'full'], {'rcond': 'None'}), '(sampled, full, rcond=None)\n', (4653, 4680), True, 'import numpy as np\n'), ((4700...
# Copyright 2018 Open Source Robotics Foundation, Inc. # # 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...
[ "importlib.machinery.SourceFileLoader", "importlib.util.spec_from_loader", "importlib.util.module_from_spec" ]
[((1228, 1291), 'importlib.machinery.SourceFileLoader', 'SourceFileLoader', (['"""python_launch_file"""', 'python_launch_file_path'], {}), "('python_launch_file', python_launch_file_path)\n", (1244, 1291), False, 'from importlib.machinery import SourceFileLoader\n'), ((1303, 1340), 'importlib.util.spec_from_loader', 's...
# Copyright 2013 Google Inc. 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 law or ag...
[ "src.hadoop.hadoop_csv_transformer.HadoopCsvTransformer" ]
[((1171, 1222), 'src.hadoop.hadoop_csv_transformer.HadoopCsvTransformer', 'hadoop_csv_transformer.HadoopCsvTransformer', (['config'], {}), '(config)\n', (1214, 1222), False, 'from src.hadoop import hadoop_csv_transformer\n')]
import aiohttp from fastapi import FastAPI, Request, Response import app_setting #from lib import wx_api app = app_setting.creat_app() async def fetch(session, url): async with session.get(url) as response: return await response.text() @app.get("/") async def read_main(): async with aiohttp.ClientSe...
[ "aiohttp.ClientSession", "app_setting.creat_app", "uvicorn.run" ]
[((113, 136), 'app_setting.creat_app', 'app_setting.creat_app', ([], {}), '()\n', (134, 136), False, 'import app_setting\n'), ((568, 611), 'uvicorn.run', 'uvicorn.run', (['app'], {'host': '"""0.0.0.0"""', 'port': '(5481)'}), "(app, host='0.0.0.0', port=5481)\n", (579, 611), False, 'import uvicorn\n'), ((304, 327), 'aio...
"""aoctools main""" import aoctools.main as main if __name__ == '__main__': main.main()
[ "aoctools.main.main" ]
[((82, 93), 'aoctools.main.main', 'main.main', ([], {}), '()\n', (91, 93), True, 'import aoctools.main as main\n')]
#!/usr/bin/env python3 import subprocess import sys import os resolutions = [ # [1280, 1024], # [1600, 1200], # [1680, 1050], [1920, 1080] ] for row in resolutions: x, y = row args = [ '--replay-path', os.path.dirname(os.path.realpath(__file__)) + '/take-screenshot.json', '--wind...
[ "os.path.realpath", "subprocess.call" ]
[((501, 533), 'subprocess.call', 'subprocess.call', (["(['echo'] + args)"], {}), "(['echo'] + args)\n", (516, 533), False, 'import subprocess\n'), ((722, 748), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (738, 748), False, 'import os\n'), ((250, 276), 'os.path.realpath', 'os.path.realpat...
''' Created on Nov 19, 2013 @author: <NAME> <EMAIL> Department of Geography, UGA ''' ''' Create initial table for tweet storing ''' import dbf table = dbf.Table("Tweet.dbf","TweetID C(20);TweetText C(200);TweetTime C(30); TweetLat C(30);TweetLon C(30);UserID C(30);UserName C(30);UserLoc C(30); CheckTime C(20)") ...
[ "dbf.Table" ]
[((157, 328), 'dbf.Table', 'dbf.Table', (['"""Tweet.dbf"""', '"""TweetID C(20);TweetText C(200);TweetTime C(30); TweetLat C(30);TweetLon C(30);UserID C(30);UserName C(30);UserLoc C(30); CheckTime C(20)"""'], {}), "('Tweet.dbf',\n 'TweetID C(20);TweetText C(200);TweetTime C(30); TweetLat C(30);TweetLon C(30);UserID C...
from model.network import LeNet5 from saliency.vanilla_gradient import save_vanilla_gradient from model.data import mnist_train_test_sets import numpy as np # Get MNIST dataset, preprocessed train_images, train_labels, test_images, test_labels = mnist_train_test_sets() # Load net and 98% acc weights net = LeNet5(weig...
[ "saliency.vanilla_gradient.save_vanilla_gradient", "model.network.LeNet5", "model.data.mnist_train_test_sets" ]
[((247, 270), 'model.data.mnist_train_test_sets', 'mnist_train_test_sets', ([], {}), '()\n', (268, 270), False, 'from model.data import mnist_train_test_sets\n'), ((309, 351), 'model.network.LeNet5', 'LeNet5', ([], {'weights_path': '"""15epoch_weights.pkl"""'}), "(weights_path='15epoch_weights.pkl')\n", (315, 351), Fal...
# @author: <NAME> # @email: <EMAIL> # @github: unaxfromsibiria import json from .helpers import method_path, str_data from .protocol import CommandTargetType class MetaOnceObject(type): """ Once system object. """ _classes = dict() def __call__(self, *args, **kwargs): cls = str(self) ...
[ "json.loads" ]
[((1947, 1963), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (1957, 1963), False, 'import json\n'), ((2202, 2224), 'json.loads', 'json.loads', (['self._data'], {}), '(self._data)\n', (2212, 2224), False, 'import json\n')]
from statefun_tasks.messages_pb2 import Pipeline import unittest from statefun_tasks import in_parallel from tests.utils import TestHarness, tasks, TaskErrorException join_results_called = False join_results2_called = False join_results3_called = False say_goodbye_called = False @tasks.bind() def _say_hello(first_n...
[ "unittest.main", "tests.utils.TestHarness", "statefun_tasks.in_parallel", "tests.utils.tasks.bind" ]
[((285, 297), 'tests.utils.tasks.bind', 'tasks.bind', ([], {}), '()\n', (295, 297), False, 'from tests.utils import TestHarness, tasks, TaskErrorException\n'), ((385, 397), 'tests.utils.tasks.bind', 'tasks.bind', ([], {}), '()\n', (395, 397), False, 'from tests.utils import TestHarness, tasks, TaskErrorException\n'), (...
import coremltools as ct def model_convert(model_name, stride_num, H, W): saved_model_path = f'{model_name}/{stride_num}/saved_model_{H}x{W}' input = ct.TensorType(name='sub_2', shape=(1, H, W, 3)) mlmodel = ct.convert(saved_model_path, inputs=[input], source='tensorflow') mlmodel.save(f'{saved_model_p...
[ "coremltools.convert", "coremltools.TensorType" ]
[((159, 206), 'coremltools.TensorType', 'ct.TensorType', ([], {'name': '"""sub_2"""', 'shape': '(1, H, W, 3)'}), "(name='sub_2', shape=(1, H, W, 3))\n", (172, 206), True, 'import coremltools as ct\n'), ((221, 286), 'coremltools.convert', 'ct.convert', (['saved_model_path'], {'inputs': '[input]', 'source': '"""tensorflo...
# python 2 from __future__ import absolute_import # builtins from unittest import TestCase, main import sys from datetime import datetime from time import time, sleep from string import digits from io import StringIO # custom from blowdrycss.timing import Timer, LimitTimer from blowdrycss.utilities import change_sett...
[ "blowdrycss.utilities.change_settings_for_testing", "time.sleep", "blowdrycss.timing.LimitTimer", "datetime.datetime.now", "blowdrycss.timing.Timer", "unittest.main", "io.StringIO", "time.time" ]
[((377, 406), 'blowdrycss.utilities.change_settings_for_testing', 'change_settings_for_testing', ([], {}), '()\n', (404, 406), False, 'from blowdrycss.utilities import change_settings_for_testing\n'), ((3417, 3423), 'unittest.main', 'main', ([], {}), '()\n', (3421, 3423), False, 'from unittest import TestCase, main\n')...
from . import config from .file_util import FileUtil from .log_helper import LogHelper import os _file_util = FileUtil() _logger = LogHelper.getLogger() class AssetHelper: """Helpers for management of asset file paths. Directory structure overview: * config.INTERNAL_ASSET_STORE `-- organizatio...
[ "os.path.splitext", "os.path.join" ]
[((1841, 1899), 'os.path.join', 'os.path.join', (['config.INTERNAL_ASSET_STORE', 'organization_id'], {}), '(config.INTERNAL_ASSET_STORE, organization_id)\n', (1853, 1899), False, 'import os\n'), ((1951, 2007), 'os.path.join', 'os.path.join', (['config.SHARED_FILE_SYSTEM', 'organization_id'], {}), '(config.SHARED_FILE_S...
# Copyright 2018 Google Inc. 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 law or...
[ "gcp_variant_transforms.libs.bigquery_util.get_python_type_from_bigquery_type", "gcp_variant_transforms.libs.bigquery_util.get_bigquery_sanitized_field_name", "gcp_variant_transforms.libs.bigquery_util.get_bigquery_sanitized_field", "gcp_variant_transforms.libs.bigquery_util.get_bigquery_type_from_vcf_type" ]
[((855, 908), 'gcp_variant_transforms.libs.bigquery_util.get_bigquery_sanitized_field_name', 'bigquery_util.get_bigquery_sanitized_field_name', (['"""AA"""'], {}), "('AA')\n", (902, 908), False, 'from gcp_variant_transforms.libs import bigquery_util\n'), ((965, 1019), 'gcp_variant_transforms.libs.bigquery_util.get_bigq...
###################################################################################################################### # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
[ "services.aws_service.AwsService.__init__", "boto_retry.make_method_with_retries" ]
[((3139, 3583), 'services.aws_service.AwsService.__init__', 'AwsService.__init__', (['self'], {'service_name': '"""elbv2"""', 'resource_names': 'RESOURCE_NAMES', 'resources_with_tags': 'RESOURCES_WITH_TAGS', 'role_arn': 'role_arn', 'session': 'session', 'tags_as_dict': 'tags_as_dict', 'as_named_tuple': 'as_named_tuple'...
import time def main(): counter = 0 card = '' with open('/dev/bus/usb/001/021', 'rb') as tty: while True: RFID_input = tty.readline() print(f"read {counter}: ", RFID_input) counter += 1 time.sleep(2) if RFID_input == card: ...
[ "time.sleep" ]
[((255, 268), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (265, 268), False, 'import time\n')]
# -*- coding: utf-8 _*_ import yaml import os class Config: APP_DIR = os.path.dirname(__file__) ROOT_DIR = os.path.dirname(APP_DIR) LOG_PATH = os.path.abspath(APP_DIR) + os.sep + 'log' def __init__(self): self.config = None @staticmethod def parse_config(subject, config_yaml_path): ...
[ "os.path.abspath", "os.path.dirname", "yaml.load" ]
[((77, 102), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (92, 102), False, 'import os\n'), ((118, 142), 'os.path.dirname', 'os.path.dirname', (['APP_DIR'], {}), '(APP_DIR)\n', (133, 142), False, 'import os\n'), ((158, 182), 'os.path.abspath', 'os.path.abspath', (['APP_DIR'], {}), '(APP_DIR...
######################### # 装饰器:一般的装饰器 ######################### import time def time_track(func): # args为了保证可以接收不定参数的调用 # kwargs为了保证可以装饰 **kwargs的函数调用 def wrapper(*args, **kwargs): start = time.time() print("call function %s at %f" % (func.__name__, start)) result = func(*args, *...
[ "time.time" ]
[((213, 224), 'time.time', 'time.time', ([], {}), '()\n', (222, 224), False, 'import time\n'), ((358, 369), 'time.time', 'time.time', ([], {}), '()\n', (367, 369), False, 'import time\n')]
import numpy as np import matplotlib.pyplot as plt def displayData(X, example_width=None): """displays 2D data stored in X in a nice grid. It returns the figure handle h and the displayed array if requested.""" if X.ndim == 1: X = X.reshape(1, -1) # Set example_width automatically if ...
[ "matplotlib.pyplot.imshow", "numpy.ceil", "numpy.ones", "matplotlib.pyplot.axis", "matplotlib.pyplot.set_cmap", "matplotlib.pyplot.show" ]
[((429, 449), 'matplotlib.pyplot.set_cmap', 'plt.set_cmap', (['"""gray"""'], {}), "('gray')\n", (441, 449), True, 'import matplotlib.pyplot as plt\n'), ((1568, 1593), 'matplotlib.pyplot.imshow', 'plt.imshow', (['display_array'], {}), '(display_array)\n', (1578, 1593), True, 'import matplotlib.pyplot as plt\n'), ((1622,...
from django.shortcuts import render from .models import BookInfo from django.http import HttpResponse # Create your views here. def index(request): # return HttpResponse("hello world") data = { "message":"hello world 哈哈哈哈哈" } return render(request, 'index.html',data)
[ "django.shortcuts.render" ]
[((258, 293), 'django.shortcuts.render', 'render', (['request', '"""index.html"""', 'data'], {}), "(request, 'index.html', data)\n", (264, 293), False, 'from django.shortcuts import render\n')]
""" /*************************************************************************** Plugin Installer module Plugin version comparison functions ------------------- Date : 2008-11-24 Copyright : (C) 2008 by <NAME...
[ "re.findall", "re.sub", "builtins.range", "builtins.str" ]
[((5209, 5217), 'builtins.range', 'range', (['l'], {}), '(l)\n', (5214, 5217), False, 'from builtins import range\n'), ((2825, 2830), 'builtins.str', 'str', ([], {}), '()\n', (2828, 2830), False, 'from builtins import str\n'), ((6459, 6489), 're.sub', 're.sub', (['"""[^0-9.]+"""', '""""""', 'minVer'], {}), "('[^0-9.]+'...
from bs4 import BeautifulSoup import requests url = "https://ftp.ncbi.nlm.nih.gov/repository/clone/reports/Mus_musculus/" url = "https://ftp.ncbi.nlm.nih.gov/repository/clone/reports/Homo_sapiens/" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/7...
[ "bs4.BeautifulSoup", "requests.get" ]
[((355, 389), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (367, 389), False, 'import requests\n'), ((395, 442), 'bs4.BeautifulSoup', 'BeautifulSoup', (['res.text'], {'features': '"""html.parser"""'}), "(res.text, features='html.parser')\n", (408, 442), False, 'from bs4...
from __future__ import print_function import sys import string import re import shutil import os from os.path import join, exists, abspath from shutil import copytree, ignore_patterns import ConfigParser import scrapy from scrapy.command import ScrapyCommand from scrapy.utils.template import render_templatefile, strin...
[ "os.path.exists", "string.Template", "ConfigParser.RawConfigParser", "os.makedirs", "shutil.ignore_patterns", "os.path.join", "os.getcwd", "sys.exit", "scrapy.exceptions.UsageError", "scrapy.utils.template.string_camelcase", "re.search" ]
[((423, 464), 'os.path.join', 'join', (['scrapy_sci.__path__[0]', '"""templates"""'], {}), "(scrapy_sci.__path__[0], 'templates')\n", (427, 464), False, 'from os.path import join, exists, abspath\n'), ((603, 635), 'shutil.ignore_patterns', 'ignore_patterns', (['"""*.pyc"""', '""".svn"""'], {}), "('*.pyc', '.svn')\n", (...
import json person = {'name':'John','age':28,'city':'New York','hasChildren':False} personJson = json.dumps(person,indent=4,separators=(':','='),sort_keys=True) print(personJson) with open('res/person.json', 'w') as f: json.dump(person,f,indent=4) person = {'name':'John','age':28,'city':'New York','hasChildren'...
[ "json.load", "json.loads", "json.dumps", "json.dump" ]
[((98, 165), 'json.dumps', 'json.dumps', (['person'], {'indent': '(4)', 'separators': "(':', '=')", 'sort_keys': '(True)'}), "(person, indent=4, separators=(':', '='), sort_keys=True)\n", (108, 165), False, 'import json\n'), ((342, 360), 'json.dumps', 'json.dumps', (['person'], {}), '(person)\n', (352, 360), False, 'im...
import os import json import time import torch import argparse import numpy as np from collections import OrderedDict, defaultdict import pickle from tensorboardX import SummaryWriter from convlab2.policy.mle.idea9.model_dialogue import dialogue_VAE, data_mask, loss_fn from convlab2.policy.mle.idea9.utils imp...
[ "collections.OrderedDict", "os.makedirs", "argparse.ArgumentParser", "torch.mean", "torch.stack", "os.path.join", "pickle.load", "numpy.exp", "torch.tensor", "torch.cuda.is_available", "collections.defaultdict", "convlab2.policy.mle.idea9.model_dialogue.dialogue_VAE", "convlab2.policy.mle.id...
[((395, 420), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (418, 420), False, 'import torch\n'), ((686, 699), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (697, 699), False, 'from collections import OrderedDict, defaultdict\n'), ((961, 978), 'convlab2.policy.mle.idea9.model_dia...
import heapq import random class myHeapContainer(list): heap = None is_max_heap = None def _is_in_order(self, parent, child): comp_val = parent > child #print comp_val if self.is_max_heap: return comp_val else: return (not comp_val) def __init__(self, arr = None, is_max = False): self.is_max_heap...
[ "random.shuffle" ]
[((1823, 1842), 'random.shuffle', 'random.shuffle', (['arr'], {}), '(arr)\n', (1837, 1842), False, 'import random\n')]
# -*- coding: utf-8 -*- """ """ import os import shutil from binascii import hexlify from pathlib import Path from unittest.mock import MagicMock import pytest from lxml import etree as et from werkzeug.datastructures import FileStorage from pynuget import create_app from pynuget import core DATA_DIR = os.path.join(...
[ "pynuget.core.et_to_str", "pynuget.core.parse_nuspec", "pynuget.create_app", "pynuget.core.get_package_path", "binascii.hexlify", "pynuget.core.hash_file", "pynuget.core.extract_namespace", "pynuget.core.require_auth", "pathlib.Path", "pynuget.core.extract_nuspec", "lxml.etree.iselement", "pyn...
[((562, 574), 'pynuget.create_app', 'create_app', ([], {}), '()\n', (572, 574), False, 'from pynuget import create_app\n'), ((898, 940), 'pynuget.core.get_package_path', 'core.get_package_path', (['"""pkg_name"""', '"""0.0.1"""'], {}), "('pkg_name', '0.0.1')\n", (919, 940), False, 'from pynuget import core\n'), ((1061,...
import pytest from ammolite import reset, draw_arrows def test_draw_arrow_uniform(): """ Draw arrows using the same radius for all arrows. The radius is taken is example property here, to test if uniform values are properly arrayfied. """ reset() draw_arrows([(0,0,0), (1,0,1)], [(1,0,0), (...
[ "ammolite.draw_arrows", "ammolite.reset" ]
[((265, 272), 'ammolite.reset', 'reset', ([], {}), '()\n', (270, 272), False, 'from ammolite import reset, draw_arrows\n'), ((277, 348), 'ammolite.draw_arrows', 'draw_arrows', (['[(0, 0, 0), (1, 0, 1)]', '[(1, 0, 0), (1, 0, 1)]'], {'radius': '(0.1)'}), '([(0, 0, 0), (1, 0, 1)], [(1, 0, 0), (1, 0, 1)], radius=0.1)\n', (...
# importing the required modules import requests from bs4 import BeautifulSoup import pandas as pd from selenium import webdriver import time pd.options.display.max_columns = 999 pd.options.display.max_rows = 999 df = pd.read_csv('updated_profile_links.csv') df = df.drop(['Unnamed: 0'], axis = 1) df["0"] ...
[ "pandas.read_csv", "selenium.webdriver.Chrome", "time.sleep", "bs4.BeautifulSoup", "pandas.DataFrame" ]
[((228, 268), 'pandas.read_csv', 'pd.read_csv', (['"""updated_profile_links.csv"""'], {}), "('updated_profile_links.csv')\n", (239, 268), True, 'import pandas as pd\n'), ((7494, 7516), 'pandas.DataFrame', 'pd.DataFrame', (['all_user'], {}), '(all_user)\n', (7506, 7516), True, 'import pandas as pd\n'), ((505, 578), 'sel...
from textwrap import dedent import pytest from pylox.lox import Lox # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/string/error_after_multiline.lox TEST_SRC = dedent( """\ // Tests that we correctly track the line info across multiline strings. var a = "1 2 ...
[ "textwrap.dedent", "pylox.lox.Lox" ]
[((201, 404), 'textwrap.dedent', 'dedent', (['""" // Tests that we correctly track the line info across multiline strings.\n var a = "1\n 2\n 3\n ";\n\n err; // // expect runtime error: Undefined variable \'err\'.\n """'], {}), '(\n """ // Tests that we correctly track the line info across mu...
#!/usr/bin/env python3 import os import logging import uuid import json import logzero from logzero import logger from Common.Events import PeriodicEvents from EdgeAgent import EdgeAgent from gui import TkinterGUI from Topics import mqttTopics # Set a minimum log level logzero.loglevel(logging.DEBUG) # Set a logfil...
[ "logzero.logger.info", "logging.Formatter", "uuid.uuid4", "logzero.loglevel", "os._exit", "Common.Events.PeriodicEvents", "Topics.mqttTopics.myTopic", "gui.TkinterGUI", "logzero.logger.debug" ]
[((273, 304), 'logzero.loglevel', 'logzero.loglevel', (['logging.DEBUG'], {}), '(logging.DEBUG)\n', (289, 304), False, 'import logzero\n'), ((445, 509), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)-15s - %(levelname)s: %(message)s"""'], {}), "('%(asctime)-15s - %(levelname)s: %(message)s')\n", (462, 509),...
# (c) 2019 Open Risk (https://www.openriskmanagement.com) # # This code is licensed under the Apache 2.0 license a copy of which is included # in the source distribution of the course. This is notwithstanding any licenses of # third-party software included in this distribution. You may not use this file except in # com...
[ "seaborn.scatterplot", "matplotlib.pyplot.savefig", "pandas.read_hdf" ]
[((774, 811), 'pandas.read_hdf', 'pd.read_hdf', (['"""german_credit.h5"""', '"""df"""'], {}), "('german_credit.h5', 'df')\n", (785, 811), True, 'import pandas as pd\n'), ((861, 901), 'seaborn.scatterplot', 'sns.scatterplot', ([], {'x': "df['A5']", 'y': "df['A13']"}), "(x=df['A5'], y=df['A13'])\n", (876, 901), True, 'im...
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools.misc.timeTools import asctime import time def test_asctime(): assert isinstance(asctime(), basestring) assert asctime(time.gmtime(0)) == 'Thu Jan 1 00:00:00 1970'
[ "time.gmtime", "fontTools.misc.timeTools.asctime" ]
[((200, 209), 'fontTools.misc.timeTools.asctime', 'asctime', ([], {}), '()\n', (207, 209), False, 'from fontTools.misc.timeTools import asctime\n'), ((242, 256), 'time.gmtime', 'time.gmtime', (['(0)'], {}), '(0)\n', (253, 256), False, 'import time\n')]
# -*- coding: utf-8 -*- import pickle from django.http import HttpResponseRedirect from django.urls import reverse def cart_required(view_func): def wrapped(*args, **kwargs): try: session_cart = pickle.loads(args[0].session.get('cart')) except: pass if len(session_...
[ "django.urls.reverse" ]
[((372, 393), 'django.urls.reverse', 'reverse', (['"""store_cart"""'], {}), "('store_cart')\n", (379, 393), False, 'from django.urls import reverse\n')]
import torch from test_model.backbone.ResNet import * if __name__ == '__main__': image_test = torch.randn(50,3,224,224) resnet_test = ResNet_50(1000) test_out = resnet_test(image_test) print(test_out.shape)
[ "torch.randn" ]
[((107, 135), 'torch.randn', 'torch.randn', (['(50)', '(3)', '(224)', '(224)'], {}), '(50, 3, 224, 224)\n', (118, 135), False, 'import torch\n')]
from setuptools import setup from setuptools import find_packages setup(name='Neuroballad', version='0.1.0', description='Neural Circuit Simulation for Python', author='<NAME>', author_email='<EMAIL>', url='', download_url='', license='BSD-3-Clause', packages=find_packa...
[ "setuptools.find_packages" ]
[((310, 325), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (323, 325), False, 'from setuptools import find_packages\n')]
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from blob_app import blob_facade from gaecookie.decorator import no_csrf from gaepermission.decorator import login_required from tekton import router from routes import updown from tekton.gae.middleware.redirect import RedirectResponse __...
[ "blob_app.blob_facade.save_blob_files_cmd", "tekton.router.to_path", "tekton.gae.middleware.redirect.RedirectResponse" ]
[((467, 524), 'blob_app.blob_facade.save_blob_files_cmd', 'blob_facade.save_blob_files_cmd', (['blob_infos', '_logged_user'], {}), '(blob_infos, _logged_user)\n', (498, 524), False, 'from blob_app import blob_facade\n'), ((554, 576), 'tekton.router.to_path', 'router.to_path', (['updown'], {}), '(updown)\n', (568, 576),...
import mock import unittest from .helper import _ResourceMixin class SearchTest(_ResourceMixin, unittest.TestCase): def _getTargetClass(self): from .. import Search return Search @mock.patch('requests.get') def test_charge(self, api_call): class_ = self._getTargetClass() ...
[ "mock.patch" ]
[((209, 235), 'mock.patch', 'mock.patch', (['"""requests.get"""'], {}), "('requests.get')\n", (219, 235), False, 'import mock\n'), ((4080, 4106), 'mock.patch', 'mock.patch', (['"""requests.get"""'], {}), "('requests.get')\n", (4090, 4106), False, 'import mock\n'), ((5677, 5703), 'mock.patch', 'mock.patch', (['"""reques...
import os from getpass import getpass import yaml from netmiko import ConnectHandler def load_devices(device_file="lab_devices.yml"): device_dict = {} with open(device_file) as f: device_dict = yaml.safe_load(f) return device_dict if __name__ == "__main__": # Code so automated tests will ru...
[ "netmiko.ConnectHandler", "yaml.safe_load", "getpass.getpass", "os.getenv" ]
[((212, 229), 'yaml.safe_load', 'yaml.safe_load', (['f'], {}), '(f)\n', (226, 229), False, 'import yaml\n'), ((457, 486), 'os.getenv', 'os.getenv', (['"""NETMIKO_PASSWORD"""'], {}), "('NETMIKO_PASSWORD')\n", (466, 486), False, 'import os\n'), ((424, 453), 'os.getenv', 'os.getenv', (['"""NETMIKO_PASSWORD"""'], {}), "('N...
import unittest from pathlib import Path import box import torch.nn as nn from torch.optim import SGD import torch_model_state import torch_model_state.configs @box.register(tag='model') class MockModule(nn.Module): def __init__(self): super().__init__() self.conv = nn.Conv2d(16, 16, kernel_size...
[ "torch_model_state.configs.ArgumentConfig", "pathlib.Path", "torch.nn.Conv2d", "torch_model_state.load_model_from_state", "torch_model_state.from_state", "torch_model_state.to_state", "unittest.main", "torch_model_state.save_state_file", "box.register" ]
[((165, 190), 'box.register', 'box.register', ([], {'tag': '"""model"""'}), "(tag='model')\n", (177, 190), False, 'import box\n'), ((1380, 1395), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1393, 1395), False, 'import unittest\n'), ((291, 334), 'torch.nn.Conv2d', 'nn.Conv2d', (['(16)', '(16)'], {'kernel_size':...
#-*- coding:utf-8 -*- import time import requests import credential from bs4 import BeautifulSoup from selenium import webdriver binary= './chromedriver' driver=webdriver.Chrome(binary) f = open('./data/50.txt', 'a') driver.get('https://pann.nate.com/talk/c20005') driver.find_element_by_xpath('//*[@id="GnbWrap"]/div...
[ "bs4.BeautifulSoup", "selenium.webdriver.Chrome", "requests.get" ]
[((162, 186), 'selenium.webdriver.Chrome', 'webdriver.Chrome', (['binary'], {}), '(binary)\n', (178, 186), False, 'from selenium import webdriver\n'), ((613, 647), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (626, 647), False, 'from bs4 import BeautifulSoup\n'),...
from datetime import datetime from random import randint import zeeguu db = zeeguu.db class UniqueCode(db.Model): __table_args__ = {'mysql_collate': 'utf8_bin'} id = db.Column(db.Integer, primary_key=True) code = db.Column(db.String(4)) email = db.Column(db.String(255)) time = db.Column(db.DateT...
[ "datetime.datetime.now", "random.randint" ]
[((377, 394), 'random.randint', 'randint', (['(100)', '(999)'], {}), '(100, 999)\n', (384, 394), False, 'from random import randint\n'), ((441, 455), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (453, 455), False, 'from datetime import datetime\n')]
from datetime import datetime, date from marqeta.response_models.currency_conversion import CurrencyConversion from marqeta.response_models.response import Response from marqeta.response_models.merchant_response_model import MerchantResponseModel from marqeta.response_models.store_response_model import StoreResponseMod...
[ "marqeta.response_models.acquirer.Acquirer", "marqeta.response_models.fee_transfer_response.FeeTransferResponse", "marqeta.response_models.gpa_returns.GpaReturns", "marqeta.response_models.merchant_response_model.MerchantResponseModel", "marqeta.response_models.peer_transfer_response.PeerTransferResponse", ...
[((2572, 2628), 'json.dumps', 'json.dumps', (['self.json_response'], {'default': 'self.json_serial'}), '(self.json_response, default=self.json_serial)\n', (2582, 2628), False, 'import json\n'), ((3658, 3709), 'marqeta.response_models.datetime_object', 'datetime_object', (['"""created_time"""', 'self.json_response'], {}...
import itertools import numpy as np def jitter(data, depth): '''generates indices of the vertices for every possible mesh configuration for the given depth.''' return [a for a in itertools.product([0,1], repeat=len(data))] def mapVertices(vertices, all_indices, depths): '''given indices (l...
[ "numpy.array", "numpy.sqrt" ]
[((676, 733), 'numpy.sqrt', 'np.sqrt', (['(arr[:, 0] ** 2 + arr[:, 1] ** 2 + arr[:, 2] ** 2)'], {}), '(arr[:, 0] ** 2 + arr[:, 1] ** 2 + arr[:, 2] ** 2)\n', (683, 733), True, 'import numpy as np\n'), ((561, 598), 'numpy.array', 'np.array', (['[vtx[0], vtx[1], depths[i]]'], {}), '([vtx[0], vtx[1], depths[i]])\n', (569, ...
import unittest from simulator_diagnoser.graph import SegmentationGraph class GraphTest(unittest.TestCase): def setUp(self): # Graph = # 9 # / | \ # 6 7 8 # \ / \ / # 4 5 # / \ / \ # 1 2 3 self.g = SegmentationGraph() ...
[ "unittest.main", "simulator_diagnoser.graph.SegmentationGraph" ]
[((3109, 3124), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3122, 3124), False, 'import unittest\n'), ((297, 316), 'simulator_diagnoser.graph.SegmentationGraph', 'SegmentationGraph', ([], {}), '()\n', (314, 316), False, 'from simulator_diagnoser.graph import SegmentationGraph\n')]
# Dummy models.py file to allow for tests to run from django.db import models class CCTestModel(models.Model): name = models.CharField(max_length=10) age = models.IntegerField() gender = models.CharField(max_length=10) price = models.PositiveIntegerField() discount = models.PositiveIntegerField() ...
[ "django.db.models.PositiveIntegerField", "django.db.models.DateField", "django.db.models.CharField", "django.db.models.IntegerField" ]
[((123, 154), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(10)'}), '(max_length=10)\n', (139, 154), False, 'from django.db import models\n'), ((166, 187), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (185, 187), False, 'from django.db import models\n'), ((201, 232...
"""Tests for Octave magics extension.""" import codecs import unittest import sys from IPython.display import SVG from IPython.testing.globalipapp import get_ipython import numpy as np from oct2py.ipython import octavemagic from oct2py import Oct2PyError class OctaveMagicTest(unittest.TestCase): @classmethod ...
[ "IPython.testing.globalipapp.get_ipython", "codecs.getreader", "numpy.allclose" ]
[((660, 673), 'IPython.testing.globalipapp.get_ipython', 'get_ipython', ([], {}), '()\n', (671, 673), False, 'from IPython.testing.globalipapp import get_ipython\n'), ((1003, 1035), 'numpy.allclose', 'np.allclose', (['result', '[[2, 3, 4]]'], {}), '(result, [[2, 3, 4]])\n', (1014, 1035), True, 'import numpy as np\n'), ...
import requests from django.core.mail.backends.base import BaseEmailBackend from django.conf import settings from commons.exceptions import MailerConfigError class EmailBackend(BaseEmailBackend): def __init__(self, **kwargs): self.as_html = kwargs.get('as_html', False) def send_messages(self, email...
[ "requests.post", "commons.exceptions.MailerConfigError" ]
[((664, 705), 'commons.exceptions.MailerConfigError', 'MailerConfigError', (['"""Need mailgun api key"""'], {}), "('Need mailgun api key')\n", (681, 705), False, 'from commons.exceptions import MailerConfigError\n'), ((769, 814), 'commons.exceptions.MailerConfigError', 'MailerConfigError', (['"""Need mailgun domain nam...
from aiogram import types from bot.misc import dp @dp.inline_handler() async def example_echo(iq: types.InlineQuery): await iq.answer(results=[], switch_pm_text='To bot', switch_pm_parameter='sp')
[ "bot.misc.dp.inline_handler" ]
[((54, 73), 'bot.misc.dp.inline_handler', 'dp.inline_handler', ([], {}), '()\n', (71, 73), False, 'from bot.misc import dp\n')]
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path urlpatterns = [ # Django Admin path(settings.ADMIN_URL, admin.site.urls), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
[ "django.conf.urls.static.static", "django.urls.path" ]
[((230, 291), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (236, 291), False, 'from django.conf.urls.static import static\n'), ((178, 219), 'django.urls.path', 'path', (['settings.ADMIN_URL', ...
#!/usr/bin/env python """JARVIS 2 helper script Usage: run.py -j [-s] [NAME] run.py [-d] Options: -h --help Show usage -d --debug Run app in debug mode -j --job Run a job, will prompt if NAME is not given -s --json Print job output as JSON """ from __future__ import print...
[ "signal.signal", "pprint.pprint", "flask.Flask", "main.queues.clear", "json.dumps", "os.environ.get", "main.app.run", "sys.exit", "main.sched.shutdown", "jobs.load_jobs", "main.queues.values", "docopt.docopt" ]
[((455, 481), 'main.sched.shutdown', 'sched.shutdown', ([], {'wait': '(False)'}), '(wait=False)\n', (469, 481), False, 'from main import app, queues, sched\n'), ((499, 514), 'main.queues.values', 'queues.values', ([], {}), '()\n', (512, 514), False, 'from main import app, queues, sched\n'), ((544, 558), 'main.queues.cl...
import unittest from bubuku.id_extractor import _search_broker_id class TestBrokerIdExtractor(unittest.TestCase): def test_match_valid(self): assert '123534' == _search_broker_id(['broker.id=123534']) assert '123534' == _search_broker_id(['\tbroker.id=123534']) assert '123534' == _search_...
[ "bubuku.id_extractor._search_broker_id" ]
[((176, 215), 'bubuku.id_extractor._search_broker_id', '_search_broker_id', (["['broker.id=123534']"], {}), "(['broker.id=123534'])\n", (193, 215), False, 'from bubuku.id_extractor import _search_broker_id\n'), ((243, 284), 'bubuku.id_extractor._search_broker_id', '_search_broker_id', (["['\\tbroker.id=123534']"], {}),...
import os import shutil def process_subset(data_root, subset): coord_path = os.path.join(data_root, subset, 'coordinate') for accid in sorted(os.listdir(coord_path)): coord_file_path = os.path.join(coord_path, accid) for filename in sorted(os.listdir(coord_file_path)): vid = filenam...
[ "os.path.exists", "os.listdir", "os.path.join", "os.makedirs" ]
[((81, 126), 'os.path.join', 'os.path.join', (['data_root', 'subset', '"""coordinate"""'], {}), "(data_root, subset, 'coordinate')\n", (93, 126), False, 'import os\n'), ((151, 173), 'os.listdir', 'os.listdir', (['coord_path'], {}), '(coord_path)\n', (161, 173), False, 'import os\n'), ((202, 233), 'os.path.join', 'os.pa...
''' Author: <NAME> Description: Module to test the ODA algorithm and targeted landing. ''' from Camera import camera from Algorithms import create_samples as cs from Algorithms import discretize as disc from Algorithms import voronoi as voronoi from Algorithms import gap_detection as gd from process_frames import plot...
[ "matplotlib.pyplot.imshow", "matplotlib.pyplot.grid", "Camera.camera.Camera", "numpy.random.rand", "matplotlib.pyplot.colorbar", "time.sleep", "Algorithms.create_samples.createSamples", "matplotlib.pyplot.subplot", "Algorithms.discretize.depthCompletion", "matplotlib.pyplot.figure", "matplotlib....
[((2110, 2121), 'time.time', 'time.time', ([], {}), '()\n', (2119, 2121), False, 'import time\n'), ((2265, 2304), 'Algorithms.create_samples.createSamples', 'cs.createSamples', (['d_small', 'perc_samples'], {}), '(d_small, perc_samples)\n', (2281, 2304), True, 'from Algorithms import create_samples as cs\n'), ((2426, 2...
import little_helper # defaultdict(list), defaultdict(int), deque.rotate/append from collections import defaultdict, deque # functools.reduce(function, iterable[, initializer]) from functools import reduce # islice(seq, [start,] stop [, step]) from itertools import islice import re #import networkx as nx #fr...
[ "little_helper.submit", "argparse.ArgumentParser", "little_helper.get_input" ]
[((1544, 1569), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1567, 1569), False, 'import argparse\n'), ((1708, 1736), 'little_helper.get_input', 'little_helper.get_input', (['day'], {}), '(day)\n', (1731, 1736), False, 'import little_helper\n'), ((1931, 1975), 'little_helper.submit', 'little...
# Copyright 2017 The KaiJIN 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 ...
[ "os.path.exists", "os.makedirs", "os.path.join", "os.path.split", "os.mkdir" ]
[((769, 789), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (783, 789), False, 'import os\n'), ((936, 956), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (950, 956), False, 'import os\n'), ((962, 976), 'os.mkdir', 'os.mkdir', (['path'], {}), '(path)\n', (970, 976), False, 'import os\...
# the python script for finding the best kali linux mirror # according to your country, (having the lowest latency) # designed by Mrsingh2002 (https://github.com/mrsinghh2002) import re import sys import subprocess import urllib import xmltodict from threading import Thread import os # values hostlist = dict() resul...
[ "re.search", "xmltodict.parse", "urllib.parse.urlparse", "subprocess.Popen", "os.getuid", "os.popen", "sys.exit", "os.system", "re.findall", "urllib.request.urlopen", "threading.Thread" ]
[((1816, 1875), 'urllib.request.urlopen', 'urllib.request.urlopen', (['"""http://http.kali.org/README.meta4"""'], {}), "('http://http.kali.org/README.meta4')\n", (1838, 1875), False, 'import urllib\n'), ((1888, 1914), 'xmltodict.parse', 'xmltodict.parse', (['meta_file'], {}), '(meta_file)\n', (1903, 1914), False, 'impo...
import networkx as nx from graphilp.imports import networkx as impnx from graphilp.network import atsp_desrochers_laporte as tsp from gurobipy import GRB def test_atsp_desrochers_laporte(): # create graph instance n=10 G = nx.complete_graph(n) G.add_weighted_edges_from([(u, (u+1)%n, 2) for u in range...
[ "networkx.complete_graph", "graphilp.imports.networkx.read", "graphilp.network.atsp_desrochers_laporte.create_model", "graphilp.network.atsp_desrochers_laporte.extract_solution" ]
[((238, 258), 'networkx.complete_graph', 'nx.complete_graph', (['n'], {}), '(n)\n', (255, 258), True, 'import networkx as nx\n'), ((411, 424), 'graphilp.imports.networkx.read', 'impnx.read', (['G'], {}), '(G)\n', (421, 424), True, 'from graphilp.imports import networkx as impnx\n'), ((576, 650), 'graphilp.network.atsp_...
#!/usr/bin/python # # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # import argparse import json import re import requests from requests.auth import HTTPBasicAuth import sys import logging logger = logging.getLogger(__name__) class DeleteProjects(object): def __init__(self, args_str = None): ...
[ "logging.getLogger", "logging.StreamHandler", "requests.auth.HTTPBasicAuth", "argparse.ArgumentParser", "requests.delete", "re.findall" ]
[((218, 245), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (235, 245), False, 'import logging\n'), ((3912, 3935), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (3933, 3935), False, 'import logging\n'), ((1153, 1220), 'argparse.ArgumentParser', 'argparse.ArgumentPar...
# -*- coding: utf-8 -*- """ Created on Sun Sep 23 20:32:25 2018 @author: robot """ import os,sys AbsolutePath = os.path.abspath(__file__) #将相对路径转换成绝对路径 SuperiorCatalogue = os.path.dirname(AbsolutePath) #相对路径的上级路径 BaseDir = os.path.dirname(SuperiorCatalogue) #在“SuperiorCatalogue”的基础上在脱掉一层路径,得到我们想...
[ "os.path.dirname", "constructMethod.instance.Instance", "numpy.zeros", "copy.deepcopy", "os.path.abspath", "sys.path.append" ]
[((114, 139), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (129, 139), False, 'import os, sys\n'), ((185, 214), 'os.path.dirname', 'os.path.dirname', (['AbsolutePath'], {}), '(AbsolutePath)\n', (200, 214), False, 'import os, sys\n'), ((239, 273), 'os.path.dirname', 'os.path.dirname', (['Sup...
import csv import logging from pathlib import Path from typing import Union import click import numpy as np from blender import Blender, Blend from blender.catalog import blend2cat, CATALOG_HEADER def save_img(blend: Blend, idx: int, prefix: str, outdir: Union[Path, str] = ".") -> None: np.save(f"{outdir}/{pref...
[ "logging.basicConfig", "logging.getLogger", "click.Choice", "blender.catalog.blend2cat", "click.option", "pathlib.Path.cwd", "blender.Blender", "csv.writer", "click.echo", "click.Path", "click.command", "numpy.save" ]
[((1596, 1620), 'click.command', 'click.command', (['"""produce"""'], {}), "('produce')\n", (1609, 1620), False, 'import click\n'), ((1622, 1736), 'click.option', 'click.option', (['"""-n"""', '"""--n_blends"""'], {'type': 'int', 'default': '(100)', 'show_default': '(True)', 'help': '"""Number of blends to produce"""'}...
import pytest pytestmark = pytest.mark.django_db @pytest.mark.parametrize( "email, username, password, status_code", [ (None, "mediumgoals", "passwsord", 200), ("<EMAIL>", None, "passwsord", 200), ("<EMAIL>", "mediumgoals", "passwsord", 200), ("<EMAIL>", None, "spasswsord", 4...
[ "pytest.mark.parametrize", "pytest.raises" ]
[((54, 327), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""email, username, password, status_code"""', "[(None, 'mediumgoals', 'passwsord', 200), ('<EMAIL>', None, 'passwsord', \n 200), ('<EMAIL>', 'mediumgoals', 'passwsord', 200), ('<EMAIL>', None,\n 'spasswsord', 401), (None, None, 'passwsord', 40...
# This source code is part of the Biotite package and is distributed # under the 3-Clause BSD License. Please see 'LICENSE.rst' for further # information. import biotite.sequence as seq from biotite.sequence import Location, Feature, Annotation, AnnotatedSequence import biotite.sequence.io.genbank as gb import numpy a...
[ "biotite.sequence.AnnotatedSequence", "biotite.sequence.NucleotideSequence", "biotite.sequence.io.genbank.get_annotated_sequence", "biotite.sequence.Annotation", "biotite.sequence.Location" ]
[((635, 659), 'biotite.sequence.Annotation', 'Annotation', (['feature_list'], {}), '(feature_list)\n', (645, 659), False, 'from biotite.sequence import Location, Feature, Annotation, AnnotatedSequence\n'), ((1054, 1086), 'biotite.sequence.Annotation', 'Annotation', (['[feature1, feature2]'], {}), '([feature1, feature2]...
import pandas from sklearn import linear_model, feature_extraction def last_poll(full_data): """ Create feature from last poll in each state """ # Only care about republicans repub = full_data[full_data["PARTY"] == "Rep"] # Sort by date chron = repub.sort_values(by="DATE", ascending=T...
[ "pandas.isnull", "pandas.read_csv", "pandas.DataFrame", "pandas.notnull", "sklearn.linear_model.LinearRegression" ]
[((563, 590), 'pandas.read_csv', 'pandas.read_csv', (['"""data.csv"""'], {}), "('data.csv')\n", (578, 590), False, 'import pandas\n'), ((971, 1020), 'pandas.read_csv', 'pandas.read_csv', (['"""../data/2012_pres.csv"""'], {'sep': '""";"""'}), "('../data/2012_pres.csv', sep=';')\n", (986, 1020), False, 'import pandas\n')...
from django.contrib import admin from . models import CustomUser,Request,Profile,volunteer_invitations admin.site.register(CustomUser) admin.site.register(Request) admin.site.register(volunteer_invitations) admin.site.register(Profile)
[ "django.contrib.admin.site.register" ]
[((104, 135), 'django.contrib.admin.site.register', 'admin.site.register', (['CustomUser'], {}), '(CustomUser)\n', (123, 135), False, 'from django.contrib import admin\n'), ((136, 164), 'django.contrib.admin.site.register', 'admin.site.register', (['Request'], {}), '(Request)\n', (155, 164), False, 'from django.contrib...
import pandas as pd import seaborn as sb from sklearn.linear_model import LinearRegression from statsmodels.graphics.tsaplots import plot_acf from statsmodels.graphics.tsaplots import plot_pacf from statsmodels.tsa.seasonal import seasonal_decompose import numpy as np import pmdarima import matplotlib.pyplot as plt imp...
[ "matplotlib.pyplot.MaxNLocator", "pandas.read_csv", "matplotlib.pyplot.style.use", "seaborn.set_style", "seaborn.lineplot", "matplotlib.pyplot.figure", "matplotlib.pyplot.subplot", "pandas.concat", "matplotlib.pyplot.axvline", "pandas.to_datetime", "matplotlib.pyplot.show" ]
[((714, 738), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""seaborn"""'], {}), "('seaborn')\n", (727, 738), True, 'import matplotlib.pyplot as plt\n'), ((739, 763), 'seaborn.set_style', 'sb.set_style', (['"""darkgrid"""'], {}), "('darkgrid')\n", (751, 763), True, 'import seaborn as sb\n'), ((902, 978), 'pandas....
# Generated by Django 2.2 on 2019-06-04 23:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('drug', '0005_auto_20190604_2308'), ] operations = [ migrations.AlterField( model_name='drugs', name='image', ...
[ "django.db.models.ImageField" ]
[((329, 473), 'django.db.models.ImageField', 'models.ImageField', ([], {'blank': '(True)', 'default': '"""images/default_drug.png"""', 'help_text': '"""please upload drug image here"""', 'null': '(True)', 'upload_to': '"""images/"""'}), "(blank=True, default='images/default_drug.png', help_text=\n 'please upload dru...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_general_log_parser ---------------------------------- Tests for `general_log_parser` module. """ import sys, os, re sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import unittest from general_log_parser import parser clas...
[ "unittest.main", "os.path.dirname", "general_log_parser.parser.is_valid_date", "general_log_parser.parser.has_piped_input" ]
[((972, 987), 'unittest.main', 'unittest.main', ([], {}), '()\n', (985, 987), False, 'import unittest\n'), ((223, 248), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (238, 248), False, 'import sys, os, re\n'), ((572, 646), 'general_log_parser.parser.is_valid_date', 'parser.is_valid_date', ([...
import pygame pygame.init() WIDTH=600 HEIGHT=480 SCREEN = pygame.display.set_mode((WIDTH, HEIGHT)) while True: events = pygame.event.get() for event in events: if event.type == pygame.KEYDOWN: if event.key == pygame.K_1: print('this DOES work! :)')
[ "pygame.display.set_mode", "pygame.init", "pygame.event.get" ]
[((15, 28), 'pygame.init', 'pygame.init', ([], {}), '()\n', (26, 28), False, 'import pygame\n'), ((59, 99), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(WIDTH, HEIGHT)'], {}), '((WIDTH, HEIGHT))\n', (82, 99), False, 'import pygame\n'), ((126, 144), 'pygame.event.get', 'pygame.event.get', ([], {}), '()\n', ...
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import pandas as pd from tensorflow.examples.tutorials.mnist import input_data mnist_data = input_data.read_data_sets("c:/data/MNIST_data", one_hot=True) ## parameter ## input_size = 784 num_classes = 10 batch_size = 100 total_batches = 200 d...
[ "tensorflow.examples.tutorials.mnist.input_data.read_data_sets", "tensorflow.reduce_mean", "tensorflow.cast", "tensorflow.reduce_min", "tensorflow.placeholder", "tensorflow.Session", "tensorflow.layers.conv2d", "tensorflow.layers.dropout", "tensorflow.square", "tensorflow.summary.scalar", "tenso...
[((168, 229), 'tensorflow.examples.tutorials.mnist.input_data.read_data_sets', 'input_data.read_data_sets', (['"""c:/data/MNIST_data"""'], {'one_hot': '(True)'}), "('c:/data/MNIST_data', one_hot=True)\n", (193, 229), False, 'from tensorflow.examples.tutorials.mnist import input_data\n'), ((865, 917), 'tensorflow.placeh...
import http.server import socketserver # Inicializando o servidor web # ============================================================================ PORT = 8000 HANDLER = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer(("", PORT), HANDLER) as httpd: print("Servindo na porta:", PORT) httpd.se...
[ "socketserver.TCPServer" ]
[((216, 259), 'socketserver.TCPServer', 'socketserver.TCPServer', (["('', PORT)", 'HANDLER'], {}), "(('', PORT), HANDLER)\n", (238, 259), False, 'import socketserver\n')]
from typing import List import itertools import numpy as np import torch from skimage.color import label2rgb def get_val_from_metric(metric_value): if isinstance(metric_value, (int, float)): pass elif torch.is_tensor(metric_value): metric_value = metric_value.item() else: metric_va...
[ "matplotlib.pyplot.ylabel", "torch.from_numpy", "numpy.ascontiguousarray", "numpy.array", "numpy.moveaxis", "matplotlib.pyplot.imshow", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.close", "matplotlib.pyplot.yticks", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xticks", "matplotlib.use", ...
[((2235, 2261), 'numpy.zeros', 'np.zeros', (['(h, w)', 'np.uint8'], {}), '((h, w), np.uint8)\n', (2243, 2261), True, 'import numpy as np\n'), ((2363, 2387), 'skimage.color.label2rgb', 'label2rgb', (['labels', 'image'], {}), '(labels, image)\n', (2372, 2387), False, 'from skimage.color import label2rgb\n'), ((2572, 2597...
from django.contrib import admin from e_commerc.models import Card # Register your models here. admin.site.register(Card)
[ "django.contrib.admin.site.register" ]
[((96, 121), 'django.contrib.admin.site.register', 'admin.site.register', (['Card'], {}), '(Card)\n', (115, 121), False, 'from django.contrib import admin\n')]
#!/usr/bin/python3 import numpy as np import matplotlib.pyplot as plt import sys import classifier as c from plotDecBoundaries import plotDecBoundaries def error_rate(classifications, true_classifications): if (np.shape(classifications) != np.shape(true_classifications)): raise RuntimeError("Size not equ...
[ "numpy.shape", "matplotlib.pyplot.savefig", "numpy.size", "classifier.NearestMeanClassifier", "matplotlib.pyplot.clf", "numpy.min", "numpy.argmax", "numpy.max", "numpy.append", "numpy.array", "numpy.count_nonzero", "plotDecBoundaries.plotDecBoundaries", "numpy.std", "numpy.argmin", "nump...
[((482, 498), 'numpy.array', 'np.array', (['[0, 1]'], {}), '([0, 1])\n', (490, 498), True, 'import numpy as np\n'), ((635, 658), 'numpy.append', 'np.append', (['features', '(-1)'], {}), '(features, -1)\n', (644, 658), True, 'import numpy as np\n'), ((679, 736), 'numpy.loadtxt', 'np.loadtxt', (['training_csv'], {'delimi...
# %% import numpy as np import os,sys import argparse import numpy as np from collections import defaultdict from keras.models import Model, load_model, model_from_json from datetime import datetime import plotly.graph_objects as go import base64 from dominate.util import raw from dominate.tags import * from dominate i...
[ "numpy.mean", "numpy.unique", "dominate.document", "argparse.ArgumentParser", "os.makedirs", "plotly.graph_objects.Box", "keras.models.model_from_json", "plotly.graph_objects.Figure", "numpy.array", "os.path.isdir", "collections.defaultdict", "numpy.random.seed", "numpy.linspace", "dominat...
[((335, 356), 'numpy.random.seed', 'np.random.seed', (['(12345)'], {}), '(12345)\n', (349, 356), True, 'import numpy as np\n'), ((1960, 1984), 'collections.defaultdict', 'defaultdict', (['defaultdict'], {}), '(defaultdict)\n', (1971, 1984), False, 'from collections import defaultdict\n'), ((6973, 6984), 'plotly.graph_o...
import psycopg2 import config from Query.sql import full_query def latest_comments(okta_id, video_string="", fan_string="", limit=5000): conn = psycopg2.connect(f"dbname= {config.DB_NAME} \ user={config.DB_USER} \ host={config.DB_HOST} \ ...
[ "psycopg2.connect", "Query.sql.full_query" ]
[((151, 364), 'psycopg2.connect', 'psycopg2.connect', (['f"""dbname= {config.DB_NAME} user={config.DB_USER} host={config.DB_HOST} password={config.DB_PASSWORD}"""'], {}), "(\n f'dbname= {config.DB_NAME} us...
from django.urls import include, path from .views import classroom urlpatterns = [ path('', classroom.home, name='home'), path('post/new/', classroom.post_new, name='post_new'), #<int:pk>/ ]
[ "django.urls.path" ]
[((91, 128), 'django.urls.path', 'path', (['""""""', 'classroom.home'], {'name': '"""home"""'}), "('', classroom.home, name='home')\n", (95, 128), False, 'from django.urls import include, path\n'), ((134, 188), 'django.urls.path', 'path', (['"""post/new/"""', 'classroom.post_new'], {'name': '"""post_new"""'}), "('post/...
from graia.ariadne.app import Ariadne from graia.ariadne.event.message import GroupMessage from graia.ariadne.model import Group from graia.ariadne.message.chain import MessageChain from graia.ariadne.message.element import Plain, Source from graia.saya import Saya, Channel from graia.saya.builtins.broadcast.schema imp...
[ "graia.saya.Channel.current", "arclet.alconna.manager.CommandManager", "graia.saya.Saya.current", "graia.ariadne.message.parser.alconna.AlconnaDispatcher", "arclet.alconna.Alconna" ]
[((509, 523), 'graia.saya.Saya.current', 'Saya.current', ([], {}), '()\n', (521, 523), False, 'from graia.saya import Saya, Channel\n'), ((534, 551), 'graia.saya.Channel.current', 'Channel.current', ([], {}), '()\n', (549, 551), False, 'from graia.saya import Saya, Channel\n'), ((621, 637), 'arclet.alconna.manager.Comm...
import re import graphene from django.conf import settings from graphql.utils import schema_printer from ..account.types import AddressInput from ..utils import get_user_country_context from .utils import get_graphql_content def test_get_user_country_context_from_address_instance(address, address_other_country): ...
[ "re.findall", "graphene.Schema", "graphene.Argument" ]
[((1265, 1293), 'graphene.Schema', 'graphene.Schema', ([], {'query': 'Query'}), '(query=Query)\n', (1280, 1293), False, 'import graphene\n'), ((1843, 1887), 're.findall', 're.findall', (['"""implements (\\\\w+,) (\\\\w+)"""', 'sdl'], {}), "('implements (\\\\w+,) (\\\\w+)', sdl)\n", (1853, 1887), False, 'import re\n'), ...
import argparse, json, funcy from sklearn.model_selection import train_test_split def save_coco(file, info, licenses, images, annotations, categories): with open(file, "wt", encoding="UTF-8") as coco: json.dump( { "info": info, "licenses": licenses, ...
[ "argparse.ArgumentParser", "sklearn.model_selection.train_test_split", "json.load", "json.dump", "funcy.lremove" ]
[((3695, 3817), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Splits a coco annotations file into a training, validation, and test set."""'}), "(description=\n 'Splits a coco annotations file into a training, validation, and test set.'\n )\n", (3718, 3817), False, 'import argparse...
# @Date: 2019-05-13 # @Email: <EMAIL> <NAME> # @Last modified time: 2020-10-07 import sys #sys.path.insert(0, '/work/qiu/data4Keran/code/modelPredict') sys.path.insert(0, '/home/xx02tmp/code3/modelPredict') from img2mapC05 import img2mapC import numpy as np import time sys.path.insert(0, '/home/xx02tmp/...
[ "os.path.exists", "numpy.int8", "sys.path.insert", "scipy.io.savemat", "numpy.unique", "os.makedirs", "numpy.where", "numpy.delete", "basic4dataPre.savePatch_fold_singlev", "img2mapC05.img2mapC", "basic4dataPre.savePatch_fold_single", "basic4dataPre.patch2labelInx_lt", "numpy.arange" ]
[((162, 216), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""/home/xx02tmp/code3/modelPredict"""'], {}), "(0, '/home/xx02tmp/code3/modelPredict')\n", (177, 216), False, 'import sys\n'), ((286, 339), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""/home/xx02tmp/code3/dataPrepare"""'], {}), "(0, '/home/xx02tmp/cod...
""" Examples for config.yml file ---------------------------- Configuration file `config.yml` use YAML (https://yaml.org) format to describe decay process. The main parts of config.yml is `decay` and `particle`. The `decay` part describe the particle (or an id of a list of particle) decay into which particles, it ca...
[ "yaml.full_load", "matplotlib.pyplot.ylabel", "tf_pwa.histogram.Hist1D.histogram", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((2793, 2865), 'tf_pwa.histogram.Hist1D.histogram', 'Hist1D.histogram', (['mass_phsp'], {'weights': 'weight', 'bins': '(60)', 'range': '(0.25, 1.45)'}), '(mass_phsp, weights=weight, bins=60, range=(0.25, 1.45))\n', (2809, 2865), False, 'from tf_pwa.histogram import Hist1D\n'), ((3366, 3378), 'matplotlib.pyplot.legend'...
# Copyright (c) 2021 by xfangfang. All Rights Reserved. # # Using IINA as DLNA media renderer # # Macast Metadata # <macast.title>IINA Renderer</macast.title> # <macast.renderer>IINARenderer</macast.renderer> # <macast.platform>darwin</macast.platform> # <macast.version>0.31</macast.version> # <macast.host_version>0.7<...
[ "logging.getLogger", "macast.RendererSetting", "socket.socket", "os.waitpid", "macast.Setting.stop_service", "json.dumps", "time.sleep", "macast.Setting.get_system_env", "macast.Setting.load", "threading.Thread", "queue.Queue", "cherrypy.engine.publish" ]
[((865, 898), 'logging.getLogger', 'logging.getLogger', (['"""IINARenderer"""'], {}), "('IINARenderer')\n", (882, 898), False, 'import logging\n'), ((7515, 7529), 'macast.Setting.load', 'Setting.load', ([], {}), '()\n', (7527, 7529), False, 'from macast import RendererSetting, Setting, gui\n'), ((1092, 1109), 'macast.R...
import sys from battle.battle_functions import load_pokemon_from_file, simulate_battle if __name__ == "__main__": if len(sys.argv) < 3: print("usage: python singlepokemonbattle.py pokemon1.py pokemon2.py (numBattles)") sys.exit(1) print("loading pokemon1 from", sys.argv[1]) poke_mod_1 = lo...
[ "battle.battle_functions.simulate_battle", "battle.battle_functions.load_pokemon_from_file", "sys.exit" ]
[((318, 353), 'battle.battle_functions.load_pokemon_from_file', 'load_pokemon_from_file', (['sys.argv[1]'], {}), '(sys.argv[1])\n', (340, 353), False, 'from battle.battle_functions import load_pokemon_from_file, simulate_battle\n'), ((419, 454), 'battle.battle_functions.load_pokemon_from_file', 'load_pokemon_from_file'...
from pyrevit.framework import List from pyrevit import revit, DB import clr clr.AddReference('RevitAPI') clr.AddReference('RevitAPIUI') clr.AddReference("System") from Autodesk.Revit.DB import FilteredElementCollector from Autodesk.Revit.DB import * from System.Collections.Generic import List doc = __revit__.ActiveUID...
[ "pyrevit.DB.FilteredElementCollector", "clr.AddReference" ]
[((77, 105), 'clr.AddReference', 'clr.AddReference', (['"""RevitAPI"""'], {}), "('RevitAPI')\n", (93, 105), False, 'import clr\n'), ((106, 136), 'clr.AddReference', 'clr.AddReference', (['"""RevitAPIUI"""'], {}), "('RevitAPIUI')\n", (122, 136), False, 'import clr\n'), ((137, 163), 'clr.AddReference', 'clr.AddReference'...
# Generated by Django 2.0.5 on 2018-06-04 08:45 from django.db import migrations, models import picture_bed.models class Migration(migrations.Migration): dependencies = [ ('picture_bed', '0001_initial'), ] operations = [ migrations.AlterField( model_name='picture', ...
[ "django.db.models.ImageField" ]
[((357, 431), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': 'picture_bed.models.Picture.user_pictures_path'}), '(upload_to=picture_bed.models.Picture.user_pictures_path)\n', (374, 431), False, 'from django.db import migrations, models\n')]