gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2008-2010, Frank Scholz <dev@coherence-project.org> import os.path import urllib from twisted.python import failure import rhythmdb from coherence.upnp.core.soap_service import errorCode from coherence.upnp.core import DI...
''' Frequently used functions ''' import numpy as np import numpy.ma as ma import numpy.testing as npt from sharppy.sharptab.constants import MISSING, TOL from sharppy.sharptab import utils as utils # vec2comp Tests def test_vec2comp_single(): input_wdir = 225 input_wspd = 7.0710678118654755 correct_u = 5...
# 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...
# 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 ...
# coding: utf-8 # # 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 requi...
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 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...
# Copyright (c) 2013 Per Unneberg # # 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 python # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'robot.ui' # # Created: Sat Feb 21 20:25:38 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! import rospy import actionlib from move_base_msgs.msg import * import ...
import pytest from datetime import datetime from marshmallow import EXCLUDE, fields, INCLUDE, RAISE, Schema, validate from apispec.ext.marshmallow import MarshmallowPlugin from apispec import exceptions, utils, APISpec from .schemas import CustomList, CustomStringField from .utils import get_schemas, build_ref cla...
# Copyright 2019 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...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python3 # Copyright (c) 2014-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. """Test the rawtransaction RPCs. Test the following RPCs: - createrawtransaction - signrawtransacti...
from xml.etree import ElementTree from collections import OrderedDict import io import re tree = ElementTree.parse('vk.xml').getroot() defined_defs = {'void', 'char', 'float', 'uint8_t', 'uint32_t', 'uint64_t', 'int32_t', 'size_t', 'DWORD', 'HINSTANCE', 'HWND', 'HANDLE'} external_structs = {'Display', 'xcb_connectio...
# -*- coding: utf-8 -*- # __ _ _______ ______ _______ __ _ # | | | | _ | _ | | _ | | | | # | |_| | |_| | | || | |_| | |_| | # | | | |_||_| | | # | _ | | __ | | _ | # | | | | _ | | | | _ | | | | # |_| |__|__| |__|___| |_...
import domain import pre_processing as pp import transformation as trans import math class Classification(object): """This class holds several classification methods""" NLTK_TAG_TO_SENTIWORDNET_TAG = {'JJ':'ADJECTIVE', 'RB':'ADVERB', 'VB':'VERB', 'VBZ':'VERB', 'VBP':'VERB'} def...
import datetime import re from typing import Any, Dict, List, Mapping, Union from unittest import mock import orjson from django.conf import settings from django.utils.timezone import now as timezone_now from confirmation.models import Confirmation, create_confirmation_link from zerver.lib.actions import ( do_add...
''' Configuration object ==================== The :class:`Config` object is an instance of a modified Python ConfigParser. See the `ConfigParser documentation <http://docs.python.org/library/configparser.html>`_ for more information. Kivy has a configuration file which determines the default settings. In order to cha...
"""Tests for Broadlink devices.""" import broadlink.exceptions as blke from homeassistant.components.broadlink.const import DOMAIN from homeassistant.components.broadlink.device import get_domains from homeassistant.config_entries import ( ENTRY_STATE_LOADED, ENTRY_STATE_NOT_LOADED, ENTRY_STATE_SETUP_ERROR...
from __future__ import annotations import codecs import copy import io import os from collections import OrderedDict import dials.pychef import libtbx.phil from cctbx.array_family import flex from dials.algorithms.merging.merge import make_dano_plots from dials.pychef import dose_phil_str from dials.report.analysis i...
# 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...
"""Formula unit tests.""" import pytest from vivid.classes.point import Point from vivid.classes.interval import Interval from vivid.classes.attribute import Attribute from vivid.classes.relation import Relation from vivid.classes.attribute_structure import AttributeStructure from vivid.classes.attribute_system impor...
#! /usr/bin/env python ''' Program to send and test the trajectories ''' import roslib; roslib.load_manifest('robotnik_torso_control') import rospy import actionlib import time from actionlib_msgs.msg import * from trajectory_msgs.msg import * from control_msgs.msg import * if __name__ == '__main__': rospy.ini...
# # # Model version # automatically created: 2013/07/06 22:16:03 by copow # # import string import types import importlib import os import os.path import json import imp import pymongo import pprint import re from #APPNAME.lib.db_conn import DBConn from #APPNAME.lib import powlib from #APPNAME.lib.powlib import _lo...
""" Use this module directly: import xarray.plot as xplt Or use the methods on a DataArray: DataArray.plot._____ """ import functools import numpy as np import pandas as pd from .facetgrid import _easy_facetgrid from .utils import ( _add_colorbar, _ensure_plottable, _infer_interval_breaks, _infer_xy_labe...
# -*- coding: utf-8 -*- from __future__ import absolute_import from .base import Type from .isobmff import IsoBmff class Mp4(IsoBmff): """ Implements the MP4 video type matcher. """ MIME = 'video/mp4' EXTENSION = 'mp4' def __init__(self): super(Mp4, self).__init__( mime=...
import nflgame import MySQLdb import MySQLdb.cursors import datetime import os import argparse import gamestats_functions as f import config as c # Location of text file used to translate nflgame player IDs to CBS player IDs lookupfile = os.path.dirname(os.path.abspath(__file__))+"/playerids.txt" # Directory where ph...
""" @package mi.dataset.parser.test @file marine-integrations/mi/dataset/parser/test/test_nutnr_j_cspp.py @author Emily Hahn @brief Test code for a nutnr_j_cspp data parser """ import os from nose.plugins.attrib import attr from mi.core.log import get_logger log = get_logger() from mi.core.exceptions import Recoverab...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 Big Switch Networks, 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.a...
# Copyright (c) 2015 Infoblox 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...
# 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 ...
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # 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 # ...
#!/usr/bin/env python VERSION_STR = 'v0.1' import os import shutil import re import wx import wx.grid as grid import pyfits DEFAULT_TOKENS = ['OBJECT', 'FILTER', 'EXPTIME', 'DATE-OBS', 'FOCUSPOS', 'AIRMASS'] TOKENS_LIST = ['OBJECT', 'FILTER', 'EXPTIME', 'DATE-OBS', 'ORIGIN', 'TELESCOP', 'COMMENT', 'OBSERVER', 'PRIO...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # (c) Camille Scott, 2021 # File : processors.py # License: MIT # Author : Camille Scott <camille.scott.w@gmail.com> # Date : 05.11.2021 from collections import OrderedDict, defaultdict from enum import Enum, unique as unique_enum import functools import inspect impor...
import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import timezone from django.utils.duration import duration_microseconds from django.utils.encoding import force_str class DatabaseOperations(BaseDatabaseOperations): compiler_modul...
from __future__ import unicode_literals from django.db import transaction from django.test import TestCase from django.utils import six from .models import ( Article, InheritedArticleA, InheritedArticleB, Publication, Tag, ) class ManyToManyTests(TestCase): def setUp(self): # Create a couple of Pub...
import gzip import json import os import shutil import hashlib from os.path import join from warnings import warn from contextlib import closing from functools import wraps from typing import Callable, Optional, Dict, Tuple, List, Any, Union import itertools from collections.abc import Generator from collections import...
# 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 ...
# # 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 us...
"""Models for SQLAlchemy.""" import json import logging from sqlalchemy import ( Boolean, Column, DateTime, ForeignKey, Index, Integer, String, Text, distinct, ) from sqlalchemy.dialects import mysql from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ...
# This module contains the analysis options # DEBUG options: these options cause SimuVEX to set breakpoints in various # places or raise exceptions when checks fail. BREAK_SIRSB_START = "BREAK_SIRSB_START" BREAK_SIRSB_END = "BREAK_SIRSB_END" BREAK_SIRSTMT_START = "BREAK_SIRSTMT_START" BREAK_SIRSTMT_END = "BREAK_SIRSTM...
""" Module that contains many useful utilities for validating data or function arguments """ from typing import Iterable, Union import warnings import numpy as np from pandas.core.dtypes.common import is_bool def _check_arg_length(fname, args, max_fname_arg_count, compat_args): """ Checks whether 'args' has...
# Lint as: python3 # 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 ...
from . import color_utils from . import filepath_utils from . import string_utils from . import object_utils from ..rman_constants import RMAN_STYLIZED_FILTERS, RMAN_STYLIZED_PATTERNS, RMAN_UTILITY_PATTERN_NAMES, RFB_FLOAT3 import math import bpy def is_renderman_nodetree(material): return find_node(material, 'Ren...
"""Generic configuration system using unrepr. Configuration data may be supplied as a Python dictionary, as a filename, or as an open file object. When you supply a filename or file, Python's builtin ConfigParser is used (with some extensions). Namespaces ---------- Configuration keys are separated into namespaces b...
"""Support for Todoist task management (https://todoist.com).""" from datetime import datetime, timedelta import logging from todoist.api import TodoistAPI import voluptuous as vol from homeassistant.components.calendar import PLATFORM_SCHEMA, CalendarEventDevice from homeassistant.const import CONF_ID, CONF_NAME, CO...
"""Rackspace provider implementation""" import json import logging import time import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ["rackspacecloud.com"] def _async_request_complete...
# Copyright 2019 kubeflow.org. # # 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,...
"""ToyBox API Server in Python 3.7.""" __author__ = 'Pavel Simakov (psimakov@google.com)' import datetime import json import logging import mimetypes import os import traceback import auth import flask from werkzeug.exceptions import HTTPException import dao # configure logging logging.basicConfig() logging.getLog...
''' Copyright 2013 Douglas Gibbons 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 i...
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
from django.test import TestCase from django.contrib.auth.models import User from wagtail.wagtailcore.models import Page, UserPagePermissionsProxy from wagtail.tests.models import EventPage class TestPagePermission(TestCase): fixtures = ['test.json'] def test_nonpublisher_page_permissions(self): eve...
""" 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/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
import logging from urllib import urlencode from urlparse import urljoin from xml.etree import ElementTree import recurly.js as js from recurly.errors import * from recurly.resource import Resource, Money, PageError """ Recurly's Python client library is an interface to its REST API. Please see the Recurly API doc...
from test import support import types import unittest class FuncAttrsTest(unittest.TestCase): def setUp(self): class F: def a(self): pass def b(): return 3 self.fi = F() self.F = F self.b = b def cannot_set_attr(self, obj, name, v...
import httplib2 from apiclient import discovery, errors from rest_framework.viewsets import ViewSet from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework import status from csp import settings from crowdsourcing import models from apiclient.http import ...
"""Hierarchical Agglomerative Clustering These routines perform some hierarchical agglomerative clustering of some input data. Authors : Vincent Michel, Bertrand Thirion, Alexandre Gramfort, Gael Varoquaux License: BSD 3 clause """ from heapq import heapify, heappop, heappush, heappushpop import warnings im...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
# Copyright 2017, Google LLC 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import select #import signal import time import copy #tcp option SO_REUSEADDR = 1 SO_KEEPALIVE = 1 TCP_NODELAY = 1 SO_SNDBUF = 10240 SO_RCVBUF = 10240 SOCKET_TIMEOUT = 120 #socket list server_list = [] client_list = [] class ServerSocket: def __init__(self,...
""" from twisted.internet import defer Tests borrowed from the twisted.web.client tests. """ import os import shutil import OpenSSL.SSL from twisted.trial import unittest from twisted.web import server, static, util, resource from twisted.internet import reactor, defer try: from twisted.internet.testing import Str...
#!/usr/bin/env python ################################################################################ # # Copyright (c) 2012-2013, Alexander Todorov <atodorov@nospam.dif.io> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
from __future__ import absolute_import import contextlib import errno import locale import logging import re import os import posixpath import shutil import stat import subprocess import sys import tarfile import zipfile from pip.exceptions import InstallationError from pip.compat import console_to_str, stdlib_pkgs f...
from __future__ import unicode_literals from django.core.urlresolvers import reverse import json import pytest import rest_framework from tests.models import Article, Person, Comment pytestmark = pytest.mark.django_db def test_no_pagination_if_all_results(client): molly = Person.objects.create(last_name="Dav...
#!/usr/bin/env python # # SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 """ Generate Kconfig.soc_caps.in with defines from soc_caps.h """ import argparse import inspect import io import logging import sys from difflib import unified_diff from os import path fro...
import numpy as np class PerspCamera(object): r"""Perspective camera in 35mm format. Attributes: f_mm (float): See ``f``. im_h (float): See ``im_res``. im_w (float): See ``im_res``. loc (numpy.ndarray) lookat (numpy.ndarray) up (numpy.ndarray) Note: ...
# Copyright (c) 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...
import logging from collections import Counter logger = logging.getLogger() storage = {'parquet': 'STORED AS PARQUET', 'com.databricks.spark.csv': ("ROW FORMAT SERDE" "'org.apache.hadoop.hive.serde2.OpenCSVSerde'\n" "STORED AS ...
# -*- coding: utf-8 -*- """ equip.analysis.python.types ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Knowledge of Python type system and builtin types. :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ from __future__ import absolute_import import types import _ast from...
import decimal import json import unittest import uuid from django import forms from django.core import exceptions, serializers, validators from django.core.management import call_command from django.db import IntegrityError, connection, models from django.test import TransactionTestCase, override_settings from django...
# # 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 us...
import re from binary_tree_with_parent_prototype import BinaryTreeNode from list_node import ListNode, list_size from test_framework.binary_tree_utils import (binary_tree_height, binary_tree_size) class SerializationTrait: def name(self): raise NotImplemented...
# =============================================================================== # Copyright 2017 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/LICE...
#!/bin/env python '''This script illustrates how to download and access the `local politics` subcorpus within TREC DD This particular corpus is a selection of the TREC KBA 2014 StreamCorpus that has already been tagged with Serif NER, and is organized into hourly directories based on the origination time stamp on each...
""" Author: Justin Cappos Start Date: July 1st, 2008 Description: Handles exiting and killing all threads, tracking CPU / Mem usage, etc. """ import threading import os import time # needed for sys.stderr and windows Popen hackery import sys # needed for signal numbers import signal # needed for harshexit imp...
""" Interval datatypes """ import pkg_resources pkg_resources.require( "bx-python" ) import logging, os, sys, time, sets, tempfile, shutil import data from galaxy import util from galaxy.datatypes.sniff import * from galaxy.web import url_for from cgi import escape import urllib from bx.intervals.io import * from gal...
# 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 ...
#www.stuffaboutcode.com #Raspberry Pi, Minecraft Twitter #import the minecraft.py module from the minecraft directory import minecraft.minecraft as minecraft #import minecraft block module import minecraft.block as block #import time, so delays can be used import time #import oauth for twitter security from oauth.oaut...
"""The WaveBlocks Project This file contains the basic interface for general wavepackets. @author: R. Bourquin @copyright: Copyright (C) 2012, 2013, 2014, 2016 R. Bourquin @license: Modified BSD License """ from numpy import array, complexfloating, cumsum, vsplit, vstack, zeros, conjugate from scipy import sqrt from...
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
import os import shutil import sys import tempfile import pytest from mock import Mock, mock_open, patch from pip._vendor import pkg_resources from pip._vendor.packaging.markers import Marker from pip._vendor.packaging.requirements import Requirement from pip._internal.commands.install import InstallCommand from pip....
# coding=utf-8 # 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 app...
# 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...
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2016 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file LICENSE, which # you should have received as part of this distribution. # import abc import asyncio import base64 import functools import hashlib import hmac import http.co...
"""Support for Prometheus metrics export.""" import logging import string from aiohttp import web import prometheus_client import voluptuous as vol from homeassistant import core as hacore from homeassistant.components.climate.const import ( ATTR_CURRENT_TEMPERATURE, ATTR_HVAC_ACTION, CURRENT_HVAC_ACTIONS...
import traceback import optparse import inspect import sys import os import shlex from ast import literal_eval as safe_eval try: _maxsize = sys.maxint except: # python3 _maxsize = sys.maxsize PY3 = sys.version_info[0] == 3 class MagicOptionParser(optparse.OptionParser): def error(self, msg): ...
# -*- coding: utf-8 -*- # Copyright 2013 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...
# Copyright 2017 ETH Zurich # # 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, sof...
#!/usr/bin/python # -*- coding: utf-8 -*- import os import shutil import verilog as vl import userlogic import communication import software as sw CLOCK = "clk" RESET = "rst" TEMPLATE = os.path.dirname(os.path.abspath(__file__)) + '/template/' class Component(object): def __init__(self, compname): self.clock = "clk...
# This file is part of Spyrk. # # Spyrk 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 3 of the License, or # (at your option) any later version. # # Spyrk is distributed in the hope tha...
# -*- coding: utf-8 -*- import datetime import random import re import os import tempfile import json import string from PIL import Image from slugify import slugify import requests from django.core.files import File from django.db import transaction from django.utils import timezone from django.conf import settings...
# Copyright DataStax, 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, softwa...
from __future__ import print_function, division from sympy.core.basic import C from sympy.core.expr import Expr from sympy.core.relational import Eq from sympy.core.sets import Interval from sympy.core.singleton import S from sympy.core.symbol import (Dummy, Wild, Symbol) from sympy.core.sympify import sympify from sy...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-12 17:33 from __future__ import unicode_literals import uuid import django.db.models.deletion import django.db.models.manager import mptt.fields from django.conf import settings from django.db import migrations from django.db import models import content...
import maya.cmds class RibMaya(object): """Methodes for Rib managment in Maya""" def __init__( self ): self.output = 'E:/141031_defaultProject/maya/3delight/rib_scene_001/rib/obj/ribObject_python.rib' def verbose( self ): print 'pouet' # print self.ribObject( name='obj1', face='1 1', vtxPerFace='4 4', vtxInd...
""" Contains functions to perform technical analysis on pandas OHLCV data frames """ import logging from typing import Union import pandas as pd import pytech.utils.pandas_utils as pd_utils logger = logging.getLogger(__name__) def sma(df: pd.DataFrame, period: int = 50, col: str = pd_utils.CLOSE_CO...
# Copyright 2019 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...
"""SCons.Tool SCons tool selection. This looks for modules that define a callable object that can modify a construction environment as appropriate for a given tool (or tool chain). Note that because this subsystem just *selects* a callable that can modify a construction environment, it's possible for people to defin...
from pandac.PandaModules import * from DistributedNPCToonBase import * from direct.gui.DirectGui import * from pandac.PandaModules import * import NPCToons from direct.task.Task import Task import TailorClothesGUI from toontown.toonbase import TTLocalizer import ToonDNA from toontown.estate import ClosetGlobals class ...