text
stringlengths
475
200k
# Copyright 2014-2015 MongoDB, 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 writi...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2012 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
# Copyright 2013 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...
from ginger.dataset import GingerDataSet from django.forms.widgets import CheckboxInput import re from collections import namedtuple from django.middleware import csrf from django.utils import six from django.utils.encoding import force_text from ginger import utils from . import common __all__ = ["Choice", "Link", ...
""" Beckman Coulter Access 2 """ from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from . import BeckmancoulterAccessCSVParser, BeckmancoulterAccessImporter import json import traceback title = "Beckman Coulter Access 2" def Import(context, request): """ Beckman Coulter Access 2 analysi...
#!/usr/bin/env python # coding: utf8 """ Oneall Authentication for web2py Developed by Nathan Freeze (Copyright © 2013) Email <[EMAIL]> This file contains code to allow using onall.com authentication services with web2py """ import os import base64 from gluon import * from gluon.storage import Storage...
# Copyright (c) 2011-2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
import errno import os import tempfile from django.conf import settings from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured class SessionStore(SessionBase): """ Implements a file based session store. """ ...
# -*- coding: utf-8 -*- import time import openerp class m(openerp.osv.osv.Model): """ This model exposes a few methods that will consume between 'almost no resource' and 'a lot of resource'. """ _name = 'test.limits.model' def consume_nothing(self, cr, uid, context=None): return True...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
import time import queue from typing import List, Optional from wsproto.frame_protocol import CloseReason from wsproto.frame_protocol import Opcode from mitmproxy import flow from mitmproxy.net import websockets from mitmproxy.coretypes import serializable from mitmproxy.utils import strutils, human class WebSocket...
import os import logging from autotest.client import utils from autotest.client.shared import error from virttest import data_dir from virttest import qemu_virtio_port # This decorator makes the test function aware of context strings @error.context_aware def run(test, params, env): """ QEMU 'Windows virtio-...
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : [EMAIL] **...
# Example of a generator: re-implement the built-in range function # without actually constructing the list of values. (It turns out # that the built-in function is about 20 times faster -- that's why # it's built-in. :-) # Wrapper function to emulate the complicated range() arguments def range(*a): if len(a) == 1...
import unittest from stem.interpreter.arguments import DEFAULT_ARGS, parse, get_help class TestArgumentParsing(unittest.TestCase): def test_that_we_get_default_values(self): args = parse([]) for attr in DEFAULT_ARGS: self.assertEqual(DEFAULT_ARGS[attr], getattr(args, attr)) def test_that_we_load_...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.auth', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'mptt', 'cms', 'menus', 'djangocms_googlemap', 'south', ] DATABASES = { ...
# -*- coding: utf-8 -*- # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
from __future__ import unicode_literals import json from datetime import timedelta from django.core.urlresolvers import reverse from django.utils import timezone from mock import patch from temba.contacts.models import ContactField from temba.flows.models import RuleSet from temba.orgs.models import Language from tem...
# # 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 ...
from __future__ import (absolute_import, division, print_function, unicode_literals) import logging from binascii import a2b_base64, b2a_base64 from contextlib import contextmanager from multiprocessing.pool import ThreadPool from mentos.exceptions import (DetectorClosed, NoLeadingMaster, ...
from veripy.models import ComplianceTestSuite from veripy.models.decorators import must, should import client #import relay_agent import server class StatelessDHCPv6ServiceClientSpecification(ComplianceTestSuite): """ Stateless Dynamic Host Configuration Protocol Service for IPv6 (DHCPv6 Client) These te...
# -*- coding: utf-8 -*- # Copyright 2010-2013 Kolab Systems AG (http://www.kolabsys.com) # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # # 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 ...
#!/usr/bin/env python # Copyright (c) 2013 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. """ Make sure PGO is working properly. """ import TestGyp import os import sys if sys.platform == 'win32': test = TestGyp.TestGyp(forma...
# # Copyright 2018 Red Hat | Ansible # # 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) any later version. # # ...
from functools import update_wrapper from django.contrib import admin from django.core.urlresolvers import reverse from django.db import models from django.http import HttpResponseRedirect from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Action(models.Model): name ...
""" Tests for the linecache module """ import linecache2 as linecache import unittest2 as unittest import os.path import tempfile from fixtures import NestedTempfile FILENAME = os.__file__ if FILENAME.endswith('.pyc'): FILENAME = FILENAME[:-1] NONEXISTENT_FILENAME = FILENAME + '.missing' INVALID_NAME = '!@$)(!@#...
# sql/__init__.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from sqlalchemy.sql.expression import ( Alias, ClauseElement, ColumnCollec...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Matt Hite <[EMAIL]> # # 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...
# This file is part of Osgende # Copyright (C) 2020 Sarah Hoffmann # # This 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 2 # of the License, or any later version. # # This program is distribu...
""" Acceptance tests for Studio's Settings Details pages """ from unittest import skip from .base_studio_test import StudioCourseTest from ...fixtures.course import CourseFixture from ...pages.studio.settings import SettingsPage from ...pages.studio.overview import CourseOutlinePage from ...tests.studio.base_studio_te...
# -*- coding: utf-8 -*- # # 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 ...
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict_...
"""Routines related to PyPI, indexes""" import sys import os import re import mimetypes import posixpath from pip.log import logger from pip.util import Inf, normalize_name, splitext, is_prerelease from pip.exceptions import (DistributionNotFound, BestVersionAlreadyInstalled, InstallationE...
#!/usr/bin/python # Author: Jon Trulson <[EMAIL]> # Copyright (c) 2016 Intel Corporation. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation...
# -*- coding: utf-8 -*- """ twp support functions @author: Jev Kuznetsov Licence: GPL v2 """ from scipy import polyfit, polyval import datetime as dt #from datetime import datetime, date from pandas import DataFrame, Index, Series import csv import matplotlib.pyplot as plt import numpy as np import p...
import sys if __name__ == '__main__': import os pkg_dir = (os.path.split( os.path.split( os.path.split( os.path.abspath(__file__))[0])[0])[0]) parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'tests' and ...
from Components.config import config from Renderer import Renderer from enigma import eLabel, eTimer from boxbranding import getMachineProcModel from Components.VariableText import VariableText class RollerCharLCD(VariableText, Renderer): def __init__(self): Renderer.__init__(self) VariableText.__init__(self) i...
# strings assert 'a'.__class__ == str assert isinstance('a',str) hello = "This is a rather long string containing\n\ several lines of text just as you would do in C.\n\ Note that whitespace at the beginning of the line is\ significant." hello = """\ Usage: thingy [OPTIONS] -h Display...
# 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...
# 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...
# -*- coding: utf-8 -*- # # test_facetshw_stdp.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 2 of the Lice...
#!/usr/bin/env python # # Copyright (C) 2009 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
import pygame import random pygame.display.set_caption("Multi Bingo") screen = pygame.display.set_mode((0,0)) screen.fill([0,0,0]) pygame.mouse.set_visible(False) meter = pygame.image.load('graphics/assets/black_register_cover.png').convert() odds = pygame.image.load('super_7/assets/odds.png').convert_alpha() eb = p...
# Copyright (c) 2018 PaddlePaddle 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 appli...
#!/usr/bin/env python # # Copyright 2011-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
"""fontTools.ttLib -- a package for dealing with TrueType fonts. This package offers translators to convert TrueType fonts to Python objects and vice versa, and additionally from Python to TTX (an XML-based text format) and vice versa. Example interactive session: Python 1.5.2c1 (#43, Mar 9 1999, 13:06:43) [CW PP...
# -*- coding: utf-8 -*- """ *************************************************************************** classification.py --------------------- Date : July 2015 Copyright : (C) 2015 by Arnaud Morvan Email : arnaud dot morvan at camptocamp dot com **********...
# Copyright 2013 Centrin Data Systems Ltd. # # 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 -*- import os, time import hashlib import datetime from warnings import warn from .helpers import request_except_handler, require_auth from app.configparser import config from app.utils import get_json_localization from app.mixins.auth import AuthMixin from app.mixins.routes import JsonResponseM...
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://static.aryehleib.com/oldsite/MutableLists.html Author: Aryeh Leib Taurog. """ from fun...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import matplotlib.pyplot as plt from ....wcs import WCS from ....tests.helper import pytest, remote_data from .. import WCSAxes from ..frame import BaseFrame from ....tests.image_tests import IMAGE_REFERENCE_DIR from .test_images imp...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015, 2016 CERN. # # Invenio 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 2 of the # License, or (at your optio...
# -*- coding: utf-8 -*- __license__ = 'GPL 3' __copyright__ = '2009, John Schember <[EMAIL]>' __docformat__ = 'restructuredtext en' import re class TCRCompressor(object): ''' TCR compression takes the form header+code_dict+coded_text. The header is always "!!8-Bit!!". The code dict is a list of 256 strin...
# Copyright (c) 2011 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 ...
__all__ = ['oldtype2dtype', 'convtypecode', 'convtypecode2', 'oldtypecodes'] import numpy as np oldtype2dtype = {'1': np.dtype(np.byte), 's': np.dtype(np.short), # 'i': np.dtype(np.intc), # 'l': np.dtype(int), # 'b': np.dtype(np.ubyte), ...
import base64 import datetime import re from uuid import UUID from math import isnan, isinf import logging LOG = logging.getLogger(__name__) import bson import bson.json_util from mongo_connector.compat import PY3 if PY3: long = int unicode = str RE_TYPE = type(re.compile("")) try: from bson.regex im...
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
#FLM: RoboFab Intro, Generating Fonts # # # demo generating fonts with robofab # # # Generating fonts with RoboFab is super easy! Let's have a look. # (you will need to have a font open in FontLab) from robofab.world import CurrentFont import os # A little function for making folders. we'll need it later. def make...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
""" This is the template for extracting the solution for the computation problem of computing real solution of a polynomial system of equations RR from the output of the computer algebra system Z3. .. moduleauthor:: Albert Heinle <[EMAIL]> """ import xml.dom.minidom as dom import re #--------------------------------...
from vector3 import Vector3 import Image, ImageDraw def bounding_cube(layers): min_x = 999999 min_y = 999999 min_z = 999999 max_x = -999999 max_y = -999999 max_z = -999999 for layer in layers: for thread in layer: for point in thread: if point.x > max_x: ...
# Copyright (C) 2014 eNovance SAS <[EMAIL]> # # 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...
# (c) 2012-2014, Michael DeHaan <[EMAIL]> # # 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) any later version. ...
# # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE...
# CER decoder from pyasn1.type import univ from pyasn1.codec.ber import decoder from pyasn1.compat.octets import oct2int from pyasn1 import error class BooleanDecoder(decoder.AbstractSimpleDecoder): protoComponent = univ.Boolean(0) def valueDecoder(self, fullSubstrate, substrate, asn1Spec, tagSet, length, ...
#!/usr/bin/env python # # Use the raw transactions API to spend sidecoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a sidecoind or S...
#!/usr/bin/env python # Copyright (c) 2015 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and/or associated documentation files (the # "Materials"), to deal in the Materials without restriction, including # without limitation the rights to use...
# # Copyright 2005,2006,2007,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any l...
__author__ = 'Robert Smallshire' class Node(object): def __init__(self, indent=None, lines=None, parent=None): if indent is not None: self.indent = indent else: self.indent = 0 if lines is not None: self.lines = lines else: ...
# # genxmlif, Release 0.9.0 # file: xmlifbase.py # # XML interface base classes # # history: # 2005-04-25 rl created # 2006-08-18 rl some methods for XML schema validation support added # 2007-05-25 rl performance optimization (caching) added, bugfixes for XPath handling # 2007-07-04 rl complete re-de...
from twilio.rest import TwilioRestClient from twilio import TwilioRestException from redis import StrictRedis import time import details account_sid = details.twilio_account_sid auth_token = details.twilio_auth_token client = TwilioRestClient(account_sid, auth_token) twilio_number = details.twilio_num r = StrictRed...
#************************************************************************ # Codelet Tuning Infrastructure # Copyright (C) 2010-2015 Intel Corporation, CEA, GENCI, and UVSQ # # 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 # th...
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
from __future__ import print_function, division __all__ = ['LagrangesMethod'] from sympy import diff, zeros, Matrix, eye, sympify from sympy.physics.vector import dynamicsymbols, ReferenceFrame from sympy.physics.mechanics.functions import (find_dynamicsymbols, msubs, _f_list_parser) from sympy.physics.mechan...
"""Script to generate doxygen documentation. """ import re import os import os.path import sys import shutil from devtools import tarball def find_program(*filenames): """find a program in folders path_lst, and sets env[var] @param filenames: a list of possible names of the program to search for @return: ...
# -*- coding: utf-8 -*- # # 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 #...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Scriptharness exceptions. These exceptions are written with several things in mind: #. the exceptions should be unicode-capable in python 2.7 (py3 gets that for free), #. the exceptions should differentiate between user-facing exceptions and developer-facing ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vispy: gallery 2 # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ 3D brain mesh viewer. """ from timeit import default_timer import numpy as np from vispy import gloo from vispy import app from ...
# Copyright 2020 The Johns Hopkins University Applied Physics Laboratory # # 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 Michael De La Rue | Ansible # # 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) any later ver...
""" Python 'uu_codec' Codec - UU content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg ([EMAIL]). Some details were adapted from uu.py which was written by Lance Ellinghouse...
""" Setup script for the Open edX package. """ from setuptools import setup setup( name="Open edX", version="0.5", install_requires=["setuptools"], requires=[], # NOTE: These are not the names we should be installing. This tree should # be reorganized to be a more conventional Python tree. ...
#!/usr/bin/env python # Toon Bot - Poster Bot Subprocess # # _____ U ___ u U ___ u _ _ ____ U ___ u _____ # |_ " _| \/"_ \/ \/"_ \/ | \ |"| U | __")u \/"_ \/|_ " _| # | | | | | | | | | |<| \| |> \| _ \/ | | | | | | # /| |\.-,_| |_| |.-,_| |_| |U| |\ |u ...
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 Michal Čihař <[EMAIL]> # # This file is part of Weblate <https://weblate.org/> # # 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 versio...
import os import sys import urllib.parse try: from fuzzywuzzy import fuzz except ImportError: print('[*] fuzzywuzzy not found.') print('[*] Please run the script in the setup directory!') sys.exit() def process_group( data, group, toc, toc_table, page_num, section, sectionid, html): ...
"""$DOC""" __version__ = "$VERSION" import logging import pytest logger = logging.getLogger(__name__) _automark = False _ignore_unknown = False def _get_bool(value): """Evaluate string representation of a boolean value. """ if value: if value.lower() in ["0", "no", "n", "false", "f", "off"]: ...
# # (c) 2016 Red Hat Inc. # # 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) any later version. # # Ansible is d...
#!/usr/bin/env python import sys,os from collections import defaultdict def read_to_hash(fname,ds=0,de=0,flank=0,cover=False): #print "loading",fname pos = {} for line in file(fname): if line.startswith("#"): continue line = line.strip() chrom,start,end,name,score,sense...
# A necrobot "casual" race room. import asyncio import datetime import discord from necrobot.botbase.botchannel import BotChannel from necrobot.botbase.necrobot import Necrobot from necrobot.config import Config from necrobot.race import cmd_race from necrobot.race import raceinfo from necrobot.race.publicrace impor...
"""Temperature util functions.""" from homeassistant.const import ( TEMP_CELSIUS, TEMP_FAHRENHEIT, UNIT_NOT_RECOGNIZED_TEMPLATE, TEMPERATURE ) def fahrenheit_to_celsius(fahrenheit: float) -> float: """Convert a Fahrenheit temperature to Celsius.""" return (fahrenheit - 32.0) / 1.8 def celsiu...
# @author zfedoran / http://github.com/zfedoran import os import sys import math import operator import re import json import types import shutil # ##################################################### # Globals # ##################################################### option_triangulate = True option_textures = True o...
# 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. """Some utility methods for getting and manipulating paths.""" # TODO(pamg): Have the buildbot use these, too. import errno import os import sys clas...
# # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core business involves the administration of students, teachers, # courses, progr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gzip import random import re from io import BytesIO from unittest import skipIf from django.conf import settings from django.core import mail from django.core.exceptions import PermissionDenied from django.http import ( FileResponse, HttpReque...
"""Provide the Subreddit class.""" # pylint: disable=too-many-lines from copy import deepcopy from json import dumps, loads from os.path import basename, dirname, join from urllib.parse import urljoin from prawcore import Redirect import websocket from ...const import API_PATH, JPEG_HEADER from ...exceptions import A...
from django.conf.urls.defaults import * class URLObject(object): def __init__(self, app_name, namespace): self.app_name = app_name self.namespace = namespace def urls(self): return patterns('', url(r'^inner/$', 'empty_view', name='urlobject-view'), url(r'^inner/...
import _krunner import abc from PyQt5 import QtCore __all__ = ["AbstractRunner", "QueryMatch", "RunnerContext", "RunnerSyntax"] for name in __all__[1:]: cls = getattr(_krunner.Plasma, name) globals()[name] = cls cls.__module__ = __name__ del name del cls class ARMeta(type(_krunner.Plasma.AbstractRunne...
""" Helper functions that can display leaflet maps inline in an ipython notebook """ from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins i...
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...