code
stringlengths
1
199k
"""Run sequence-level classification (and regression) fine-tuning.""" import functools import math import os from typing import Any, Callable, Dict, Mapping, Tuple from absl import logging from flax import jax_utils from flax import optim from flax.metrics import tensorboard from flax.training import checkpoints from f...
import abc import copy import datetime import mock from oslo_config import fixture as fixture_config from oslotest import mockpatch import six from stevedore import extension from ceilometer.agent import plugin_base from ceilometer import pipeline from ceilometer import publisher from ceilometer.publisher import test a...
from typing import Dict, List import numpy as np from multiworld.core.image_env import normalize_image from rlkit.data_management.obs_dict_replay_buffer import flatten_dict from rlkit.data_management.online_vae_replay_buffer import OnlineVaeRelabelingBuffer from weakly_supervised_control.envs.disentangled_env import Di...
import cv2 import numpy as np import heapq import histogram_util class TileBrickDetector(object): """ Class capable of recognizing tile bricks on a board. """ def __init__(self): self.brick_detection_minimum_median_delta = 20.0 self.brick_detection_minimum_probability = 0.15 self...
import os, sys pwd = sys.path[0] # 当前路径 if len(sys.argv)<2: print '请传入安装路径 格式:./setup.py 安装路径' exit(0) setup_path = sys.argv[1] if setup_path[-1] == '/': setup_path = setup_path[:-1] coordinator = ''' coordinator=true node-scheduler.include-coordinator=false discovery-server.enabled=true ''' worker = ''' c...
from src.base.solution import Solution from src.tests.part2.q096_test_uniq_bst import UniqueBstTestCases class UniqBst(Solution): def run_test(self, input): return self.numTrees(input) def gen_test_cases(self): return UniqueBstTestCases() def numTrees(self, n): """ :type n: i...
"""Google Cloud Logging functionalities.""" from typing import Optional from typing import TYPE_CHECKING, List, Dict, Any from libcloudforensics.providers.gcp.internal import common if TYPE_CHECKING: import googleapiclient class GoogleCloudLog: """Class representing a Google Cloud Logs interface. Attributes: ...
""" KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1Disk(object): """ NOT...
import os import shutil import tempfile import ConfigParser import epumgmt.api class TestEpumgmtAPI: def setup(self): class FakeOpts: name = None self.opts = FakeOpts() self.opts.name = "testname" self.epu_home = tempfile.mkdtemp() conf_dir = os.path.join(self.epu...
""" testTextIndex.py Author: Tony Papenfuss Date: Thu May 29 11:44:36 EST 2008 """ import os, sys from fasta import FastaFile filename = 'tumour_sample.fa' f = FastaFile(filename, indexed=True, clobber=False, method='db') x = f[9000:9100]
import csv from io import StringIO import os import datetime from collections import OrderedDict import hashlib from unittest import skipIf, mock from bs4 import BeautifulSoup from django.conf import settings from django.test import TestCase from django.contrib.auth.models import User, Group, Permission from django.con...
''' @package ion.services.dm.utility.granule.record_dictionary @file ion/services/dm/utility/granule/record_dictionary.py @author Tim Giguere @author Luke Campbell <LCampbell@ASAScience.com> @brief https://confluence.oceanobservatories.org/display/CIDev/Record+Dictionary ''' from pyon.container.cc import Container from...
import ntplib import cPickle as pickle from threading import Lock from mi.core.driver_scheduler import DriverSchedulerConfigKey, TriggerType from mi.core.exceptions import InstrumentProtocolException, InstrumentParameterException from mi.core.instrument.data_particle import DataParticle, DataParticleKey from mi.core.in...
from __future__ import print_function import os import requests OAUTH_TOKEN = os.environ['GITHUB_SOT_OAUTH'] HEADER = {'Authorization': 'token {}'.format(OAUTH_TOKEN)} GITHUB_API = 'https://api.github.com' STANDARD_LABELS = dict([(u'bug', u'fc2929'), (u'duplicate', u'cccccc'), ...
from __future__ import print_function import re import os from setuptools import setup, find_packages os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) def _required_to_setup(required): install_requires, dependency_links = [], [] for package in required: m = re.match("(.*):/...
from django.http import HttpResponse from django.shortcuts import render_to_response def about_us(request): return render_to_response('about-us.html', )
__version_info__ = ("0", "4", "9", "15") __version__ = ".".join(__version_info__)
from __future__ import print_function from orphics import maps,io,cosmology,lensing,stats from enlib import enmap,lensing as enlensing,bench import numpy as np import os,sys from szar import counts from scipy.linalg import pinv2 arc = 30.0 px = 1.0 dimensionless = False mean_sub = False theory_file_root = "../alhazen/d...
class NameAttrEnforcer(type): def __init__(cls, name, bases, attrs): if 'NAME' not in attrs: raise ValueError("Interface class: '{}' doesn't have NAME attribute.".format(name)) type.__init__(cls, name, bases, attrs) class BaseInterface: """Subclass must defined NAME class variable"""...
from __future__ import (absolute_import, print_function, division) import sqlite3 from flask import g from werkzeug.local import LocalProxy def get_db_conn(): db_conn = getattr(g, 'db_conn', None) if db_conn is None: g.db_conn = db_conn = sqlite3.connect('data/example.db', ...
def get_page(url): try: if url == "http://www.udacity.com/cs101x/index.html": return ('<html> <body> This is a test page for learning to crawl! ' '<p> It is a good idea to ' '<a href="http://www.udacity.com/cs101x/crawling.html">learn to ' 'crawl</a> before yo...
import os import setuptools import shotfirst readme = os.path.join(os.path.dirname(__file__), "README.rst") install_requires = [ "pyinotify", # To monitor directories "pdfrw", # For PDF "Pillow", # For EXIF metadata "enzyme", # For Videos ] setuptools.setup( name="shotfirst", version=shotfir...
from django.conf.urls import patterns, url from .views import ContactFormAjaxView urlpatterns = patterns('', url(r'^$', ContactFormAjaxView.as_view(), name='ajax_form'), )
""" """ import sys import os import roslib import rospkg rospack = rospkg.RosPack() packname='' packname=rospack.get_path('robotvqa_visualizer') sys.path.append(os.path.join(packname,'../models')) sys.path.append(os.path.join(packname,'../tools')) import visualize from visualize import get_ax import pickle import glob ...
from inviwopy.properties import Property class Animation: """ Example: import inviwopy from inviwopy import qt import ivw.animation app = inviwopy.app network = app.network with ivw.animation.Animation(network.VolumeRaycaster.raycaster.samplingRate,1,10,0.5) as ani: for i,v in an...
from flask import Flask from friendbot.models import db as fb_db, Friend, Phrase from saved_posts.models import db as sp_db, User, Post """ This file makes it easy to access SQLAlchemy without running the app """ app = Flask(__name__) app.app_context().push() friends = '/home/protected/friends.db' saved = '/home/protec...
__author__ = 'Chris Barrett' __email__ = 'chris.d.barrett@me.com' __version__ = 0.1
"""Leetcode 295. Find Median from Data Stream Hard URL: https://leetcode.com/problems/find-median-from-data-stream/ Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. For example, [2,3,4], the median is 3 [...
import bvxm_batch import os bvxm_batch.register_processes(); bvxm_batch.register_datatypes(); class dbvalue: def __init__(self, index, type): self.id = index self.type = type print("------------------------------------------") print("Creating Voxel World"); bvxm_batch.init_process("bvxmGenSyntheticWorldProces...
""" Common functions for hashing files """ import hashlib def sha256_hash(path): """ Returns a SHA-256 hash of either the contents of the path, or the data passed in if file-like. """ sha256 = hashlib.sha256() if hasattr(path, 'read'): file_object = path else: file_object = open(path, 'rb') while True: buf...
import jinja2 import os import json from pive.visualization import defaults as default from pive.visualization import basevisualization as bv from pive.visualization import viewportvisualization as vv class Chart(bv.BaseVisualization, vv.ViewportVisualization): def __init__(self, dataset, ...
"""Construct a circular flake of twisted bilayer graphene (arbitrary angle)""" import numpy as np import matplotlib.pyplot as plt import math import pybinding as pb from scipy.spatial import cKDTree from pybinding.repository import graphene c0 = 0.335 # [nm] graphene interlayer spacing def two_graphene_monolayers(): ...
def rangesize(min_, max_): def inner_dec(func): def passCheck(n): if min_!=None and min_ > n: return False if max_!=None and max_ < n: return False return True def inner_func(read_bits): if not passCheck(read_bits): raise ValueError("yo...
"""Dynamic Imaging of Coherent Sources (DICS).""" import numpy as np from ..channels import equalize_channels from ..io.pick import pick_info, pick_channels from ..utils import (logger, verbose, warn, _check_one_ch_type, _check_channels_spatial_filter, _check_rank, _check_optio...
import sklearn.naive_bayes from autosklearn.pipeline.components.classification.gaussian_nb import \ GaussianNB from .test_base import BaseClassificationComponentTest class GaussianNBComponentTest(BaseClassificationComponentTest): __test__ = True res = dict() res["default_iris"] = 0.95999999999999996 ...
import os import shutil import errno import tempfile import mimetypes import zipfile from uuid import uuid4 from foresite import utils, Aggregation, AggregatedResource, RdfLibSerializer from rdflib import Namespace, URIRef import bagit from mezzanine.conf import settings from hs_core.models import Bags, ResourceFile cl...
import os, subprocess, sys subprocess.call(['python', 'virtualenv.py', 'flask']) if sys.platform == 'win32': bin = 'Scripts' else: bin = 'bin' subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask<0.10']) subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-login']) subprocess.c...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("pollingstations", "0007_dataqualityreport")] operations = [ migrations.RemoveField(model_name="dataqualityreport", name="council"), migrations.DeleteModel(name="DataQ...
import datetime from flask import ( render_template, url_for, Response, stream_with_context, redirect, flash, abort, request, current_app ) from flask_security import current_user from purchasing.database import db from sqlalchemy import text from flask_security.decorators import roles_accepted from purchasing....
from __future__ import unicode_literals from django.db import models, migrations import mezzanine.core.fields import mezzanine.utils.models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ('events', '0004_auto_20160510_1148'), ] operations = [ migra...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("djangocms_blog", "0014_auto_20160215_1331"), ] operations = [ migrations.AlterField( model_name="post", name="date_published", field=models.DateTimeField(bla...
from cspace import CSpace from .. import robotsim from ..model import collide from ..model import trajectory from ..math import vectorops,so3,se3 import math import random class RigidObjectCSpace(CSpace): """A basic free-flying rigid object cspace that allows collision free motion. The C-space is 6D, with param...
from openstack.api import base class Usage(base.Resource): def __repr__(self): return "<ComputeUsage>" class UsageManager(base.ManagerWithFind): resource_class = Usage def list(self, start, end): return self._list("/extras/usage?start=%s&end=%s" % (start.isoformat(), end.isoformat()), "usage...
import sys import os import shlex import mock MOCK_MODULES = ['numpy', 'matplotlib', 'matplotlib.pyplot', 'matplotlib.colors', 'matplotlib.markers'] for mod_name in MOCK_MODULES: sys.modules[mod_name] = mock.Mock() extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'numpydoc' ] templates_path =...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['Seasonal_Hour'] , ['SVR'] );
""" Available Queries ----------------- Queries are used for actual searching - things like relevancy scores, Levenstein distance, and partial matches. View the `elasticsearch documentation <query_docs>`_ to see what other options are available, and put 'em here if you end up using any of 'em. .. _`query_docs`: https:/...
""" Merge any overlapping regions of bed files. Bed files can be provided on the command line or on stdin. Merged regions are always reported on the '+' strand, and any fields beyond chrom/start/stop are lost. usage: %prog bed files ... """ import psyco_full import sys from bx.bitset import * from bx.bitset_builders im...
import bs4 import copy import re import time import webcolors import urllib.parse import common.util.urlFuncs as urlFuncs from . import HtmlProcessor import markdown class RoyalRoadLSeriesPageProcessor(HtmlProcessor.HtmlPageProcessor): wanted_mimetypes = ['text/html'] want_priority = 60 loggerPath = "Main.Text.RR...
""" * We have to drop the primary key indexes that django creates and create a different one with specific settings--see formdata/sql/<model>.sql for details. """ from django.db import models from django.utils.text import slugify from djorm_hstore.fields import DictionaryField from djorm_hstore.models import HStoreMana...
""" Script to collect and combine bracketed exposure photos. Requires: luminance-hdr, libimage-exiftool-perl packages """ import sys, subprocess file_args = sys.argv[1:] photos = sorted(file_args) num_photos = len(photos) brackets = [-4,-3,-2,-1,0,1,2,3,4] num_brackets = len(brackets) mid_exposure = 5 sets = int(num_ph...
from waffle import flag_is_active, sample_is_active, switch_is_active from waffle.views import _generate_waffle_js try: import jinja2 @jinja2.contextfunction def flag_helper(context, flag_name): return flag_is_active(context['request'], flag_name) @jinja2.contextfunction def inline_wafflejs_...
#! /usr/bin/env python from gamelib import main main.main()
""" flask.logging ~~~~~~~~~~~~~ Implements the logging support for Flask. :copyright: (c) 2016 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sys from werkzeug.local import LocalProxy from logging import getLogger, StreamHandler, For...
""" Serializers and ModelSerializers are similar to Forms and ModelForms. Unlike forms, they are not constrained to dealing with HTML output, and form encoded input. Serialization in REST framework is a two-phase process: 1. Serializers marshal between complex types like model instances, and python primitives. 2. The p...
""" compat ====== Cross-compatible functions for Python 2 and 3. Key items to import for 2/3 compatible code: * iterators: range(), map(), zip(), filter(), reduce() * lists: lrange(), lmap(), lzip(), lfilter() * unicode: u() [no unicode builtin in Python 3] * longs: long (int in Python 3) * callable * iterable method c...
from djangosaber.util import key import six import logging logging.basicConfig(level=logging.debug) class OrmMixin(object): _memory = None def objects(self): return self def all(self): return self def first(self): return self[0] @property def pk(self): return self...
import copy import datetime from django.utils import six from django.db.backends.schema import BaseDatabaseSchemaEditor from django.db.utils import DatabaseError class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_column = "ALTER TABLE %(table)s ADD %(column)s %(definition)s" sql_alter_column_type ...
""" Repr test ========= Test repr and the sphinx_gallery_dummy_images config. """ class A: def _repr_html_(self): return '<p><b>This should print<b></p>' A()
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 0, transform = "Logit", sigma = 0.0, exog_count = 20, ar_order = 12);
from __future__ import unicode_literals from django.apps import AppConfig class CumulusCIConfig(AppConfig): name = "metaci.cumulusci"
__author__ = 'mdavid' from mock import * from unittest import TestCase from wnsresolver import * class TestInit(TestCase): def test_all_args(self): wns_resolver = WalletNameResolver( resolv_conf='resolv.conf', dnssec_root_key='root_key', nc_host = '127.0.0.1', ...
import sys import getopt from PIL import Image class Usage(Exception): def __init__(self, msg): self.msg = msg def main(argv=None): if argv is None: argv = sys.argv filename = sys.argv[1] size_string = sys.argv[2] norm_z = int(sys.argv[3]) width, height = map(lambda x: int(x), si...
from jinja2 import FileSystemLoader from latex.jinja2 import make_env from latex import build_pdf env = make_env(loader=FileSystemLoader('.')) tpl = env.get_template('ex2.latex') for name in ['Alice', 'Bob', 'Carol']: filename = 'hello-{}.pdf'.format(name.lower()) pdf = build_pdf(tpl.render(name=name)) pdf....
"""Supplies test data for the tcc status window To do: - fix so order of data is preserved by specifying the data as a tuple of tuples and turning it into an ordered dict for each dispatched message - convert all axis widgets to use this or at least fix them to use AxisCmdState instead of TCCStatus as necessary...
import datetime from corehq.apps.accounting import tasks from corehq.apps.accounting.models import DomainUserHistory from corehq.apps.accounting.tests import generator from corehq.apps.accounting.tests.test_invoicing import BaseInvoiceTestCase from corehq.apps.domain.tests.test_utils import delete_all_domains class Tes...
''' Copyright (c) 2010, Alexandru Dancu All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follo...
from .roberta import * # noqa: F401, F403
""" Layering text over a heatmap ---------------------------- An example of a layered chart of text over a heatmap using the cars dataset. """ import altair as alt from altair.expr import datum from vega_datasets import data cars = data.cars.url heatmap = alt.Chart(cars).mark_rect().encode( alt.X('Cylinders:O', sca...
from __future__ import unicode_literals import sys import json import time import hashlib import logging import traceback from copy import deepcopy from functools import wraps from threading import local, RLock from collections import defaultdict import cherrypy from ws4py.websocket import WebSocket from ws4py.server.c...
import pylink import pytest from testutils import model, attenuator_1db, amplifier_10db class TestReceiver(object): def test_rx_noise_temp_k(self, model): e = model.enum m = model m.override(e.rx_system_noise_temp_k, 100) m.override(e.rx_antenna_noise_temp_k, 100) # verifies ...
import os.path, timeit from django.conf import settings def main(): print("Running benchmarks for django templates...") template_root = os.path.join(os.path.dirname(__file__), "templates") settings.configure( TEMPLATE_DIRS = (template_root,), TEMPLATE_LOADERS = ( ("django.templat...
''' Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Solve it without division and in O(n). For example, given [1,2,3,4], return [24,12,8,6]. ''' class Solution(object): def productExceptSelf(self, nums): ...
from django.test import TestCase from rest_framework import status from eszone_ipf.settings import BASE_DIR, API_VERSION_PREFIX class ConfigFileTestCase(TestCase): url = '/{}/api_ipf/config/'.format(API_VERSION_PREFIX) url_act = ''.join([url, 'activate/']) def test_ipf_form_post(self): title = 'test...
from typing import List import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor from torch.nn.modules.batchnorm import BatchNorm2d from torch.nn.modules.instancenorm import InstanceNorm2d from torchvision.ops import Conv2dNormActivation from ..._internally_replaced_utils import load_...
from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.auth.models import User from django.contrib.auth import logout, login, authenticate from django.core.excep...
from django_comments.forms import CommentForm from temba_client.utils import format_iso8601 from django.urls import reverse from casepro.msg_board.models import MessageBoardComment from casepro.test import BaseCasesTest class CommentCRUDLTest(BaseCasesTest): def setUp(self): super(CommentCRUDLTest, self).se...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup APP = ['src/racm.py'] DATA_FILES = [] OPTIONS = {'argv_emulation': True, 'site_packages': True, 'iconfile': 'resources/icons/racm.icns'} setup( app=APP, name='RACM', ...
from __future__ import unicode_literals import copy from django.conf import settings from django.contrib import admin from django.contrib.contenttypes.models import ContentType from django.core import management from django.core.exceptions import FieldError from django.db import models, DEFAULT_DB_ALIAS from django.db....
from arrowhead import Flow, step, arrow, main def ask(prompt): answer = None while answer not in ('yes', 'no'): answer = input(prompt + ' ') return answer class XKCD518(Flow): """ https://xkcd.com/518/ """ @step(initial=True, level=1) @arrow('do_you_understand_flowcharts') de...
from __future__ import absolute_import from rest_framework.response import Response import operator import six from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import (Release, ReleaseCommit, Commit, CommitFileChange, Event, Group) from sentry.api.seri...
import sys from scripts.migrate_to_whatsapp_templates.base import BaseMigration class ServiceInfo(BaseMigration): TEMPLATE_NAME = "mc_important_info" def get_template_variables(self, message): return [message["text_content"]] if __name__ == "__main__": ServiceInfo().run(sys.stdin, sys.stdout)
from distutils.core import setup, Extension from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages=['roslz4'], package_dir={'': 'src'}, requires=[], ) setup(**d)
def extractTwig(item): """ # 'Twig' """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None return False
from django import template from django.db.models.loading import cache from django.db.models import Model as DjangoModel from django.utils.safestring import SafeUnicode from classytags.core import Options from classytags.arguments import (Argument, MultiValueArgument, MultiKeywordArgument) from classytags.helpers impor...
import os def write(destination, name, content): library_mapping_file = os.path.abspath(os.path.join(destination, name)) with open(library_mapping_file, "wb") as f: f.write(content.encode())
"""Model objects for requests and responses. Each API may support one or more serializations, such as JSON, Atom, etc. The model classes are responsible for converting between the wire format and the Python object representation. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import logging import urllib from ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='FlatContent', fields=[ ('id', models.Auto...
""" GPoFM: Gaussian Process Training with Optimized Feature Maps for Shift-Invariant Kernels Github: https://github.com/MaxInGaussian/GPoFM Author: Max W. Y. Lam [maxingaussian@gmail.com] """ import numpy as np import matplotlib.pyplot as plt from matplotlib import offsetbox from scipy.interpolate import griddat...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('album', '0008_auto_20170217_1254'), ] operations = [ migrations.RemoveField( model_name='album', name='photographers', ),...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "BoxCox", sigma = 0.0, exog_count = 0, ar_order = 12);
from couchdbkit import Document class _(Document): pass
import platform import warnings import fnmatch import itertools import pytest import sys from fractions import Fraction import numpy.core.umath as ncu from numpy.core import _umath_tests as ncu_tests import numpy as np from numpy.testing import ( assert_, assert_equal, assert_raises, assert_raises_regex, assert...
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_messages', '0002_auto_20160607_0852'), ] operations = [ migrations.AlterField( model_name='message', ...
import shutil import tempfile from numpy import array, allclose, corrcoef from lambdaimage.rdds.timeseries import TimeSeries from test_utils import PySparkTestCase from nose.tools import assert_equals class TimeSeriesTestCase(PySparkTestCase): def setUp(self): super(TimeSeriesTestCase, self).setUp() ...
""" Main script for multi_base quepy. """ import quepy multi_dbs = quepy.install("multi_base") question = 'which movie is sequel of a movie about Giant Monster starring' \ ' Akira Takarada' target, query, metadata = multi_dbs.get_query(question) print query
""" ============ django-slack ============ ------------------------------------- Seamless Slack integration for Django ------------------------------------- This project provides easy-to-use integration between `Django <http://www.djangoproject.com/>`_ projects and the `Slack <https://www.slack.com>`_ group chat and IM...
import unittest from webkitpy.common.host_mock import MockHost from webkitpy.layout_tests.models import test_expectations from webkitpy.layout_tests.models import test_failures from webkitpy.layout_tests.models import test_results from webkitpy.layout_tests.models import test_run_results def get_result(test_name, resul...
from elasticapm import get_client from elasticapm.base import Client from elasticapm.middleware import ElasticAPM def filter_factory(app, global_conf, **kwargs): client = get_client() or Client(**kwargs) return ElasticAPM(app, client)
from __future__ import print_function, absolute_import, unicode_literals __all__ = ["corner", "hist2d", "error_ellipse"] __version__ = "0.0.6" __author__ = "Dan Foreman-Mackey (danfm@nyu.edu)" __copyright__ = "Copyright 2013 Daniel Foreman-Mackey" __contributors__ = [ # Alphabetical by first name. "Adrian Price...
import sys class GitProject: RepoTokens = type('Tokens', (object,), { 'prefix': '?', 'major': -1, 'minor': -1, 'extension': '?', 'commits': -1, 'hashcode': '?', 'branch': '?', 'state': '?' }) ReleaseBranch = None ReleaseTagged = None Modifications = None class ModTracker: name = None ...