gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | |
# -*- coding: utf-8 -*-
""" Utilities
@requires: U{B{I{gluon}} <http://web2py.com>}
@copyright: (c) 2010-2012 Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Softwa... | |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | |
import copy
import csv
from itertools import groupby
import functools
import math
from django.conf import settings
from django.core.cache import cache
from django.db.models import Count, Max
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render, get_object_or_404
from ... | |
"""
Copyright 2012 Pontiflex, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | |
import random
from puzzlepy import coord
from puzzlepy.coord import Coord
from puzzlepy.cell import Cell
from puzzlepy.partition import Partition
class Grid:
def __init__(self, m, n):
self._m = m
self._n = n
self._cells = []
self._partitions = {}
self._allowed_values = ... | |
from __future__ import absolute_import
import re
import math
import random, pygame, sys
from pygame.locals import *
from .vec2d import Vec2d
try:
from RPi import GPIO
print("Select some colours and connect the dots!")
except ImportError:
GPIO = None
print("Not running on a Raspberry Pi. Press Space to ... | |
import numpy
from shadow4.syned.shape import Rectangle
from shadow4.syned.element_coordinates import ElementCoordinates
from syned.beamline.optical_elements.mirrors.mirror import Mirror
from shadow4.physical_models.prerefl.prerefl import PreRefl
class S4Mirror(Mirror):
def __init__(self,
name=... | |
#!/usr/bin/python
"""
Small web application to retrieve genes from the tomato genome
annotation involved to a specified pathways.
"""
import flask
from flaskext.wtf import Form, TextField
import ConfigParser
import datetime
import json
import os
import rdflib
import urllib
CONFIG = ConfigParser.ConfigParser()
CON... | |
from __future__ import unicode_literals
import datetime
from django.contrib.admin import (site, ModelAdmin, SimpleListFilter,
BooleanFieldListFilter, AllValuesFieldListFilter)
from django.contrib.admin.views.main import ChangeList
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models imp... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, os, argparse, subprocess, signal
import sqlite3 as lite
from Crypto import Random
from bar.network.bar_daemon import daemon_main
from bar.network.bar_server import server_main
def parse_cli():
'''
The top-level parser is called "operation". Each subparser ... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# This Python file uses the following encoding: utf-8
#
# Copyright 2014 Google Inc. All rights reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licen... | |
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | |
# 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... | |
"""
The TEAPOT MATRIX_Lattice is a subclass of a MAXTRIX_Lattice class. The Matrix lattice is generated
by using the TEAPOT lattice. The matrices are the linear part of the TEAPOT elements
tracking. The number of transport matrices in the lattice is equal to the sum of
all parts of TEAPOT elements. The RF cavities in ... | |
#!usr/bin/python
from __future__ import print_function
import random
from kivy.app import App
from kivy.clock import Clock
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.uix.widget import Widget
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.relativelayout import RelativeLayo... | |
#!/usr/bin/env python3
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from xml.dom import minidom
from writers import gpo_editor_writer, xml_formatted_writer
from writers.admx_writer import AdmxElemen... | |
import cPickle
import Cookie
import hmac
import md5
import os
import random
import sha
import sys
import time
import UserDict
from datetime import datetime, timedelta
# Determine if strong crypto is available
crypto_ok = False
# Check for pycryptopp encryption for AES
try:
from pycryptopp.cipher import aes
fr... | |
# -*- coding: utf-8 -*-
"""Conservation views."""
from __future__ import unicode_literals
from dateutil.relativedelta import relativedelta
from django.http import Http404
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.views.generic.... | |
#!/usr/bin/python2.5
# Copyright (C) 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
"""
Unitary Event Analysis (UEA) plots
----------------------------------
Standard plot function for pairwise unitary event analysis results resembling
the original publication. The output is assumed to be from
:func:`elephant.unitary_event_analysis.jointJ_window_analysis` function.
.. autosummary::
:toctree: toc... | |
import re
import logging
import dateutil.parser
from xml.dom import minidom, Node
from django.utils.encoding import smart_unicode, smart_str
from django.utils.translation import ugettext as _
from onadata.libs.utils.common_tags import XFORM_ID_STRING
class XLSFormError(Exception):
pass
class DuplicateInstance(... | |
#!/usr/bin/python
#
# bindsnoop Trace IPv4 and IPv6 binds()s.
# For Linux, uses BCC, eBPF. Embedded C.
#
# based on tcpconnect utility from Brendan Gregg's suite.
#
# USAGE: bindsnoop [-h] [-t] [-E] [-p PID] [-P PORT[,PORT ...]] [-w]
# [--count] [--cgroupmap mappath] [--mntnsmap mappath]... | |
#!/usr/bin/env python3
# Copyright (c) 2016-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the bumpfee RPC.
Verifies that the bumpfee RPC creates replacement transactions successfully when... | |
import os
import logging
from .plugin import SimStatePlugin
from ..storage.file import SimFile
from ..errors import SimMergeError
from ..misc.ux import once
l = logging.getLogger(name=__name__)
class SimFilesystem(SimStatePlugin): # pretends links don't exist
"""
angr's emulated filesystem. Available as stat... | |
# Lint as: python3
# Copyright 2020 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | |
# -*- coding: utf-8 -*-
import requests
import urllib
import time
import xbmc, xbmcgui
from meta.utils.text import to_utf8
from meta.gui import dialogs
from meta import plugin
from settings import *
from language import get_string as _
TCI = plugin.get_setting(SETTING_TRAKT_API_CLIENT_ID, str)
TCS = plugin.get_setti... | |
#MIT License
#Copyright (c) 2017 Tim Wentzlau
# 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, merge, publ... | |
# The MIT License (MIT)
# Copyright (c) 2016 Massachusetts Institute of Technology
#
# Authors: Victor Pankratius, Justin Li, Cody Rude
# This software has been created in projects supported by the US National
# Science Foundation and NASA (PI: Pankratius)
#
# Permission is hereby granted, free of charge, to any person... | |
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import inspect
import re
import sys
import textwrap
from asn1crypto import x509, keys, csr, pem
from oscrypto import asymmetric
from .version import __version__, __version_info__
if sys.version_info < (3,):
int_ty... | |
"""The tests for the Group components."""
# pylint: disable=protected-access
from collections import OrderedDict
from unittest.mock import patch
import homeassistant.components.group as group
from homeassistant.const import (
ATTR_ASSUMED_STATE,
ATTR_FRIENDLY_NAME,
ATTR_ICON,
EVENT_HOMEASSISTANT_START,... | |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.23
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed unde... | |
# Copyright 2013 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | |
from django.shortcuts import render, redirect
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.contrib import auth
from django.core.context_processors import csrf
from django.contrib.auth.models import User
from django.co... | |
#!/usr/bin/python3
'''
Author : Zachary Harvey
'''
import sqlite3 as sql
import json
import csv
from mtgsdk import Card, QueryBuilder
from mtgsdk.config import __endpoint__
from utils import CardItem
from utils.config import URL_LENGTH
MTG_CARDS_TABLE_NAME = 'mtgcards'
MTG_CARDS = '''CREATE TABLE '''+MTG_CAR... | |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | |
"""
Assorted utilities for working with neural networks in AllenNLP.
"""
from typing import Dict, List, Optional, Any, Tuple, Callable
import logging
import math
import torch
from torch.autograd import Variable
from allennlp.common.checks import ConfigurationError
logger = logging.getLogger(__name__) # pylint: dis... | |
# Copyright 2012 NTT Data. All Rights Reserved.
# Copyright 2012 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/li... | |
# Copyright (c) 2014 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | |
import logging
import os
import re
import socket
import time
import copy
from dns.exception import Timeout
from dns.resolver import NXDOMAIN
from dns.resolver import NoAnswer
from dns.resolver import Resolver
from tsproxy.common import FIFOCache, MyThreadPoolExecutor, lookup_conf_file
from tsproxy import common
logg... | |
from sympy import (
Abs, And, binomial, Catalan, cos, Derivative, E, Eq, exp, EulerGamma,
factorial, Function, harmonic, I, Integral, KroneckerDelta, log,
nan, Ne, Or, oo, pi, Piecewise, Product, product, Rational, S, simplify,
sqrt, Sum, summation, Symbol, symbols, sympify, zeta, gamma, Le
)
from sympy... | |
# -*- coding: UTF-8 -*-
from collections import defaultdict
from conference.models import Ticket, Speaker, Talk
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.conf import settings
from django.db.models import Q, Count
from p3 import models
from conference import mod... | |
# $Id: request.py,v 1.13 2007/06/10 14:11:58 mggrant Exp $
#
# Xlib.protocol.request -- definitions of core requests
#
# Copyright (C) 2000-2002 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | |
from os.path import exists, join
import glob
import json
from pythonforandroid.logger import (info, info_notify, warning, Err_Style, Err_Fore)
from pythonforandroid.util import current_directory, BuildInterruptingException
from shutil import rmtree
class Distribution(object):
'''State container for information a... | |
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2012 VMware, Inc.
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. Yo... | |
# MIT License
#
# Copyright (c) 2017
#
# 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, merge, publish, di... | |
import json
import os
import random
import uuid
from StringIO import StringIO
from collections import Counter
from couchdbkit.exceptions import ResourceNotFound
from django.test import SimpleTestCase
from django.test import TestCase
from mock import Mock
from corehq.apps.domain.models import Domain
from corehq.apps.d... | |
# Copyright 2010-2011 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www... | |
#!/usr/bin/env python
from __future__ import division, print_function, absolute_import
import numpy as np
from itertools import combinations
from numpy.testing import (run_module_suite, assert_allclose, assert_,
assert_raises, assert_equal)
import pywt
# Check that float32 and complex64 a... | |
from .types import Module, ResultInfo, ConsoleErrorInfo, ConsoleErrorField
"""
This file contains all currently known 2DS/3DS result and error codes (hexadecimal).
There may be inaccuracies here; we'll do our best to correct them
when we find out more about them.
A result code is a 32-bit integer returned when callin... | |
#!/usr/bin/env python
# FFIG (Foreign Function Interface Generation) parses C/C++ headers with
# libclang and passes the class and function information on to templates to
# generate a c-api and language bindings.
import argparse
import ffig.annotations
import ffig.clang as clang
import ffig.cppmodel
import ffig.filte... | |
import threading
import unittest
import mock
import numpy
import six
import chainer
from chainer import backend
from chainer.backends import cuda
import chainer.functions as F
from chainer import testing
from chainer.testing import attr
from chainer.utils import type_check
def make_array(start, shape, dtype):
s... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
"""
SQLAlchemy-Utils provides way of automatically calculating aggregate values of
related models and saving them to parent model.
This solution is inspired by RoR counter cache,
`counter_culture`_ and `stackoverflow reply by Michael Bayer`_.
Why?
----
Many times you may have situations where you need to calculate d... | |
# -*- coding: utf-8 -*-
#
# Markov Logic Networks
#
# (C) 2012-2013 by Daniel Nyga (nyga@cs.uni-bremen.de)
# (C) 2006-2011 by Dominik Jain (jain@cs.tum.edu)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal ... | |
import itertools
from lampost.db.dbo import DBOAspect
from lampost.db.dbofield import DBOField
from lampost.event.zone import Attachable
from lampost.gameops.action import action_handler, ActionCache
from lampost.gameops.parser import ParseError, parse_actions, has_action
from lampost.di.resource import Injected, modu... | |
#!/usr/bin/env python
#
# Copyright 2017 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import random
import sys
# Adds testrunner to the path hence it has to be imported at the beggining.
import base_runner
from tes... | |
# Copyright 2013, Big Switch Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | |
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.core import management
from django.test import TestCase
from django.utils.six import StringIO
from .models import (
Car, CarDriver, Driver, Group, Membership, Person, UserMembership,
)
class M2MThroughTestCase(TestCa... | |
from graphql import graphql_sync
from graphene.tests.utils import dedent
from ...types import Interface, ObjectType, Schema
from ...types.scalars import Int, String
from ..node import Node
class CustomNode(Node):
class Meta:
name = "Node"
@staticmethod
def to_global_id(type_, id):
retur... | |
"""
Data API for Genome Annotation entities. This API provides methods for retrieving the
Assembly and Taxon associated with an annotation, as well as retrieving individual features.
"""
# stdlib imports
import abc
import hashlib
# 3rd party imports
import blist
# local imports
from doekbase.data_api.core import Ob... | |
"""A collection of string constants.
Public module variables:
whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -- a string containing all ASCII letters
digits -- a ... | |
''' pydevd - a debugging daemon
This is the daemon you launch for python remote debugging.
Protocol:
each command has a format:
id\tsequence-num\ttext
id: protocol command number
sequence-num: each request has a sequence number. Sequence numbers
originating at the debugger are odd, sequence numbers ori... | |
import unittest, time
from threading import Thread, Event
from Queue import Queue
class ControlThread(Thread):
"""Handles communications. Is a continuous timer. Also implements
protocol.
http://stackoverflow.com/questions/12435211/python-threading-timer-repeat-function-every-n-seconds
"""
def __init__(self, zumo,... | |
# Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
"""Defined search unit tests."""
# Copyright 2015 Solinea, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | |
#!/bin/python
import SocketServer
import watchdog
import watchdog.events
import watchdog.observers
import sys
import os
import json
import base64
ignore_extens = [
".o",
".obj",
".a" ,
".bin",
".db",
".ko",
".so",
".tmp",
".TMP",
".d",
... | |
import argparse
import textwrap
from dataclasses import dataclass, fields
from .testutils import *
def test_tuple_any_becomes_string():
@dataclass
class Container(TestSetup):
strings: Tuple = (64, 128, 256, 512)
c = Container.setup("")
assert c.strings == (64, 128, 256, 512)
c = Containe... | |
import copy
import cherrypy
from datetime import datetime
from Queue import Queue, Empty
from json import JSONEncoder
import argparse
from flask import request
from flask import jsonify, Response
import flask_restplus
from flexget.config_schema import process_config
from flexget.api import api, APIResource, ApiError,... | |
# Copyright 2010 Google Inc.
#
# 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, merge, publish, dis-
# trib... | |
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | |
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import pre_save
from django.core.mail import EmailMessage
from django.dispatch import receiver
from imagekit.models import ImageSpecField
from imagekit.processors import Resize... | |
#!/usr/bin/env python
#
# This code is a part of `ardrone_autopilot` project
# which is distributed under the MIT license.
# See `LICENSE` file for details.
#
"""OpenCV functions test: target recognition using ORB detector
This node is based on `base.py`. See there a documentation.
Inputs
------
* target/in/image -... | |
# ===============================================================================
# Copyright 2013 Jake Ross
#
# 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... | |
# coding: utf-8
# Imports
# ======
# In[1]:
import pickle as pkl
import numpy as np
from time import time
import sys
import tensorflow as tf
from tensorflow.python.ops import rnn, rnn_cell
from tensorflow.python.ops import ctc_ops as ctc
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1... | |
""" BVT tests for routers
"""
# Import Local Modules
from marvin.cloudstackAPI import (stopRouter,
restartNetwork,
startRouter,
rebootRouter)
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.codes i... | |
"""
Computations with homomorphisms of modules and rings.
This module implements classes for representing homomorphisms of rings and
their modules. Instead of instantiating the classes directly, you should use
the function ``homomorphism(from, to, matrix)`` to create homomorphism objects.
"""
from sympy.polys.agca.mo... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Group.first_release'
db.add_column('sentry_groupedmessage... | |
#!/usr/bin/env python
"""
Crash kiss
----------
An image processing art project. Given an input image, this program
1) tries to determine what is the foreground and what is the background
2a) crashes foreground on the left into foreground on the right
2b) collapses mixed foreground/background regions in a certain way... | |
import json
from django import forms
from django.template.loader import render_to_string
from django.utils import translation
from django.utils.functional import cached_property
from django.utils.translation import gettext as _
from wagtail.admin.staticfiles import versioned_static
from wagtail.core.blocks import Fie... | |
from datetime import datetime
from lr.lib.harvest import harvest
from lr.tests import *
from lr.util.decorators import ForceCouchDBIndexing, ModifiedServiceDoc, update_authz
from pylons import config
from urllib import unquote_plus,quote_plus
import logging,json
import threading
import time
import time
log = logging.ge... | |
#!/usr/bin/python
import copy
from . import wgwidget as widget
from . import wgtextbox as textbox
import textwrap
import curses
from . import wgtitlefield as titlefield
from . import fmPopup as Popup
import weakref
import collections
import copy
MORE_LABEL = "- more -" # string to tell user there a... | |
import numpy as np
import pandas as pd
import re
import urllib2
import astropy.table as astro_table
from threeML.catalogs.VirtualObservatoryCatalog import VirtualObservatoryCatalog
from threeML.exceptions.custom_exceptions import custom_warnings
from threeML.config.config import threeML_config
from threeML.io.get_hea... | |
# test_cmake.py - Unit tests for swift_build_support.cmake -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for ... | |
"""The tests for Cover device conditions."""
import pytest
import homeassistant.components.automation as automation
from homeassistant.components.cover import DOMAIN
from homeassistant.const import (
CONF_PLATFORM,
STATE_CLOSED,
STATE_CLOSING,
STATE_OPEN,
STATE_OPENING,
)
from homeassistant.helpers... | |
from corrdb.common import logAccess, logStat, logTraffic, crossdomain, basicAuthSession
from corrdb.common.models import UserModel
from corrdb.common.models import ProjectModel
from corrdb.common.models import EnvironmentModel
from corrdb.common.models import RecordModel
from corrdb.common.models import RecordBodyModel... | |
import logging
from pajbot import utils
from pajbot.managers.db import DBManager
from pajbot.models.command import Command
from pajbot.models.command import CommandExample
from pajbot.models.user import User
from pajbot.modules import BaseModule
from pajbot.modules import ModuleSetting
from pajbot.utils import time_si... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#!/usr/bin/env python2
from bottle import route, run, debug, template, request, static_file, error, response, app, hook
from backend import Backend, Event, Reportpoint, load_plugins, Config
from config import USERS, EVENT_TYPES, SERVERS
import json
import os
import time
import sys
import types
import datetime
from view... | |
"""
"""
import abc
import re
import requests
from requests import RequestException
import six
from six.moves.urllib import parse
from jiracli.cli import colorfunc
from jiracli.utils import COLOR
@six.add_metaclass(abc.ABCMeta)
class JiraBridge(object):
def __init__(self, base_url, config, persist=True):
... | |
from __future__ import unicode_literals
from django.contrib.auth import authenticate, get_user_model
from django.contrib.auth.tokens import default_token_generator
from django.db.models import Q
from django.db.models.manager import Manager
from django import forms
from django.utils.http import int_to_base36
from djang... | |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
# This is a temporary copy of all the CONDITIONAL_NAMES from _cffi_src so... | |
# Copyright 2013-2021 Aerospike, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | |
import contextlib
import functools
import warnings
import numpy as np
import pandas as pd
from ..plot.plot import _PlotMethods
from . import indexing
from . import groupby
from . import ops
from . import utils
from . import variable
from .alignment import align
from .common import AbstractArray, BaseDataObject
from ... | |
"""
test one to many relationships
"""
from elixir import *
from elixir.compat import u
from sqlalchemy import and_
from sqlalchemy.ext.orderinglist import ordering_list
def setup():
metadata.bind = 'sqlite://'
class TestOneToMany(object):
def teardown(self):
cleanup_all(True)
def test_simple(se... | |
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | |
"""deployment scripts for researchcompendia
with credit to scipy-2014 and researchcompendia fabric.py
fab <deploy|provision>[:<git ref>]
provision: provisions a box to run the site. is not idempotent. do not rerun.
deploy: deploys a update to the site. if no git ref is provided, deploys HEAD.
git ref: a git branch, h... | |
import functools
import os
from pytss.tspi_exceptions import *
from cffi import FFI, VerificationError
INTERFACE_H = os.path.dirname(os.path.abspath(__file__)) + '/interface.h'
__all__ = ["ffi", "lib"]
# Setup CFFI with libtspi
ffi = FFI()
ffi.cdef(open(INTERFACE_H, 'r').read())
tss_lib = ffi.verify('#include <trous... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.