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
tony5856/repository.tonysrepo
plugin.program.xmlerator/unidecode/x00b.py
252
4132
data = ( '[?]', # 0x00 'N', # 0x01 'N', # 0x02 'H', # 0x03 '[?]', # 0x04 'a', # 0x05 'aa', # 0x06 'i', # 0x07 'ii', # 0x08 'u', # 0x09 'uu', # 0x0a 'R', # 0x0b 'L', # 0x0c '[?]', # 0x0d '[?]', # 0x0e 'e', # 0x0f 'ai', # 0x10 '[?]', # 0x11 '[?]', # 0x12 'o', # ...
gpl-3.0
ruslanloman/nova
nova/tests/unit/objects/test_dns_domain.py
70
3002
# Copyright (C) 2014, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
mgit-at/ansible
lib/ansible/module_utils/network/aruba/aruba.py
84
4862
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
ac769/continuum_technologies
twitter/sample_twitter_codes.py
1
1644
'''' In this code we'll have a bunch of examples you can use at your own discretion. Simply remove the three ' marks above and below the code you want in order to run it, while leaving the text within a new set of three ' marks. Once that's done, go to your Terminal, navigate to where this code and the twitter_follo...
mit
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_vlag.py
29
10765
#!/usr/bin/python """ PN CLI vlag-create/vlag-delete/vlag-modify """ # # 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...
bsd-3-clause
UniversalMasterEgg8679/ansible
lib/ansible/modules/network/nxos/_nxos_template.py
67
5984
#!/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
Micket/CCBuilder
make_cc.py
1
8680
#!/usr/bin/env python3 from __future__ import print_function from __future__ import division import argparse import pickle import time import CCBuilder as ccb import CCBuilder_c as ccb_c import numpy as np import scipy.special def uniform_dist(x): """ Returns uniform distributions of given range """ return la...
gpl-3.0
lyoniionly/django-cobra
src/cobra/models/fields/node.py
1
3306
from __future__ import absolute_import, print_function import collections import logging import six import warnings from django.db import models from django.db.models.signals import post_delete from cobra.core.cache import memoize from cobra.core.compat import pickle from cobra.core.strings import decompress, compre...
apache-2.0
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/jedi/evaluate/arguments.py
8
9709
from parso.python import tree from jedi._compatibility import zip_longest from jedi import debug from jedi.evaluate import analysis from jedi.evaluate.lazy_context import LazyKnownContext, LazyKnownContexts, \ LazyTreeContext, get_merged_lazy_context from jedi.evaluate.filters import ParamName from jedi.evaluate.b...
gpl-3.0
amgowano/oppia
core/domain/config_domain.py
6
7850
# 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...
apache-2.0
alikins/ansible
lib/ansible/modules/storage/netapp/sf_check_connections.py
49
5271
#!/usr/bin/python # (c) 2017, NetApp, Inc # 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', 'status': ['preview'], ...
gpl-3.0
augmify/omim
tools/python/stylesheet/webcolors/webcolors.py
53
28314
# -*- coding: utf-8 -*- """ A simple library for working with the color names and color codes defined by the HTML and CSS specifications. An overview of HTML and CSS colors ---------------------------------- Colors on the Web are specified in `the sRGB color space`_, where each color is made up of a red component, a ...
apache-2.0
twaldrop/ursula
library/keystone_user.py
87
14056
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
mit
drsounds/mingus
unittest/run_fluidsynth_tests.py
12
1094
#!/usr/bin/python # -*- coding: utf-8 -*- # mingus - Music theory Python package, run_fluidsynth_tests module. # Copyright (C) 2008, Bart Spaans # # 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 Soft...
gpl-3.0
GiovanniConserva/TestDeploy
venv/Lib/site-packages/django/conf/locale/tr/formats.py
504
1141
# -*- 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 = 'd F Y' TIME_FORMAT = 'H:i' DATETI...
bsd-3-clause
ANR-kamoulox/Telemeta
telemeta/models/query.py
2
21153
# -*- coding: utf-8 -*- # Copyright (C) 2007-2010 Samalyse SARL # Copyright (C) 2010-2011 Parisson SARL # # This file is part of Telemeta. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation,...
agpl-3.0
franga2000/django-machina
machina/apps/forum_moderation/app.py
2
2945
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from machina.core.app import Application from machina.core.loading import get_class class ModerationApp(Application): name = 'forum_moderation' topic_loc...
bsd-3-clause
andersgs/dingo
dingo/random_forest.py
1
2551
''' Some functions to fit a random forest ''' import sklearn.ensemble import pandas import progressbar bar = progressbar.ProgressBar() def test_max_features(max_features): if (max_features not in ['sqrt', 'auto', 'log2', None]): try: max_features = int(max_features) except ValueError:...
bsd-3-clause
william-richard/moto
tests/test_ec2/test_internet_gateways.py
2
9612
from __future__ import unicode_literals import pytest import re import boto import boto3 from boto.exception import EC2ResponseError import sure # noqa from moto import mock_ec2_deprecated, mock_ec2 VPC_CIDR = "10.0.0.0/16" BAD_VPC = "vpc-deadbeef" BAD_IGW = "igw-deadbeef" @mock_ec2_deprecated def test_igw_c...
apache-2.0
MemeticParadigm/TensorFlow
tensorflow/python/summary/impl/directory_watcher_test.py
5
3056
"""Tests for directory_watcher.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import shutil from tensorflow.python.framework import test_util from tensorflow.python.platform import googletest from tensorflow.python.summary.impl import direct...
apache-2.0
Permutatrix/servo
components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py
107
2977
def WebIDLTest(parser, harness): parser.parse(""" [Global] interface Foo : Bar { getter any(DOMString name); }; interface Bar {}; """) results = parser.finish() harness.ok(results[0].isOnGlobalProtoChain(), "[Global] interface should be on global's proto ...
mpl-2.0
Proggie02/TestRepo
tests/modeltests/proxy_model_inheritance/tests.py
6
2131
from __future__ import absolute_import import os import sys from django.conf import settings from django.core.management import call_command from django.db.models.loading import cache, load_app from django.test import TestCase, TransactionTestCase from django.test.utils import override_settings from .models import (...
bsd-3-clause
BlueBrain/NEST
testsuite/manualtests/cross_check_test_mip_corrdet.py
13
2594
# -*- coding: utf-8 -*- # # cross_check_test_mip_corrdet.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 o...
gpl-2.0
agilgur5/LTLMoP
src/lib/handlers/Spider/SpiderActuatorHandler.py
7
4379
#!/usr/bin/env python """ ========================================= dummyActuator.py - Dummy Actuator Handler ========================================= The actions for the spider. Will be able to change the gaits that the spider will do. """ import lib.handlers.handlerTemplates as handlerTemplates class SpiderActuat...
gpl-3.0
alphafoobar/intellij-community
python/helpers/pycharm/nose_utils.py
28
7224
import sys import traceback import datetime import unittest from tcmessages import TeamcityServiceMessages from tcunittest import strclass from tcunittest import TeamcityTestResult try: from nose.util import isclass # backwards compat from nose.config import Config from nose.result import TextTestResult from...
apache-2.0
iulianbute/labs
python/solutii/marius_ilau/paint/fill.py
2
2137
#!/usr/bin/env python # *-* coding: UTF-8 *-* """Tuxy dorește să împlementeze un nou paint pentru consolă. În timpul dezvoltării proiectului s-a izbit de o problemă pe care nu o poate rezolva singur și a apelat la ajutorul tău. El dorește să adauge o unealtă care să permită umplerea unei forme închise. Exemplu: Po...
mit
ksasi/PerfKitBenchmarker
perfkitbenchmarker/packages/mongodb_server.py
10
1715
# 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 agr...
apache-2.0
Orav/kbengine
kbe/src/lib/python/Tools/demo/life.py
1
9249
#!/usr/bin/env python3 """ A curses-based version of Conway's Game of Life. An empty board will be displayed, and the following commands are available: E : Erase the board R : Fill the board randomly S : Step for a single generation C : Update continuously until a key is struck Q : Quit Cursor keys :...
lgpl-3.0
jwilliamn/handwritten
extraction/FormatModel/CreatePage3Variable.py
1
6106
import pickle from extraction.FormatModel.VariableDefinitions import * from extraction.FormatModel.RawVariableDefinitions import * import json def jsonDefault(object): return object.__dict__ if __name__ == '__main__': Page3 = Category('page3', 'pagina 3') ############ for r in range(1,6): s...
gpl-3.0
huzhifeng/py12306
py12306.py
1
62739
#!/usr/bin/env python # -*- coding: utf-8 -*- # 标准库 import argparse import urllib import time import datetime import sys import re import ConfigParser import random import smtplib from email.mime.text import MIMEText # 第三方库 import requests from huzhifeng import dumpObj, hasKeys # Set default encoding to utf-8 reload...
gpl-2.0
csdl/makahiki
makahiki/apps/widgets/participation/migrations/0001_initial.py
2
4348
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ParticipationSetting' db.create_table(u'participation_par...
mit
TheWardoctor/Wardoctors-repo
script.module.master.common/lib/js2py/utils/injector.py
34
5447
__all__ = ['fix_js_args'] import types import opcode # Opcode constants used for comparison and replacecment LOAD_FAST = opcode.opmap['LOAD_FAST'] LOAD_GLOBAL = opcode.opmap['LOAD_GLOBAL'] STORE_FAST = opcode.opmap['STORE_FAST'] def fix_js_args(func): '''Use this function when unsure whether func takes this and ...
apache-2.0
gavioto/rethinkdb
test/rql_test/connections/http_support/werkzeug/contrib/securecookie.py
294
12204
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
agpl-3.0
geekboxzone/lollipop_external_owasp_sanitizer
tools/cut_release.py
9
6031
#!/usr/bin/python """ Packages a new maven release. """ import os import re import shutil import subprocess import sys import xml.dom.minidom def mime_type_from_path(path): if path.endswith(".pom"): return "text/xml;charset=UTF-8" elif path.endswith(".jar"): return "application/java-archive" return Non...
bsd-3-clause
SRabbelier/Melange
thirdparty/google_appengine/lib/django_1_2/django/contrib/gis/gdal/envelope.py
321
7044
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
apache-2.0
wainersm/buildbot
master/buildbot/test/unit/test_interpolate_secrets.py
6
2056
from __future__ import absolute_import from __future__ import print_function from twisted.internet import defer from twisted.trial import unittest from buildbot.process.properties import Interpolate from buildbot.secrets.manager import SecretManager from buildbot.test.fake import fakemaster from buildbot.test.fake.fa...
gpl-2.0
fti7/ansible-modules-core
cloud/rax_scaling_policy.py
60
9059
#!/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 distributed...
gpl-3.0
jotes/ansible
v2/test/parsing/test_data_loader.py
13
2219
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
ntt-sic/glance
glance/image_cache/drivers/sqlite.py
4
16418
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack 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/...
apache-2.0
mjs/juju
acceptancetests/schedule_hetero_control.py
1
3284
#!/usr/bin/env python from __future__ import print_function from argparse import ArgumentParser import json import os import re from jenkins import Jenkins from jujuci import ( add_credential_args, get_credentials, ) from utility import ( find_candidates, get_candidates_path, ) def get_args(...
agpl-3.0
mwmuni/LIGGGHTS_GUI
OpenGL/GL/ATI/element_array.py
9
1645
'''OpenGL extension ATI.element_array This module customises the behaviour of the OpenGL.raw.GL.ATI.element_array to provide a more Python-friendly API Overview (from the spec) This extension provides a mechanism for an application to create an array of index data for use in specifying geometric primitives. ...
gpl-3.0
fishcorn/pylearn2
pylearn2/rbm_tools.py
44
20714
"""Tools for estimating the partition function of an RBM""" import numpy from theano.compat.six.moves import xrange import theano from theano import tensor, config from theano.tensor import nnet from pylearn2.utils.exc import reraise_as from pylearn2.utils.rng import make_np_rng, make_theano_rng from pylearn2.utils.mem...
bsd-3-clause
Alwnikrotikz/pybluez
examples/bluezchat/bluezchat.py
19
6006
#!/usr/bin/python """ A simple graphical chat client to demonstrate the use of pybluez. Opens a l2cap socket and listens on PSM 0x1001 Provides the ability to scan for nearby bluetooth devices and establish chat sessions with them. """ import os import sys import time import gtk import gobject import gtk.glade i...
gpl-2.0
NicovincX2/Python-3.5
Algèbre/Opération/scalar_product.py
1
1933
# -*- coding: utf-8 -*- import os import seaborn seaborn.set() colors = seaborn.color_palette() import utils # For 3D plotting we need to import some extra stuff from mpl_toolkits.mplot3d import Axes3D # First create two random vectors in 3 dimensional space v1 = rand(3, 1) v2 = rand(3, 1) # And scale them to uni...
gpl-3.0
rimbalinux/MSISDNArea
djangotoolbox/test.py
4
1957
from .utils import object_list_to_table, equal_lists from django.test import TestCase from django.test.simple import DjangoTestSuiteRunner from django.utils.unittest import TextTestRunner import sys try: from StringIO import StringIO except ImportError: from cStringIO import StringIO class ModelTes...
bsd-3-clause
rgarcia-herrera/MCAC
prediction_intersect_mongodb/fuse.py
2
3865
import argparse import csv import pymongo from bson.objectid import ObjectId from pprint import pprint parser = argparse.ArgumentParser(description='Load variant effect prediction file to variants table.') parser.add_argument('--type', required=True, choices=['provean','vep']) parser.add_argument('--sample', required=...
gpl-3.0
nuobit/odoo-addons
connector_sage/models/payroll_sage_payslip_line_payroll/binding.py
1
1439
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>) # Eric Antones <eantones@nuobit.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import models, fields from odoo.addons.queue_job.job import job class PayslipLinePayrollBinding(models.Model): _name = 'sage.payroll.sage.pay...
agpl-3.0
lerouxb/PyCAPTCHA
Captcha/Visual/Tests.py
4
1760
""" Captcha.Visual.Tests Visual CAPTCHA tests """ # # PyCAPTCHA Package # Copyright (C) 2004 Micah Dowty <micah@navi.cx> # from Captcha.Visual import Text, Backgrounds, Distortions, ImageCaptcha from Captcha import Words import random __all__ = ["PseudoGimpy", "AngryGimpy", "AntiSpam"] class PseudoGimpy(ImageCaptc...
mit
wehkamp/ansible-modules-extras
database/vertica/vertica_role.py
148
8202
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
gpl-3.0
ArtemTeleshev/raspberrypi-linux
scripts/analyze_suspend.py
1537
120394
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
gpl-2.0
divio/django-cms
cms/extensions/models.py
7
5644
from django.db.models import ManyToManyField from cms.constants import PUBLISHER_STATE_DIRTY from django.db import models from cms.models import Page, Title class BaseExtension(models.Model): public_extension = models.OneToOneField( 'self', on_delete=models.CASCADE, null=True, ed...
bsd-3-clause
j-greffe/mbed-os
tools/host_tests/host_tests_plugins/module_copy_mps2.py
55
5528
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
johnweber/bbxm-kernel
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
Thraxis/pymedusa
lib/requests/packages/chardet/euckrfreq.py
3121
45978
######################## 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...
gpl-3.0
CryptArc/bitcoin
test/functional/combine_logs.py
5
7590
#!/usr/bin/env python3 """Combine logs from multiple bitcoin nodes as well as the test_framework log. This streams the combined log output to stdout. Use combine_logs.py > outputfile to write to an outputfile. If no argument is provided, the most recent test directory will be used.""" import argparse from collection...
mit
piquadrat/django
django/db/migrations/operations/base.py
40
4830
from django.db import router class Operation: """ Base class for migration operations. It's responsible for both mutating the in-memory model state (see db/migrations/state.py) to represent what it performs, as well as actually performing it against a live database. Note that some operations...
bsd-3-clause
cuihaoleo/PyTest
PyTest.py
1
7675
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ## # PyTest.py # This file is part of PyTest. # # PyTest # Python编写的OI评测器后端 # Copyright (C) 2011 CUI Hao # # 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 Fo...
gpl-3.0
ATIX-AG/ansible
lib/ansible/modules/cloud/amazon/aws_api_gateway.py
38
11659
#!/usr/bin/python # Copyright: Ansible Project # 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', 'status': ['preview'], ...
gpl-3.0
killbug2004/volatility
volatility/plugins/linux/dmesg.py
54
3132
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
Vizerai/grpc
src/python/grpcio_tests/tests/qps/client_runner.py
25
2685
# Copyright 2016 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
devananda/ironic
ironic/tests/unit/drivers/modules/test_agent.py
1
58308
# Copyright 2014 Rackspace, 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 writin...
apache-2.0
jawed123/flask
examples/flaskr/flaskr.py
157
2893
# -*- coding: utf-8 -*- """ Flaskr ~~~~~~ A microblog example application written as Flask tutorial with Flask and sqlite3. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os from sqlite3 import dbapi2 as sqlite3 from flask import Flask, request...
bsd-3-clause
feibaliang/blog
node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/web.py
94
155814
# -*- coding: utf-8 -*- """ pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Lexers for web-related languages and markup. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import copy from pygments.lexer import RegexLexer, ExtendedReg...
mit
shuhaida6704/account-financial-reporting
account_financial_report_webkit_xls/wizard/open_invoices_wizard.py
37
1876
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under...
agpl-3.0
John-Hart/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/Lro/setup.py
10
1170
# 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 ...
mit
geggo/pyface
pyface/workbench/i_workbench_window_layout.py
3
10821
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
bsd-3-clause
nandhp/youtube-dl
youtube_dl/extractor/bild.py
48
1362
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unescapeHTML, ) class BildIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bild\.de/(?:[^/]+/)+(?P<display_id>[^/]+)-(?P<id>\d+)(?:,auto=true)?\.bild\.html' IE_DESC = 'Bild...
unlicense
sander76/home-assistant
tests/components/homekit/test_type_sensors.py
5
10998
"""Test different accessory types: Sensors.""" from homeassistant.components.homekit import get_accessory from homeassistant.components.homekit.const import ( DEVICE_CLASS_MOTION, PROP_CELSIUS, THRESHOLD_CO, THRESHOLD_CO2, ) from homeassistant.components.homekit.type_sensors import ( BINARY_SENSOR_S...
apache-2.0
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/prompt_toolkit/output/color_depth.py
1
1497
from __future__ import unicode_literals from prompt_toolkit.utils import is_windows import os __all__ = [ 'ColorDepth', ] class ColorDepth(object): """ Possible color depth values for the output. """ #: One color only. DEPTH_1_BIT = 'DEPTH_1_BIT' #: ANSI Colors. DEPTH_4_BIT = 'DEPTH_...
mit
yqm/sl4a
python/src/Lib/encodings/euc_jisx0213.py
816
1051
# # euc_jisx0213.py: Python Unicode Codec for EUC_JISX0213 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jisx0213') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(m...
apache-2.0
takis/odoo
openerp/addons/test_inherit/models.py
69
2503
# -*- coding: utf-8 -*- from openerp import models, fields, api, osv # We just create a new model class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name'), 'state': osv.fie...
agpl-3.0
dominicelse/scipy
scipy/io/tests/test_fortran.py
14
2593
''' Tests for fortran sequential files ''' import tempfile import shutil from os import path from glob import iglob import re from numpy.testing import assert_equal, assert_allclose, run_module_suite import numpy as np from scipy.io import FortranFile DATA_PATH = path.join(path.dirname(__file__), 'data') def tes...
bsd-3-clause
javachengwc/hue
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/teletype.py
101
5187
# -*- coding: utf-8 -*- # # Create and extract text from ODF, handling whitespace correctly. # Copyright (C) 2008 J. David Eisenberg # # 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; e...
apache-2.0
samuknet/servo
tests/wpt/web-platform-tests/tools/py/py/_path/svnwc.py
176
43848
""" svn-Command based Implementation of a Subversion WorkingCopy Path. SvnWCCommandPath is the main class. """ import os, sys, time, re, calendar import py import subprocess from py._path import common #----------------------------------------------------------- # Caching latest repository revision and repo-path...
mpl-2.0
richpolis/siveinpy
env/lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/coordseq.py
624
3112
from ctypes import c_double, c_int, c_uint, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, CS_PTR from django.contrib.gis.geos.prototypes.errcheck import last_arg_byref, GEOSException from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc ## Error-checking routines specific to coordinate seq...
mit
palmer159/openstack-test
packstack/installer/utils/shortcuts.py
3
1698
# -*- 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...
apache-2.0
sangh/LaserShow
pyglet-hg/pyglet/image/codecs/bmp.py
18
12417
# ---------------------------------------------------------------------------- # 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: # # * Redistribu...
bsd-3-clause
WorldViews/Spirals
dummyServer.py
1
2519
import json, time import flask from flask import Flask, render_template, send_file, \ jsonify, send_from_directory, request from flask_socketio import SocketIO, emit rdb = None try: import rethinkdb as rdb #rdb.connect('localhost', 28015).repl() conn = rdb.connect(db='test') except: ...
mit
jedie/bootstrap_env
bootstrap_env/admin_shell/normal_shell.py
1
7715
""" Admin Shell commands available in 'normal' install mode ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORTANT: Every import from external packages must be made with LazyImportError! Otherwise the bootstrap will fail, because no external package is available in boots...
gpl-3.0
fitoria/askbot-devel
askbot/migrations/0162_auto__add_field_post_language_code.py
14
35079
# 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): # Adding field 'Post.language_code' db.add_column('askbot_post', 'language_code', self.gf('django.db.model...
gpl-3.0
dago/ansible-modules-extras
cloud/profitbricks/profitbricks_nic.py
132
8769
#!/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 distributed...
gpl-3.0
nschaetti/nsNLP
data/Text.py
1
2476
# -*- coding: utf-8 -*- # # File : corpus/IQLACorpus.py # Description : . # Date : 16/08/2017 # # Copyright Nils Schaetti, University of Neuchâtel <nils.schaetti@unine.ch> # Imports from Sample import Sample import codecs # Class to access to a text class Text(Sample): """ Class to access to a text """ ...
gpl-3.0
pyk/rojak
rojak-analyzer/create_training_data.py
5
1655
import csv from bs4 import BeautifulSoup from collections import Counter import re import os OUTPUT_NAME = os.getenv('OUTPUT_NAME', 'train.data') LABEL_PREFIX = os.getenv('LABEL_PREFIX', '__LABEL__') csv_file = open('data_detikcom_labelled.csv') csv_reader = csv.DictReader(csv_file) train_file = open(OUTPUT_NAME, 'w...
bsd-3-clause
jh23453/privacyidea
privacyidea/lib/resolvers/LDAPIdResolver.py
1
41677
# -*- coding: utf-8 -*- # Copyright (C) 2014 Cornelius Kölbel # contact: corny@cornelinux.de # # 2017-01-23 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add certificate verification # 2017-01-07 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Use get_info=ldap3.NONE for binds t...
agpl-3.0
ixs/func
func/overlord/cmd_modules/show.py
6
1062
""" show introspection commandline Copyright 2007, Red Hat, Inc see AUTHORS This software may be freely redistributed under the terms of the GNU general public license. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 ...
gpl-2.0
blindfuzzy/LHF
Tools/linuxprivchk.py
1
25080
#!/usr/bin/env python ############################################################################################################### ## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script ## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift ##-----------------------------------------------------...
gpl-3.0
lmazuel/azure-sdk-for-python
azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/log_file_py3.py
2
2365
# 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 ...
mit
catapult-project/catapult-csm
third_party/gsutil/third_party/boto/boto/rds/optiongroup.py
180
15665
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
bsd-3-clause
delta2323/chainer
chainer/functions/array/transpose.py
3
1222
import numpy from chainer import function from chainer.utils import type_check class Transpose(function.Function): """Permute the dimensions of an array.""" def __init__(self, axes=None): self.axes = axes def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1,) ...
mit
jcasner/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/path.py
69
20263
""" Contains a class for managing paths (polylines). """ import math from weakref import WeakValueDictionary import numpy as np from numpy import ma from matplotlib._path import point_in_path, get_path_extents, \ point_in_path_collection, get_path_collection_extents, \ path_in_path, path_intersects_path, con...
agpl-3.0
manqala/erpnext
erpnext/patches/v7_0/create_warehouse_nestedset.py
21
4746
from __future__ import unicode_literals import frappe, erpnext from frappe import _ from frappe.utils import cint from frappe.utils.nestedset import rebuild_tree def execute(): """ Patch Reference: 1. check whether warehouse is associated to company or not 2. if warehouse is associated with company a. create...
gpl-3.0
benschmaus/catapult
telemetry/third_party/web-page-replay/httpproxy_test.py
11
8557
#!/usr/bin/env python # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
bsd-3-clause
oudalab/phyllo
phyllo/extractors/regula_ad_monachoDB.py
1
3765
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup # several names in the <pagehead> but not sure what to put as an author name def main(): # The collection URL below. collURL = 'http://www.thelatinlibrary.com/regula.html' collOpen = urllib.request.urlo...
apache-2.0
leilihh/novaha
nova/console/vmrc.py
21
4588
# Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
apache-2.0
darkleons/odoo
addons/l10n_be_hr_payroll/l10n_be_hr_payroll.py
379
3110
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
endlessm/chromium-browser
third_party/catapult/third_party/gsutil/gslib/vendored/boto/boto/dynamodb/layer2.py
135
33814
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
bsd-3-clause
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/numpy/fft/tests/test_fftpack.py
134
6052
from __future__ import division, absolute_import, print_function import numpy as np from numpy.random import random from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal from numpy.testing import assert_array_equal import threading import sys if sys.version_info[0] >= 3: import queue else...
gpl-3.0
ukncsc/viper
viper/modules/cuckoo.py
2
11252
# This file is part of Viper - https://github.com/viper-framework/viper # See the file 'LICENSE' for copying permission. try: import requests HAVE_REQUESTS = True except ImportError: HAVE_REQUESTS = False import os import shutil import tempfile import tarfile import contextlib from cStringIO import String...
bsd-3-clause
izonder/intellij-community
python/lib/Lib/site-packages/django/contrib/localflavor/tr/forms.py
71
3415
""" TR-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select, CharField from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re phone_digits_...
apache-2.0
garydonovan/google-maps-services-python
googlemaps/client.py
6
13027
# # 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 ...
apache-2.0