code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import os import io from setuptools import setup def get_version(filename): here = os.path.dirname(os.path.abspath(__file__)) f = open(os.path.join(here, filename)) version_match = f.read() f.close() if version_match: return version_match raise RuntimeError("Unable to find version s...
[ "os.path.abspath", "os.path.join", "io.open" ]
[((107, 132), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (122, 132), False, 'import os\n'), ((147, 175), 'os.path.join', 'os.path.join', (['here', 'filename'], {}), '(here, filename)\n', (159, 175), False, 'import os\n'), ((495, 551), 'io.open', 'io.open', (['"""README.rst"""'], {'encodin...
import os from pathlib import Path class WorkingDirFactory: def create(self): return Path(os.getcwd())
[ "os.getcwd" ]
[((104, 115), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (113, 115), False, 'import os\n')]
import os from unittest import TestCase from unittest.mock import patch from ui_automation_core.utilities.log_utils import LogUtils class LoggingTest(TestCase): def test_LogUtils_is_instantiate(self): log_dir = '../logs/' log_util = LogUtils(log_dir) self.assertEqual('An instance of LogU...
[ "unittest.mock.patch", "ui_automation_core.utilities.log_utils.LogUtils", "os.path.isdir" ]
[((389, 412), 'unittest.mock.patch', 'patch', (['"""builtins.print"""'], {}), "('builtins.print')\n", (394, 412), False, 'from unittest.mock import patch\n'), ((257, 274), 'ui_automation_core.utilities.log_utils.LogUtils', 'LogUtils', (['log_dir'], {}), '(log_dir)\n', (265, 274), False, 'from ui_automation_core.utiliti...
# -*- coding: UTF-8 -*- """ 训练神经网络,将参数(Weight)存入 HDF5 文件 """ import numpy as np import tensorflow as tf from utils import * from network import * """ ==== 一些术语的概念 ==== # Batch size : 批次(样本)数目。一次迭代(Forword 运算(用于得到损失函数)以及 BackPropagation 运算(用于更新神经网络参数))所用的样本数目。Batch size 越大,所需的内存就越大 # Iteration : 迭代。每一次迭代更新一次权重(网络参数)...
[ "tensorflow.keras.utils.to_categorical", "numpy.reshape", "tensorflow.keras.callbacks.ModelCheckpoint" ]
[((917, 1025), 'tensorflow.keras.callbacks.ModelCheckpoint', 'tf.keras.callbacks.ModelCheckpoint', (['filepath'], {'monitor': '"""loss"""', 'verbose': '(0)', 'save_best_only': '(True)', 'mode': '"""min"""'}), "(filepath, monitor='loss', verbose=0,\n save_best_only=True, mode='min')\n", (951, 1025), True, 'import ten...
from uuid import UUID import pytest from katka import models @pytest.mark.django_db class TestProjectViewSet: def test_list(self, client, logged_in_user, my_team, my_project): response = client.get("/projects/") assert response.status_code == 200 parsed = response.json() assert le...
[ "katka.models.Project.objects.get", "uuid.UUID", "katka.models.Project.objects.count" ]
[((2437, 2496), 'katka.models.Project.objects.get', 'models.Project.objects.get', ([], {'pk': 'my_project.public_identifier'}), '(pk=my_project.public_identifier)\n', (2463, 2496), False, 'from katka import models\n'), ((2879, 2938), 'katka.models.Project.objects.get', 'models.Project.objects.get', ([], {'pk': 'my_proj...
# -*- coding: utf-8 -*- from luckydonaldUtils.logger import logging from pytgbot.bot import Bot from pytgbot.exceptions import TgApiServerException, TgApiParseException __author__ = 'luckydonald' logger = logging.getLogger(__name__) class Webhook(Bot): """ Subclass of Bot, will be returned of a sucessful we...
[ "DictObject.DictObject", "luckydonaldUtils.encoding.to_native", "pytgbot.api_types.as_array", "pytgbot.exceptions.TgApiServerException", "luckydonaldUtils.logger.logging.getLogger", "requests.post", "pytgbot.exceptions.TgApiParseException" ]
[((207, 234), 'luckydonaldUtils.logger.logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (224, 234), False, 'from luckydonaldUtils.logger import logging\n'), ((1405, 1439), 'DictObject.DictObject', 'DictObject', ([], {'url': 'url', 'params': 'params'}), '(url=url, params=params)\n', (1415, 14...
from solution.recollection.get_tweets import get_tweets from solution.ml.sentiment import AddSentimentAnalysis from solution.ml.clustering import cluster from solution.viz.wordclouds import GenWordcloud from solution.viz.ngrams import ngram from solution.viz.visualization import scatter import pandas as pd import os...
[ "solution.ml.sentiment.AddSentimentAnalysis", "solution.ml.clustering.cluster", "solution.viz.visualization.scatter", "solution.viz.ngrams.ngram", "pandas.read_pickle", "solution.viz.wordclouds.GenWordcloud" ]
[((452, 518), 'solution.ml.clustering.cluster', 'cluster', ([], {'file': 'f"""data/{pais}/{prioridad}/tweets.json"""', 'verbose': '(True)'}), "(file=f'data/{pais}/{prioridad}/tweets.json', verbose=True)\n", (459, 518), False, 'from solution.ml.clustering import cluster\n'), ((596, 622), 'solution.ml.sentiment.AddSentim...
#! /usr/bin/python3 # -*- coding: utf-8 -*- import tkinter from tkinter import ttk from tkinter import filedialog import tkinter.messagebox as tkmsg import os import time import sys import subprocess ############add APP info here############### APP_NAME = "marueditor" APP_NAME_TITLE = "Maruediter" APP_LUA_JP = [""] AP...
[ "tkinter.ttk.Label", "tkinter.PhotoImage", "os.mkdir", "tkinter.ttk.Entry", "tkinter.ttk.Radiobutton", "tkinter.Listbox", "os.path.exists", "os.path.dirname", "tkinter.ttk.Progressbar", "tkinter.messagebox.showerror", "tkinter.filedialog.askdirectory", "tkinter.ttk.Button", "tkinter.IntVar",...
[((664, 709), 'tkinter.Tk', 'tkinter.Tk', ([], {'className': "(APP_NAME + ' Installer')"}), "(className=APP_NAME + ' Installer')\n", (674, 709), False, 'import tkinter\n'), ((715, 731), 'tkinter.IntVar', 'tkinter.IntVar', ([], {}), '()\n', (729, 731), False, 'import tkinter\n'), ((735, 759), 'os.path.exists', 'os.path....
# Auto generated configuration file # using: # Revision: 1.381.2.28 # Source: /local/reps/CMSSW/CMSSW/Configuration/PyReleaseValidation/python/ConfigBuilder.py,v # with command line options: step4 --data --conditions auto:com10 --scenario pp -s ALCAHARVEST:SiStripGains --filein file:PromptCalibProdSiStripGains.root ...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.untracked.double", "FWCore.ParameterSet.Config.untracked.vstring", "Configuration.AlCa.GlobalTag.GlobalTag", "FWCore.ParameterSet.Config.untracked.string", "FWCore.ParameterSet.Config.untracked...
[((442, 464), 'FWCore.ParameterSet.VarParsing.VarParsing', 'VarParsing', (['"""analysis"""'], {}), "('analysis')\n", (452, 464), False, 'from FWCore.ParameterSet.VarParsing import VarParsing\n'), ((1162, 1188), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""ALCAHARVEST"""'], {}), "('ALCAHARVEST')\n", (1173,...
from eurostatapiclient.models.dimension import Category, BaseItem, ItemList, \ Dimension import unittest class TestCategory(unittest.TestCase): def test_properties(self): id = 'ID0' index = 4 label = 'label with text' category = Category(id, index, label) self.assert...
[ "eurostatapiclient.models.dimension.Category", "eurostatapiclient.models.dimension.Dimension", "eurostatapiclient.models.dimension.Dimension.create_from_json", "eurostatapiclient.models.dimension.BaseItem", "eurostatapiclient.models.dimension.ItemList" ]
[((273, 299), 'eurostatapiclient.models.dimension.Category', 'Category', (['id', 'index', 'label'], {}), '(id, index, label)\n', (281, 299), False, 'from eurostatapiclient.models.dimension import Category, BaseItem, ItemList, Dimension\n'), ((603, 629), 'eurostatapiclient.models.dimension.BaseItem', 'BaseItem', (['id',...
import os import json import requests from elasticsearch import Elasticsearch, RequestsHttpConnection, helpers, exceptions HOST = os.environ.get('ES_ENDPOINT') INDEX = os.environ.get('ES_INDEX') QUOTES_DUMP = os.environ.get('QUOTES_DUMP') headers = {"Content-Type": "application/json"} def main(): try: e...
[ "os.environ.get", "json.load" ]
[((131, 160), 'os.environ.get', 'os.environ.get', (['"""ES_ENDPOINT"""'], {}), "('ES_ENDPOINT')\n", (145, 160), False, 'import os\n'), ((169, 195), 'os.environ.get', 'os.environ.get', (['"""ES_INDEX"""'], {}), "('ES_INDEX')\n", (183, 195), False, 'import os\n'), ((210, 239), 'os.environ.get', 'os.environ.get', (['"""QU...
# Generated by Django 3.0.3 on 2020-03-17 02:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('LibreBadge', '0013_auto_20200317_0236'), ] operations = [ migrations.AlterField( model_name='badgetemplate', name='b...
[ "django.db.models.FileField" ]
[((345, 375), 'django.db.models.FileField', 'models.FileField', ([], {'upload_to': '""""""'}), "(upload_to='')\n", (361, 375), False, 'from django.db import migrations, models\n')]
#<NAME> import socket, threading, sys, time, os import tkinter as tk client_list = [] connections = {} check_buttons = {} window = tk.Tk() text_header = tk.StringVar() text_message_wid = tk.Text(window, height=5, width=40, font=("Calibri")) outer_frame = tk.Frame(window) cb_canvas = tk.Canvas(outer_frame,...
[ "tkinter.StringVar", "tkinter.Text", "threading.Thread", "tkinter.Canvas", "socket.socket", "tkinter.Entry", "tkinter.messagebox.showwarning", "tkinter.Scrollbar", "time.sleep", "socket.gethostname", "os._exit", "tkinter.BooleanVar", "tkinter.messagebox.askokcancel", "tkinter.Frame", "sy...
[((141, 148), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (146, 148), True, 'import tkinter as tk\n'), ((164, 178), 'tkinter.StringVar', 'tk.StringVar', ([], {}), '()\n', (176, 178), True, 'import tkinter as tk\n'), ((199, 250), 'tkinter.Text', 'tk.Text', (['window'], {'height': '(5)', 'width': '(40)', 'font': '"""Calibri...
# Copyright 2019 Intel Corporation # # 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 wri...
[ "binascii.hexlify" ]
[((852, 876), 'binascii.hexlify', 'binascii.hexlify', (['binary'], {}), '(binary)\n', (868, 876), False, 'import binascii\n')]
import os,copy from collections import OrderedDict from pypospack.task.lammps import LammpsSimulation class LammpsStructuralMinimization(LammpsSimulation): """ Class for LAMMPS structural minimization This data class defines additional attributes and methods necessary to interact with the Workflow manage...
[ "pypospack.task.lammps.LammpsSimulation.on_post", "pypospack.task.lammps.LammpsSimulation.__init__", "os.path.join", "collections.OrderedDict", "pypospack.task.lammps.LammpsSimulation.postprocess" ]
[((782, 972), 'pypospack.task.lammps.LammpsSimulation.__init__', 'LammpsSimulation.__init__', (['self'], {'task_name': 'task_name', 'task_directory': 'task_directory', 'task_type': '_task_type', 'structure_filename': 'structure_filename', 'restart': 'restart', 'fullauto': 'fullauto'}), '(self, task_name=task_name, task...
import json import requests def remove_repetidos(lista): l = [] for i in lista: if i not in l: l.append(i) l.sort() return l def busca_musicas(id_api): r = requests.get(id_api+'index.js') if r.status_code == 200: reddit_data = json.loads(r.content) musicas ...
[ "json.loads", "requests.get" ]
[((199, 232), 'requests.get', 'requests.get', (["(id_api + 'index.js')"], {}), "(id_api + 'index.js')\n", (211, 232), False, 'import requests\n'), ((282, 303), 'json.loads', 'json.loads', (['r.content'], {}), '(r.content)\n', (292, 303), False, 'import json\n'), ((412, 490), 'requests.get', 'requests.get', (["('https:/...
import logging from typing import Optional import requests import datetime from dataclasses import dataclass logger = logging.getLogger(__name__) @dataclass class Holiday: title: str date: str day_of_week: str day_of_week_text: str def fetch_public_holiday(token: str, target_date: datetime.date) ...
[ "requests.get", "datetime.date", "logging.getLogger" ]
[((121, 148), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (138, 148), False, 'import logging\n'), ((357, 495), 'requests.get', 'requests.get', ([], {'url': '"""https://api.kenall.jp/v1/holidays"""', 'headers': "{'Authorization': f'Token {token}'}", 'params': "{'year': target_date.year}...
from django import forms from .models import UserProfile class ProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ['name', 'photo'] widgets = { 'name': forms.TextInput(attrs={'class': 'form-control'}), 'photo': forms.FileInput(attrs={'class': 'for...
[ "django.forms.TextInput", "django.forms.FileInput" ]
[((213, 261), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form-control'}"}), "(attrs={'class': 'form-control'})\n", (228, 261), False, 'from django import forms\n'), ((284, 332), 'django.forms.FileInput', 'forms.FileInput', ([], {'attrs': "{'class': 'form-control'}"}), "(attrs={'class': 'for...
import operator s1="Marlin" s2="beard" print("The Concatenated string is :",end="") print(operator.concat(s1,s2)) #using contains() to check if s1 contains s2 if(operator.contains(s1, s2)): print("Marlin Contains Beard") else: print("Marlin Does not contains Beard")
[ "operator.concat", "operator.contains" ]
[((162, 187), 'operator.contains', 'operator.contains', (['s1', 's2'], {}), '(s1, s2)\n', (179, 187), False, 'import operator\n'), ((90, 113), 'operator.concat', 'operator.concat', (['s1', 's2'], {}), '(s1, s2)\n', (105, 113), False, 'import operator\n')]
from __future__ import print_function import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def runif_check(): fr = h2o.H2OFrame([[r] for r in range(1,1001)]) runif1 = fr[0].runif(1234) runif2 = fr[0].runif(1234) runif3 = fr[0].runif(42) assert (runif1 == runif2).all(), "Expected...
[ "tests.pyunit_utils.standalone_test", "sys.path.insert" ]
[((49, 77), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""../../"""'], {}), "(1, '../../')\n", (64, 77), False, 'import sys\n'), ((510, 551), 'tests.pyunit_utils.standalone_test', 'pyunit_utils.standalone_test', (['runif_check'], {}), '(runif_check)\n', (538, 551), False, 'from tests import pyunit_utils\n')]
import arcpy import pythonaddins class ExplosionButtonClass(object): """Implementation for ExplosionAddin_addin.explosionbutton (Button)""" def __init__(self): self.enabled = True self.checked = False def onClick(self): # Print message to confirm initialisation #pythonaddi...
[ "pythonaddins.GPToolDialog", "pythonaddins.MessageBox" ]
[((427, 486), 'pythonaddins.MessageBox', 'pythonaddins.MessageBox', (['"""I am working"""', '"""Are you working?"""'], {}), "('I am working', 'Are you working?')\n", (450, 486), False, 'import pythonaddins\n'), ((496, 638), 'pythonaddins.GPToolDialog', 'pythonaddins.GPToolDialog', (['"""E:/MSc/Advanced-Programming/GitH...
#!/usr/bin/env python # # Public Domain 2014-present MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a com...
[ "wtscenario.make_scenarios" ]
[((6094, 6256), 'wtscenario.make_scenarios', 'make_scenarios', (['write_10_values', 'type_10_values', 'write_20_values', 'type_20_values', 'write_30_values', 'type_30_values', 'evict_time_values', 'rollback_time_values'], {}), '(write_10_values, type_10_values, write_20_values,\n type_20_values, write_30_values, typ...
import os import click def SetVars(api_url, api_key): ''' Takes API key and URL, sets them to environment variables Parameters ---------- api_url : str The SimScale API URL to call. api_key : str The SimScale API Key to use when calling, this is equivilent to the user...
[ "click.argument", "click.command" ]
[((638, 672), 'click.command', 'click.command', (['"""set-api-variables"""'], {}), "('set-api-variables')\n", (651, 672), False, 'import click\n'), ((674, 709), 'click.argument', 'click.argument', (['"""api-url"""'], {'type': 'str'}), "('api-url', type=str)\n", (688, 709), False, 'import click\n'), ((721, 756), 'click....
import os from django import template from django.utils.safestring import mark_safe from repository.models import FileExt register = template.Library() generic = '<path fill-rule="evenodd" d="M4 0h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm0 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2...
[ "django.template.Library", "os.path.splitext", "django.utils.safestring.mark_safe" ]
[((136, 154), 'django.template.Library', 'template.Library', ([], {}), '()\n', (152, 154), False, 'from django import template\n'), ((422, 444), 'os.path.splitext', 'os.path.splitext', (['name'], {}), '(name)\n', (438, 444), False, 'import os\n'), ((792, 820), 'django.utils.safestring.mark_safe', 'mark_safe', (['ext.ty...
import numpy as np import re import pandas as pd def clean_str(string): """ Tokenization/string cleaning for all datasets except for SST. Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py """ string = re.sub(r"[^A-Za-z0-9(),!?\'\`]", " ", string) string = r...
[ "pandas.DataFrame", "pandas.read_csv", "numpy.array", "numpy.arange", "re.sub", "numpy.concatenate" ]
[((260, 306), 're.sub', 're.sub', (['"""[^A-Za-z0-9(),!?\\\\\'\\\\`]"""', '""" """', 'string'], {}), '("[^A-Za-z0-9(),!?\\\\\'\\\\`]", \' \', string)\n', (266, 306), False, 'import re\n'), ((319, 348), 're.sub', 're.sub', (['"""\\\\\'s"""', '""" \'s"""', 'string'], {}), '("\\\\\'s", " \'s", string)\n', (325, 348), Fals...
import sys class Memory: def __init__(self): self.memory = {} #single byte def get_address(self, address_str): if address_str in self.memory: return self.memory[addresss_str] else: print("memory not assigned, returning zero") return '0'*8 #s...
[ "sys.exit" ]
[((1278, 1289), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (1286, 1289), False, 'import sys\n'), ((1588, 1599), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (1596, 1599), False, 'import sys\n'), ((1889, 1900), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (1897, 1900), False, 'import sys\n'), ((2200, 2211), '...
""" Modified From https://github.com/OpenNMT/OpenNMT-tf/blob/r1/examples/library/minimal_transformer_training.py MIT License Copyright (c) 2017-present The OpenNMT Authors. This example demonstrates how to train a standard Transformer model using OpenNMT-tf as a library in about 200 lines of code. While relatively s...
[ "opennmt.encoders.SelfAttentionEncoder", "numpy.random.seed", "argparse.ArgumentParser", "tensorflow.get_collection", "tensorflow.ConfigProto", "tensorflow.global_variables", "tensorflow.train.latest_checkpoint", "examples.tensorflow.decoder.utils.common.DecodingArgumentNew", "tensorflow.tables_init...
[((1522, 1561), 'sys.path.append', 'sys.path.append', (["(dir_path + '/../../..')"], {}), "(dir_path + '/../../..')\n", (1537, 1561), False, 'import sys\n'), ((2406, 2601), 'opennmt.encoders.SelfAttentionEncoder', 'onmt.encoders.SelfAttentionEncoder', ([], {'num_layers': 'NUM_LAYERS', 'num_units': 'HIDDEN_UNITS', 'num_...
import numpy as np from Kuru import QuadratureRule, FunctionSpace , Mesh from Kuru.FiniteElements.LocalAssembly._KinematicMeasures_ import _KinematicMeasures_ from Kuru.VariationalPrinciple._GeometricStiffness_ import GeometricStiffnessIntegrand as GetGeomStiffness from .DisplacementApproachIndices import FillGeometric...
[ "numpy.sum", "numpy.true_divide", "numpy.zeros", "Kuru.FunctionSpace", "numpy.einsum", "Kuru.QuadratureRule", "numpy.arange", "numpy.dot", "numpy.ascontiguousarray" ]
[((6804, 6860), 'numpy.zeros', 'np.zeros', (['(nvar * SpatialGradient.shape[0], ndim * ndim)'], {}), '((nvar * SpatialGradient.shape[0], ndim * ndim))\n', (6812, 6860), True, 'import numpy as np\n'), ((6868, 6904), 'numpy.zeros', 'np.zeros', (['(ndim * ndim, ndim * ndim)'], {}), '((ndim * ndim, ndim * ndim))\n', (6876,...
"""Tests for the azure_lightning_flask application""" import unittest from mock import patch from azure.common import AzureMissingResourceHttpError from azure_lightning_flask.application import create_app from tests.test_config import TestConfig class TestApplication(unittest.TestCase): """Tests for the azure_lig...
[ "azure_lightning_flask.application.create_app", "mock.patch", "azure.common.AzureMissingResourceHttpError" ]
[((1109, 1171), 'mock.patch', 'patch', (['"""azure_lightning_flask.helpers.TableService.get_entity"""'], {}), "('azure_lightning_flask.helpers.TableService.get_entity')\n", (1114, 1171), False, 'from mock import patch\n'), ((1890, 1952), 'mock.patch', 'patch', (['"""azure_lightning_flask.helpers.TableService.get_entity...
from flask import Flask, request from flask_apscheduler import APScheduler import json import socket import datetime import mqManagementClass class Config(object): # 任务列表 JOBS = [ { 'id': 'heratbeat', 'func': '__main__:sendHeartbeat', #执行函数 'args': N...
[ "flask_apscheduler.APScheduler", "flask.Flask", "json.dumps", "socket.gethostname", "mqManagementClass.mqManagement", "datetime.datetime.now" ]
[((427, 442), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (432, 442), False, 'from flask import Flask, request\n'), ((566, 586), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (584, 586), False, 'import socket\n'), ((604, 627), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="weishaupt-wcm-com", version="0.0.10", author="<NAME>", author_email="<EMAIL>", description="Interfacing the Weishaupt WCM-COM module", long_description=long_description, long_descr...
[ "setuptools.find_packages" ]
[((467, 493), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (491, 493), False, 'import setuptools\n')]
# Generated by Django 2.2.9 on 2020-02-17 16:47 from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0001_squashed_0021'), ('wagtailcore', '0041_group_collection_permissions...
[ "django.db.models.TextField", "django.db.models.URLField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.IntegerField" ]
[((542, 627), 'django.db.models.TextField', 'models.TextField', ([], {'default': '""""""', 'help_text': '"""Description for the about IATI section"""'}), "(default='', help_text='Description for the about IATI section'\n )\n", (558, 627), False, 'from django.db import migrations, models\n'), ((799, 878), 'django.db....
from scrapy import signals from sqlalchemy import create_engine from sqlalchemy.engine.url import URL from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base from sqlalchemy_utils import database_exists, create_database from sqlalchemy.orm import object_mapper from .mapper import...
[ "sqlalchemy.orm.object_mapper", "sqlalchemy_utils.create_database", "sqlalchemy_utils.database_exists", "sqlalchemy.engine.url.URL", "sqlalchemy.ext.declarative.declarative_base", "sqlalchemy.orm.sessionmaker" ]
[((367, 385), 'sqlalchemy.ext.declarative.declarative_base', 'declarative_base', ([], {}), '()\n', (383, 385), False, 'from sqlalchemy.ext.declarative import declarative_base\n'), ((2033, 2060), 'sqlalchemy_utils.database_exists', 'database_exists', (['engine.url'], {}), '(engine.url)\n', (2048, 2060), False, 'from sql...
from geopy import Point from magicbox_distance import shapefile, distance right_angle_start = Point(1.0, 1.0) right_angle_middle = Point(1.1, 1.0) right_angle_end = Point(1.1, 1.1) right_angle_distance = distance.using_latitude_and_longitude(right_angle_start, right_angle_middle) + \ distance....
[ "magicbox_distance.shapefile.create_record", "magicbox_distance.distance.using_latitude_and_longitude", "geopy.Point" ]
[((96, 111), 'geopy.Point', 'Point', (['(1.0)', '(1.0)'], {}), '(1.0, 1.0)\n', (101, 111), False, 'from geopy import Point\n'), ((133, 148), 'geopy.Point', 'Point', (['(1.1)', '(1.0)'], {}), '(1.1, 1.0)\n', (138, 148), False, 'from geopy import Point\n'), ((167, 182), 'geopy.Point', 'Point', (['(1.1)', '(1.1)'], {}), '...
#!/usr/bin/env python3 from typing import List, Dict import lib from lib import StatTracker from lib.common import group, calc_stat import collections import matplotlib.pyplot as plt import os plots = collections.OrderedDict() plots["Full"] = "analyzer/baseline/validation/" plots["$+$"] = "analyzer/add/validation/" p...
[ "matplotlib.pyplot.legend", "os.path.dirname", "matplotlib.pyplot.figure", "lib.get_runs", "collections.OrderedDict", "matplotlib.pyplot.ylabel", "lib.common.group" ]
[((203, 228), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (226, 228), False, 'import collections\n'), ((2935, 2963), 'lib.get_runs', 'lib.get_runs', (["['addmul_rnn']"], {}), "(['addmul_rnn'])\n", (2947, 2963), False, 'import lib\n'), ((2983, 3023), 'lib.get_runs', 'lib.get_runs', (["['addmu...
from rest_framework import serializers from typing import Optional, TYPE_CHECKING from .models import Profile, Scratch from .github import GitHubUser from .middleware import Request def serialize_profile(request: Request, profile: Profile): if profile.user is None: return { "is_you": profile =...
[ "rest_framework.serializers.HyperlinkedRelatedField", "rest_framework.serializers.CharField" ]
[((1483, 1537), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'allow_blank': '(True)', 'required': '(True)'}), '(allow_blank=True, required=True)\n', (1504, 1537), False, 'from rest_framework import serializers\n'), ((1553, 1608), 'rest_framework.serializers.CharField', 'serializers.CharField',...
from rest_framework.routers import DefaultRouter from django.conf.urls import include, url from .views import UserViewSet app_name = 'apps.users' # # Here the comments and activity is added manually by including them under the detail view. # # urlpatterns = [ # # url( # regex=r'^$', # view=UserV...
[ "rest_framework.routers.DefaultRouter" ]
[((1234, 1249), 'rest_framework.routers.DefaultRouter', 'DefaultRouter', ([], {}), '()\n', (1247, 1249), False, 'from rest_framework.routers import DefaultRouter\n')]
from pathlib import Path import pytest import os from powrap import powrap FIXTURE_DIR = Path(__file__).resolve().parent @pytest.mark.parametrize("po_file", (FIXTURE_DIR / "bad" / "glossary.po",)) def test_fail_on_bad_wrapping(po_file, capsys): assert powrap.check_style([po_file]) == 1 assert str(po_file) ...
[ "pytest.mark.parametrize", "pytest.raises", "powrap.powrap.check_style", "pathlib.Path" ]
[((127, 201), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""po_file"""', "(FIXTURE_DIR / 'bad' / 'glossary.po',)"], {}), "('po_file', (FIXTURE_DIR / 'bad' / 'glossary.po',))\n", (150, 201), False, 'import pytest\n'), ((578, 663), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""po_file"""', "(F...
import exrex import logging import os import multiprocessing import numpy as np from scipy.stats import genlogistic from scipy.ndimage.filters import median_filter, uniform_filter1d from functools import partial from patteRNA.LBC import LBC from patteRNA import rnalib, filelib, timelib, misclib, viennalib from tqdm imp...
[ "os.remove", "numpy.sum", "multiprocessing.Lock", "numpy.isnan", "patteRNA.rnalib.compile_motif_constraints", "scipy.ndimage.filters.uniform_filter1d", "os.path.join", "patteRNA.viennalib.hc_fold", "scipy.stats.genlogistic.fit", "numpy.max", "patteRNA.LBC.LBC", "numpy.log10", "scipy.ndimage....
[((337, 359), 'multiprocessing.Lock', 'multiprocessing.Lock', ([], {}), '()\n', (357, 359), False, 'import multiprocessing\n'), ((369, 396), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (386, 396), False, 'import logging\n'), ((405, 420), 'patteRNA.timelib.Clock', 'timelib.Clock', ([], ...
import os from .base import GnuRecipe class FreeFontRecipe(GnuRecipe): def __init__(self, *args, **kwargs): super(FreeFontRecipe, self).__init__(*args, **kwargs) self.sha256 = '7c85baf1bf82a1a1845d1322112bc6ca' \ '982221b484e3b3925022e25b5cae89af' self.depends = ['fo...
[ "os.path.join" ]
[((1053, 1111), 'os.path.join', 'os.path.join', (['self.directory', "('freefont-%s' % self.version)"], {}), "(self.directory, 'freefont-%s' % self.version)\n", (1065, 1111), False, 'import os\n')]
import src.frontend.utility.utility as utility import src.model.universe as universe class rd_obj(): def __init__(self): self.name = '' self.declared = False def declaration_collision(self): pass class rd_list(list): def setup(self, obj_constructor): self.obj_constructor = obj_constructor return sel...
[ "src.model.universe.universe" ]
[((1651, 1670), 'src.model.universe.universe', 'universe.universe', ([], {}), '()\n', (1668, 1670), True, 'import src.model.universe as universe\n')]
# Import Third-Party from requests import Response class APIResponse(Response): def __init__(self, req_response, formatted_json=None): for k, v in req_response.__dict__.items(): self.__dict__[k] = v self._formatted = formatted_json @property def formatted(self): retur...
[ "bitex.Kraken" ]
[((492, 500), 'bitex.Kraken', 'Kraken', ([], {}), '()\n', (498, 500), False, 'from bitex import Kraken\n')]
# Copyright Contributors to the Testing Farm project. # SPDX-License-Identifier: Apache-2.0 import collections import urllib import re import six from concurrent.futures import ThreadPoolExecutor, wait import requests from jq import jq import koji import gluetool from gluetool import GlueError from gluetool.action...
[ "gluetool.action.Action.set_thread_root", "re.compile", "typing.cast", "jq.jq", "re.match", "typing_extensions.TypedDict", "gluetool.action.Action.current_action", "typing.NamedTuple", "gluetool.utils.from_yaml", "urllib.urlencode", "requests.get", "concurrent.futures.wait", "concurrent.futu...
[((726, 775), 'typing.NamedTuple', 'NamedTuple', (['"""TaskArches"""', "[('arches', List[str])]"], {}), "('TaskArches', [('arches', List[str])])\n", (736, 775), False, 'from typing import cast, Any, Dict, List, Optional, Tuple, Union, NamedTuple, Set\n'), ((948, 1039), 'typing.NamedTuple', 'NamedTuple', (['"""MBSAbout"...
#!/usr/bin/env python3 """ Convert Hershey data with hmp file to create DrawBot python module file """ from struct import pack import re from parse import parse vectors = {} vectors_count = {} vectors_used = {} def hershey_load(glyph_file_name): """ Load Hershey glyphs """ global vectors, vectors_co...
[ "parse.parse", "struct.pack" ]
[((1497, 1525), 'parse.parse', 'parse', (['"""{:d} {:d}"""', 'raw_line'], {}), "('{:d} {:d}', raw_line)\n", (1502, 1525), False, 'from parse import parse\n'), ((3879, 3905), 'struct.pack', 'pack', (['"""H"""', 'offsets[offset]'], {}), "('H', offsets[offset])\n", (3883, 3905), False, 'from struct import pack\n')]
#!/usr/bin/env python """ This is a Python script that prints an FLP """ import OpenFL.Printer as P if __name__ == '__main__': parser = argparse.ArgumentParser(description="Print a .flp") parser.add_argument('input', metavar='input', type=str, help='source flp file') args = parser....
[ "OpenFL.Printer.Printer" ]
[((342, 353), 'OpenFL.Printer.Printer', 'P.Printer', ([], {}), '()\n', (351, 353), True, 'import OpenFL.Printer as P\n')]
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
[ "argparse.Namespace", "aiida.orm.User.objects.get", "aiida.orm.BandsData", "aiida.orm.Group", "aiida.orm.nodes.data.array.bands.get_bands_and_parents_structure", "aiida.orm.User", "pytest.mark.parametrize", "pytest.mark.usefixtures" ]
[((1757, 1856), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""all_users, expected"""', '((True, [True, True]), (False, [True, False]))'], {}), "('all_users, expected', ((True, [True, True]), (\n False, [True, False])))\n", (1780, 1856), False, 'import pytest\n'), ((1857, 1910), 'pytest.mark.usefixtures...
from django.contrib.auth.models import User from django.db import models from PIL import Image class Profile(models.Model): contact_no = models.CharField(max_length=20) address = models.CharField(max_length=200) image = models.ImageField(help_text='425x425px recommmended', upload_to='profile_pics') ti...
[ "django.db.models.OneToOneField", "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "PIL.Image.open", "django.db.models.ImageField", "django.db.models.IntegerField" ]
[((143, 174), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(20)'}), '(max_length=20)\n', (159, 174), False, 'from django.db import models\n'), ((189, 221), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)'}), '(max_length=200)\n', (205, 221), False, 'from django.db ...
#!/usr/bin/python3 ########################################################################## # Tables used: # - OCI_USAGE - Raw data of the usage reports # - OCI_USAGE_STATS - Summary Stats of the Usage Report for quick query if only filtered by tenant and date # - OCI_USAGE_TAG_KEYS - Tag keys of the usage reports # ...
[ "os.mkdir", "os.remove", "argparse.ArgumentParser", "pandas.read_csv", "oci.config.get_config_value_or_default", "requests.post", "json.loads", "os.path.exists", "requests.get", "oci.auth.signers.InstancePrincipalsSecurityTokenSigner", "argparse.FileType", "oci.config.from_file", "csv.DictRe...
[((1080, 1111), 'os.path.exists', 'os.path.exists', (['work_report_dir'], {}), '(work_report_dir)\n', (1094, 1111), False, 'import os\n'), ((1117, 1142), 'os.mkdir', 'os.mkdir', (['work_report_dir'], {}), '(work_report_dir)\n', (1125, 1142), False, 'import os\n'), ((5794, 5819), 'argparse.ArgumentParser', 'argparse.Arg...
""" SUSOD dev config. currently not very useful """ import os APPLICATION_ROOT = '/' SECRET_KEY = b'tobegenerated' SESSION_COOKIE_NAME = 'login_name' # Directory for file uploads # currently not used UPLOAD_FOLDER = os.path.join( os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'var', 'uploads', ) ...
[ "os.path.realpath" ]
[((267, 293), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (283, 293), False, 'import os\n')]
import pytest #from project0 import project0 from project0 import main def test_fetchincidents(): url = "https://www.normanok.gov/sites/default/files/documents/2021-03/2021-03-03_daily_incident_summary.pdf" data = main.fetchincidents(url) assert type(data) == bytes def test_extractincidents(): url = ...
[ "project0.main.extractincidents", "project0.main.fetchincidents", "project0.main.createdb" ]
[((223, 247), 'project0.main.fetchincidents', 'main.fetchincidents', (['url'], {}), '(url)\n', (242, 247), False, 'from project0 import main\n'), ((434, 458), 'project0.main.fetchincidents', 'main.fetchincidents', (['url'], {}), '(url)\n', (453, 458), False, 'from project0 import main\n'), ((478, 505), 'project0.main.e...
from rest_framework import serializers from users.models import User, Permission, Role class RoleRelatedField(serializers.RelatedField): def to_representation(self, instance): return RoleSerializer(instance).data def to_internal_value(self, data): return self.queryset.get(pk=data) class U...
[ "users.models.Role.objects.all" ]
[((413, 431), 'users.models.Role.objects.all', 'Role.objects.all', ([], {}), '()\n', (429, 431), False, 'from users.models import User, Permission, Role\n')]
#!/usr/bin/env python """Configuration loader for benchy benchmark harness. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import os def _load(): """Initializes and returns a singleton config dic...
[ "json.load", "os.path.join", "os.path.dirname", "os.path.realpath", "os.path.expanduser" ]
[((497, 524), 'os.path.dirname', 'os.path.dirname', (['benchy_dir'], {}), '(benchy_dir)\n', (512, 524), False, 'import os\n'), ((540, 566), 'os.path.dirname', 'os.path.dirname', (['tools_dir'], {}), '(tools_dir)\n', (555, 566), False, 'import os\n'), ((584, 609), 'os.path.dirname', 'os.path.dirname', (['base_dir'], {})...
import json def read_json_file(filename): f = open(filename, 'r') data = json.load(f) f.close() return data def find_nth(haystack, needle, n): start = haystack.find(needle) while start >= 0 and n > 1: start = haystack.find(needle, start + len(needle)) n -= 1 return start ...
[ "json.load" ]
[((83, 95), 'json.load', 'json.load', (['f'], {}), '(f)\n', (92, 95), False, 'import json\n')]
import unittest import numpy as np from numpy.testing import assert_array_equal,\ assert_array_almost_equal, assert_almost_equal from .image_generation import binary_circle_border from ..spim import Spim, SpimStage from ..process_opencv import ContourFinderSimple, FeatureFormFilter class FeatureFil...
[ "numpy.random.randint", "numpy.array", "numpy.unique" ]
[((802, 834), 'numpy.random.randint', 'np.random.randint', ([], {'low': '(0)', 'high': '(3)'}), '(low=0, high=3)\n', (819, 834), True, 'import numpy as np\n'), ((1149, 1167), 'numpy.array', 'np.array', (['[0, 255]'], {}), '([0, 255])\n', (1157, 1167), True, 'import numpy as np\n'), ((1128, 1146), 'numpy.unique', 'np.un...
#!/usr/bin/env python3 import os import yaml rootDir = 'apis' for dirName, subdirList, fileList in os.walk(rootDir): if 'env.yaml' in fileList: print(f"Found env.yaml in {dirName}") with open(os.path.join(dirName, 'env.yaml'), 'r') as stream: try: env_yaml = yaml.s...
[ "yaml.safe_load", "os.walk", "os.path.join", "os.system" ]
[((101, 117), 'os.walk', 'os.walk', (['rootDir'], {}), '(rootDir)\n', (108, 117), False, 'import os\n'), ((814, 910), 'os.system', 'os.system', (['f"""cd {dirName} && echo Y | pipenv --python {env_yaml[\'python\'][\'version\']}"""'], {}), '(\n f"cd {dirName} && echo Y | pipenv --python {env_yaml[\'python\'][\'versio...
# -*-coding:utf-8 -*- u""" :创建时间: 2021/12/5 1:40 :作者: 苍之幻灵 :我的主页: https://cpcgskill.com :QQ: 2921251087 :爱发电: https://afdian.net/@Phantom_of_the_Cang :aboutcg: https://www.aboutcg.org/teacher/54335 :bilibili: https://space.bilibili.com/351598127 """ from __future__ import unicode_literals, print_function import imp i...
[ "imp.reload", "regex_match_dialog.exec_" ]
[((332, 348), 'imp.reload', 'imp.reload', (['init'], {}), '(init)\n', (342, 348), False, 'import imp\n'), ((382, 408), 'regex_match_dialog.exec_', 'regex_match_dialog.exec_', ([], {}), '()\n', (406, 408), False, 'import regex_match_dialog\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-10 22:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('prodavnica', '0006_slika'), ] operations = [ migrations.RemoveField( ...
[ "django.db.migrations.RemoveField", "django.db.models.FileField" ]
[((290, 349), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""slika"""', 'name': '"""lokacija"""'}), "(model_name='slika', name='lokacija')\n", (312, 349), False, 'from django.db import migrations, models\n'), ((491, 577), 'django.db.models.FileField', 'models.FileField', ([], {'bl...
import numpy as np import modeling.collision_model as cm import visualization.panda.world as wd if __name__ == '__main__': base = wd.World(cam_pos=np.array([.7, .05, .3]), lookat_pos=np.zeros(3)) # object object_ref = cm.CollisionModel(initor="./objects/bunnysim.stl", cdp...
[ "numpy.array", "numpy.zeros", "modeling.collision_model.CollisionModel" ]
[((231, 331), 'modeling.collision_model.CollisionModel', 'cm.CollisionModel', ([], {'initor': '"""./objects/bunnysim.stl"""', 'cdprimit_type': '"""box"""', 'cdmesh_type': '"""triangles"""'}), "(initor='./objects/bunnysim.stl', cdprimit_type='box',\n cdmesh_type='triangles')\n", (248, 331), True, 'import modeling.col...
import FWCore.ParameterSet.Config as cms hltESPChi2MeasurementEstimator100 = cms.ESProducer("Chi2MeasurementEstimatorESProducer", ComponentName = cms.string('hltESPChi2MeasurementEstimator100'), MaxChi2 = cms.double(40.0), MaxDisplacement = cms.double(0.5), MaxSagitta = cms.double(2.0), MinPtForHit...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.double" ]
[((151, 198), 'FWCore.ParameterSet.Config.string', 'cms.string', (['"""hltESPChi2MeasurementEstimator100"""'], {}), "('hltESPChi2MeasurementEstimator100')\n", (161, 198), True, 'import FWCore.ParameterSet.Config as cms\n'), ((214, 230), 'FWCore.ParameterSet.Config.double', 'cms.double', (['(40.0)'], {}), '(40.0)\n', (2...
import unittest import zserio from testutils import getZserioApi class StructTemplateInTemplateTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.api = getZserioApi(__file__, "templates.zs").struct_template_in_template def testReadWrite(self): structTemplateInTemplate = self.a...
[ "zserio.BitStreamReader", "testutils.getZserioApi", "zserio.BitStreamWriter" ]
[((512, 536), 'zserio.BitStreamWriter', 'zserio.BitStreamWriter', ([], {}), '()\n', (534, 536), False, 'import zserio\n'), ((601, 662), 'zserio.BitStreamReader', 'zserio.BitStreamReader', (['writer.byte_array', 'writer.bitposition'], {}), '(writer.byte_array, writer.bitposition)\n', (623, 662), False, 'import zserio\n'...
# Original Source: # https://github.com/tensorflow/tpu/blob/master/models/official/efficientnet/autoaugment.py # # Copyright 2019 The TensorFlow 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 ...
[ "imax.color_transforms.invert", "imax.color_transforms.cutout", "imax.color_transforms.sharpness", "imax.transforms.shear", "jax.lax.cond", "jax.random.uniform", "imax.color_transforms.contrast", "jax.numpy.matmul", "jax.random.randint", "imax.transforms.flip", "imax.color_transforms.color", "...
[((4138, 4192), 'jax.lax.cond', 'jax.lax.cond', (['negate', '(lambda l: -l)', '(lambda l: l)', 'level'], {}), '(negate, lambda l: -l, lambda l: l, level)\n', (4150, 4192), False, 'import jax\n'), ((4381, 4435), 'jax.lax.cond', 'jax.lax.cond', (['negate', '(lambda l: -l)', '(lambda l: l)', 'level'], {}), '(negate, lambd...
from __future__ import division from resippy.image_objects.earth_overhead.geotiff.geotiff_image_factory import GeotiffImageFactory from resippy.photogrammetry.dem.geotiff_dem import GeotiffDem from resippy.photogrammetry.dem.constant_elevation_dem import ConstantElevationDem class DemFactory: @staticmethod d...
[ "resippy.photogrammetry.dem.geotiff_dem.GeotiffDem", "resippy.image_objects.earth_overhead.geotiff.geotiff_image_factory.GeotiffImageFactory.from_file", "resippy.photogrammetry.dem.constant_elevation_dem.ConstantElevationDem" ]
[((593, 629), 'resippy.image_objects.earth_overhead.geotiff.geotiff_image_factory.GeotiffImageFactory.from_file', 'GeotiffImageFactory.from_file', (['fname'], {}), '(fname)\n', (622, 629), False, 'from resippy.image_objects.earth_overhead.geotiff.geotiff_image_factory import GeotiffImageFactory\n'), ((650, 662), 'resip...
import asyncio import time ################################################################################ async def main(): reader, writer = await asyncio.open_connection( '127.0.0.1', 8888 ) while not reader.at_eof(): data = await reader.readline() print('[{}] Received: {}'.format...
[ "asyncio.open_connection", "time.strftime" ]
[((153, 195), 'asyncio.open_connection', 'asyncio.open_connection', (['"""127.0.0.1"""', '(8888)'], {}), "('127.0.0.1', 8888)\n", (176, 195), False, 'import asyncio\n'), ((321, 340), 'time.strftime', 'time.strftime', (['"""%X"""'], {}), "('%X')\n", (334, 340), False, 'import time\n')]
#!/usr/bin/env python3 import numpy as np import csv import json import sys import argparse import multiprocessing as mp import glob import os from functools import partial from sofa_print import * import subprocess from time import sleep, time def sofa_record(command, logdir, cfg): p_tcpdump = None p_mpstat...
[ "subprocess.Popen", "os.system", "time.time", "subprocess.call", "sys.exc_info" ]
[((950, 990), 'subprocess.call', 'subprocess.call', (["['mkdir', '-p', logdir]"], {}), "(['mkdir', '-p', logdir])\n", (965, 990), False, 'import subprocess\n'), ((1011, 1096), 'subprocess.call', 'subprocess.call', (["('rm %s/perf.data > /dev/null 2> /dev/null' % logdir)"], {'shell': '(True)'}), "('rm %s/perf.data > /de...
#!/usr/bin/env python # Copyright 2019 Extreme Networks, 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 applica...
[ "argparse.ArgumentParser", "st2common.config.parse_args", "st2common.transport.publishers.PoolPublisher", "kombu.Exchange", "eventlet.sleep" ]
[((919, 951), 'kombu.Exchange', 'Exchange', (['exchange'], {'type': '"""topic"""'}), "(exchange, type='topic')\n", (927, 951), False, 'from kombu import Exchange\n'), ((968, 983), 'st2common.transport.publishers.PoolPublisher', 'PoolPublisher', ([], {}), '()\n', (981, 983), False, 'from st2common.transport.publishers i...
# Copyright 2014 PerfKitBenchmarker 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 appli...
[ "unittest.main", "perfkitbenchmarker.beam_pipeline_options.GenerateAllPipelineOptions", "perfkitbenchmarker.beam_pipeline_options.EvaluateDynamicPipelineOptions" ]
[((3148, 3163), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3161, 3163), False, 'import unittest\n'), ((828, 896), 'perfkitbenchmarker.beam_pipeline_options.GenerateAllPipelineOptions', 'beam_pipeline_options.GenerateAllPipelineOptions', (['None', 'None', '[]', '[]'], {}), '(None, None, [], [])\n', (876, 896),...
# Copyright 2013-2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'LICENSE.txt' file ...
[ "pcluster.cli.commands.configure.easyconfig.configure" ]
[((1470, 1485), 'pcluster.cli.commands.configure.easyconfig.configure', 'configure', (['args'], {}), '(args)\n', (1479, 1485), False, 'from pcluster.cli.commands.configure.easyconfig import configure\n')]
import pandas as pd import numpy as np test_submission_guardians_may_24 = pd.read_csv('data/processed/test_submission_guardians_may_24.csv') two_sub_combined_submission_may_23 = pd.read_csv('data/processed/two_sub_combined_submission_may_23.csv') two_sub_combined_submission_may_23_y_pred_may_24 = two_sub_combined_...
[ "pandas.read_csv" ]
[((77, 143), 'pandas.read_csv', 'pd.read_csv', (['"""data/processed/test_submission_guardians_may_24.csv"""'], {}), "('data/processed/test_submission_guardians_may_24.csv')\n", (88, 143), True, 'import pandas as pd\n'), ((181, 249), 'pandas.read_csv', 'pd.read_csv', (['"""data/processed/two_sub_combined_submission_may_...
import silbot from silbot.helper import InlineKBMarkup, inlineKBRow, inlineKBData """ This is an example of how to use new methods added with silbot 1.1 This is a simple bot that will check if a user is in a channel or is admin of that channel """ token = "<KEY>" # Put bot token here channelid = -1001086416281 # Cha...
[ "silbot.botapi.BotApi", "silbot.GetUpdatesLoop", "silbot.helper.inlineKBData" ]
[((384, 419), 'silbot.botapi.BotApi', 'silbot.botapi.BotApi', (['token', '"""HTML"""'], {}), "(token, 'HTML')\n", (404, 419), False, 'import silbot\n'), ((1849, 1884), 'silbot.GetUpdatesLoop', 'silbot.GetUpdatesLoop', (['bot', 'updateH'], {}), '(bot, updateH)\n', (1870, 1884), False, 'import silbot\n'), ((853, 888), 's...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('orchestra', '0001_initial'), ] operations = [ migrations.AddField( model_name='task', ...
[ "django.db.models.ForeignKey", "django.db.models.TextField", "django.db.models.ManyToManyField" ]
[((364, 442), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'models.CASCADE', 'default': '(0)', 'to': '"""orchestra.Project"""'}), "(on_delete=models.CASCADE, default=0, to='orchestra.Project')\n", (381, 442), False, 'from django.db import models, migrations\n'), ((623, 651), 'django.db.models....
# -*- coding: utf-8 -*- # # Copyright 2013-2014 Mirantis, 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...
[ "os.path.join", "mock.patch", "mock.Mock" ]
[((10573, 10608), 'mock.patch', 'patch', (['"""fuelclient.client.requests"""'], {}), "('fuelclient.client.requests')\n", (10578, 10608), False, 'from mock import patch\n'), ((10614, 10652), 'mock.patch', 'patch', (['"""fuelclient.client.auth_client"""'], {}), "('fuelclient.client.auth_client')\n", (10619, 10652), False...
from __future__ import print_function from __future__ import division from . import _C import numpy as np import fuzzytools.files as ftfiles import fuzzytools.strings as ftstrings from fuzzytools.datascience.cms import ConfusionMatrix from fuzzytools.matplotlib.cm_plots import plot_custom_confusion_matrix import matpl...
[ "matplotlib.pyplot.show", "fuzzytools.latex.latex_tables.LatexTable", "fuzzytools.files.gather_files_by_kfold", "IPython.display.display", "lcfeatures.results.utils.get_fmodel_name", "fuzzytools.matplotlib.utils.save_fig", "fuzzytools.strings.latex_bf_alphabet_count" ]
[((1200, 1255), 'lcfeatures.results.utils.get_fmodel_name', 'utils.get_fmodel_name', (['model_name'], {'returns_mn_dict': '(True)'}), '(model_name, returns_mn_dict=True)\n', (1221, 1255), True, 'import lcfeatures.results.utils as utils\n'), ((1443, 1577), 'fuzzytools.files.gather_files_by_kfold', 'ftfiles.gather_files_...
from django.shortcuts import render # Create your views here. from django.shortcuts import render from .forms import fill_me_form def fill_view2(request): if request.method == 'POST': print('watashi ga kitta 2 ') form = fill_me_form(request.POST) if form.is_valid(): data = fo...
[ "django.shortcuts.render" ]
[((436, 481), 'django.shortcuts.render', 'render', (['request', '"""Page2.html"""', "{'form': form}"], {}), "(request, 'Page2.html', {'form': form})\n", (442, 481), False, 'from django.shortcuts import render\n')]
#coding: utf8 import matplotlib.pyplot as plt import math import numpy as np xList = range(100) y1 = [x*x for x in xList] y2 = [math.sin(x) for x in xList] y3 = [math.sqrt(x) for x in xList] def draw(): # plt.plot(y1, 'b-', label='y=x*x') plt.plot(y2, label='y=sin(x)') plt.plot(y3, 'r*', label='y=sqrt(...
[ "matplotlib.pyplot.show", "math.sqrt", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.yticks", "math.sin", "matplotlib.pyplot.ticklabel_format", "matplotlib.pyplot.grid" ]
[((130, 141), 'math.sin', 'math.sin', (['x'], {}), '(x)\n', (138, 141), False, 'import math\n'), ((164, 176), 'math.sqrt', 'math.sqrt', (['x'], {}), '(x)\n', (173, 176), False, 'import math\n'), ((252, 282), 'matplotlib.pyplot.plot', 'plt.plot', (['y2'], {'label': '"""y=sin(x)"""'}), "(y2, label='y=sin(x)')\n", (260, 2...
# Generated by Django 3.0.2 on 2020-01-16 15:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alacode', '0001_initial'), ] operations = [ migrations.AddField( model_name='code', name='q12', field=mo...
[ "django.db.models.CharField", "django.db.models.IntegerField", "django.db.models.BooleanField" ]
[((318, 405), 'django.db.models.CharField', 'models.CharField', ([], {'default': '(0)', 'help_text': '"""Notes"""', 'max_length': '(500)', 'verbose_name': '"""q12"""'}), "(default=0, help_text='Notes', max_length=500, verbose_name\n ='q12')\n", (334, 405), False, 'from django.db import migrations, models\n'), ((552,...
#!/usr/bin/python3 # -*- coding: utf-8 -*- from wikiapi import WikiApi import requests, pprint # This is suitable for extracting content that is organized by categories and sub-categories # This code requires the wiki-api python library created by <NAME> of UK # https://github.com/richardasaurus/wiki-api # Note that ...
[ "pprint.pprint", "wikiapi.WikiApi", "requests.get" ]
[((432, 441), 'wikiapi.WikiApi', 'WikiApi', ([], {}), '()\n', (439, 441), False, 'from wikiapi import WikiApi\n'), ((449, 474), 'wikiapi.WikiApi', 'WikiApi', (["{'locale': 'ta'}"], {}), "({'locale': 'ta'})\n", (456, 474), False, 'from wikiapi import WikiApi\n'), ((2510, 2527), 'requests.get', 'requests.get', (['url'], ...
import datetime from google.auth import credentials import json class WorkloadIdentityCredentials(credentials.Scoped, credentials.Credentials): def __init__(self, scopes): super(WorkloadIdentityCredentials, self).__init__() self._scopes = scopes def with_scopes(self, scopes): return W...
[ "datetime.datetime.utcnow", "datetime.timedelta", "json.loads" ]
[((849, 874), 'json.loads', 'json.loads', (['response.data'], {}), '(response.data)\n', (859, 874), False, 'import json\n'), ((1028, 1054), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (1052, 1054), False, 'import datetime\n'), ((1066, 1121), 'datetime.timedelta', 'datetime.timedelta', ([],...
# Generated by Django 3.2.5 on 2021-08-18 05:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboard', '0028_alter_participantrepayment_payment_1'), ] operations = [ migrations.AddField( model_name='participantrepayment...
[ "django.db.models.CharField" ]
[((373, 473), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(100)', 'null': '(True)', 'verbose_name': '"""Nominal Pembayaran Ke 1"""'}), "(blank=True, max_length=100, null=True, verbose_name=\n 'Nominal Pembayaran Ke 1')\n", (389, 473), False, 'from django.db import migrat...
# -------------------------------------------------------- # DenseFusion 6D Object Pose Estimation by Iterative Dense Fusion # Licensed under The MIT License [see LICENSE for details] # Written by Chen # -------------------------------------------------------- import argparse import os import random import time import...
[ "argparse.ArgumentParser", "pathlib.Path", "numpy.mean", "os.path.join", "numpy.round", "random.randint", "torch.utils.data.DataLoader", "matplotlib.pyplot.close", "torch.load", "os.path.exists", "DenseFusion.lib.network.PoseNet", "random.seed", "matplotlib.pyplot.cla", "DenseFusion.datase...
[((1184, 1209), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1207, 1209), False, 'import argparse\n'), ((2502, 2526), 'random.randint', 'random.randint', (['(1)', '(10000)'], {}), '(1, 10000)\n', (2516, 2526), False, 'import random\n'), ((2532, 2565), 'torch.cuda.set_device', 'torch.cuda.set...
import csv import os import re from operator import itemgetter from typing import Tuple from urllib import parse import json from itertools import groupby from markdown.extensions.toc import slugify from iir import xml_to_filt def extract_from_repo(path1: str, path2: str, content_type: str): ''' extracts b...
[ "json.dump", "os.path.abspath", "csv.writer", "os.getcwd", "markdown.extensions.toc.slugify", "urllib.parse.quote", "iir.xml_to_filt", "glob.glob", "operator.itemgetter", "os.chdir", "re.compile" ]
[((2219, 2272), 'glob.glob', 'glob.glob', (['f"""{path1}{path2}/**/*.xml"""'], {'recursive': '(True)'}), "(f'{path1}{path2}/**/*.xml', recursive=True)\n", (2228, 2272), False, 'import glob\n'), ((4467, 4520), 're.compile', 're.compile', (['"""(.*) \\\\((\\\\d{4})\\\\)(?: *\\\\(.*\\\\))? (.*)"""'], {}), "('(.*) \\\\((\\...
import os from contextlib import contextmanager from math import ceil import pytest import requests import requests_mock from apisports import _client_class from apisports._client import ClientMeta, ClientInitError from apisports.data import SingleData, NoneData, SimpleData, PagedData from helpers import assert_respo...
[ "requests_mock.Adapter", "math.ceil", "requests.Session", "requests_mock.mock", "helpers.assert_response_ok", "apisports._client_class", "os.path.dirname", "pytest.raises" ]
[((1505, 1523), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1521, 1523), False, 'import requests\n'), ((1630, 1653), 'requests_mock.Adapter', 'requests_mock.Adapter', ([], {}), '()\n', (1651, 1653), False, 'import requests_mock\n'), ((3026, 3054), 'helpers.assert_response_ok', 'assert_response_ok', (['re...
# # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project. # from data_wrangling_components.engine.verbs.groupby import groupby from data_wrangling_components.engine.verbs.ungroup import ungroup from data_wrangling_components.types import Step, Verb fro...
[ "tests.engine.test_store.get_test_store", "data_wrangling_components.types.Step", "data_wrangling_components.engine.verbs.ungroup.ungroup", "data_wrangling_components.engine.verbs.groupby.groupby" ]
[((406, 475), 'data_wrangling_components.types.Step', 'Step', (['Verb.Groupby', '"""table10"""', '"""output"""'], {'args': "{'columns': ['x', 'y']}"}), "(Verb.Groupby, 'table10', 'output', args={'columns': ['x', 'y']})\n", (410, 475), False, 'from data_wrangling_components.types import Step, Verb\n'), ((535, 551), 'tes...
#!/usr/bin/env python import sys import os.path import logging import optparse if os.name == "posix": stream = sys.stderr else: #when running from py2exe, if anything is printed to stderr #then the app shows an annoying dialog when closed stream = sys.stdout logging.basicConfig( level=logging.DEBU...
[ "sys.exit", "gs.get_default_command_line_parser", "logging.basicConfig", "gs.groundstation.Groundstation" ]
[((277, 420), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG', 'format': '"""[%(name)-20s][%(levelname)-7s] %(message)s (%(filename)s:%(lineno)d)"""', 'stream': 'stream'}), "(level=logging.DEBUG, format=\n '[%(name)-20s][%(levelname)-7s] %(message)s (%(filename)s:%(lineno)d)',\n strea...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Class that serves as the WoT entrypoint. """ import json import logging import warnings import six import tornado.concurrent import tornado.gen import tornado.ioloop from rx import Observable from six.moves import range from tornado.httpclient import AsyncHTTPClient,...
[ "wotpy.wot.consumed.thing.ConsumedThing", "rx.Observable.merge", "json.loads", "tornado.httpclient.HTTPRequest", "wotpy.wot.exposed.thing.ExposedThing", "wotpy.wot.thing.Thing", "wotpy.support.is_dnssd_supported", "wotpy.utils.utils.handle_observer_finalization", "rx.Observable.create", "rx.Observ...
[((1079, 1106), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1096, 1106), False, 'import logging\n'), ((2375, 2400), 'rx.Observable.of', 'Observable.of', (['*found_tds'], {}), '(*found_tds)\n', (2388, 2400), False, 'from rx import Observable\n'), ((5336, 5364), 'rx.Observable.create', ...
# Copyright © 2021 Ingram Micro Inc. All rights reserved. from django.db import migrations def create_users(apps, schema_editor): User = apps.get_model('app', 'User') to_create = [] for username in ('Mal', 'Zoe', 'Wash', 'Inara', 'Jayne', 'Kaylee', 'Simon', 'River'): to_create.append(User(userna...
[ "django.db.migrations.RunPython" ]
[((1072, 1133), 'django.db.migrations.RunPython', 'migrations.RunPython', (['create_users', 'migrations.RunPython.noop'], {}), '(create_users, migrations.RunPython.noop)\n', (1092, 1133), False, 'from django.db import migrations\n'), ((1143, 1207), 'django.db.migrations.RunPython', 'migrations.RunPython', (['create_pro...
import os import unittest from azure.cognitiveservices.vision.customvision.training import CustomVisionTrainingClient from azure.cognitiveservices.vision.customvision.training.models import Project, ImageUrlCreateEntry from autotrainer.blob.blob_client import LabelledBlob from autotrainer.custom_vision.custo...
[ "autotrainer.custom_vision.domain.to_domain_id", "azure.cognitiveservices.vision.customvision.training.CustomVisionTrainingClient", "autotrainer.blob.blob_client.LabelledBlob", "autotrainer.custom_vision.custom_vision_client.CustomVisionClient" ]
[((600, 642), 'azure.cognitiveservices.vision.customvision.training.CustomVisionTrainingClient', 'CustomVisionTrainingClient', (['CVTK', 'endpoint'], {}), '(CVTK, endpoint)\n', (626, 642), False, 'from azure.cognitiveservices.vision.customvision.training import CustomVisionTrainingClient\n'), ((992, 1027), 'autotrainer...
import numpy as np import pandas as pd from ncls import NCLS def _number_overlapping(scdf, ocdf, **kwargs): keep_nonoverlapping = kwargs.get("keep_nonoverlapping", True) column_name = kwargs.get("overlap_col", True) if scdf.empty: return None if ocdf.empty: if keep_nonoverlapping: ...
[ "pandas.DataFrame", "numpy.nan_to_num", "ncls.NCLS", "numpy.setdiff1d", "pandas.Series", "pandas.concat" ]
[((471, 530), 'ncls.NCLS', 'NCLS', (['ocdf.Start.values', 'ocdf.End.values', 'ocdf.index.values'], {}), '(ocdf.Start.values, ocdf.End.values, ocdf.index.values)\n', (475, 530), False, 'from ncls import NCLS\n'), ((724, 748), 'pandas.Series', 'pd.Series', (['_self_indexes'], {}), '(_self_indexes)\n', (733, 748), True, '...
from django import forms from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, ButtonHolder, Submit, HTML from fabric_bolt.web_hooks import models class HookCreateForm(forms.ModelForm): button_prefix = "Create" project = forms.CharF...
[ "crispy_forms.layout.HTML", "django.core.urlresolvers.reverse", "crispy_forms.helper.FormHelper", "django.forms.HiddenInput", "crispy_forms.layout.Submit" ]
[((549, 561), 'crispy_forms.helper.FormHelper', 'FormHelper', ([], {}), '()\n', (559, 561), False, 'from crispy_forms.helper import FormHelper\n'), ((1199, 1211), 'crispy_forms.helper.FormHelper', 'FormHelper', ([], {}), '()\n', (1209, 1211), False, 'from crispy_forms.helper import FormHelper\n'), ((1272, 1321), 'djang...
# -*- coding: utf-8 -*- """ Created on Wed Mar 13 16:51:06 2019 @author: chaoz """ import xml.etree.ElementTree as ET import cv2 import os import numpy as np only1=0 kdanfkn=0 total_sc=0 image_dir='C:\\Users\\chaoz\\Desktop\\testset' sname='RGB.png' dname='D.png' xmlname='xml' RGB_dirlist=[] depth_dirlist=[] xml_dir...
[ "xml.etree.ElementTree.parse", "cv2.imwrite", "os.path.exists", "cv2.imread", "os.path.split", "os.path.join", "os.listdir" ]
[((340, 361), 'os.listdir', 'os.listdir', (['image_dir'], {}), '(image_dir)\n', (350, 361), False, 'import os\n'), ((543, 582), 'os.path.join', 'os.path.join', (['image_dir', 'RGB_dirlist[i]'], {}), '(image_dir, RGB_dirlist[i])\n', (555, 582), False, 'import os\n'), ((676, 699), 'os.path.exists', 'os.path.exists', (['x...
# Copyright 2018-2021 Xanadu Quantum Technologies 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 applicabl...
[ "jax.jacobian", "torch.autograd.functional.jacobian", "pennylane.jacobian", "tensorflow.GradientTape" ]
[((1152, 1189), 'pennylane.jacobian', 'qml.jacobian', (['classical_preprocessing'], {}), '(classical_preprocessing)\n', (1164, 1189), True, 'import pennylane as qml\n'), ((1516, 1553), 'jax.jacobian', 'jax.jacobian', (['classical_preprocessing'], {}), '(classical_preprocessing)\n', (1528, 1553), False, 'import jax\n'),...
import os import sys import platform import numpy import threading import ctypes import string import random import requests import json from colorama import Fore VALID = 0 INVALID = 0 BOOST_LENGTH = 24 CLASSIC_LENGTH = 16 CODESET = [] BASEURL = "https://discord.gift/" CODESET[:0] = string.ascii_letters + string...
[ "threading.Thread", "os.system", "ctypes.windll.kernel32.SetConsoleTitleW", "requests.get", "numpy.random.choice" ]
[((330, 422), 'ctypes.windll.kernel32.SetConsoleTitleW', 'ctypes.windll.kernel32.SetConsoleTitleW', (['f"""NoirGen and Checker | Valid: 0 | Invalid: 0"""'], {}), "(\n f'NoirGen and Checker | Valid: 0 | Invalid: 0')\n", (369, 422), False, 'import ctypes\n'), ((418, 434), 'os.system', 'os.system', (['"""cls"""'], {}),...
#!/usr/bin/env python # coding: utf-8 # In[28]: import xml.etree.cElementTree as ET from collections import defaultdict import re import pprint OSMFILE = (r"C:\Users\Marcus\Documents\School Documents\Python Environments\Unit_4\sample1percent.osm") street_type_re = re.compile(r'\b\S+\.?$', re.IGNORECASE) postcodes_re ...
[ "collections.defaultdict", "xml.etree.cElementTree.iterparse", "re.search", "re.compile" ]
[((267, 308), 're.compile', 're.compile', (['"""\\\\b\\\\S+\\\\.?$"""', 're.IGNORECASE'], {}), "('\\\\b\\\\S+\\\\.?$', re.IGNORECASE)\n", (277, 308), False, 'import re\n'), ((322, 351), 're.compile', 're.compile', (['"""^\\\\D*(\\\\d{5}).*"""'], {}), "('^\\\\D*(\\\\d{5}).*')\n", (332, 351), False, 'import re\n'), ((363...
import numpy as np class RidgeRegression: def __init__(self, bias=True, weight_l2=1e-3, scale=True): self.bias = bias self.weight_l2 = weight_l2 self.weights = None self.scale = scale def _scale(self, X): return (X - self._min) / (self._max - self._mi...
[ "numpy.eye", "numpy.ones", "numpy.zeros", "numpy.exp" ]
[((1402, 1422), 'numpy.zeros', 'np.zeros', (['n_features'], {}), '(n_features)\n', (1410, 1422), True, 'import numpy as np\n'), ((1195, 1205), 'numpy.exp', 'np.exp', (['(-x)'], {}), '(-x)\n', (1201, 1205), True, 'import numpy as np\n'), ((541, 565), 'numpy.ones', 'np.ones', (['(X.shape[0], 1)'], {}), '((X.shape[0], 1))...
# Generated by Django 3.0.5 on 2021-01-13 10:21 from django.db import migrations, models import django.utils.timezone import uuid class Migration(migrations.Migration): dependencies = [ ('app', '0001_initial'), ] operations = [ migrations.CreateModel( name='JobApplicants', ...
[ "django.db.models.DateTimeField", "django.db.models.UUIDField", "django.db.models.TextField", "django.db.models.EmailField" ]
[((364, 435), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'default': 'uuid.uuid4', 'primary_key': '(True)', 'serialize': '(False)'}), '(default=uuid.uuid4, primary_key=True, serialize=False)\n', (380, 435), False, 'from django.db import migrations, models\n'), ((463, 518), 'django.db.models.DateTimeField', ...
# -*- coding: utf-8 -*- import numpy as np from tensorflow.keras.utils import Sequence from core.dataset import augment from core.image import read_image, preprocess_image from core.utils import decode_annotation, decode_name class Dataset(Sequence): def __init__(self, cfg, verbose=0): self.verbose = v...
[ "core.dataset.augment.bbox_filter", "numpy.argmax", "core.dataset.augment.random_distort", "numpy.arange", "core.image.preprocess_image", "core.utils.decode_annotation", "core.dataset.augment.random_rotate", "core.dataset.augment.random_flip_lr", "numpy.random.choice", "numpy.random.shuffle", "c...
[((6246, 6276), 'core.utils.decode_cfg', 'decode_cfg', (['"""cfgs/custom.yaml"""'], {}), "('cfgs/custom.yaml')\n", (6256, 6276), False, 'from core.utils import decode_cfg, load_weights\n'), ((913, 956), 'core.utils.decode_annotation', 'decode_annotation', ([], {'anno_path': 'self.anno_path'}), '(anno_path=self.anno_pat...
from setuptools import setup from scrapy_sticky_meta_params import __version__ with open("README.md") as f: readme = f.read() setup( name="scrapy-sticky-meta-params", version=__version__, license="MIT license", description="A spider middleware that forwards meta params through subsequent requests...
[ "setuptools.setup" ]
[((133, 1121), 'setuptools.setup', 'setup', ([], {'name': '"""scrapy-sticky-meta-params"""', 'version': '__version__', 'license': '"""MIT license"""', 'description': '"""A spider middleware that forwards meta params through subsequent requests."""', 'long_description': 'readme', 'long_description_content_type': '"""tex...
#!/usr/bin/env python # Simple model of receptors diffusing in and out of synapses. # Simulation of the Dynamcis with the Euler method. # This simulates the effect of a sudden change in the pool size # # <NAME>, January-April 2017 import numpy as np from matplotlib import pyplot as plt # parameters N = 3 ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.zeros", "matplotlib.pyplot.axis", "matplotlib.pyplot.cycler", "numpy.transpose", "matplotlib.pyplot.figure", "matplotlib.pyplot.rc", "matplotlib.pyplot.gca", "matplotlib.pyplot.yla...
[((837, 848), 'numpy.zeros', 'np.zeros', (['N'], {}), '(N)\n', (845, 848), True, 'import numpy as np\n'), ((1294, 1309), 'numpy.zeros', 'np.zeros', (['steps'], {}), '(steps)\n', (1302, 1309), True, 'import numpy as np\n'), ((1334, 1349), 'numpy.zeros', 'np.zeros', (['steps'], {}), '(steps)\n', (1342, 1349), True, 'impo...
import subprocess import os import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d import proj3d import scipy from scipy.sparse.linalg import lsqr import time from matplotlib.offsetbox import OffsetImage, AnnotationBbox from matplotlib.widgets import Slider,...
[ "numpy.random.seed", "numpy.sum", "numpy.argmax", "numpy.floor", "numpy.ones", "matplotlib.pyplot.figure", "numpy.sin", "numpy.arange", "numpy.round", "numpy.zeros_like", "numpy.random.randn", "numpy.max", "numpy.linspace", "matplotlib.pyplot.show", "matplotlib.pyplot.get_cmap", "numpy...
[((26405, 26422), 'numpy.random.seed', 'np.random.seed', (['(2)'], {}), '(2)\n', (26419, 26422), True, 'import numpy as np\n'), ((26443, 26463), 'numpy.zeros', 'np.zeros', (['(N * 2, 2)'], {}), '((N * 2, 2))\n', (26451, 26463), True, 'import numpy as np\n'), ((26537, 26546), 'numpy.cos', 'np.cos', (['t'], {}), '(t)\n',...
# Import modified 'os' module with LC_LANG set so click doesn't complain from .os_utils import os # noqa: F401 from collections import defaultdict import click DELIMITER = "X" FASTA_PREFIX = "aligned_sequences" CELL_BARCODE = 'CB' UMI = 'UB' BAM_FILENAME = 'possorted_genome_bam.bam' BARCODES_TSV = 'barcodes.tsv' ...
[ "click.argument", "click.echo", "click.option", "click.command", "collections.defaultdict" ]
[((5977, 5992), 'click.command', 'click.command', ([], {}), '()\n', (5990, 5992), False, 'import click\n'), ((5994, 6023), 'click.argument', 'click.argument', (['"""tenx_folder"""'], {}), "('tenx_folder')\n", (6008, 6023), False, 'import click\n'), ((6025, 6294), 'click.option', 'click.option', (['"""--all-cells-in-one...
""" Fix Django's 'write-through' (cache and datastore storage) session backend to work with Appengine's datastore, along with whatever cache backend is in settings. Basically a reworking of django.contrib.sessions.backends.db, so have a look there for definitive docs. """ from google.appengine.ext import ndb from app...
[ "google.appengine.ext.ndb.transaction", "django.utils.encoding.force_unicode", "django.contrib.sessions.backends.base.CreateError", "datetime.datetime.utcnow", "datetime.timedelta", "google.appengine.ext.ndb.Key" ]
[((1718, 1735), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (1733, 1735), False, 'from datetime import datetime, timedelta\n'), ((2216, 2233), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (2231, 2233), False, 'from datetime import datetime, timedelta\n'), ((2236, 2261), 'datetim...