gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# -*- coding: utf-8 -*-
"""
Most of the api endpoints here use django_rest_framework to expose the content app APIs,
except some set methods that do not return anything.
"""
from django.conf.urls import include, url
from kolibri.content import api, models, serializers
from rest_framework import viewsets
from rest_frame... | |
from ifaint import *
import os
def style_lw1(obj):
obj.linewidth = 1
def style_lw2(obj):
obj.linewidth = 2
def style_lw20(obj):
obj.linewidth = 20
def style_none(obj):
obj.fillstyle = 'none'
obj.linewidth = 2
def style_border(obj):
obj.fillstyle = 'b'
obj.linewidth = 2
def style_fill(o... | |
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
from __future__ import absolute_import, unicode_literals
import sys
import os
import logging
import copy
from optparse import OptionParser
from svtplay_dl.error import UIException
from svtplay_dl.log import log
from svtplay_dl.ut... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# (c) Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the Li... | |
from trac.perm import PermissionCache
from trac.test import Mock, EnvironmentStub
from trac.ticket import api, default_workflow, web_ui
from trac.ticket.batch import BatchModifyModule
from trac.ticket.model import Ticket
from trac.util.datefmt import utc
import unittest
class BatchModifyTestCase(unittest.TestCase):
... | |
# coding: utf-8
"""
Talon.One API
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #... | |
# 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... | |
import urllib
class StringWidget(object):
""" String Widget """
def __init__(self, screen, ref, x, y, text):
self.screen = screen
self.ref = ref
self.x = x
self.y = y
self.text = text
self.screen.server.request("widget_add %s %s %s" % (self.screen.ref... | |
'''This task handles the interface between the kernel and user-level servers.
System services can be accessed by doing a system call. System calls are
transformed into request messages, which are handled by this task. By
convention, a sys_call() is transformed in a SYS_CALL request message that
is handled in a functi... | |
#!/usr/bin/env python3
# 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... | |
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import re
from pathlib import PurePath
from textwrap import dedent
from typing import List, Mapping, Optional
import pytest
from pants.backend.python import target_types_rules
... | |
"""
Created on Sep 24, 2013
@author: casale
"""
import scipy as SP
import scipy.linalg as LA
import pdb
import sys
sys.path.append('./../../..')
import mtSet.pycore.external.limix.plink_reader as plink_reader
def genBinormal(dim1,dim2,percSign=0.5,std=1e-1):
rv = (2*(SP.rand(dim1,dim2)>percSign)-1)+std*SP.randn(... | |
#!/usr/bin/python
import os
import subprocess
import sys, getopt
import time
import re
import datetime
import json
import copy
import hashlib
import shutil
import random
from pprint import pprint
from subprocess import *
from distutils.spawn import find_executable
VERSION = 3.2
REGEXP_IMPORT = re.compile('/// *<refe... | |
# Copyright 2014 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 telemetry.page import page as page_module
from telemetry.page import shared_page_state
from telemetry import story
class ToughPinchZoomCasesPage(page_m... | |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'badge.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
... | |
from .error import *
from .tokens import *
from .events import *
from .nodes import *
from .loader import *
from .dumper import *
__version__ = '3.09'
try:
from .cyaml import *
__with_libyaml__ = True
except ImportError:
__with_libyaml__ = False
import io
def scan(stream, Loader=Loader):
"""
S... | |
# 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 use ... | |
"""Useful rrd utility functions.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import os
import socket
import time
import six
if six.PY2 and os.name == 'posix':
import subprocess32 as subpro... | |
#! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2011 Patrick Crews
#
#
# 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 Softwar... | |
# Copyright 2017 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 __future__ import division
import os
import unittest
from telemetry import decorators
from telemetry import story
from telemetry.testing import legacy_... | |
# Copyright (c) 2019-2020 by Rocky Bernstein
# 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 ... | |
import logging
import random
from datetime import datetime
import bson
import modularodm.exceptions
import pytz
from django.conf import settings
from django.contrib.contenttypes.fields import (GenericForeignKey,
GenericRelation)
from django.contrib.contenttypes.models im... | |
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import math
from .._errors import pretty_message
from .._ffi import new, null, is_null, buffer_from_bytes, bytes_from_buffer, deref
from ._libcrypto import libcrypto, LibcryptoConst, handle_openssl_error
from ..util imp... | |
#!/usr/bin/python
# Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 appl... | |
"""State unit tests."""
import pytest
from vivid.classes.valueset import ValueSet
from vivid.classes.attribute import Attribute
from vivid.classes.attribute_structure import AttributeStructure
from vivid.classes.attribute_system import AttributeSystem
from vivid.classes.state import State
def test___init__():
""... | |
# -*- coding: utf-8 -*-
from cStringIO import StringIO
from struct import pack
from struct import unpack
from datetime import datetime
import time
def _calcCRC(crc, byte):
table = [0x0000, 0xCC01, 0xD801, 0x1400, 0xF001, 0x3C00, 0x2800, 0xE401,
0xA001, 0x6C00, 0x7800, 0xB401, 0x5000, 0x9C01, 0x8801,... | |
"""
Copyright (c) 2015, 2019 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, unicode_literals, absolute_import
import os
import json
import types
from textwrap import dedent... | |
#!/usr/bin/env python
import getpass
import optparse
import os
import struct
import sys
import unittest
from hashlib import sha256
from random import randrange
PY3 = sys.version_info[0] == 3
if PY3:
import builtins
print_ = getattr(builtins, 'print')
raw_input = getattr(builtins, 'input')
unicode_type ... | |
from numba import jit, jitclass, float64
import numpy as np
@jit(nopython=True)
def _B1_LT_085(x):
# B1.LT_085: lt(0.85)
if 0.0 == 0.0:
return 1.0 if x < 0.85 else 0.0
x1 = 0.85 - 0.0
x2 = 0.85 + 0.0
if x <= x1:
return 1.0
if x <= x2:
return 1.0 - (x - x1) / (x2 - x1)
... | |
import copy
import math
import random
from scipy.spatial.distance import hamming as ham
class CHC:
def __init__(self, archivo):
f = open(archivo)
self.tam_crom = int(f.readline())
print ("Numero instancias: " + str(self.tam_crom))
self.tip = f.readline()
self.tip = sel... | |
import numpy as np
import collections
import pdb
from nn.math import softmax, make_onehot
# This is a 2-Layer Deep Recursive Neural Netowrk with two ReLU Layers and a softmax layer
# You must update the forward and backward propogation functions of this file.
# You can run this file via 'python rnn2deep.py' to perfor... | |
from direct.distributed import DistributedObject
from toontown.toonbase import ToontownGlobals
import MailboxGlobals
from toontown.catalog import CatalogItem
from toontown.catalog import CatalogItemList
from toontown.toontowngui import TTDialog
from toontown.toonbase import TTLocalizer
from toontown.catalog import Mail... | |
import logging
from collections import defaultdict
import networkx
import pyvex
from . import Analysis
from .code_location import CodeLocation
from ..annocfg import AnnotatedCFG
from ..errors import AngrBackwardSlicingError
from ..utils.constants import DEFAULT_STATEMENT
l = logging.getLogger(name=__name__)
class... | |
from django.db import connection, transaction, DatabaseError
from xformmanager.tests.util import *
from xformmanager.models import Metadata, MetaDataValidationError
from xformmanager.manager import XFormManager, FormDefError
from receiver.models import Submission, Attachment, SubmissionHandlingOccurrence
import unittes... | |
# python3
# Copyright 2020 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs, csv, datetime, itertools, json, logging, operator, pprint, shutil, urllib
import requests
from django.utils.http import urlquote_plus
from rapid_app import settings_app
from rapid_app.models import PrintTitleDev, ProcessorTracker
log = lo... | |
from __future__ import absolute_import
from bokeh.io import save
from bokeh.plotting import figure
from bokeh.models import CustomJS, Range1d, DataRange1d
from selenium.webdriver.common.action_chains import ActionChains
import pytest
pytestmark = pytest.mark.integration
def make_pan_plot_with_callback(xr=None, yr=N... | |
"""
Regression tests for the Test Client, especially the customized assertions.
"""
from django.test import Client, TestCase
from django.core.urlresolvers import reverse
import os
class AssertContainsTests(TestCase):
def test_contains(self):
"Responses can be inspected for content, including counting repe... | |
# -*- coding: utf-8 -*-
""" Update an Attendify speakers XLSX file with the current list of
speakers.
Usage: manage.py attendify_speakers_xlsx ep2016 speakers.xlsx
Note that for Attendify you have to download the speakers before
running this script, since they add meta data to the downloaded
file ... | |
# Copyright 2021 The TensorFlow Probability Authors.
#
# 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... | |
from __future__ import absolute_import
import os
import logging
import tarfile
import hashlib
from collections import namedtuple
from urlparse import urlparse
import toml
import json
import zinc.helpers as helpers
import zinc.utils as utils
from .catalog import ZincCatalog
from .defaults import defaults
from .coordin... | |
# 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. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
#!/usr/bin/env python
from __future__ import absolute_import, division, with_statement
from tornado.httputil import url_concat, parse_multipart_form_data, HTTPHeaders
from tornado.escape import utf8
from tornado.testing import LogTrapTestCase
from tornado.util import b
import logging
import unittest
class TestUrlCo... | |
import os
from flask import render_template, current_app, flash, redirect, session, url_for, request, g
from flask_login import login_user, logout_user, current_user, login_required
from app import db, lm, admin
from .forms import *
from . import main_bp
from app.models import User, ROLE_APPLICANT, ROLE_ADVISER, ROLE_A... | |
# 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... | |
import gameDefs
Game = gameDefs.Game
Drive = gameDefs.Drive
Play = gameDefs.Play
Event = gameDefs.Event
def getPlay(game, drive, play, item, itemWNames):
play.body = itemWNames
gain = 0
kickoffLoc = item.find(' kickoff')
onsideLoc = item.find('on-side kick')
fieldGoalLoc = item.find(' field goal')
extraPointL... | |
# -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import logging
import datetime
from io import BytesIO
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
from .auth import HTTPBasicAuth
from .c... | |
# Copyright 2014 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... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# DCASE 2016::Acoustic Scene Classification / Baseline System
import argparse
import textwrap
import timeit
import skflow
from sklearn import mixture
from sklearn import preprocessing as pp
from sklearn.externals import joblib
from sklearn.metrics import confusion_matri... | |
""" implement the TimedeltaIndex """
from pandas._libs import index as libindex, lib
from pandas._libs.tslibs import Timedelta, to_offset
from pandas._typing import DtypeObj
from pandas.errors import InvalidIndexError
from pandas.core.dtypes.common import TD64NS_DTYPE, is_scalar, is_timedelta64_dtype
from pandas.cor... | |
# 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 applicable ... | |
# coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import shu... | |
#!/usr/bin/env python
################################################################################
# Copyright (c) 2010 Michael Fairley
#
# 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... | |
#!/usr/bin/python
# Copyright (c) 2011 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.
# suppressions.py
"""Post-process Valgrind suppression matcher.
Suppressions are defined as follows:
# optional one-line comments an... | |
#!/usr/bin/env python
# -*- coding: utf8 -*-
import unittest
from asciicanvas import colors
from asciicanvas.style import Style
from asciicanvas.asciicanvas import AsciiCanvas
class TestAsciiCanvas(unittest.TestCase):
"""
Test cases for AsciiCanvas
"""
def test_canvas_size(self):
ascii_canva... | |
import bcrypt
import datetime
import hashlib
import math
from collections import defaultdict
from flask import (
abort, render_template, flash, g, request, redirect, make_response, url_for)
from . import app
from .lib import current_page, authenticate, authenticated_endpoint, validate_signup, create_user, hash_p... | |
#!/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... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | |
import re
import os
import sys
import inspect
import time
import functools
import shutil
import imp
from six import exec_
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.button import Button
from kivy.base import runTouchApp
from kivy.factor... | |
# 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... | |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... | |
#Main thread:
# Lock NewFrameAvailable lock.
# Loop:
# See if the face detector has new faces to add.
# Camera takes a picture.
# The main thread waits until all other threads have finished using the previous frame.
# The previous frame is rendered (with any modifications).
# Initiate new face trackers... | |
print 'start'
from dolfin import *
import sys
from random import gauss, expovariate
import math
from math import atan, pi, atan2, sqrt
import numpy as np
import nanopores as nano
import nanopores.geometries.pughpore as pughpore
from get_F import Force, Current
from get_D import Dx, Dy, Dz, dxDx, dyDy, dzDz, dis
import ... | |
"""
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
import dj_database_url
def env(key,... | |
# Licensed under a 3-clause BSD style license - see PYFITS.rst
import gzip
import errno
import http.client
import mmap
import operator
import io
import os
import sys
import tempfile
import warnings
import zipfile
import re
from functools import reduce
import numpy as np
from .util import (isreadable, iswritable, is... | |
# Copyright (c) 2013 Rackspace Hosting
# 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 req... | |
# 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 code import Code
from model import PropertyType
import cpp_util
import model
import os
class HGenerator(object):
"""A .h generator for a namespac... | |
# Copyright (c) 2016 Simon van Heeringen <simon.vanheeringen@gmail.com>
#
# This module is free software. You can redistribute it and/or modify it under
# the terms of the MIT License, see the file COPYING included with this
# distribution.
""" Module for motif activity prediction """
from __future__ import print_fun... | |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from astropy import units as u
from astropy.time import Time, TimeDelta
from astropy.tests.helper import assert_quantity_allclose
from astrop... | |
# Copyright 2012 Nebula, Inc.
# 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... | |
#!/usr/bin/env python
#
# Copyright 2012 Splunk, 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 ... | |
#!/usr/bin/env python
import sys, time, gc
from omniORB import CORBA, PortableServer
import omniORB
import TypeTest, TypeTest__POA
failed = []
output = 1
exc_info = 0
def tstart(s):
global current_test, output
current_test = s
if output:
sys.stdout.write(s + ": ")
sys.stdout.flush()
def... | |
#!/usr/bin/env python
import os
import re
import string
import sys
import time
import posixpath
import subprocess
from starcluster.clustersetup import ClusterSetup
from starcluster.logger import log
class NfsShares (ClusterSetup):
"""
Automatically mounts external NFS shares on StarCluster nodes
"""
d... | |
# Copyright 2014 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 random
import unittest
import telemetry.timeline.async_slice as tracing_async_slice
import telemetry.timeline.bounds as timeline_bounds
from telemetr... | |
# 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... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 - 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
... | |
# -*- coding: utf-8 -*-
"""Module providing user dashboard content type and functionality"""
import json
import datetime
import os
import time
import uuid as uuid_tool
from Acquisition import aq_inner
from Acquisition import aq_parent
from five import grok
from plone import api
from plone.app.contentlisting.interface... | |
import asyncio
import functools
import json
import os
import string
import escapism
from jupyterhub.proxy import Proxy
from jupyterhub.utils import exponential_backoff
from kubernetes_asyncio import client
from traitlets import Unicode
from .clients import load_config
from .clients import shared_client
from .objects ... | |
# Copyright 2012 OpenStack Foundation
#
# 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 l... | |
'''
Kivy framework
==============
Kivy is an open source library for developing multi-touch applications. It is
cross-platform (Linux/OSX/Windows/Android/iOS) and released under
the terms of the `MIT License <https://en.wikipedia.org/wiki/MIT_License>`_.
It comes with native support for many multi-touch input devices... | |
"""Test the Opentherm Gateway config flow."""
import asyncio
from pyotgw.vars import OTGW_ABOUT
from serial import SerialException
from homeassistant import config_entries, data_entry_flow, setup
from homeassistant.components.opentherm_gw.const import (
CONF_FLOOR_TEMP,
CONF_PRECISION,
DOMAIN,
)
from home... | |
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Rez Project
from __future__ import print_function
from rez.config import config
from rez.vendor.memcache.memcache import Client as Client_, \
SERVER_MAX_KEY_LENGTH, __version__ as memcache_client_version
from rez.utils import py23
from threadi... | |
# 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 ... | |
# 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... | |
"""
A place for internal code
Some things are more easily handled Python.
"""
import ast
import re
import sys
import platform
from .multiarray import dtype, array, ndarray
try:
import ctypes
except ImportError:
ctypes = None
IS_PYPY = platform.python_implementation() == 'PyPy'
if sys.byteorder == 'little':... | |
"""
Tests for scalar Timedelta arithmetic ops
"""
from datetime import (
datetime,
timedelta,
)
import operator
import numpy as np
import pytest
from pandas.errors import OutOfBoundsTimedelta
import pandas as pd
from pandas import (
NaT,
Timedelta,
Timestamp,
offsets,
)
import pandas._testing... | |
import lrparsing
from lrparsing import Keyword, List, Prio, Ref, Token, Opt
from arithmeticExpressions import ALitteral, Addition, Subtraction, Product, Division, EuclideanDivision, Modulo, \
Power, Func, UndefinedLitteral, Min, Max, globalsHeightExpression, globalsWidthExpression, globalsFpsExpression
from trigger... | |
import glob
import pandas as pd
import numpy as np
pd.set_option('display.max_columns', 50) # print all rows
import os
os.chdir("/gpfs/commons/home/biederstedte-934/evan_projects/correct_phylo_files")
normalB = glob.glob("binary_position_RRBS_normal_B_cell*")
mcell = glob.glob("binary_position_RRBS_NormalBCD19pCD27... | |
#!/usr/bin/env python3
"""
Grole is a python (3.5+) nano web framework based on asyncio. It's goals are to be simple, embedable (single file and standard library only) and easy to use.
"""
import asyncio
import socket
import json
import re
import urllib
import traceback
import inspect
import io
import mimetypes
import ... | |
'''
Defines the main analysis functions which are called by the
PyGeoNS executable.
'''
from __future__ import division
import numpy as np
import logging
import subprocess as sp
from pygeons.main.fit import fit
from pygeons.main.reml import reml
from pygeons.main.strain import strain
from pygeons.main.autoclean impor... | |
# 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... | |
#!/usr/bin/env python
#
# Copyright 2009 The Closure Library 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
... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Daniel Lundin <daniel@edgewall.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http... | |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | |
from django.views.generic import *
from teachers.models import *
from teachers.forms import *
from django.shortcuts import *
from baseapp.models import *
from django.contrib import messages
from django.db import *
from datetime import *
from datetime import datetime, timedelta
from django.views.generic import *
from dj... | |
from __future__ import absolute_import
import os
import struct
import io
import warnings
import six
from .protocol import Masker
from netlib import tcp
from netlib import utils
MAX_16_BIT_INT = (1 << 16)
MAX_64_BIT_INT = (1 << 64)
DEFAULT=object()
OPCODE = utils.BiDi(
CONTINUE=0x00,
TEXT=0x01,
BINARY=... | |
# -*- coding: utf-8 -*-
from datetime import timedelta
from openprocurement.api.utils import get_now
# TenderContractResourceTest
def patch_tender_contract(self):
response = self.app.get('/tenders/{}/contracts'.format(self.tender_id))
contract = response.json['data'][0]
fake_contractID = "myselfID"
... | |
"""
@file iotvt_integration.py
"""
##
# @addtogroup iotivity iotivity
# @brief This is iotivity component
# @{
# @addtogroup iotvt_integration iotvt_integration
# @brief This is iotvt_integration module
# @{
##
import os
import time
import string
import subprocess
from oeqa.oetest import oeRuntimeTest
from oeqa.utils... | |
#!/usr/bin/env python
# Copyright (C) 2015 OpenStack, 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... | |
from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:4370")
else:
access = Ser... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.