repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
rbaindourov/v8-inspector
Source/build/scripts/template_expander.py
64
2836
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
odb9402/OPPA
oppa/Helper/tools.py
1
5111
import os import time import glob import re from ..calculateError import run as calculateError from ..loadParser.parseLabel import run as parseLabel from ..loadParser.loadPeak import run as loadPeak """ These methods are common parts of learning processes which are in learn****param.py. """ def parallel_learning(MAX...
mit
sahilTakiar/spark
examples/src/main/python/mllib/stratified_sampling_example.py
128
1368
# # 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...
apache-2.0
EvanK/ansible
lib/ansible/modules/network/illumos/dladm_linkprop.py
52
7820
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
tangentlabs/wagtail
wagtail/wagtailforms/views.py
10
4274
import datetime import csv from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.shortcuts import get_object_or_404, render, redirect from django.utils.encoding import smart_str from django.utils.tr...
bsd-3-clause
IronLanguages/ironpython2
Src/StdLib/Lib/site-packages/win32/test/test_pywintypes.py
2
3632
import sys import unittest import pywintypes import time from pywin32_testutil import str2bytes, ob2memory import datetime import operator class TestCase(unittest.TestCase): def testPyTimeFormat(self): struct_current = time.localtime() pytime_current = pywintypes.Time(struct_current) # try ...
apache-2.0
DCGM/EmotionService
src/clusterFaces.py
1
5407
#!/usr/bin/env python from __future__ import print_function import time import argparse import cv2 import os from operator import itemgetter from collections import defaultdict from scipy.cluster.hierarchy import linkage, fcluster from scipy.spatial.distance import pdist import numpy as np import caffe from classif...
bsd-2-clause
ozzmeister00/mazeGeneration
mazeGame_hard.py
1
6271
''' Hard version of the maze game, which only shows the grid immediately around the player First iteration, moved the logic around after this was first done to support a multiple-difficulties mazeGame ''' import maze import random import time verbDict = {'up':['up','u','north','n'], 'down':['down', 'd', '...
gpl-3.0
tapomayukh/projects_in_python
sandbox_tapo/src/refs/google-python-exercises/copyspecial/solution/copyspecial.py
206
2584
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os import shutil import commands """Copy Special exercise """ #...
mit
xxhank/namebench
nb_third_party/dns/rdtypes/ANY/RP.py
248
3275
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
ryfeus/lambda-packs
Pdf_docx_pptx_xlsx_epub_png/source/pip/_vendor/requests/packages/chardet/big5freq.py
3133
82594
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
mit
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9-SunOS-i386/lib/python/lib/python2.4/lib-old/fmt.py
9
18532
# Text formatting abstractions # Note -- this module is obsolete, it's too slow anyway import string import Para # A formatter back-end object has one method that is called by the formatter: # addpara(p), where p is a paragraph object. For example: # Formatter back-end to do nothing at all with the paragraphs cl...
gpl-2.0
LTHeaven/PokemonGo-Map
pogom/pgoapi/auth_ptc.py
3
3552
""" pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
mit
andresailer/DIRAC
Core/scripts/dirac-info.py
2
2553
#!/usr/bin/env python ######################################################################## # File : dirac-info # Author : Andrei Tsaregorodtsev ######################################################################## """ Report info about local DIRAC installation """ __RCSID__ = "$Id$" import os import DIR...
gpl-3.0
giovtorres/docker-centos7-slurm
tests/test_dockerfile.py
1
2157
import subprocess import time import pytest import testinfra @pytest.fixture(scope="session") def host(request): test_image = "docker-centos7-slurm:spec-test" subprocess.check_call(["docker", "build", "-t", test_image, "."]) docker_id = subprocess.check_output( ["docker", "run", "-d", "-it", "-h"...
mit
datalogics/scons
test/CVS.py
2
10521
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
facebook/mysql-5.6
xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/bug817132_test.py
24
5425
#! /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...
gpl-2.0
nesdis/djongo
tests/django_tests/tests/v22/tests/auth_tests/test_remote_user.py
31
11327
from datetime import datetime from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.backends import RemoteUserBackend from django.contrib.auth.middleware import RemoteUserMiddleware from django.contrib.auth.models import User from django.test import TestCase, modify_set...
agpl-3.0
veridiam/Madcow-Waaltz
build/lib/madcow/modules/megahal.py
8
4744
"""MegaHAL Interface""" import re import os import time import sys from madcow.util import Module from madcow.util.text import * import shutil class MegaHALError(Exception): """Base MegaHAL Error""" class InvalidID(MegaHALError): """Raised when an invalid ID is supplied""" class Uninitialized(MegaHALErr...
gpl-3.0
programa-stic/barf-project
tests/core/__init__.py
98
1345
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
bsd-2-clause
tachang/xhtml2pdf
tests/test_utils.py
89
8136
#-*- coding: utf-8 -*- from reportlab.lib.colors import Color from unittest import TestCase from xhtml2pdf.util import getCoords, getColor, getSize, getFrameDimensions, \ getPos, getBox from xhtml2pdf.tags import int_to_roman class UtilsCoordTestCase(TestCase): def test_getCoords_simple(self): ...
apache-2.0
xianggong/m2c_unit_test
test/operator/post_decrement_short16/compile.py
1861
4430
#!/usr/bin/python import os import subprocess import re def runCommand(command): p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) p.wait() return iter(p.stdout.readline, b'') def dumpRunCommand(command,...
gpl-2.0
jaggu303619/asylum-v2.0
openerp/addons/l10n_de/__init__.py
693
1057
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
cosurgi/trunk
examples/mpi/fibres/exampleFibresMPI.py
1
6543
#Example showing how to run 'fiber' (gridNode+girdConnection) in Yade-MPI from yade import utils from yade.gridpfacet import * from yade import mpy as mp # create a Fiber class with attributes of the nodes it consists, the node which corresponds to the centre of mass, and a tuple 'segs' which consists the node pair ...
gpl-2.0
HenriqueLR/simple-route
app/seek/views.py
1
3996
#encoding> utf-8 from core.models import Maps, Routes from core.serializers import MapsSerializer, RoutesSerializer from django.http import Http404 from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from django.http import HttpResponse import json fr...
mit
yukoba/sympy
sympy/unify/usympy.py
93
4015
""" SymPy interface to Unification engine See sympy.unify for module level docstring See sympy.unify.core for algorithmic docstring """ from __future__ import print_function, division from sympy.core import Basic, Add, Mul, Pow from sympy.matrices import MatAdd, MatMul, MatrixExpr from sympy.sets.sets import Union, ...
bsd-3-clause
bratsche/Neutron-Drive
neutron-drive/django/contrib/localflavor/hr/hr_choices.py
91
2810
# -*- coding: utf-8 -*- """ Sources: Croatian Counties: http://en.wikipedia.org/wiki/ISO_3166-2:HR Croatia doesn't have official abbreviations for counties. The ones provided are in common use. """ from django.utils.translation import ugettext_lazy as _ HR_COUNTY_CHOICES = ( ('GZG', _('Grad Zagreb')),...
bsd-3-clause
philanthropy-u/edx-platform
common/djangoapps/terrain/stubs/video_source.py
24
1588
""" Serve HTML5 video sources for acceptance tests """ import os from contextlib import contextmanager from logging import getLogger from SimpleHTTPServer import SimpleHTTPRequestHandler from .http import StubHttpService LOGGER = getLogger(__name__) class VideoSourceRequestHandler(SimpleHTTPRequestHandler): """...
agpl-3.0
patrickcurl/ztruck
dj/lib/python2.7/site-packages/django/conf/locale/az/formats.py
1059
1267
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j E Y г.' TIME_FORMAT = 'G:i' DAT...
apache-2.0
Anlim/decode-Django
Django-1.5.1/django/contrib/localflavor/no/forms.py
110
2871
""" Norwegian-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re import datetime from django.contrib.localflavor.no.no_municipalities import MUNICIPALITY_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
gpl-2.0
duyetdev/openerp-6.1.1
openerp/addons/account/wizard/account_report_print_journal.py
3
3426
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
CapOM/ChromiumGStreamerBackend
tools/telemetry/third_party/gsutilz/third_party/boto/tests/unit/s3/test_uri.py
114
12504
#!/usr/bin/env python # Copyright (c) 2013 Google, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
bsd-3-clause
mjg2203/edx-platform-seas
lms/djangoapps/instructor_task/tests/test_tasks.py
24
20923
""" Unit tests for LMS instructor-initiated background tasks. Runs tasks on answers to course problems to validate that code paths actually work. """ import json from uuid import uuid4 from mock import Mock, MagicMock, patch from celery.states import SUCCESS, FAILURE from xmodule.modulestore.exceptions import Item...
agpl-3.0
hanw/p4c
tools/driver/p4c_src/config.py
1
1610
# Copyright 2013-present Barefoot Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
zimmerst/i2py
i2py/ir.py
3
36412
# # Copyright (C) 2005 Christopher J. Stawarz <chris@pseudogreen.org> # # This file is part of i2py. # # i2py 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 ...
gpl-2.0
froyobin/horizon
openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py
4
18887
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
aselle/tensorflow
tensorflow/python/training/monitored_session.py
11
48948
# pylint: disable=g-bad-file-header # 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/LICENS...
apache-2.0
supergis/QGIS
python/ext-libs/pygments/lexers/_mapping.py
68
36995
# -*- coding: utf-8 -*- """ pygments.lexers._mapping ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer mapping defintions. This file is generated by itself. Everytime you change something on a builtin lexer defintion, run this script from the lexers folder to update it. Do not alter the LEXERS dictionary by hand...
gpl-2.0
doomsterinc/odoo
openerp/addons/base/module/wizard/base_language_install.py
447
2738
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
fw1121/Roary
contrib/roary_plots/roary_plots.py
1
5754
#!/usr/bin/env python # Copyright (C) <2015> EMBL-European Bioinformatics Institute # 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 la...
gpl-3.0
westinedu/newertrends
django/contrib/gis/tests/distapp/models.py
406
1832
from django.contrib.gis.db import models class SouthTexasCity(models.Model): "City model on projected coordinate system for South Texas." name = models.CharField(max_length=30) point = models.PointField(srid=32140) objects = models.GeoManager() def __unicode__(self): return self.name class SouthTe...
bsd-3-clause
noroutine/ansible
lib/ansible/modules/utilities/helper/_accelerate.py
29
2723
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, James Cammarata <jcammarata@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1...
gpl-3.0
StefanRijnhart/OpenUpgrade
addons/hr_payroll_account/hr_payroll_account.py
41
10957
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
agpl-3.0
Laurawly/tvm-1
tutorials/dev/low_level_custom_pass.py
1
6886
# 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...
apache-2.0
Nefry/taurus
tests/modules/test_SeleniumExecutor.py
1
18757
from tests import setup_test_logging, BZTestCase, __dir__ from bzt.modules.selenium import SeleniumExecutor from tests.mocks import EngineEmul from bzt.utils import BetterDict import os import shutil import yaml import time setup_test_logging() class TestSeleniumJUnitRunner(BZTestCase): """ java:one/folder/...
apache-2.0
theolind/home-assistant
homeassistant/components/sensor/zwave.py
16
3735
""" homeassistant.components.sensor.zwave ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interfaces with Z-Wave sensors. """ # pylint: disable=import-error from openzwave.network import ZWaveNetwork from pydispatch import dispatcher import homeassistant.components.zwave as zwave from homeassistant.helpers.entity import Entity ...
mit
Communities-Communications/cc-odoo
addons/account/wizard/account_report_print_journal.py
378
3440
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
stuntman723/rap-analyzer
rap_analyzer/lib/python2.7/site-packages/pip/_vendor/html5lib/inputstream.py
435
31665
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from pip._vendor.six.moves import http_client import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import util...
mit
dset0x/invenio
invenio/modules/accounts/upgrades/accounts_2015_03_06_namedefaults.py
3
1895
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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 option) any later...
gpl-2.0
jacegem/lotto-store
lib/future/backports/email/utils.py
82
14270
# Copyright (C) 2001-2010 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Miscellaneous utilities.""" from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from future import utils from future.builtins import bytes, int, str...
apache-2.0
marlengit/BitcoinUnlimited
qa/rpc-tests/smartfees.py
1
12639
#!/usr/bin/env python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Copyright (c) 2015-2016 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test fee estimation code # from collectio...
mit
theflofly/tensorflow
tensorflow/python/tools/print_selective_registration_header_test.py
24
7356
# 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...
apache-2.0
VielSoft/odoo
addons/account_followup/account_followup.py
79
29624
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
brandond/ansible
test/units/module_utils/facts/test_collectors.py
78
16892
# unit tests for ansible fact collectors # -*- coding: utf-8 -*- # # 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. # # Ansibl...
gpl-3.0
ilique/webpushkin
pushkin/pushkin.py
1
13033
import re import paramiko import telnetlib import time from django.core.exceptions import ObjectDoesNotExist from netmiko import ConnectHandler from .models import Service, CommandGroup class Switch(object): def __init__(self, value): self.value = value self.fall = False def __iter__(self):...
mit
rsvip/Django
tests/model_formsets_regress/models.py
144
1146
from django.db import models from django.utils.encoding import python_2_unicode_compatible class User(models.Model): username = models.CharField(max_length=12, unique=True) serial = models.IntegerField() class UserSite(models.Model): user = models.ForeignKey(User, to_field="username") data = models....
bsd-3-clause
ralphtheninja/compose
compose/config.py
9
16210
import logging import os import sys import yaml from collections import namedtuple import six from compose.cli.utils import find_candidates_in_parent_dirs DOCKER_CONFIG_KEYS = [ 'cap_add', 'cap_drop', 'cpu_shares', 'cpuset', 'command', 'detach', 'devices', 'dns', 'dns_search', ...
apache-2.0
OshynSong/scikit-learn
doc/tutorial/text_analytics/skeletons/exercise_01_language_train_model.py
254
2005
"""Build a language detector model The goal of this exercise is to train a linear classifier on text features that represent sequences of up to 3 consecutive characters so as to be recognize natural languages by using the frequencies of short character sequences as 'fingerprints'. """ # Author: Olivier Grisel <olivie...
bsd-3-clause
hradec/cortex
test/IECore/ops/mayaUserData/mayaUserData-1.py
12
2775
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
bsd-3-clause
computationalBiology/NPLB
NPLB/weblogoMod/test_corebio/test_transform.py
2
5194
#!/usr/bin/env python # Copyright (c) 2006 John Gilman # # This software is distributed under the MIT Open Source License. # <http://www.opensource.org/licenses/mit-license.html> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation file...
gpl-3.0
seecr/meresco-oai
meresco/oai/oaiprovenance.py
1
3062
## begin license ## # # "Meresco Oai" are components to build Oai repositories, based on # "Meresco Core" and "Meresco Components". # # Copyright (C) 2007-2008 SURF Foundation. http://www.surf.nl # Copyright (C) 2007-2010 Seek You Too (CQ2) http://www.cq2.nl # Copyright (C) 2007-2009 Stichting Kennisnet Ict op school. ...
gpl-2.0
CAST-Extend/com.castsoftware.uc.checkanalysiscompleteness
xlsxwriter/styles.py
13
20948
############################################################################### # # Styles - A class for writing the Excel XLSX Worksheet file. # # Copyright 2013-2015, John McNamara, jmcnamara@cpan.org # # Package imports. from . import xmlwriter class Styles(xmlwriter.XMLwriter): """ A class for writing th...
mit
wellpinho/coursera-dl
coursera/utils.py
15
3156
# -*- coding: utf-8 -*- """ This module provides utility functions that are used within the script. """ import errno import os import random import re import string import sys import six from .define import COURSERA_URL from six.moves import html_parser # six.moves doesn’t support urlparse if six.PY3: # pragma:...
lgpl-3.0
pelikanchik/edx-platform
common/lib/xmodule/xmodule/tests/rendering/core.py
55
3311
""" This module is indended to provide a pluggable way to add assertions about the rendered content of XBlocks. For each view on the XBlock, this module defines a @singledispatch function that can be used to test the contents of the rendered html. The functions are of the form: @singledispatch def assert_stu...
agpl-3.0
talishte/ctigre
env/lib/python2.7/site-packages/Crypto/Cipher/CAST.py
116
4498
# -*- coding: utf-8 -*- # # Cipher/CAST.py : CAST # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, #...
bsd-2-clause
cheral/orange3
Orange/widgets/data/tests/test_oweditdomain.py
2
7136
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring from unittest import TestCase import numpy as np from AnyQt.QtCore import QModelIndex, Qt from Orange.data import ContinuousVariable, DiscreteVariable, \ StringVariable, Table, Domain from Orange.widgets.data.owedi...
bsd-2-clause
robintw/Py6S
Py6S/outputs.py
1
17043
# This file is part of Py6S. # # Copyright 2012 Robin Wilson and contributors listed in the CONTRIBUTORS file. # # Py6S 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, o...
lgpl-3.0
tchellomello/home-assistant
tests/components/mqtt_json/test_device_tracker.py
7
5830
"""The tests for the JSON MQTT device tracker platform.""" import json import logging import os import pytest from homeassistant.components.device_tracker.legacy import ( DOMAIN as DT_DOMAIN, YAML_DEVICES, ) from homeassistant.const import CONF_PLATFORM from homeassistant.setup import async_setup_component f...
apache-2.0
sdcooke/django
tests/validation/test_unique.py
337
7108
from __future__ import unicode_literals import datetime import unittest from django.apps.registry import Apps from django.core.exceptions import ValidationError from django.db import models from django.test import TestCase from .models import ( CustomPKModel, FlexibleDatePost, ModelToValidate, Post, UniqueErrors...
bsd-3-clause
s3nk4s/flaskTutorials
FlaskApp/FlaskApp/venv/local/lib/python2.7/encodings/gb2312.py
816
1027
# # gb2312.py: Python Unicode Codec for GB2312 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_cn, codecs import _multibytecodec as mbc codec = _codecs_cn.getcodec('gb2312') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrem...
mit
leppa/home-assistant
homeassistant/components/tado/__init__.py
2
5394
"""Support for the (unofficial) Tado API.""" from datetime import timedelta import logging import urllib from PyTado.interface import Tado import voluptuous as vol from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import config_validation as cv from homeassistant.helpers.discover...
apache-2.0
foospidy/DbDat
plugins/mssql/check_privileges_clr_assembly_permissions.py
1
1261
class check_privileges_clr_assembly_permissions(): """ check_privileges_clr_assembly_permissions: Setting CLR Assembly Permission Sets to SAFE_ACCESS will prevent assemblies from accessing external system resources such as files, the network, environment variables, or the registry. """ # Ref...
gpl-2.0
wimnat/ansible-modules-core
network/nxos/nxos_hsrp.py
8
22854
#!/usr/bin/python # # 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 distribut...
gpl-3.0
40223114/0519
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/dummy/__init__.py
693
4380
# # Support for the API of the multiprocessing package using threads # # multiprocessing/dummy/__init__.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
gpl-3.0
itead/ITEADSW_kernel
modules/wifi/ar6302/AR6K_SDK_ISC.build_3.1_RC.329/host/tools/athbtfilter/bluez/testscripts/bthmonoheadset.py
185
1768
#!/usr/bin/python import dbus import os import sys def printusage(): print 'bthmonoheadset.py <options>' print ' create - create a mono headset' print ' start - connect and play ' print ' stop - stop and disconnect' return headsetAddress = os.getenv("BTMONO_HEADSET") print 'BT Mono Headset Is : =>...
gpl-2.0
syjeon/new_edx
common/lib/supertrace.py
74
1646
""" A handy util to print a django-debug-screen-like stack trace with values of local variables. """ import sys import traceback from django.utils.encoding import smart_unicode def supertrace(max_len=160): """ Print the usual traceback information, followed by a listing of all the local variables in each...
agpl-3.0
pacerom/external_skia
gm/rebaseline_server/results_test.py
89
2848
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test results.py """ # Imports from within Skia import base_unittest import results class ResultsTest(base_unittest.TestCase): def test_ignore_builder(self): ""...
bsd-3-clause
rajul/Pydev
plugins/org.python.pydev/pysrc/pydevd_attach_to_process/winappdbg/process.py
100
183637
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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 ...
epl-1.0
fjammes/braise
libraries/ArduinoJson-master/third-party/gtest-1.7.0/test/gtest_uninitialized_test.py
2901
2480
#!/usr/bin/env python # # Copyright 2008, 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...
gpl-3.0
redshodan/lazarus-ssh
tests/utils.py
1
5573
# # Copyright (C) 2009 Chris Newton <redshodan@gmail.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 Foundation; either version 2 # of the License, or (at your option) any later version. # # This pro...
lgpl-2.1
kirillmakhonin/med
MED.Server/apps/human_resources/migrations/0004_auto_20160826_2140.py
1
1111
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-26 21:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('human_resources', '0003_auto_20160826_2113'), ] operations = [ migrations.Cre...
mit
ehealthafrica-ci/formhub
restservice/models.py
2
1230
from django.db import models from django.utils.translation import ugettext_lazy from odk_logger.models.xform import XForm from restservice import SERVICE_CHOICES class RestService(models.Model): class Meta: app_label = 'restservice' unique_together = ('service_url', 'xform', 'name') service_...
bsd-2-clause
LeeRisk/ssbc
search/migrations/0002_filelist_hash_statusreport.py
35
2086
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('search', '0001_initial'), ] operations = [ migrations.CreateModel( name='FileList', fields=[ ...
gpl-2.0
Peddle/hue
desktop/core/ext-py/python-openid-2.2.5/openid/fetchers.py
138
13937
# -*- test-case-name: openid.test.test_fetchers -*- """ This module contains the HTTP fetcher interface and several implementations. """ __all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', 'HTTPError'] import urll...
apache-2.0
Innovahn/odoo.old
addons/account_bank_statement_extensions/__init__.py
442
1153
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
agpl-3.0
kirbyfan64/shedskin
tests/123.py
6
9445
# (c) Jack Ha # --- jack.ha@gmail.com def validMove(puzzle, x, y, number): # puzzle: [list(list(int))], x: [int], y: [int], number: [int] #see if the number is in any row, column or his own 3x3 square blnOK = True # [int] px = x / 3 # [int] ...
gpl-3.0
pniedzielski/fb-hackathon-2013-11-21
src/repl.it/jsrepl/extern/python/unclosured/lib/python2.7/encodings/cp424.py
593
12311
""" Python Character Mapping Codec cp424 generated from 'MAPPINGS/VENDORS/MISC/CP424.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
agpl-3.0
Maximilian-Reuter/SickRage-1
lib/simplejson/encoder.py
343
16033
"""Implementation of JSONEncoder """ import re try: from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ...
gpl-3.0
awkspace/ansible
test/units/plugins/strategy/test_strategy_linear.py
29
6509
# Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat import unittest from units.compat.mock import patc...
gpl-3.0
helloworldC2/VirtualRobot
GuiHUD.py
1
22037
import scoring import pygame import gui import Game import selectBar from selectBar import * import Level from Level import * import Tile import EntityTreasure import Keyboard from pygame.locals import * from Image import * class GuiHUD(object): def __init__(self,screen): self.ebg = image(screen,(5,5),...
mit
collinmsn/thrift
lib/py/src/transport/TTransport.py
18
13066
# # 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...
apache-2.0
knowledgepoint-devs/askbot-devel
askbot/migrations/0029_auto__del_flaggeditem.py
20
26637
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'FlaggedItem' db.delete_table(u'flagged_item') def backwards(self, orm)...
gpl-3.0
androidarmv6/android_external_chromium_org
tools/checkdeps/checkdeps_test.py
64
7177
#!/usr/bin/env python # 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. """Tests for checkdeps. """ import os import unittest import checkdeps import results class CheckDepsTest(unittest.TestCase): ...
bsd-3-clause
litecoin-project/litecore-litecoin
qa/rpc-tests/txn_doublespend.py
94
6649
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 proper accounting with a double-spend conflict # from test_framework.test_framework import Bitc...
mit
mstreatfield/rez
src/rezgui/widgets/VariantVersionsTable.py
3
6252
from rezgui.qt import QtCore, QtGui from rezgui.mixins.ContextViewMixin import ContextViewMixin from rez.package_filter import PackageFilterList from rezgui.util import get_timestamp_str, update_font, get_icon_widget, create_pane from rez.packages_ import iter_packages from rez.vendor.version.version import VersionRang...
gpl-3.0
luminousflux/lflux
lfluxproject/lstory/migrations/0010_auto.py
1
6790
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing M2M table for field tumbleposts on 'Story' db.delete_table('lstory_story_tumbleposts') def b...
mit
gfcapalbo/website
website_blog_mgmt/tests/test_website_blog_flow.py
29
5750
# -*- coding: utf-8 -*- ############################################################################## # # Authors: Laurent Mignon # Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General ...
agpl-3.0
WhireCrow/openwrt-mt7620
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/email/base64mime.py
118
5792
# Copyright (C) 2002-2006 Python Software Foundation # Author: Ben Gertzfield # Contact: email-sig@python.org """Base64 content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode arbitrary 8-bit data using the three 8-bit bytes in four 7-bit ch...
gpl-2.0
oliverhr/odoo
openerp/addons/base/ir/ir_exports.py
338
1672
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
ibuddler/M2ATT
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0