gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
import datetime
import json
import re
import sys
import threading
import time
import traceback
import urllib.request, urllib.parse, urllib.error
hasWebsockets=False
try:
import websocket
hasWebsockets=True
except:
pass
from avnav_api import AVNApi
class Config(object):
def __init__(self,api):
self.port = ... | |
# Copyright (c) 2014 Red Hat, 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 require... | |
import logging
import mimetypes
import os.path
import re
import shutil
import traceback
import zipfile
from openmdao.gui.util import filedict
from openmdao.main.publisher import Publisher
from openmdao.util.fileutil import onerror
from openmdao.util.log import logger
from watchdog.events import FileSystemEventHandler
... | |
# Copyright 2016 Google LLC
#
# 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, s... | |
from sympy import Matrix, Symbol, solve, exp, log, cos, acos, Rational, Eq, \
sqrt, oo, LambertW, pi, I, sin, asin, Function, diff, Derivative, \
symbols, S, raises, sympify, var, simplify
from sympy.solvers import solve_linear_system, solve_linear_system_LU,dsolve,\
tsolve, deriv_degree
from symp... | |
import os,sys
# http://happybase.readthedocs.org/en/latest/user.html
import happybase
import MySQLdb
import json
import time
import requests
import shutil
import hashlib
from Queue import *
from threading import Thread
sys.path.insert(0, os.path.abspath('../memex_tools'))
import sha1_tools
nb_threads=12
# HBase conne... | |
# Copyright 2016 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... | |
"""Tests for the routes."""
import unittest
from grow.routing import routes as grow_routes
class RoutesTestCase(unittest.TestCase):
"""Test the routes."""
def _add(self, path, value=None, options=None, custom_routes=None):
routes = custom_routes if custom_routes is not None else self.routes
... | |
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | |
# -*- coding: utf-8 -*-
# Copyright 2017 Novo Nordisk Foundation Center for Biosustainability,
# Technical University of Denmark.
#
# 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... | |
# Copyright 2014 Citrix Systems
#
# 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 agr... | |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | |
from collections import deque, defaultdict
from itertools import islice
from functools import wraps
from fuzzysearch.common import FuzzySearchBase, Match, \
count_differences_with_maximum, get_best_match_in_group, group_matches
from fuzzysearch.search_exact import search_exact
def _check_arguments(subsequence, s... | |
# -*- test-case-name: udplog.test.test_udplog -*-
#
# Copyright (c) Mochi Media, Inc.
# Copyright (c) Ralph Meijer.
# See LICENSE for details.
"""
Send and receive structured log events over UDP.
This module provides L{UDPLogger} for sending out structured log events. When
used as a script it listens for log events a... | |
# Copyright 2013 IBM Corp.
#
# 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 agree... | |
"""Module for testing unicode variables."""
class TestUnicodeVar(BaseTestCase):
def setUp(self):
BaseTestCase.setUp(self)
self.rawData = []
self.dataByKey = {}
for i in range(1, 11):
unicodeCol = u"Unicode \u3042 %d" % i
fixedCharCol = (u"Fixed Unicode %d" %... | |
import pytz
import json
from django.core.exceptions import ValidationError
from rest_framework import serializers as ser
from rest_framework import exceptions
from api.base.exceptions import Conflict
from api.base.utils import absolute_reverse, get_user_auth
from website.project.metadata.utils import is_prereg_admin_... | |
# -*- coding: utf-8 -*-
'''
This module implements objects relating to analog signals,
:class:`BaseAnalogSignal` and its child :class:`AnalogSignal`.
:class:`AnalogSignalArray` is derived from :class:`BaseAnalogSignal` but is
defined in :module:`neo.core.analogsignalarray`.
:class:`IrregularlySampledSignal` is not de... | |
import os
import platform
import re
import subprocess
import unittest
from textwrap import dedent
from conans.client import tools
from conans.client.tools.oss import check_output
from conans.model.ref import ConanFileReference, PackageReference
from conans.paths import CONANFILE
from conans.test.utils.test_files impor... | |
"""
Experimental script to generate coverage and other graphs.
Need to adapt absolute paths to make it work for another user.
"""
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import os, argparse, time, glob
from datetime import datetime, timedelta
from matplotlib.dates import drange
from... | |
from django.conf import settings
from django.db import models
from django.core.exceptions import ObjectDoesNotExist
from django.db.models.fields.related import RelatedField, OneToOneRel
from publisher.base import install_publisher
from publisher.manager import PublisherManager
from publisher.errors import MpttPublisher... | |
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | |
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 30 19:07:37 2017
@author: AmatVictoriaCuramIII
"""
import numpy as np
import random as rand
import pandas as pd
import time as t
#from DatabaseGrabber import DatabaseGrabber
from YahooGrabber import YahooGrabber
from ListPairs import ListPairs
Empty = []
Start = t.time()
... | |
import numpy as np
from scipy.spatial import distance
from skimage.draw._draw import line
class Stroke(object):
def __init__(self, id, coords, ref=None, truth="", norm_w=None, norm_h=None):
"""
id, stroke/trace id in Inkml file
coords, coordinates of trace points
ref, reference of ... | |
import dxr.plugins
import os, sys
import fnmatch
import urllib, re
from dxr.utils import search_url
class ClangHtmlifier(object):
def __init__(self, tree, conn, path, text, file_id):
self.tree = tree
self.conn = conn
self.path = path
self.text = text
self.file_... | |
# Copyright 2014 The Oppia 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 applicable ... | |
# Copyright 2015 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 a... | |
r"""
Backrefs re.
Add the ability to use the following backrefs with re:
- `\l` - Lowercase character class (search)
- `\c` - Uppercase character class (search)
- `\L` ... | |
"""\
basis_631ppss.dat basis set for use with PyQuante
This program is part of the PyQuante quantum chemistry program suite.
Copyright (c) 2004, Richard P. Muller. All Rights Reserved.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE that is part of this
distr... | |
from __future__ import print_function
import base64
import logging
import re
from collections import defaultdict
from hashlib import sha1
from streamlink import PluginError
from streamlink.compat import parse_qsl, urlparse
from streamlink.plugin import Plugin, PluginArguments, PluginArgument
from streamlink.plugin.ap... | |
# Copyright 2016 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 or agreed to in writing, ... | |
#!/usr/bin/python
#
# This script is used to analyze, tabulate, and graph data generated by
# the JAM weaver and by JAMScript performance instrumentation. It was
# used to produce figures presented in the experimental results section
# of ``Efficient Runtime Enforcement Techniques for Policy Weaving,''
# published at F... | |
#!/usr/bin/env python3
import csv
import os
import pickle
import uuid
from itertools import cycle
import functools
import numpy as np
import pyqtgraph as pg
import qtutil
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from pyqtgraph.dockarea import *
from .util import file_io
from .util import project_function... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
# Form implementation generated from reading ui file 'PatchTemplate.ui'
#
# Created: Sat Feb 21 11:45:16 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_from... | |
# coding: UTF-8
"""
Copyright (c) 2009 Marian Tietz
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 a... | |
#!/usr/bin/python
#
# Copyright (c) 2013-2015, Zhouhan LIN
# 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
# l... | |
"""Support for ESPHome lights."""
from __future__ import annotations
from typing import Any, cast
from aioesphomeapi import APIVersion, LightColorCapability, LightInfo, LightState
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_EFFECT,
ATTR_FLASH,
ATTR_RGB_COLO... | |
# Copyright (c) 2015 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | |
import datetime
from decimal import Decimal
from django.utils import translation
import mock
from nose.tools import eq_, ok_
import amo
import amo.tests
from addons.models import Addon, AddonUser
from constants.payments import PROVIDER_BANGO
from market.models import AddonPremium, PreApprovalUser, Price, Refund
from... | |
# 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
# d... | |
#!/usr/bin/python
"""
####################################################################################################
TITLE : HPE XP7 Migration, Precheck
DESCRIPTION : Precheck to examine hostgroup is ready for migration
AUTHOR : Koen Schets / StorageTeam
VERSION : Based on previous ODR framework
1.0 ... | |
import unittest
from panda3d.core import loadPrcFileData
from direct.task.TaskManagerGlobal import taskMgr
from calibration import World
from time import time
import sys
# Tests run fine one at a time, but on Windows, isn't destroying
# the ShowBase instance between suites, for some crazy reason. Meh.
# So, to run in... | |
from abc import ABC
import json
from datetime import timedelta
from typing import Any, List, Dict, Optional
import attr
from enum import Enum
from .generic import GenericManager
from ..options import OptionBlockTimeOut, forward_args
from ..cluster import QueryScanConsistency
from couchbase.management.admin import METH... | |
"""Base implementation of event loop.
The event loop can be broken up into a multiplexer (the part
responsible for notifying us of I/O events) and the event loop proper,
which wraps a multiplexer with functionality for scheduling callbacks,
immediately or at a given time in the future.
Whenever a public API takes a c... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
"""
Utilities for using modules
"""
import frappe, os, json
import frappe.utils
from frappe import _
from frappe.utils import cint
def export_module_json(doc, is_standard, module):
"""Make a folder for the given doc and ... | |
# urllib3/util.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from base64 import b64encode
from collections import namedtuple
from socket import error as Socke... | |
# Copyright: See the LICENSE file.
import unittest
from factory import base, declarations, enums, errors
class TestObject:
def __init__(self, one=None, two=None, three=None, four=None):
self.one = one
self.two = two
self.three = three
self.four = four
class FakeDjangoModel:
... | |
# -*- coding: utf8 -*-
# This file is a part of netsav
#
# Copyright (c) 2014-2015 Pierre GINDRAUD
#
# 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 li... | |
# Copyright (c) 2015 Red Hat, 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 require... | |
"""Support for Rflink lights.
For more details about this platform, please refer to the documentation
at https://home-assistant.io/components/light.rflink/
"""
import asyncio
import logging
from homeassistant.components import group
from homeassistant.components.light import (
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS... | |
# Copyright 2017 Balazs Nemeth
#
# 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, s... | |
"""
websocket - WebSocket client library for Python
Copyright (C) 2010 Hiroki Ohtani(liris)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, ... | |
#!/usr/bin/env python3
import sys
import re
import textwrap
import argparse
parser = argparse.ArgumentParser(description="convert ICE40 chip database")
parser.add_argument("filename", type=str, help="chipdb input filename")
parser.add_argument("-p", "--constids", type=str, help="path to constids.inc")
parser.add_argu... | |
# Copyright 2018 The Oppia 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 applicable ... | |
# Copyright 2015 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 agreed ... | |
# ----------------------------------------------------------------
# Copyright 2016 Cisco Systems
#
# 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/LICENS... | |
"""
tests.test_component_switch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests switch component.
"""
# pylint: disable=too-many-public-methods,protected-access
import unittest
import os
import homeassistant.loader as loader
import homeassistant.util.color as color_util
from homeassistant.const import (
ATTR_ENTITY_ID, STATE... | |
"""
Support for interface with an Aquos TV.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.aquostv/
"""
import logging
import voluptuous as vol
from homeassistant.components.media_player import (
SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPP... | |
# 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 under th... | |
from __future__ import absolute_import
import time
import os
import atexit
import six
from six.moves import range
try:
from multiprocessing import Process, Pipe
except ImportError:
Process = None
import numpy as nm
from sfepy.base.base import sfepy_config_dir, ordered_iteritems
from sfepy.base.base import o... | |
from __future__ import with_statement
from enable.api import Container, Component, ColorTrait
from kiva.constants import FILL, FILL_STROKE
from kiva.trait_defs.kiva_font_trait import KivaFont
from traits.api import Any, Bool, Delegate, Enum, Instance, Int, List, Str
class Button(Component):
color = ColorTrait(... | |
from __future__ import unicode_literals
from __future__ import absolute_import
import os
from os import path
from docker.errors import APIError
import mock
import tempfile
import shutil
import six
from compose import __version__
from compose.const import (
LABEL_CONTAINER_NUMBER,
LABEL_ONE_OFF,
LABEL_PROJ... | |
import os
from hippy.builtin import (wrap_method, Optional, ThisUnwrapper,
handle_as_exception, StreamContextArg, Nullable)
from hippy.objects.instanceobject import W_InstanceObject
from hippy.objects.intobject import W_IntObject
from hippy.objects.resources.file_resource import W_FileResource
from hippy.objects.re... | |
from django.contrib.auth.checks import (
check_models_permissions, check_user_model,
)
from django.contrib.auth.models import AbstractBaseUser
from django.core import checks
from django.db import models
from django.test import (
SimpleTestCase, override_settings, override_system_checks,
)
from django.test.utils... | |
#!/usr/bin/env python
# high-level unit tests for main window
import unittest
import copy
import math
import os
import sys
import random
import gtk
import gettext
os.environ.setdefault('LANG', 'en')
gettext.install('gnofract4d')
sys.path.insert(1, "..")
from fract4d import fractal
import main_window
class WrapMai... | |
"""Default variable filters."""
from __future__ import unicode_literals
import random as random_module
import re
import warnings
from decimal import ROUND_HALF_UP, Context, Decimal, InvalidOperation
from functools import wraps
from pprint import pformat
from django.conf import settings
from django.template.base impor... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='BallotPositionName',
fields=[
('slug', models.C... | |
"""
Set operations for arrays based on sorting.
:Contains:
unique,
isin,
ediff1d,
intersect1d,
setxor1d,
in1d,
union1d,
setdiff1d
:Notes:
For floating point arrays, inaccurate results may appear due to usual round-off
and floating point comparison issues.
Speed could be gained in some operations by ... | |
#!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for manipulating blocks and transactions."""
from binascii import a2b_hex
import struct
impo... | |
"""Definition and setup of the Omnilogic Sensors for Home Assistant."""
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
ELECTRIC_POTENTIAL_MILLIVOLT,
MASS_GRAMS... | |
# System
import os
import sys
from collections import namedtuple
from datetime import datetime, date, time
import logging
import copy
# Libraries
import jinja2
import yaml
import re
# Wok
from wok import util
from wok import renderers
from wok.jinja import GlobFileLoader, AmbiguousTemplate
class Page(object):
""... | |
from unittest import mock
import pykka
import pytest
from mopidy import backend, core
from mopidy.internal import deprecation
from mopidy.internal.models import PlaybackState
from mopidy.models import Track
from tests import dummy_audio, dummy_backend
class MyTestPlaybackProvider(backend.PlaybackProvider):
def... | |
# Copyright 2009-2010 10gen, 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,... | |
from toee import *
import char_class_utils
import char_editor
###################################################
def GetConditionName():
return "Assassin"
# def GetSpellCasterConditionName():
# return "Assassin Spellcasting"
def GetCategory():
return "Core 3.5 Ed Prestige Classes"
def GetClassDefinitionFlags():... | |
# 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
# d... | |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Flashlight decoders.
"""
import gc
import itertools as it
import os.path as osp
from typing import List
import wa... | |
# -*- 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... | |
# Copyright (C) 2013 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 ... | |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import sys
if not (sys.version_info.major == 3 and sys.version_info.minor > 5):
print("Python version %s.%s not supported version 3.6 or above required - exiting" % (sys.version_info.major,sys.version_info.minor))
sys.exit(1)
import os
for path in [os.getcwd(),"so... | |
import unittest
from bson import SON
from mongoengine import *
from mongoengine.pymongo_support import list_collection_names
from tests.utils import MongoDBTestCase
class TestDelta(MongoDBTestCase):
def setUp(self):
super().setUp()
class Person(Document):
name = StringField()
... | |
# Author: Lars Buitinck <L.J.Buitinck@uva.nl>
# License: BSD 3 clause
from array import array
from collections import Mapping
from operator import itemgetter
import numpy as np
import scipy.sparse as sp
from ..base import BaseEstimator, TransformerMixin
from ..externals import six
from ..externals.six.moves import x... | |
from sys import exit
import os
from os.path import join
def no_config(f):
f.__no_config = True
return f
class Target:
def __init__(self, buildozer):
self.buildozer = buildozer
self.build_mode = 'debug'
self.platform_update = False
def check_requirements(self):
pass
... | |
# 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
# d... | |
#!/usr/bin/env python
# this script sets up the testing packages to allow the tests
# 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 ... | |
from quantopian.pipeline import Pipeline, CustomFilter
from quantopian.algorithm import attach_pipeline, pipeline_output
from quantopian.pipeline.factors import Latest
from quantopian.pipeline.data.builtin import USEquityPricing
from quantopian.pipeline.data.psychsignal import aggregated_twitter_withretweets_stocktwit... | |
##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that ... | |
# Copyright 2018 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... | |
import sys
import os
import psutil
sys.path.append('../tools/')
import interactCfg
import helperFunction
import datetime
import random
from Bit import Bit
from Qubit import *
from Error import *
from IBMQX import *
#from Gate import *
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patch... | |
import os
from pathlib import Path
import pytest
import subprocess
import sys
import tempfile
import time
from typing import List
from unittest import mock, skipIf
import yaml
import ray
from ray.runtime_env import RuntimeEnv
from ray._private.runtime_env.conda import (
inject_dependencies,
_inject_ray_to_cond... | |
# Copyright 2017 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... | |
# Copyright 2013 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.
import os
from core import path_util
from core import perf_benchmark
from telemetry import benchmark
from telemetry import page as page_module
from telemet... | |
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
TweetFreq - A flask-based web application for analyzing tweets
"""
from datetime import datetime, timedelta
from time import sleep
from redis import StrictRedis
from flask import Flask, render_template, flash, jsonify, redirect, url_for
from flask.json import loads, d... | |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Hub._product_type_id'
db.delete_column('webinars_hub', '_product_type_id')
# Ad... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | |
#!/usr/bin/python
import os
import sys
import subprocess
import time
import socket
import urllib
import urllib2
import signal
import threading
SYNDICATE_ROOT = "/home/princeton_syndicate/syndicate"
YUM_PACKAGES = "subversion gcc gcc-c++ gnutls-devel openssl-devel boost-devel libxml2-devel libattr-devel curl-devel aut... | |
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2019 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
#
# Authors: Aric Hagberg (hagberg@lanl.gov)
# Pieter Swart (swart@lanl.gov)
# Joel Miller (... | |
# Copyright 2012 Pinterest.com
#
# 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,... | |
#!/usr/bin/env python3
"""
[Nonogram](https://en.wikipedia.org/wiki/Nonogram) solver.
The input is a list of strings:
* The first line contains width and height of the board, separated by the space
character.
* The next width of lines contain space-separated hints for the vertical lines.
* The next height of lines ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.