code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from __future__ import unicode_literals from django.core import mail from django.core.management import call_command from django.test import SimpleTestCase class SendTestEmailManagementCommand(SimpleTestCase): """ Test the sending of a test email using the `sendtestemail` command. """ def test_send_...
[ "django.core.management.call_command" ]
[((465, 505), 'django.core.management.call_command', 'call_command', (['"""sendtestemail"""', 'recipient'], {}), "('sendtestemail', recipient)\n", (477, 505), False, 'from django.core.management import call_command\n'), ((919, 978), 'django.core.management.call_command', 'call_command', (['"""sendtestemail"""', 'recipi...
#!/usr/bin/env python3 # encoding: utf-8 import pprint from enum import Enum from engine.datastore.models.paper_structure import PaperStructure from engine.datastore.models.text import Text from engine.preprocessing.text_processor import TextProcessor from engine.utils.objects.word_hist import WordHist class Section...
[ "engine.utils.objects.word_hist.WordHist", "pprint.PrettyPrinter", "engine.datastore.models.text.Text" ]
[((1121, 1151), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (1141, 1151), False, 'import pprint\n'), ((1072, 1082), 'engine.utils.objects.word_hist.WordHist', 'WordHist', ([], {}), '()\n', (1080, 1082), False, 'from engine.utils.objects.word_hist import WordHist\n'), ((795, ...
from django.db import models # Create your models here. class Contact(models.Model): street_address = models.CharField( max_length=100, null=True, blank=True ) city = models.CharField( max_length=30, null=True, blank=True ) state = models.CharField(...
[ "django.db.models.CharField", "django.db.models.URLField", "django.db.models.ForeignKey", "django.db.models.EmailField" ]
[((109, 164), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'null': '(True)', 'blank': '(True)'}), '(max_length=100, null=True, blank=True)\n', (125, 164), False, 'from django.db import models\n'), ((206, 260), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)'...
import os import pandas as pd import sys sys.path.insert(0, '../') from LGAIresult import LGAIresult from utils.common_utils import save_split_txt, load_split_txt, write_excel def out_excel(ann_list, time_list, pid_list, save_dir): time_dict = get_dict(time_list) pid_dict = get_dict(pid_list, '\t') c...
[ "pandas.DataFrame", "utils.common_utils.write_excel", "LGAIresult.LGAIresult", "sys.path.insert" ]
[((41, 66), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../"""'], {}), "(0, '../')\n", (56, 66), False, 'import sys\n'), ((882, 915), 'pandas.DataFrame', 'pd.DataFrame', (['excel'], {'columns': 'cols'}), '(excel, columns=cols)\n', (894, 915), True, 'import pandas as pd\n'), ((920, 972), 'utils.common_utils.write...
from flask import Flask, render_template,request,session,redirect,url_for,flash from flask_wtf import FlaskForm from wtforms import (StringField,SubmitField,BooleanField,DateTimeField, RadioField,SelectField,TextField,TextAreaField) from wtforms.validators import DataRequired app = Flask(__name__) ...
[ "flask.flash", "wtforms.SelectField", "wtforms.BooleanField", "wtforms.RadioField", "flask.Flask", "wtforms.TextAreaField", "wtforms.SubmitField", "flask.url_for", "flask.render_template", "wtforms.validators.DataRequired" ]
[((304, 319), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (309, 319), False, 'from flask import Flask, render_template, request, session, redirect, url_for, flash\n'), ((538, 577), 'wtforms.BooleanField', 'BooleanField', (['"""Have you been neutered?"""'], {}), "('Have you been neutered?')\n", (550, 577...
import cv2 import glob import os # Fill in the output with upscaled frames. # Make sure to match scale and interpolation mode. SCALE = 2 if __name__ == "__main__": frames = sorted(glob.glob("frames/*.jpg")) for frame_index, frame in enumerate(frames): output_frame = "output/{:05d}.png".format(frame_index) ...
[ "cv2.imwrite", "os.path.exists", "cv2.imread", "glob.glob", "cv2.resize" ]
[((185, 210), 'glob.glob', 'glob.glob', (['"""frames/*.jpg"""'], {}), "('frames/*.jpg')\n", (194, 210), False, 'import glob\n'), ((326, 354), 'os.path.exists', 'os.path.exists', (['output_frame'], {}), '(output_frame)\n', (340, 354), False, 'import os\n'), ((382, 417), 'cv2.imread', 'cv2.imread', (['frame', 'cv2.IMREAD...
import flask from flask import Flask, session, render_template,redirect, url_for from run import server @server.route('/') def index(): return render_template("tbases/t_index.html", startpage=True) #@server.route('/dashboard/') #def dashboard(): # return render_template("tbases/t_index.html", startpa...
[ "run.server.route", "flask.render_template" ]
[((110, 127), 'run.server.route', 'server.route', (['"""/"""'], {}), "('/')\n", (122, 127), False, 'from run import server\n'), ((154, 208), 'flask.render_template', 'render_template', (['"""tbases/t_index.html"""'], {'startpage': '(True)'}), "('tbases/t_index.html', startpage=True)\n", (169, 208), False, 'from flask i...
# Copyright 2020 University of Illinois Board of Trustees. All Rights Reserved. # Author: <NAME>, DPRG (https://dprg.cs.uiuc.edu) # This file is part of Baechi, which is released under specific terms. See file License.txt file for full license details. # =================================================================...
[ "argparse.ArgumentParser", "json.loads", "utils.logger.get_logger", "tensorflow.global_variables_initializer", "tensorflow.device", "tensorflow.Session", "tensorflow.python.client.timeline.Timeline", "sklearn.linear_model.LinearRegression", "tensorflow.matmul", "tensorflow.RunMetadata", "tensorf...
[((552, 579), 'utils.logger.get_logger', 'logger.get_logger', (['__file__'], {}), '(__file__)\n', (569, 579), False, 'from utils import logger\n'), ((3181, 3206), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3204, 3206), False, 'import argparse\n'), ((740, 781), 'tensorflow.device', 'tf.devi...
# coding:utf-8 import os from pathlib import Path from io import StringIO, BytesIO, IOBase from typing import Union FileTypes = (IOBase,) FileType = Union[FileTypes] DEFAULT_FILENAME_DATE_FMT = ( "%Y-%m-%d_%H:%M:%S" ) # Format for dates appended to files or dirs. # This will lexsort in temporal order. DEFAULT_FI...
[ "os.mkdir", "os.stat", "os.path.basename", "os.path.isdir", "os.path.dirname", "os.path.exists", "os.path.isfile", "pathlib.Path", "os.path.splitext", "os.path.join", "os.listdir" ]
[((3191, 3214), 'os.path.dirname', 'os.path.dirname', (['prefix'], {}), '(prefix)\n', (3206, 3214), False, 'import os\n'), ((4066, 4088), 'os.path.splitext', 'os.path.splitext', (['path'], {}), '(path)\n', (4082, 4088), False, 'import os\n'), ((5099, 5133), 'os.path.join', 'os.path.join', (["(dir_ or '')", 'paths[0]'],...
import http from socket import timeout from goprocam import GoProCamera from .conftest import GoProCameraTest class WhichCamTest(GoProCameraTest): def setUp(self): super().setUp() # disable this so we can test it separately self.monkeypatch.setattr(GoProCamera.GoPro, '_prepare_gpcontrol'...
[ "socket.timeout", "http.client.HTTPException" ]
[((2535, 2544), 'socket.timeout', 'timeout', ([], {}), '()\n', (2542, 2544), False, 'from socket import timeout\n'), ((2838, 2847), 'socket.timeout', 'timeout', ([], {}), '()\n', (2845, 2847), False, 'from socket import timeout\n'), ((3133, 3160), 'http.client.HTTPException', 'http.client.HTTPException', ([], {}), '()\...
# -*- coding: utf-8 -*- """ @File : yolo_label.py @Author : Jackie @Description : """ import json import os from shutil import copyfile from sys import exit sets = ['train', 'valid'] classes = ["nie es8","maybach s650","toyota gt8","tesla modelx"] # def load_vim_label(labelfile): with open(labelfile,...
[ "json.load", "os.makedirs", "os.path.isdir", "shutil.copyfile", "os.path.join", "os.listdir", "sys.exit" ]
[((568, 589), 'os.listdir', 'os.listdir', (['imgfolder'], {}), '(imgfolder)\n', (578, 589), False, 'import os\n'), ((354, 393), 'json.load', 'json.load', (['f'], {'encoding': '"""unicode-escape"""'}), "(f, encoding='unicode-escape')\n", (363, 393), False, 'import json\n'), ((647, 674), 'os.path.isdir', 'os.path.isdir',...
# models.py from app import db class Passenger(db.Model): __tablename__ = "passengers" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(30), nullable=False) dob = db.Column(db.Date, nullable=False) email = db.Column(db.String(30), unique=True, nullable=False) address = ...
[ "app.db.backref", "app.db.relationship", "app.db.Column", "app.db.String", "app.db.ForeignKey" ]
[((103, 142), 'app.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (112, 142), False, 'from app import db\n'), ((205, 239), 'app.db.Column', 'db.Column', (['db.Date'], {'nullable': '(False)'}), '(db.Date, nullable=False)\n', (214, 239), False, 'from app import d...
import json import traceback import sys from mqtt_performance_tester.mqtt_utils import * logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) ### CLASS FOR STORE AN MQTT MESSAGE class packet(): counter = 0 def __init__(self): self.protocol = None self.frame_id = None ...
[ "json.load", "traceback.print_exc" ]
[((8261, 8276), 'json.load', 'json.load', (['file'], {}), '(file)\n', (8270, 8276), False, 'import json\n'), ((9039, 9054), 'json.load', 'json.load', (['file'], {}), '(file)\n', (9048, 9054), False, 'import json\n'), ((4029, 4065), 'traceback.print_exc', 'traceback.print_exc', ([], {'file': 'sys.stdout'}), '(file=sys.s...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Build an XGBoost model of arrests in the Chicago crime data. """ __author__ = "<NAME>" __email__ = "<EMAIL>" __copyright__ = "Copyright 2019, <NAME>" __license__ = "Creative Commons Attribution-ShareAlike 4.0 International License" __version__ = "1.0" import xgbo...
[ "sklearn.externals.joblib.dump", "model.load_clean_data_frame", "sklearn.preprocessing.StandardScaler", "skopt.space.Integer", "sklearn.preprocessing.MinMaxScaler", "skopt.space.Real", "xgboost.XGBClassifier" ]
[((2059, 2133), 'sklearn.externals.joblib.dump', 'joblib.dump', (['runner.trained_estimator', '"""model/output/xgboost_basic.joblib"""'], {}), "(runner.trained_estimator, 'model/output/xgboost_basic.joblib')\n", (2070, 2133), False, 'from sklearn.externals import joblib\n'), ((2492, 2569), 'sklearn.externals.joblib.dum...
import random import time from collections import Counter done = 'false' #here is the animation def animate(): Count=0 global done print('loading… |',end="") while done == 'false': time.sleep(0.1) print('/',end="") time.sleep(0.1) print('-',end="") time.sleep(0.1...
[ "collections.Counter", "random.randint", "time.sleep" ]
[((1371, 1392), 'random.randint', 'random.randint', (['(0)', '(51)'], {}), '(0, 51)\n', (1385, 1392), False, 'import random\n'), ((4837, 4852), 'time.sleep', 'time.sleep', (['(2.5)'], {}), '(2.5)\n', (4847, 4852), False, 'import time\n'), ((206, 221), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (216, 221), ...
from netfilterqueue import NetfilterQueue from scapy.all import * import socket import re def print_and_accept(pkt): ip = IP(pkt.get_payload()) if ip.haslayer("Raw"): print("IP packet received") payload = ip["Raw"].load if payload[0] == 0x16 and payload[5] == 0x01: n...
[ "netfilterqueue.NetfilterQueue" ]
[((545, 561), 'netfilterqueue.NetfilterQueue', 'NetfilterQueue', ([], {}), '()\n', (559, 561), False, 'from netfilterqueue import NetfilterQueue\n')]
from netCDF4 import Dataset from dataclasses import dataclass, field import os import pickle import sys import shutil import numpy as np from variables import modelvar @dataclass class VariableInfo(): nickname: str = "" dimensions: tuple = field(default_factory=lambda: ()) name: str = "" units: str = ...
[ "netCDF4.Dataset", "pickle.dump", "os.path.join", "os.makedirs", "os.path.isdir", "dataclasses.field", "numpy.arange", "shutil.copyfile", "os.path.expanduser", "numpy.prod" ]
[((250, 284), 'dataclasses.field', 'field', ([], {'default_factory': '(lambda : ())'}), '(default_factory=lambda : ())\n', (255, 284), False, 'from dataclasses import dataclass, field\n'), ((3871, 3890), 'numpy.prod', 'np.prod', (['grid.procs'], {}), '(grid.procs)\n', (3878, 3890), True, 'import numpy as np\n'), ((5009...
# Title: 소가 정보섬에 올라온 이유 # Link: https://www.acmicpc.net/problem/17128 import sys sys.setrecursionlimit(10 ** 6) read_list_int = lambda: list(map(int, sys.stdin.readline().strip().split(' '))) def solution(n: int, q: int, cows: list, qs: list): cows = cows + cows parts = [] for start in range(n): ...
[ "sys.setrecursionlimit", "sys.stdin.readline" ]
[((84, 114), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10 ** 6)'], {}), '(10 ** 6)\n', (105, 114), False, 'import sys\n'), ((154, 174), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (172, 174), False, 'import sys\n')]
"""Module containing the logic for querying dictionary or list object.""" import re import operator from dlapp import utils from dlapp.argumenthelper import validate_argument_type from dlapp.argumenthelper import validate_argument_is_not_empty from dlapp.collection import Element class DLQueryError(Exception): ""...
[ "operator.ne", "dlapp.collection.Element", "operator.eq", "dlapp.argumenthelper.validate_argument_type", "dlapp.utils.foreach", "dlapp.argumenthelper.validate_argument_is_not_empty" ]
[((1082, 1134), 'dlapp.argumenthelper.validate_argument_type', 'validate_argument_type', (['list', 'tuple', 'dict'], {'data': 'data'}), '(list, tuple, dict, data=data)\n', (1104, 1134), False, 'from dlapp.argumenthelper import validate_argument_type\n'), ((3224, 3263), 'dlapp.utils.foreach', 'utils.foreach', (['self.da...
# from __future__ import print_function # In python 2.7 from flask import render_template from flask_login import current_user import datetime #import forms from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, IntegerField from wtforms.validators import Val...
[ "flask.Blueprint", "flask.render_template" ]
[((553, 589), 'flask.Blueprint', 'Blueprint', (['"""sellerreviews"""', '__name__'], {}), "('sellerreviews', __name__)\n", (562, 589), False, 'from flask import Blueprint\n'), ((1190, 1378), 'flask.render_template', 'render_template', (['"""sellerreviews.html"""'], {'sellerreviews': 's_reviews', 'sellerreviewstats': 'se...
from django.shortcuts import render from crawler import Crawler from django.http import HttpResponse crawlers = {} def index(request, params=''): post_data = dict(request.POST) post_data['urls'] = post_data['url[]'] for link in post_data['urls']: crawlers[link] = Crawler() crawlers[link].setUrl(lin...
[ "django.shortcuts.render", "crawler.Crawler", "django.http.HttpResponse" ]
[((366, 430), 'django.shortcuts.render', 'render', (['request', '"""crawl/index.html"""', "{'urls': post_data['urls']}"], {}), "(request, 'crawl/index.html', {'urls': post_data['urls']})\n", (372, 430), False, 'from django.shortcuts import render\n'), ((719, 746), 'django.http.HttpResponse', 'HttpResponse', (['response...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """This file contains tests for the data_classes.py file. For specifics on each test, see the docstrings under each function. """ __authors__ = ["<NAME>, <NAME>"] __credits__ = ["<NAME>, <NAME>"] __Lisence__ = "BSD" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __statu...
[ "unittest.mock.patch", "itertools.combinations" ]
[((2601, 2643), 'unittest.mock.patch', 'patch', (['"""lib_bgp_data.utils.utils.get_tags"""'], {}), "('lib_bgp_data.utils.utils.get_tags')\n", (2606, 2643), False, 'from unittest.mock import patch\n'), ((3509, 3551), 'unittest.mock.patch', 'patch', (['"""lib_bgp_data.utils.utils.get_tags"""'], {}), "('lib_bgp_data.utils...
""" The goal of this module is to ease the creation of static maps from this package. Ideally, this is done headlessly (i.e., no running browser) and quickly. Given that deck.gl requires WebGL, there aren't lot of alternatives to using a browser. Not yet implemented. """ from selenium import webdriver # from selenium...
[ "selenium.webdriver.Chrome" ]
[((656, 707), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'executable_path': 'CHROMEDRIVER_PATH'}), '(executable_path=CHROMEDRIVER_PATH)\n', (672, 707), False, 'from selenium import webdriver\n')]
import logging as log import os import base64 import json import numpy as np from paprika.restraints import DAT_restraint from parmed.amber import AmberParm from parmed import Structure # https://stackoverflow.com/questions/27909658/json-encoder-and-decoder-for-complex-numpy-arrays # https://stackoverflow.com/a/24375...
[ "paprika.restraints.DAT_restraint", "logging.debug", "json.loads", "logging.warning", "numpy.frombuffer", "numpy.ascontiguousarray", "base64.b64decode", "json.dumps", "logging.info", "base64.b64encode", "os.path.join" ]
[((2779, 2829), 'logging.debug', 'log.debug', (['"""Saving restraint information as JSON."""'], {}), "('Saving restraint information as JSON.')\n", (2788, 2829), True, 'import logging as log\n'), ((3099, 3152), 'logging.debug', 'log.debug', (['"""Loading restraint information from JSON."""'], {}), "('Loading restraint ...
import PINN_Base.base_v1 as base_v1 import tensorflow as tf ''' This is an implementation of the (unnamed) "Improved fully-connected neural architecture" from UNDERSTANDING AND MITIGATING GRADIENT PATHOLOGIES IN PHYSICS-INFORMED NEURAL NETWORKS (Wang, 2020). I have taken the liberty of naming it based on the author...
[ "tensorflow.matmul" ]
[((1955, 1970), 'tensorflow.matmul', 'tf.matmul', (['H', 'W'], {}), '(H, W)\n', (1964, 1970), True, 'import tensorflow as tf\n'), ((1795, 1810), 'tensorflow.matmul', 'tf.matmul', (['H', 'W'], {}), '(H, W)\n', (1804, 1810), True, 'import tensorflow as tf\n')]
import numpy from scipy.interpolate import InterpolatedUnivariateSpline as interpolate from scipy.interpolate import interp1d from cosmo4d.lab import (UseComplexSpaceOptimizer, NBodyModel, LPTModel, ZAModel, LBFGS, ParticleMesh) #from cosmo4d.lab import mapbias as map f...
[ "sys.path.append", "cosmo4d.lab.ParticleMesh", "nbodykit.lab.BigFileCatalog", "nbodykit.cosmology.Cosmology.from_dict", "yaml.load", "scipy.interpolate.InterpolatedUnivariateSpline", "solve.solve", "os.makedirs", "getbiasparams.eval_bfit", "nbodykit.lab.BigFileMesh", "cosmo4d.lab.NBodyModel", ...
[((716, 738), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (731, 738), False, 'import sys, os, json, yaml\n'), ((739, 767), 'sys.path.append', 'sys.path.append', (['"""../utils/"""'], {}), "('../utils/')\n", (754, 767), False, 'import sys, os, json, yaml\n'), ((1003, 1022), 'HImodels.ModelA',...
#!/usr/bin/env python3 from __future__ import annotations from typing import List, Dict, Any, ValuesView, TypeVar, Iterable, ItemsView from processor.setting import Setting import threading T = TypeVar("T", bound="LocalRotary") class LocalRotary: def __init__(self, config: Dict[str, Setting]): self.co...
[ "typing.TypeVar", "threading.Event" ]
[((198, 231), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': '"""LocalRotary"""'}), "('T', bound='LocalRotary')\n", (205, 231), False, 'from typing import List, Dict, Any, ValuesView, TypeVar, Iterable, ItemsView\n'), ((470, 487), 'threading.Event', 'threading.Event', ([], {}), '()\n', (485, 487), False, 'import ...
from sys import stderr CONFIG_PATH = '/odin.cfg' CONFIG_FILE_DOCS = """The configuration file should contain these settings: ODIN_API_ROOT=https://example.com/odin_api ODIN_SECRET=<secret encryption key> JOB_API_ROOT=https://example.com/job_api JOB_API_USERNAME=<username> JOB_API_PASSWORD=<password> It may contain: ...
[ "sys.stderr.write" ]
[((442, 466), 'sys.stderr.write', 'stderr.write', (["(msg + '\\n')"], {}), "(msg + '\\n')\n", (454, 466), False, 'from sys import stderr\n')]
from re import L import sys from typing import List from tensorflow.python.ops.gen_array_ops import gather sys.path.append('.') import json import numpy as np import tensorflow as tf import tensorflow_probability as tfp from random import randint, randrange from environment.base.base import BaseEnvironment from envi...
[ "tensorflow.maximum", "tensorflow.reshape", "numpy.ones", "sys.path.append", "numpy.full", "tensorflow.nn.softmax", "numpy.zeros_like", "tensorflow.random.uniform", "environment.custom.resource_v3.resource.Resource", "tensorflow_probability.distributions.Categorical", "environment.custom.resourc...
[((109, 129), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (124, 129), False, 'import sys\n'), ((1760, 1823), 'numpy.full', 'np.full', (['(1, self.num_features)', 'self.EOS_CODE'], {'dtype': '"""float32"""'}), "((1, self.num_features), self.EOS_CODE, dtype='float32')\n", (1767, 1823), True, 'impo...
# Copyright 2021 Rosalind Franklin Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
[ "pandas.DataFrame", "subprocess.run", "tqdm.tqdm", "subprocess.Popen", "os.path.isdir", "os.path.isfile", "itertools.islice" ]
[((1506, 1534), 'pandas.DataFrame', 'pd.DataFrame', (['md_in.metadata'], {}), '(md_in.metadata)\n', (1518, 1534), True, 'import pandas as pd\n'), ((4814, 4929), 'subprocess.run', 'subprocess.run', (["['nvidia-smi', '--list-gpus']"], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE', 'encoding': '"""ascii"""'}),...
import tensorflow as tf from Globals import * from BaseNet import * class GlimpseNet(BaseNet): def __init__(self): self.imageSize = constants['imageSize'] self.imageChannel = constants['imageChannel'] self.numGlimpseResolution = constants['numGlimpseResolution'] self.glimpseOutput...
[ "tensorflow.nn.relu", "tensorflow.constant_initializer", "tensorflow.reshape", "tensorflow.concat", "tensorflow.variable_scope", "tensorflow.matmul", "tensorflow.nn.bias_add" ]
[((1494, 1537), 'tensorflow.reshape', 'tf.reshape', (['glimpses', '[-1, self.glimpseDim]'], {}), '(glimpses, [-1, self.glimpseDim])\n', (1504, 1537), True, 'import tensorflow as tf\n'), ((1552, 1581), 'tensorflow.matmul', 'tf.matmul', (['glimpses', 'self.wg0'], {}), '(glimpses, self.wg0)\n', (1561, 1581), True, 'import...
# Generated by Django 4.0.3 on 2022-03-20 10:33 import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0004_post_slug'), ] operations = [ migrati...
[ "django.db.models.ForeignKey", "django.db.migrations.AlterModelOptions" ]
[((313, 402), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""business"""', 'options': "{'ordering': ['-created_at']}"}), "(name='business', options={'ordering': [\n '-created_at']})\n", (341, 402), False, 'from django.db import migrations, models\n'), ((442, 536), 'django...
""" Module for data exploration for ARIMA modeling. This module contains the back-end exploration of river run flow rate data and exogenous predictors to determine the best way to create a time-series model of the data. Note that since this module was only used once (i.e. is not called in order to create ongoing predi...
[ "matplotlib.pyplot.title", "riverrunner.repository.Repository", "matplotlib.pyplot.subplot", "statsmodels.tsa.stattools.adfuller", "matplotlib.pyplot.show", "matplotlib.pyplot.axhline", "matplotlib.pyplot.plot", "statsmodels.tsa.arima_model.ARIMA", "statsmodels.tsa.stattools.pacf", "matplotlib.pyp...
[((1308, 1320), 'riverrunner.repository.Repository', 'Repository', ([], {}), '()\n', (1318, 1320), False, 'from riverrunner.repository import Repository\n'), ((1831, 1876), 'pandas.to_datetime', 'pd.to_datetime', (["precip['date_time']"], {'utc': '(True)'}), "(precip['date_time'], utc=True)\n", (1845, 1876), True, 'imp...
import pytest import json @pytest.mark.usefixtures('cleanup_db') async def test_todo_api(app, test_cli): """ testing todo api """ # GET resp = await test_cli.get('/api/todo') assert resp.status == 200 resp_json = await resp.json() assert len(resp_json['todo_list']) == 0 # POST ...
[ "pytest.mark.usefixtures", "json.dumps" ]
[((29, 66), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""cleanup_db"""'], {}), "('cleanup_db')\n", (52, 66), False, 'import pytest\n'), ((384, 416), 'json.dumps', 'json.dumps', (["{'name': 'new_todo'}"], {}), "({'name': 'new_todo'})\n", (394, 416), False, 'import json\n')]
import os import numpy as np import matplotlib.pyplot as plt try: import python_scripts.nalu.io as nalu except ImportError: raise ImportError('Download https://github.com/lawsonro3/python_scripts/blob/master/python_scripts/nalu/nalu_functions.py') if __name__ == '__main__': root_dir = '/Users/mlawson/Goog...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.loglog", "matplotlib.pyplot.plot", "os.path.isdir", "python_scripts.nalu.io.read_log", "matplotlib.pyplot.legend", "matplotlib.pyplot.text", "numpy.append", "matplotlib.pyplot.figure", "numpy.mean", "numpy.array", "numpy.arange", "matplotlib.pypl...
[((662, 687), 'python_scripts.nalu.io.read_log', 'nalu.read_log', (['file_gC_13'], {}), '(file_gC_13)\n', (675, 687), True, 'import python_scripts.nalu.io as nalu\n'), ((706, 742), 'numpy.mean', 'np.mean', (['t_gC_13[375:425, :]'], {'axis': '(0)'}), '(t_gC_13[375:425, :], axis=0)\n', (713, 742), True, 'import numpy as ...
""" Test module for barbante.recommendation.RecommenderHRChunks class. """ import nose.tools import barbante.tests as tests from barbante.recommendation.tests.fixtures.HybridRecommenderFixture import HybridRecommenderFixture class TestRecommenderHRChunks(HybridRecommenderFixture): """ Class for testing barbante...
[ "barbante.tests.init_session" ]
[((1885, 1948), 'barbante.tests.init_session', 'tests.init_session', ([], {'user_id': '"""u_eco_1"""', 'algorithm': 'self.algorithm'}), "(user_id='u_eco_1', algorithm=self.algorithm)\n", (1903, 1948), True, 'import barbante.tests as tests\n')]
from collections import defaultdict with open('day10/input.txt', 'r') as file: data = sorted([int(x.strip()) for x in file.readlines()]) data = [0] + data data.append(data[-1] + 3) jolt_1, jolt_3 = 0, 0 for i in range(len(data)): current = data[i - 1] if (data[i] - current) == 1: jolt_1 += 1 ...
[ "collections.defaultdict" ]
[((410, 426), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (421, 426), False, 'from collections import defaultdict\n')]
from fastai.vision.all import * from fastai.basics import * from upit.models.cyclegan import * from upit.train.cyclegan import * from upit.data.unpaired import * import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--experiment_name', type=str, default='...
[ "argparse.ArgumentParser" ]
[((229, 254), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (252, 254), False, 'import argparse\n')]
# Generated by Django 3.1.8 on 2021-05-04 15:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20210504_1433'), ] operations = [ migrations.RemoveField( model_name='user', name='first_name', ...
[ "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((233, 293), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""user"""', 'name': '"""first_name"""'}), "(model_name='user', name='first_name')\n", (255, 293), False, 'from django.db import migrations, models\n'), ((338, 397), 'django.db.migrations.RemoveField', 'migrations.RemoveFie...
from tkinter import * from datetime import datetime # Colors black: str = "#3d3d3d" # Preto white: str = "#fafcff" # Branco green: str = "#21c25c" # Verde red: str = "#eb463b" # Vermelho grey: str = "#dedcdc" # Cinza blue: str = "#3080f0" # Azul wallpeper: str = white color = black window = Tk() window.title("...
[ "datetime.datetime.now" ]
[((525, 539), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (537, 539), False, 'from datetime import datetime\n')]
import re from ._abstract import AbstractScraper from ._utils import get_minutes class CookingCircle(AbstractScraper): @classmethod def host(cls): return "cookingcircle.com" def author(self): return ( self.soup.find("div", {"class": "recipe-author"}) .findChild("s...
[ "re.findall" ]
[((854, 885), 're.findall', 're.findall', (['"""[0-9]+"""', 'totalTime'], {}), "('[0-9]+', totalTime)\n", (864, 885), False, 'import re\n')]
import codecs import collections import sys import csv import os from os.path import basename, dirname import pandas as pd import magic import mimetypes from cchardet import UniversalDetector from validator.logger import get_logger tmp_dir = None logger = get_logger(__name__) def extract_data(path, standard): ...
[ "magic.from_file", "cchardet.UniversalDetector", "validator.logger.get_logger", "codecs.open", "os.path.basename", "csv.DictReader", "csv.Sniffer", "pandas.read_excel", "pathlib.Path", "collections.OrderedDict", "mimetypes.guess_extension", "csv.DictWriter" ]
[((259, 279), 'validator.logger.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (269, 279), False, 'from validator.logger import get_logger\n'), ((532, 564), 'magic.from_file', 'magic.from_file', (['path'], {'mime': '(True)'}), '(path, mime=True)\n', (547, 564), False, 'import magic\n'), ((2278, 2297), '...
# -*- coding: utf-8 -*- __author__ = """<NAME>""" __email__ = "<EMAIL>" import tensorflow as tf import tf_quat2rot class TestGraphMode(tf.test.TestCase): @tf.function def _run_in_graph(self, batch_shape=(2, 1, 3)): self.assertTrue(not tf.executing_eagerly()) random_quats = tf_quat2rot.random...
[ "tensorflow.executing_eagerly", "tf_quat2rot.rotation_matrix_to_quaternion", "tf_quat2rot.quaternion_to_rotation_matrix", "tf_quat2rot.random_uniform_quaternion" ]
[((302, 362), 'tf_quat2rot.random_uniform_quaternion', 'tf_quat2rot.random_uniform_quaternion', ([], {'batch_dim': 'batch_shape'}), '(batch_dim=batch_shape)\n', (339, 362), False, 'import tf_quat2rot\n'), ((390, 445), 'tf_quat2rot.quaternion_to_rotation_matrix', 'tf_quat2rot.quaternion_to_rotation_matrix', (['random_qu...
from flask_wtf.form import FlaskForm from wtforms.fields.core import StringField from wtforms.fields.simple import SubmitField from wtforms.validators import DataRequired class SearchBox(FlaskForm): """Placeholder for a future implementation""" string = StringField('Search for a post, user or project', validators=...
[ "wtforms.validators.DataRequired", "wtforms.fields.simple.SubmitField" ]
[((351, 372), 'wtforms.fields.simple.SubmitField', 'SubmitField', (['"""Search"""'], {}), "('Search')\n", (362, 372), False, 'from wtforms.fields.simple import SubmitField\n'), ((324, 338), 'wtforms.validators.DataRequired', 'DataRequired', ([], {}), '()\n', (336, 338), False, 'from wtforms.validators import DataRequir...
from __future__ import print_function from __future__ import absolute_import from __future__ import division import os import compas_rhino from compas.utilities import geometric_key from fofin.shell import Shell from fofin.shellartist import ShellArtist from compas_rhino.selectors import VertexSelector from compas_...
[ "fofin.shell.Shell.from_json", "fofin.shellartist.ShellArtist", "os.path.dirname", "compas_rhino.modifiers.VertexModifier.update_vertex_attributes", "compas_rhino.selectors.VertexSelector.select_vertices", "os.path.join" ]
[((631, 656), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (646, 656), False, 'import os\n'), ((664, 690), 'os.path.join', 'os.path.join', (['HERE', '"""data"""'], {}), "(HERE, 'data')\n", (676, 690), False, 'import os\n'), ((698, 730), 'os.path.join', 'os.path.join', (['DATA', '"""fofin.js...
# coding: utf8 import locale import logging from dialog import Dialog from kalliope.core import OrderListener from kalliope.core.ConfigurationManager import SettingLoader from kalliope.core.SynapseLauncher import SynapseLauncher from kalliope.neurons.say.say import Say logging.basicConfig() logger = logging.getLogg...
[ "kalliope.neurons.say.say.Say", "kalliope.core.ConfigurationManager.SettingLoader", "logging.basicConfig", "kalliope.core.SynapseLauncher.SynapseLauncher.start_synapse_by_name", "dialog.Dialog", "locale.setlocale", "logging.getLogger" ]
[((274, 295), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (293, 295), False, 'import logging\n'), ((305, 334), 'logging.getLogger', 'logging.getLogger', (['"""kalliope"""'], {}), "('kalliope')\n", (322, 334), False, 'import logging\n'), ((705, 720), 'kalliope.core.ConfigurationManager.SettingLoader'...
"""CLI functions for edges-cal.""" import click import papermill as pm import yaml from datetime import datetime from nbconvert import PDFExporter from pathlib import Path from rich.console import Console from traitlets.config import Config from edges_cal import cal_coefficients as cc console = Console() main = clic...
[ "yaml.load", "nbconvert.PDFExporter", "click.Group", "edges_cal.cal_coefficients.CalibrationObservation", "click.option", "traitlets.config.Config", "pathlib.Path", "edges_cal.cal_coefficients.perform_term_sweep", "click.Path", "rich.console.Console", "datetime.datetime.now" ]
[((298, 307), 'rich.console.Console', 'Console', ([], {}), '()\n', (305, 307), False, 'from rich.console import Console\n'), ((316, 329), 'click.Group', 'click.Group', ([], {}), '()\n', (327, 329), False, 'import click\n'), ((851, 978), 'click.option', 'click.option', (['"""-p/-P"""', '"""--plot/--no-plot"""'], {'defau...
# # SPDX-Copyright: Copyright 2018 Capital One Services, LLC # SPDX-License-Identifier: MIT # Copyright 2018 Capital One Services, LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # associated documentation files (the "Software"), to deal in the Software without ...
[ "unittest.main", "moneymovement.setup_oauth", "models.TransferRequest", "moneymovement.get_eligible_accounts", "moneymovement.initiate_transfer", "moneymovement.get_transfer_requests" ]
[((5003, 5018), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5016, 5018), False, 'import moneymovement, unittest\n'), ((1548, 1609), 'moneymovement.setup_oauth', 'moneymovement.setup_oauth', (['client_id', 'client_secret', 'base_url'], {}), '(client_id, client_secret, base_url)\n', (1573, 1609), False, 'import ...
import jax.numpy as np from tfc import mtfc from tfc.utils import egrad, NLLS from tfc.utils.PlotlyMakePlot import MakePlot # Constants: n = [40,40] nC = [2,[1,2]] m = 40 r0 = 2. rf = 4. th0 = 0. thf = 2.*np.pi realSoln = lambda r,th: 4.*(-1024.+r**10)*np.sin(5.*th)/(1023.*r**5) # Create TFC class: myTfc = mtfc(n,n...
[ "tfc.utils.egrad", "jax.numpy.linspace", "tfc.utils.NLLS", "jax.numpy.cos", "tfc.utils.PlotlyMakePlot.MakePlot", "tfc.mtfc", "jax.numpy.ones_like", "jax.numpy.sin" ]
[((312, 354), 'tfc.mtfc', 'mtfc', (['n', 'nC', 'm'], {'x0': '[r0, th0]', 'xf': '[rf, thf]'}), '(n, nC, m, x0=[r0, th0], xf=[rf, thf])\n', (316, 354), False, 'from tfc import mtfc\n'), ((976, 987), 'tfc.utils.egrad', 'egrad', (['u', '(1)'], {}), '(u, 1)\n', (981, 987), False, 'from tfc.utils import egrad, NLLS\n'), ((99...
# -*- coding: utf-8 -*- # COPYRIGHT 2017 <NAME> # Truth network model analysis from __future__ import print_function import numpy as np import tellurium as te import antimony import generate import util import clustering def classify(setup, s_arr, c_arr): """ Ground truth classification. Returns initial per...
[ "numpy.array_equal", "numpy.abs", "util.perturbRate", "generate.generateAntimonyNew", "numpy.array", "antimony.clearPreviousLoads", "tellurium.loada", "util.getPersistantOrder", "clustering.getListOfCombinations" ]
[((785, 814), 'antimony.clearPreviousLoads', 'antimony.clearPreviousLoads', ([], {}), '()\n', (812, 814), False, 'import antimony\n'), ((1014, 1079), 'generate.generateAntimonyNew', 'generate.generateAntimonyNew', (['setup.t_net', 't_s', 't_k', 's_arr', 'c_arr'], {}), '(setup.t_net, t_s, t_k, s_arr, c_arr)\n', (1042, 1...
import sys from jinja2 import Environment, FileSystemLoader from os import path, makedirs, getcwd curves = [] curves_string = "" PQ_L1_CURVES = ["bike1l1cpa", "bike1l1fo", "frodo640aes", "frodo640shake", "hqc128_1_cca2", "kyber512", "kyber90s512", "ntru_hps20...
[ "jinja2.FileSystemLoader", "os.path.exists", "os.makedirs", "jinja2.Environment" ]
[((1682, 1703), 'jinja2.FileSystemLoader', 'FileSystemLoader', (['"""."""'], {}), "('.')\n", (1698, 1703), False, 'from jinja2 import Environment, FileSystemLoader\n'), ((1739, 1770), 'jinja2.Environment', 'Environment', ([], {'loader': 'file_loader'}), '(loader=file_loader)\n', (1750, 1770), False, 'from jinja2 import...
""" test_const_ionization.py Author: <NAME> Affiliation: University of Colorado at Boulder Created on: Thu Oct 16 14:46:48 MDT 2014 Description: """ import ares import numpy as np import matplotlib.pyplot as pl from ares.physics.CrossSections import PhotoIonizationCrossSection as sigma s_per_yr = ares.physics.Co...
[ "numpy.abs", "matplotlib.pyplot.close", "numpy.allclose", "matplotlib.pyplot.draw", "matplotlib.pyplot.figure", "ares.physics.CrossSections.PhotoIonizationCrossSection", "numpy.exp", "ares.simulations.RaySegment" ]
[((976, 1011), 'ares.simulations.RaySegment', 'ares.simulations.RaySegment', ([], {}), '(**pars)\n', (1003, 1011), False, 'import ares\n'), ((1095, 1124), 'matplotlib.pyplot.figure', 'pl.figure', (['(1)'], {'figsize': '(8, 12)'}), '(1, figsize=(8, 12))\n', (1104, 1124), True, 'import matplotlib.pyplot as pl\n'), ((1392...
import scipy.io import numpy as np import sys import os.path import matplotlib.pyplot as plt trans = [139.62,119.43,36.48,14.5] mdata = [] def avgWaveSpeed(data,ampStart,ampEnd,freq,transducers,index1,index2): total = 0 count = 0 print(data) zer = highestPoint(data,ampStart,0)[0] tz = np.arange(a...
[ "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "random.randint", "matplotlib.pyplot.plot", "matplotlib.pyplot.setp", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure", "numpy.arange", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((4374, 4384), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (4382, 4384), True, 'import matplotlib.pyplot as plt\n'), ((309, 346), 'numpy.arange', 'np.arange', (['ampStart', 'ampEnd', '(1 / freq)'], {}), '(ampStart, ampEnd, 1 / freq)\n', (318, 346), True, 'import numpy as np\n'), ((2359, 2372), 'matplotlib....
#!/usr/bin/env python import os import getpass import requests import json import base64 import socket from smtplib import SMTP from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase from email.header import Header from email.utils import parseaddr, for...
[ "hysds.es_util.get_grq_es", "json.load", "getpass.getuser", "os.path.join", "email.mime.base.MIMEBase", "email.encoders.encode_base64", "json.dumps", "email.mime.multipart.MIMEMultipart", "socket.gethostname", "socket.getfqdn", "os.path.normpath", "hysds.es_util.get_mozart_es", "hysds_common...
[((2154, 2171), 'email.utils.parseaddr', 'parseaddr', (['sender'], {}), '(sender)\n', (2163, 2171), False, 'from email.utils import parseaddr, formataddr, COMMASPACE\n'), ((3281, 3296), 'email.mime.multipart.MIMEMultipart', 'MIMEMultipart', ([], {}), '()\n', (3294, 3296), False, 'from email.mime.multipart import MIMEMu...
import torch from torch.distributions import Normal, Categorical, kl_divergence as kl from scvi.models.classifier import Classifier from scvi.models.modules import Encoder, DecoderSCVI from scvi.models.utils import broadcast_labels from scvi.models.vae import VAE class VAEC(VAE): r"""A semi-supervised Variationa...
[ "torch.ones_like", "scvi.models.classifier.Classifier", "scvi.models.modules.Encoder", "torch.ones", "torch.distributions.Categorical", "torch.zeros_like", "torch.sqrt", "scvi.models.utils.broadcast_labels", "scvi.models.modules.DecoderSCVI", "torch.distributions.Normal", "torch.log" ]
[((1939, 2057), 'scvi.models.modules.Encoder', 'Encoder', (['n_input', 'n_latent'], {'n_cat_list': '[n_labels]', 'n_hidden': 'n_hidden', 'n_layers': 'n_layers', 'dropout_rate': 'dropout_rate'}), '(n_input, n_latent, n_cat_list=[n_labels], n_hidden=n_hidden,\n n_layers=n_layers, dropout_rate=dropout_rate)\n', (1946, ...
""" =============== Demo Gridspec02 =============== """ import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec def make_ticklabels_invisible(fig): for i, ax in enumerate(fig.axes): ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") ax.tick_params(labelbottom=False, labe...
[ "matplotlib.pyplot.subplot", "matplotlib.pyplot.figure", "matplotlib.pyplot.show", "matplotlib.gridspec.GridSpec" ]
[((341, 353), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (351, 353), True, 'import matplotlib.pyplot as plt\n'), ((360, 374), 'matplotlib.gridspec.GridSpec', 'GridSpec', (['(3)', '(3)'], {}), '(3, 3)\n', (368, 374), False, 'from matplotlib.gridspec import GridSpec\n'), ((381, 402), 'matplotlib.pyplot.s...
from django import template register = template.Library() @register.inclusion_tag('sortable_column_snippet.html') def sortable_column(request, pretty_name, identifier, default=False): current = request.GET.get('sort', identifier if default else None) return { 'pretty_name': pretty_name, 'ide...
[ "django.template.Library" ]
[((41, 59), 'django.template.Library', 'template.Library', ([], {}), '()\n', (57, 59), False, 'from django import template\n')]
# -*- coding: utf-8 -*- """ SkyAlchemy Copyright ©2016 <NAME> Licensed under the terms of the MIT License. See LICENSE for details. @author: <NAME> """ from __future__ import unicode_literals import struct from collections import OrderedDict from io import BytesIO import os import os.path as osp import ctypes impor...
[ "os.path.join", "os.path.isdir", "os.path.exists", "ctypes.create_unicode_buffer", "collections.OrderedDict", "PIL.Image.frombytes", "os.listdir", "skyrimtypes.unpack" ]
[((6534, 6592), 'ctypes.create_unicode_buffer', 'ctypes.create_unicode_buffer', (['(ctypes.wintypes.MAX_PATH + 1)'], {}), '(ctypes.wintypes.MAX_PATH + 1)\n', (6562, 6592), False, 'import ctypes\n'), ((800, 813), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (811, 813), False, 'from collections import Orde...
# -*- coding: utf-8 -*- # # Copyright (c) 2021, <NAME> # Copyright (c) 2020, <NAME> # All rights reserved. # # Licensed under the BSD 3-Clause License: # http://opensource.org/licenses/BSD-3-Clause # import os import pathlib import shutil import time import tkinter as tk import tkinter.filedialog import webbrowser fr...
[ "tkinter.Text", "webbrowser.open_new", "tkinter.Menu", "tkinter.Button", "tkinter.Scrollbar", "pathlib.Path", "tkinter.Toplevel", "os.chdir", "tkinter.Frame", "pathlib.Path.cwd", "tkinter.Label", "tkinter.Tk" ]
[((583, 590), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (588, 590), True, 'import tkinter as tk\n'), ((815, 949), 'tkinter.Label', 'tk.Label', (['window'], {'text': '"""text2cc – Create quizzes in Common Cartridge format from Markdown-based plain text"""', 'font': '(None, 16)'}), "(window, text=\n 'text2cc – Create q...
from flask import Flask, request, jsonify from services import MongoDBService app = Flask(__name__) @app.route("/") def root(): return "Welcome to Storage Manager!" @app.route("/health") def health(): return "ok" @app.route("/databases", methods=["GET"]) def all_databases(): databases = MongoDBService(...
[ "flask.request.json.get", "flask.jsonify", "flask.Flask", "services.MongoDBService" ]
[((86, 101), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (91, 101), False, 'from flask import Flask, request, jsonify\n'), ((350, 368), 'flask.jsonify', 'jsonify', (['databases'], {}), '(databases)\n', (357, 368), False, 'from flask import Flask, request, jsonify\n'), ((451, 485), 'flask.request.json.ge...
#!/usr/bin/env python # coding: utf-8 # # Registration 101 # # Image registration is a critical tool in longitudinal monitoring: # # - Estimation of local changes # - Comparison to same animal (less variance) # - [3R's](https://www.nc3rs.org.uk/the-3rs) # # # # ## Goal of tutorial: # - Introduce the concept of aligni...
[ "numpy.sum", "numpy.abs", "matplotlib.pyplot.figure", "numpy.mean", "ipywidgets.fixed", "numpy.fft.ifft2", "matplotlib.get_backend", "sys.path.append", "image_viewing.overlay_RGB", "numpy.fft.ifftshift", "numpy.copy", "numpy.identity", "image_viewing.horizontal_pane", "scipy.ndimage.interp...
[((688, 719), 'sys.path.append', 'sys.path.append', (['"""reg101_files"""'], {}), "('reg101_files')\n", (703, 719), False, 'import sys\n'), ((1790, 1813), 'image_viewing.horizontal_pane', 'horizontal_pane', (['images'], {}), '(images)\n', (1805, 1813), False, 'from image_viewing import horizontal_pane, overlay_RGB, ove...
# Add your Python code here. E.g. #radio 1 from microbit import * import radio radio.on() # any channel from 0 to 100 can be used for privacy. radio.config(channel=5) while True: if button_a.was_pressed(): radio.send('HAPPY') sleep(200) elif button_b.was_pressed(): radio.send('SAD') ...
[ "radio.config", "radio.send", "radio.on" ]
[((80, 90), 'radio.on', 'radio.on', ([], {}), '()\n', (88, 90), False, 'import radio\n'), ((145, 168), 'radio.config', 'radio.config', ([], {'channel': '(5)'}), '(channel=5)\n', (157, 168), False, 'import radio\n'), ((221, 240), 'radio.send', 'radio.send', (['"""HAPPY"""'], {}), "('HAPPY')\n", (231, 240), False, 'impor...
from SciDataTool.Functions import AxisError from SciDataTool.Classes.Norm_vector import Norm_vector def get_axis_periodic(self, Nper, is_aper=False): """Returns the vector 'axis' taking symmetries into account. Parameters ---------- self: DataLinspace a DataLinspace object Nper: int ...
[ "SciDataTool.Functions.AxisError" ]
[((931, 1000), 'SciDataTool.Functions.AxisError', 'AxisError', (['"""length of axis is not divisible by the number of periods"""'], {}), "('length of axis is not divisible by the number of periods')\n", (940, 1000), False, 'from SciDataTool.Functions import AxisError\n')]
# --- # jupyter: # jupytext: # cell_metadata_filter: -all # comment_magics: true # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.13.8 # kernelspec: # display_name: Python 3 # lang...
[ "altair.Y", "pandas.read_csv", "os.path.getsize", "matplotlib.pyplot.subplots", "altair.Axis", "altair.layer", "sys.stdout.flush", "altair.Scale", "datetime.datetime.now", "pandas.concat", "matplotlib.pyplot.grid" ]
[((750, 771), 'os.path.getsize', 'os.path.getsize', (['file'], {}), '(file)\n', (765, 771), False, 'import os, sys\n'), ((781, 789), 'datetime.datetime.now', 'dt.now', ([], {}), '()\n', (787, 789), True, 'from datetime import datetime as dt\n'), ((1513, 1598), 'pandas.read_csv', 'pd.read_csv', (['file'], {'dtype': 'dat...
#!/usr/bin/env python3 import sys from password.generate import generate from password.validate import validate from password.pwn_check import main if __name__ == "__main__": if not sys.argv[1:]: while True: try: text = input( """Select the option you like ...
[ "password.validate.validate" ]
[((1504, 1618), 'password.validate.validate', 'validate', (['password'], {'lowercase': 'lowercase', 'uppercase': 'uppercase', 'numbers': 'numbers', 'symbols': 'symbols', 'length': 'length'}), '(password, lowercase=lowercase, uppercase=uppercase, numbers=\n numbers, symbols=symbols, length=length)\n', (1512, 1618), F...
"""A command line interface to processes files.""" import click from file_processing_pipeline.process import process_end_of_day from file_processing_pipeline.io import CSV @click.command() @click.option("-d", "--data-set", help="The data set to import, e.g. end_of_day.", default='end_of_d...
[ "click.option", "file_processing_pipeline.process.process_end_of_day", "click.command" ]
[((176, 191), 'click.command', 'click.command', ([], {}), '()\n', (189, 191), False, 'import click\n'), ((193, 320), 'click.option', 'click.option', (['"""-d"""', '"""--data-set"""'], {'help': '"""The data set to import, e.g. end_of_day."""', 'default': '"""end_of_day"""', 'required': '(True)'}), "('-d', '--data-set', ...
""" Official evaluation script for SQuAD version 2.0. Modified by XLNet authors to update `find_best_threshold` scripts for SQuAD V2.0 """ import collections import json import re import string def get_raw_scores(qa_ids, actuals, preds): """ Computes exact match and F1 scores without applying any una...
[ "json.dump", "json.dumps", "collections.Counter", "re.sub", "re.compile" ]
[((849, 891), 're.compile', 're.compile', (['"""\\\\b(a|an|the)\\\\b"""', 're.UNICODE'], {}), "('\\\\b(a|an|the)\\\\b', re.UNICODE)\n", (859, 891), False, 'import re\n'), ((910, 934), 're.sub', 're.sub', (['regex', '""" """', 'text'], {}), "(regex, ' ', text)\n", (916, 934), False, 'import re\n'), ((2044, 2074), 'colle...
# Python-bioformats is distributed under the GNU General Public # License, but this file is licensed under the more permissive BSD # license. See the accompanying file LICENSE for details. # # Copyright (c) 2009-2014 Broad Institute # All rights reserved. '''formatwriter.py - mechanism to wrap a bioformats WriterWrap...
[ "os.remove", "javabridge.static_call", "javabridge.get_env", "javabridge.get_static_field", "numpy.random.rand", "javabridge.make_new", "javabridge.make_method", "javabridge.make_instance", "numpy.array", "wx.PySimpleApp", "os.path.split", "numpy.ascontiguousarray", "javabridge.detach", "j...
[((4342, 4357), 'javabridge.get_env', 'jutil.get_env', ([], {}), '()\n', (4355, 4357), True, 'import javabridge as jutil\n'), ((8923, 8938), 'javabridge.get_env', 'jutil.get_env', ([], {}), '()\n', (8936, 8938), True, 'import javabridge as jutil\n'), ((9239, 9385), 'javabridge.make_instance', 'jutil.make_instance', (['...
from matplotlib import pyplot as plt def imshow(img, **kwargs): if len(img.shape) == 2 and 'cmap' not in kwargs: return plt.imshow(img, cmap=plt.cm.gray, **kwargs) if len(img.shape) == 3 and img.shape[2] == 3: return plt.imshow(img[:, :, ::-1], **kwargs) return plt.imshow(img, **kwargs)
[ "matplotlib.pyplot.imshow" ]
[((292, 317), 'matplotlib.pyplot.imshow', 'plt.imshow', (['img'], {}), '(img, **kwargs)\n', (302, 317), True, 'from matplotlib import pyplot as plt\n'), ((134, 177), 'matplotlib.pyplot.imshow', 'plt.imshow', (['img'], {'cmap': 'plt.cm.gray'}), '(img, cmap=plt.cm.gray, **kwargs)\n', (144, 177), True, 'from matplotlib im...
# -*- coding: utf-8 -*- """ Ce fichier contient l'implémentation dans une interface graphique de la logique du Game of Life Il ne contient pas le code de la Class Espace utilisée pour Created on Wed Feb 17 14:36:56 2021 @author: <NAME> """ import os import game_of_life_logique as gol from tkinter import * o...
[ "os.path.dirname", "game_of_life_logique.Espace", "game_of_life_logique.Espace.formes.keys" ]
[((328, 353), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (343, 353), False, 'import os\n'), ((30227, 30250), 'game_of_life_logique.Espace', 'gol.Espace', (['(50)', '(50)', '(300)'], {}), '(50, 50, 300)\n', (30237, 30250), True, 'import game_of_life_logique as gol\n'), ((24937, 24961), 'ga...
""" App main entry point :author: <NAME> :copyright: Copyright 2021, LINKS Foundation :version: 1.0.0 .. Copyright 2021 LINKS Foundation 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 Licen...
[ "fastapi.staticfiles.StaticFiles", "fastapi.openapi.utils.get_openapi", "fastapi.openapi.docs.get_redoc_html", "fastapi.FastAPI" ]
[((1122, 1160), 'fastapi.FastAPI', 'FastAPI', ([], {'docs_url': 'None', 'redoc_url': 'None'}), '(docs_url=None, redoc_url=None)\n', (1129, 1160), False, 'from fastapi import FastAPI\n'), ((1250, 1281), 'fastapi.staticfiles.StaticFiles', 'StaticFiles', ([], {'directory': '"""static"""'}), "(directory='static')\n", (1261...
import os, json with open("PubChemElements_all.json") as fo: data = json.load(fo) all_elements = [] for j in data['Table']['Row']: element_obj = {} for element in list(zip(data['Table']['Columns']['Column'], j['Cell'])): property = element[0] value = element[1] ...
[ "json.dump", "json.load" ]
[((73, 86), 'json.load', 'json.load', (['fo'], {}), '(fo)\n', (82, 86), False, 'import os, json\n'), ((456, 493), 'json.dump', 'json.dump', (['all_elements', 'fo'], {'indent': '(2)'}), '(all_elements, fo, indent=2)\n', (465, 493), False, 'import os, json\n')]
from a.filea import ClassA from a.b.fileb import ClassB # class_name: foo.bar.Bar def import_class(class_name): components = class_name.split('.') module = __import__(components[0]) for comp in components[1:]: # print(repr(comp)) module = getattr(module, comp) return module if __name...
[ "a.b.fileb.ClassB", "a.filea.ClassA" ]
[((346, 354), 'a.filea.ClassA', 'ClassA', ([], {}), '()\n', (352, 354), False, 'from a.filea import ClassA\n'), ((397, 405), 'a.b.fileb.ClassB', 'ClassB', ([], {}), '()\n', (403, 405), False, 'from a.b.fileb import ClassB\n')]
# This module initiates the checkpoint # processing of FTI files. import os import glob import os.path import time from fnmatch import fnmatch import configparser import posix_read_ckpts import subprocess import sys # variables used for input validation fti_levels = (1, 2, 3, 4) output_formats = ('CSV', 'HDF5', 'dat...
[ "os.path.abspath", "subprocess.check_call", "os.getcwd", "os.path.realpath", "os.walk", "posix_read_ckpts.read_checkpoint", "os.path.isfile", "fnmatch.fnmatch", "configparser.ConfigParser", "os.path.join", "os.chdir", "sys.exit" ]
[((5376, 5403), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (5401, 5403), False, 'import configparser\n'), ((5481, 5506), 'os.chdir', 'os.chdir', (['executable_path'], {}), '(executable_path)\n', (5489, 5506), False, 'import os\n'), ((5621, 5659), 'subprocess.check_call', 'subprocess.che...
import rec as rec from django.core.management.base import BaseCommand import pandas as pd from sklearn.metrics.pairwise import cosine_similarity import plotly.offline as py import plotly.graph_objects as go from django.db.models import Sum import slug import http.client import json from shop.models import Rec, Produc...
[ "pandas.DataFrame", "sklearn.metrics.pairwise.cosine_similarity", "json.dumps" ]
[((834, 863), 'pandas.DataFrame', 'pd.DataFrame', (["x['reportData']"], {}), "(x['reportData'])\n", (846, 863), True, 'import pandas as pd\n'), ((1285, 1324), 'sklearn.metrics.pairwise.cosine_similarity', 'cosine_similarity', (['customer_item_matrix'], {}), '(customer_item_matrix)\n', (1302, 1324), False, 'from sklearn...
import itertools import math from qiskit import QuantumRegister, QuantumCircuit, ClassicalRegister from qiskit.circuit import Gate, InstructionSet from qiskit.dagcircuit import DAGCircuit from qiskit.extensions.standard import * from qiskit.qasm import pi def toffoli(number_qubits: int): assert number_qubits >= ...
[ "qiskit.QuantumCircuit", "qiskit.circuit.InstructionSet", "qiskit.dagcircuit.DAGCircuit", "itertools.repeat", "qiskit.QuantumRegister" ]
[((330, 360), 'qiskit.QuantumRegister', 'QuantumRegister', (['number_qubits'], {}), '(number_qubits)\n', (345, 360), False, 'from qiskit import QuantumRegister, QuantumCircuit, ClassicalRegister\n'), ((370, 403), 'qiskit.QuantumCircuit', 'QuantumCircuit', (['q'], {'name': '"""toffoli"""'}), "(q, name='toffoli')\n", (38...
#!/usr/bin/python ''' Script to record from roku device via WinTV HVR-1950 ''' from __future__ import (absolute_import, division, print_function, unicode_literals) from time import sleep from roku_app.run_encoding import run_encoding if __name__ == '__main__': try: run_encoding() except Exception...
[ "time.sleep", "roku_app.run_encoding.run_encoding" ]
[((285, 299), 'roku_app.run_encoding.run_encoding', 'run_encoding', ([], {}), '()\n', (297, 299), False, 'from roku_app.run_encoding import run_encoding\n'), ((380, 389), 'time.sleep', 'sleep', (['(10)'], {}), '(10)\n', (385, 389), False, 'from time import sleep\n')]
from gym.spaces import Discrete from ray.rllib.models.action_dist import ActionDistribution from ray.rllib.models.tf.tf_action_dist import Categorical from ray.rllib.models.torch.torch_action_dist import TorchCategorical from ray.rllib.utils.annotations import override from ray.rllib.utils.exploration.stochastic_sampli...
[ "ray.rllib.utils.framework.get_variable", "ray.rllib.utils.annotations.override", "ray.rllib.utils.from_config.from_config", "ray.rllib.utils.schedules.PiecewiseSchedule" ]
[((2356, 2384), 'ray.rllib.utils.annotations.override', 'override', (['StochasticSampling'], {}), '(StochasticSampling)\n', (2364, 2384), False, 'from ray.rllib.utils.annotations import override\n'), ((2207, 2263), 'ray.rllib.utils.framework.get_variable', 'get_variable', (['(0)'], {'framework': 'framework', 'tf_name':...
from flask import jsonify from flask_playground.routes.exceps import ValidationError from flask_playground.routes.v1 import api_v1_routes @api_v1_routes.errorhandler(ValidationError) def bad_request(e): response = jsonify({"message": e.args[0]}) response.status_code = 400 return response @api_v1_routes...
[ "flask_playground.routes.v1.api_v1_routes.app_errorhandler", "flask.jsonify", "flask_playground.routes.v1.api_v1_routes.errorhandler" ]
[((142, 185), 'flask_playground.routes.v1.api_v1_routes.errorhandler', 'api_v1_routes.errorhandler', (['ValidationError'], {}), '(ValidationError)\n', (168, 185), False, 'from flask_playground.routes.v1 import api_v1_routes\n'), ((307, 342), 'flask_playground.routes.v1.api_v1_routes.app_errorhandler', 'api_v1_routes.ap...
import logging def get_logger(log_file=None, name='radiomics_logger'): logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) # stream handler will send message to stdout formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S') ch = logging.St...
[ "logging.Formatter", "logging.StreamHandler", "logging.FileHandler", "logging.getLogger" ]
[((86, 109), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (103, 109), False, 'import logging\n'), ((211, 305), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)s [%(levelname)s] %(message)s"""'], {'datefmt': '"""%Y-%m-%d %H:%M:%S"""'}), "('%(asctime)s [%(levelname)s] %(message)s', date...
import numpy as nump import math import random import folium # import simplekml as simplekml from models.Line import Line from models.Pos import Pos import time from gedcomoptions import gvOptions from folium.plugins import FloatImage, AntPath, MiniMap, HeatMapWithTime legend_file = 'legend.png' lgd_txt = '<span sty...
[ "folium.features.PolyLine", "folium.plugins.MiniMap", "math.exp", "folium.FeatureGroup", "folium.MarkerCluster", "models.Pos.Pos", "folium.map.LayerControl", "folium.plugins.HeatMap", "folium.plugins.AntPath", "folium.raster_layers.TileLayer", "random.random", "random.seed", "folium.Map", ...
[((2002, 2043), 'folium.Map', 'folium.Map', ([], {'location': '[0, 0]', 'zoom_start': '(2)'}), '(location=[0, 0], zoom_start=2)\n', (2012, 2043), False, 'import folium\n'), ((2572, 2585), 'random.seed', 'random.seed', ([], {}), '()\n', (2583, 2585), False, 'import random\n'), ((378, 393), 'random.random', 'random.rando...
import time from datetime import datetime def getGuestTime(): curr_datetime = datetime.now() dt_string = curr_datetime.strftime("%d/%m/%Y") ti_string = curr_datetime.strftime("%H:%M:%S") return "{0} {1}".format(dt_string, ti_string) def getGuestTimezone(): is_dst = time.daylight and time.localtime...
[ "datetime.datetime.now", "time.localtime" ]
[((83, 97), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (95, 97), False, 'from datetime import datetime\n'), ((306, 322), 'time.localtime', 'time.localtime', ([], {}), '()\n', (320, 322), False, 'import time\n')]
import boto3 import io import base64 from PIL import Image from django.contrib.auth.models import User from django.contrib.auth import get_user_model from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile from rest_framework import generics, permissions from rest_framework_jwt.settings...
[ "io.BytesIO", "boto3.client", "django.contrib.auth.get_user_model", "django.contrib.auth.models.User.objects.create_user", "base64.b64decode", "PIL.Image.open", "rest_framework.response.Response", "django.contrib.auth.models.User.objects.all" ]
[((637, 653), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (651, 653), False, 'from django.contrib.auth import get_user_model\n'), ((880, 898), 'django.contrib.auth.models.User.objects.all', 'User.objects.all', ([], {}), '()\n', (896, 898), False, 'from django.contrib.auth.models import Use...
import logging from functools import lru_cache from urllib.parse import urlencode, quote_plus from boto_utils import fetch_job_manifest, paginate from botocore.exceptions import ClientError from utils import remove_none, retry_wrapper logger = logging.getLogger(__name__) def save(s3, client, buf, bucket, key, meta...
[ "boto_utils.fetch_job_manifest", "urllib.parse.urlencode", "utils.remove_none", "boto_utils.paginate", "functools.lru_cache", "utils.retry_wrapper", "logging.getLogger" ]
[((247, 274), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (264, 274), False, 'import logging\n'), ((1944, 1955), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (1953, 1955), False, 'from functools import lru_cache\n'), ((2531, 2542), 'functools.lru_cache', 'lru_cache', ([], {}),...
from itertools import chain import tensorflow as tf from libspn.graph.node import OpNode, Input from libspn import utils from libspn.inference.type import InferenceType from libspn.exceptions import StructureError from libspn.utils.serialization import register_serializable @register_serializable class Concat(OpNode)...
[ "libspn.exceptions.StructureError", "tensorflow.concat", "libspn.graph.node.Input", "libspn.utils.docinherit", "tensorflow.split", "itertools.chain.from_iterable" ]
[((1984, 2008), 'libspn.utils.docinherit', 'utils.docinherit', (['OpNode'], {}), '(OpNode)\n', (2000, 2008), False, 'from libspn import utils\n'), ((2223, 2247), 'libspn.utils.docinherit', 'utils.docinherit', (['OpNode'], {}), '(OpNode)\n', (2239, 2247), False, 'from libspn import utils\n'), ((2512, 2536), 'libspn.util...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.modules.export_file import export_to_files from frappe.model.document import Document class DeskPa...
[ "frappe.modules.export_file.export_to_files", "frappe._" ]
[((610, 697), 'frappe.modules.export_file.export_to_files', 'export_to_files', ([], {'record_list': "[['Desk Page', self.name]]", 'record_module': 'self.module'}), "(record_list=[['Desk Page', self.name]], record_module=self.\n module)\n", (625, 697), False, 'from frappe.modules.export_file import export_to_files\n'...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import ephem # See whether asking for the rising-time of Mars hangs indefinitely. class Launchpad236872Tests(unittest.TestCase): def runTest(self): mars = ephem.Mars() boston = ephem.city('Boston') boston.date = ephem.Date('200...
[ "ephem.city", "ephem.Date", "ephem.Mars" ]
[((232, 244), 'ephem.Mars', 'ephem.Mars', ([], {}), '()\n', (242, 244), False, 'import ephem\n'), ((262, 282), 'ephem.city', 'ephem.city', (['"""Boston"""'], {}), "('Boston')\n", (272, 282), False, 'import ephem\n'), ((305, 337), 'ephem.Date', 'ephem.Date', (['"""2008/5/29 15:59:16"""'], {}), "('2008/5/29 15:59:16')\n"...
# Copyright 2016 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, softw...
[ "numpy.pad", "numpy.power", "numpy.asarray" ]
[((1683, 1704), 'numpy.asarray', 'np.asarray', (['relevance'], {}), '(relevance)\n', (1693, 1704), True, 'import numpy as np\n'), ((3342, 3363), 'numpy.asarray', 'np.asarray', (['relevance'], {}), '(relevance)\n', (3352, 3363), True, 'import numpy as np\n'), ((3465, 3498), 'numpy.pad', 'np.pad', (['rel', '(0, pad)', '"...
#!/usr/bin/env python from isbndb import ISBNdbException from isbndb.models import * from isbndb.client import ISBNdbClient from isbndb.catalog import * from unittest import TestCase ACCESS_KEY = "<KEY>" class ISBNdbTest(TestCase): def setup(self): self.client = ISBNdbClient( access_key=ACCESS_KEY...
[ "unittest.main", "isbndb.client.ISBNdbClient" ]
[((567, 573), 'unittest.main', 'main', ([], {}), '()\n', (571, 573), False, 'from unittest import main\n'), ((285, 320), 'isbndb.client.ISBNdbClient', 'ISBNdbClient', ([], {'access_key': 'ACCESS_KEY'}), '(access_key=ACCESS_KEY)\n', (297, 320), False, 'from isbndb.client import ISBNdbClient\n')]
import nerdle_cfg import re import luigi import d6tflow import itertools import pandas as pd import numpy as np #helper functions def check_len_int(nerdle): nerdle_str = ''.join(nerdle) try: return all(len(x)==len(str(int(x))) for x in re.split('\+|\-|\*|\/|==',nerdle_str)) except: return ...
[ "pandas.DataFrame", "re.split", "itertools.combinations_with_replacement", "numpy.array", "pandas.Series", "luigi.IntParameter" ]
[((762, 782), 'luigi.IntParameter', 'luigi.IntParameter', ([], {}), '()\n', (780, 782), False, 'import luigi\n'), ((1223, 1241), 'pandas.Series', 'pd.Series', (['nerdles'], {}), '(nerdles)\n', (1232, 1241), True, 'import pandas as pd\n'), ((1262, 1286), 'pandas.DataFrame', 'pd.DataFrame', (['nerdle_ser'], {}), '(nerdle...
__author__ = 'grahamhub' import pygame import random import sys import time # colors black = (0, 0, 0) white = (255, 255, 255) blue = (35, 25, 255) green = (35, 255, 25) red = (255, 35, 25) count = 0 # width/height of snake segments seg_width = 15 seg_height = 15 # space between each segment seg_margin = 3 # set i...
[ "pygame.Surface", "pygame.event.get", "pygame.display.set_mode", "pygame.init", "pygame.display.flip", "pygame.sprite.Group", "time.sleep", "random.randrange", "pygame.sprite.spritecollide", "pygame.font.Font", "pygame.display.set_caption", "pygame.time.Clock", "sys.exit" ]
[((3140, 3153), 'pygame.init', 'pygame.init', ([], {}), '()\n', (3151, 3153), False, 'import pygame\n'), ((3164, 3199), 'pygame.display.set_mode', 'pygame.display.set_mode', (['[800, 600]'], {}), '([800, 600])\n', (3187, 3199), False, 'import pygame\n'), ((3201, 3236), 'pygame.display.set_caption', 'pygame.display.set_...
from django.utils.translation import gettext as _ from rest_framework import serializers from ...core.utils import format_plaintext_for_html from ..models import Ban __all__ = ["BanMessageSerializer", "BanDetailsSerializer"] def serialize_message(message): if message: return {"plain": message, "html": f...
[ "django.utils.translation.gettext", "rest_framework.serializers.SerializerMethodField" ]
[((428, 463), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', ([], {}), '()\n', (461, 463), False, 'from rest_framework import serializers\n'), ((916, 951), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', ([], {}), '()\n', (949, 951), Fal...
from ..helpers import eos from ..helpers import alfaFunctions from ..helpers.eosHelpers import A_fun, B_fun, getCubicCoefficients, getMixFugacity,getMixFugacityCoef, dAdT_fun from ..solvers.cubicSolver import cubic_solver from ..helpers import temperatureCorrelations as tempCorr from ..helpers import mixing_rules from...
[ "numpy.absolute", "numpy.sum", "numpy.log", "scipy.integrate.quad", "numpy.array" ]
[((680, 689), 'numpy.array', 'array', (['tc'], {}), '(tc)\n', (685, 689), False, 'from numpy import log, exp, sqrt, absolute, array, sum\n'), ((698, 707), 'numpy.array', 'array', (['pc'], {}), '(pc)\n', (703, 707), False, 'from numpy import log, exp, sqrt, absolute, array, sum\n'), ((723, 738), 'numpy.array', 'array', ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import json import math import numpy as np import tokenization import six import tensorflow as tf from tensorflow import logging class EvalResults(object): def __init__(self, capacity):...
[ "math.exp", "tokenization.printable_text", "csv.reader", "tensorflow.logging.info", "json.dumps", "collections.defaultdict", "numpy.mean", "tensorflow.gfile.GFile", "collections.namedtuple", "tokenization.BasicTokenizer", "collections.OrderedDict", "tokenization.convert_to_unicode", "six.ite...
[((30082, 30149), 'tensorflow.logging.info', 'logging.info', (["('Writing predictions to: %s' % output_prediction_file)"], {}), "('Writing predictions to: %s' % output_prediction_file)\n", (30094, 30149), False, 'from tensorflow import logging\n'), ((30156, 30212), 'tensorflow.logging.info', 'logging.info', (["('Writin...
from argparse import ArgumentParser, RawDescriptionHelpFormatter import all_call.train import numpy as np import json import sys import pandas as pd import re import os from glob import glob from arguments import yaml_reader # default parameters for inference DEFAULT_MODEL_PARAMS = (-0.0107736, 0.00244419, 0.0, 0.0044...
[ "pandas.DataFrame", "os.path.abspath", "numpy.zeros_like", "numpy.load", "argparse.ArgumentParser", "json.load", "pandas.read_csv", "os.path.dirname", "arguments.yaml_reader.save_arguments", "os.path.exists", "numpy.zeros", "glob.glob", "arguments.yaml_reader.load_arguments", "re.search", ...
[((757, 816), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'formatter_class': 'RawDescriptionHelpFormatter'}), '(formatter_class=RawDescriptionHelpFormatter)\n', (771, 816), False, 'from argparse import ArgumentParser, RawDescriptionHelpFormatter\n'), ((3315, 3336), 'os.path.abspath', 'os.path.abspath', (['path']...
import os import sys import argparse parse = argparse.ArgumentParser() parse.add_argument("--type", type=str,choices=['origin', 'grist',], help="run initial file or grist file") parse.add_argument("--times", type=int, help="time to run code") flags, unparsed = parse.parse_known_args(sys.argv[1:]) for i in range(flags...
[ "os.system", "argparse.ArgumentParser" ]
[((46, 71), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (69, 71), False, 'import argparse\n'), ((453, 471), 'os.system', 'os.system', (['command'], {}), '(command)\n', (462, 471), False, 'import os\n')]
import pandas as pd import numpy as np import geopandas as gpd import glob import rasterio import rasterio.mask from shapely.geometry import box import os shp_file_path = r'C:\Doutorado\BD\IBGE\IBGE_Estruturas_cartograficas_Brasil\2017\Unidades_Censitarias\Setores_Censitarios\*shp' gdf= gpd.read_file(glob.glob(shp...
[ "rasterio.open", "os.path.dirname", "pandas.Series", "glob.glob", "os.path.join", "shapely.geometry.box" ]
[((1523, 1563), 'os.path.join', 'os.path.join', (['ref_dir', '"""Valid_files.csv"""'], {}), "(ref_dir, 'Valid_files.csv')\n", (1535, 1563), False, 'import os\n'), ((1575, 1611), 'pandas.Series', 'pd.Series', (['valid_tiffs'], {'name': '"""paths"""'}), "(valid_tiffs, name='paths')\n", (1584, 1611), True, 'import pandas ...
""" Color and Fill Scales ===================== Scales control how a plot maps data values to the visual values of an aesthetic. """ # sphinx_gallery_thumbnail_path = "gallery_py\_scales\_color_and_fill.png" from datetime import datetime import pandas as pd from lets_plot import * LetsPlot.se...
[ "pandas.read_csv", "datetime.datetime" ]
[((653, 756), 'pandas.read_csv', 'pd.read_csv', (['"""https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/mpg.csv"""'], {}), "(\n 'https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/mpg.csv'\n )\n", (664, 756), True, 'import pandas as pd\n'), ((661, 792), 'pandas.read_csv', ...
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
[ "ooflib.common.IO.whoville.AutoWhoNameParameter", "ooflib.SWIG.common.switchboard.notify", "ooflib.SWIG.common.config.devel", "ooflib.common.IO.parameter.ListOfStringsParameter", "ooflib.engine.IO.meshparameters.FieldParameter", "ooflib.common.IO.parameter.StringParameter", "ooflib.engine.IO.meshIPC.ipc...
[((1733, 1758), 'ooflib.common.parallel_enable.enabled', 'parallel_enable.enabled', ([], {}), '()\n', (1756, 1758), False, 'from ooflib.common import parallel_enable\n'), ((6190, 6256), 'ooflib.SWIG.common.switchboard.requestCallback', 'switchboard.requestCallback', (['"""new master element"""', 'buildNewMeshCmd'], {})...
# coding: utf-8 import numpy as np import matplotlib.pyplot as plt import Transform as Transform import DiffDriveRobot class Wheel(object): """docstring for Wheel.""" def __init__(self): super(Wheel, self).__init__() self.speed = 0 def setSpeed(self, speed): self.speed = speed ...
[ "numpy.arctan2", "matplotlib.pyplot.plot", "numpy.transpose", "Transform.rotate", "numpy.sin", "numpy.array", "numpy.cos", "numpy.sqrt" ]
[((587, 680), 'numpy.array', 'np.array', (['[[-150, -150], [-150, 150], [150, 150], [150, -150], [-150, -150]]'], {'dtype': 'float'}), '([[-150, -150], [-150, 150], [150, 150], [150, -150], [-150, -150]],\n dtype=float)\n', (595, 680), True, 'import numpy as np\n'), ((3291, 3321), 'matplotlib.pyplot.plot', 'plt.plot...