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
midma101/AndIWasJustGoingToBed
.venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/lint.py
500
4208
from __future__ import absolute_import, division, unicode_literals from . import _base from ..constants import cdataElements, rcdataElements, voidElements from ..constants import spaceCharacters spaceCharacters = "".join(spaceCharacters) class LintError(Exception): pass class Filter(_base.Filter): def __i...
mit
ryanjmccall/nupic
examples/opf/experiments/multistep/base/description.py
3
15899
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
ak2703/edx-platform
openedx/core/djangoapps/credit/tests/test_views.py
27
13733
""" Tests for credit app views. """ import unittest import json import datetime import pytz import ddt from mock import patch from django.test import TestCase from django.test.utils import override_settings from django.core.urlresolvers import reverse from django.conf import settings from student.tests.factories impo...
agpl-3.0
davidak/satzgenerator
python/satzgenerator.py
1
1797
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Satzgenerator Referenzimplementierung """ import sys import random as r # Textdateien einlesen, Zeilen in Liste vornamen_m = open('../data/vornamen_m.txt', 'r').read().splitlines() vornamen_w = open('../data/vornamen_w.txt', 'r').read().splitlines() vornamen = vorna...
gpl-3.0
sunlianqiang/kbengine
kbe/res/scripts/common/Lib/test/test_pwd.py
88
4229
import sys import unittest from test import support pwd = support.import_module('pwd') class PwdTest(unittest.TestCase): def test_values(self): entries = pwd.getpwall() for e in entries: self.assertEqual(len(e), 7) self.assertEqual(e[0], e.pw_name) self.assert...
lgpl-3.0
openmeteo/enhydris
enhydris/api/tests/test_views/test_search_by_ts_has_years.py
2
1962
from io import StringIO from rest_framework.test import APITestCase from model_mommy import mommy from enhydris import models from .test_search import SearchTestCaseBase class SearchWithYearExistingInOneStationTest(SearchTestCaseBase, APITestCase): search_term = "ts_has_years:2005,2012,2016" search_result...
agpl-3.0
minhphung171093/OpenERP_V8
openerp/loglevels.py
380
3930
# -*- 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 GNU...
agpl-3.0
benoitsteiner/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
6
22469
# 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
andreamerello/linux-analogdevices
scripts/gdb/linux/utils.py
367
4267
# # gdb helper commands and functions for Linux kernel debugging # # common utilities # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb class CachedType: def __init__(self, name): s...
gpl-2.0
phreakocious/graphite-web
webapp/graphite/storage.py
29
5786
import time try: from importlib import import_module except ImportError: # python < 2.7 compatibility from django.utils.importlib import import_module from django.conf import settings from graphite.util import is_local_interface, is_pattern from graphite.remote_storage import RemoteStore from graphite.node impo...
apache-2.0
zacharyvoase/urlobject
urlobject/path.py
4
4746
# -*- coding: utf-8 -*- import posixpath import urllib from .compat import urlparse from .six import text_type, u class Root(object): """A descriptor which always returns the root path.""" def __get__(self, instance, cls): return cls('/') class URLPath(text_type): root = Root() def __r...
unlicense
tyagiarpit/servo
tests/wpt/css-tests/tools/html5lib/html5lib/filters/optionaltags.py
1727
10500
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
mpl-2.0
IssamLaradji/scikit-learn
sklearn/linear_model/ransac.py
16
13870
# coding: utf-8 # Author: Johannes Schönberger # # License: BSD 3 clause import numpy as np from ..base import BaseEstimator, MetaEstimatorMixin, RegressorMixin, clone from ..utils import check_random_state, check_array, check_consistent_length from ..utils.random import sample_without_replacement from .base import ...
bsd-3-clause
kxxoling/google-diff-match-patch
python2/diff_match_patch_test.py
319
41744
#!/usr/bin/python2.4 """Test harness for diff_match_patch.py Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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://...
apache-2.0
mhnatiuk/phd_sociology_of_religion
scrapper/lib/python2.7/site-packages/twisted/internet/test/test_stdio.py
44
6297
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.stdio}. """ from twisted.python.runtime import platform from twisted.internet.test.reactormixins import ReactorBuilder from twisted.internet.protocol import Protocol if not platform.isWindows(): from twisted.i...
gpl-2.0
codrut3/tensorflow
tensorflow/examples/learn/iris.py
22
4007
# 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 appl...
apache-2.0
mgraupe/acq4
acq4/pyqtgraph/WidgetGroup.py
34
10002
# -*- coding: utf-8 -*- """ WidgetGroup.py - WidgetGroup class for easily managing lots of Qt widgets Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. This class addresses the problem of having to save and restore the state of a large group of widgets. """ from...
mit
wcooley/neomodel
test/test_localisation.py
6
1200
from neomodel import StructuredNode, StringProperty from neomodel.contrib import Localised, Locale class Student(Localised, StructuredNode): name = StringProperty(unique_index=True) def setup(): for l in ['fr', 'ar', 'pl', 'es']: Locale(code=l).save() def test_localised(): bob = Student(name="...
mit
mumble-voip/libmumble-gyp
test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py
216
1427
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify that relinking a solib doesn't relink a dependent executable if the solib's public API hasn't changed. """ import os import sys ...
bsd-3-clause
cheddartv/stockstream.live
webapp/stockstream/api.py
1
5316
import config import robinhood import time import httputil import json def get_api_request(request): return httputil.get_json_object_from_url(config.SS_API_ENDPOINT + request) def post_api_request(request, obj): return httputil.post_object_to_url(config.SS_API_ENDPOINT + request, json.dumps(obj)) def get_...
mit
imsparsh/python-for-android
python-modules/twisted/twisted/conch/manhole.py
61
10783
# -*- test-case-name: twisted.conch.test.test_manhole -*- # Copyright (c) 2001-2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Line-input oriented interactive interpreter loop. Provides classes for handling Python source input and arbitrary output interactively from a Twisted application. Also inclu...
apache-2.0
yencarnacion/jaikuengine
.google_appengine/lib/django-1.3/django/contrib/gis/gdal/geomtype.py
404
2967
from django.contrib.gis.gdal.error import OGRException #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', 1 : 'Point', 2 ...
apache-2.0
kblin/supybot-gsoc
plugins/Dunno/config.py
15
2344
### # Copyright (c) 2003-2005, Daniel DiPaolo # 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 cond...
bsd-3-clause
loganasherjones/python-logstash-async
logstash_async/memory_cache.py
1
3382
# -*- coding: utf-8 -*- # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. import uuid from logging import getLogger as get_logger from datetime import datetime, timedelta from logstash_async.cache import Cache class MemoryCache(Cache): """B...
mit
bbozhev/flask-test
flask/lib/python2.7/site-packages/wtforms/ext/django/templatetags/wtforms.py
177
2826
""" Template tags for easy WTForms access in Django templates. """ from __future__ import unicode_literals import re from django import template from django.conf import settings from django.template import Variable from ....compat import iteritems register = template.Library() class FormFieldNode(template.Node): ...
mit
varunkumta/azure-linux-extensions
VMEncryption/main/oscrypto/rhel_72_lvm/encryptstates/EncryptBlockDeviceState.py
4
4192
#!/usr/bin/env python # # VM Backup extension # # Copyright 2015 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
apache-2.0
kstrauser/ansible
v1/tests/TestConstants.py
164
1600
# -*- coding: utf-8 -*- import unittest from ansible.constants import get_config import ConfigParser import random import string import os def random_string(length): return ''.join(random.choice(string.ascii_uppercase) for x in range(6)) p = ConfigParser.ConfigParser() p.read(os.path.join(os.path.dirname(__fil...
gpl-3.0
minorua/QGIS
python/plugins/processing/algs/qgis/RectanglesOvalsDiamondsVariable.py
10
16185
# -*- coding: utf-8 -*- """ *************************************************************************** RectanglesOvalsDiamondsVariable.py --------------------- Date : April 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot...
gpl-2.0
dataxu/ansible
lib/ansible/modules/cloud/amazon/sqs_queue.py
23
10133
#!/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': ['stableinterf...
gpl-3.0
akretion/sale-workflow
partner_prepayment/model/sale.py
37
1324
# -*- coding: utf-8 -*- # # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA # # 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, either version 3 of the # License...
agpl-3.0
jorge2703/scikit-learn
sklearn/utils/optimize.py
135
5671
""" Our own implementation of the Newton algorithm Unlike the scipy.optimize version, this version of the Newton conjugate gradient solver uses only one function call to retrieve the func value, the gradient value and a callable for the Hessian matvec product. If the function call is very expensive (e.g. for logistic ...
bsd-3-clause
rruebner/odoo
openerp/addons/base/tests/test_qweb.py
47
2594
# -*- coding: utf-8 -*- import cgi from lxml import etree from openerp.tests import common from openerp.addons.base.ir import ir_qweb class TestQWebTField(common.TransactionCase): def setUp(self): super(TestQWebTField, self).setUp() self.engine = self.registry('ir.qweb') def context(self, va...
agpl-3.0
drbild/boto
boto/route53/domains/__init__.py
129
1711
# Copyright (c) 2014 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 ...
mit
switchboardOp/ansible
lib/ansible/parsing/yaml/loader.py
74
1986
# (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
airqj/ardupilot-raspilot
Tools/LogAnalyzer/tests/TestParams.py
261
3119
from LogAnalyzer import Test,TestResult import DataflashLog import math # for isnan() class TestParams(Test): '''test for any obviously bad parameters in the config''' def __init__(self): Test.__init__(self) self.name = "Parameters" # helper functions def __checkParamIsEqual(self, ...
gpl-3.0
sorenk/ansible
lib/ansible/modules/clustering/k8s/k8s_scale.py
18
3282
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Chris Houseknecht <@chouseknecht> # 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
mpattyn/fumiste
prototypePython/steamapi/requests/packages/chardet/big5prober.py
2931
1684
######################## 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
nishad-jobsglobal/odoo-marriot
addons/email_template/html2text.py
440
14143
#!/usr/bin/env python """html2text: Turn HTML into equivalent Markdown-structured text.""" __version__ = "2.36" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3." __contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"] # TODO: # Support deco...
agpl-3.0
labordoc/labordoc-next
modules/bibformat/lib/elements/bfe_field.py
28
6253
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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 ## ...
gpl-2.0
huntxu/fuel-web
nailgun/nailgun/db/sqlalchemy/models/notification.py
9
1615
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, 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 requi...
apache-2.0
topnotchgeek/capnlog
apps/www/behaviors.py
1
1759
import markdown from django.db import models from django.utils.text import slugify from conf import settings class Permalinkable(models.Model): slug = models.SlugField() class Meta: abstract = True def get_url_kwargs(self, **kwargs): kwargs.update(getattr(self, 'url_kwargs', {})) ...
apache-2.0
HuaweiSwitch/ansible
lib/ansible/modules/cloud/amazon/efs_facts.py
31
11554
#!/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
snyaggarwal/oclapi
ocl/mappings/serializers.py
2
11917
from rest_framework import serializers from concepts.fields import ConceptURLField, SourceURLField from concepts.models import Concept from mappings.models import Mapping, MappingVersion from oclapi.serializers import ResourceVersionSerializer from oclapi.models import RegexValidator,NAMESPACE_REGEX __author__ = 'miste...
mpl-2.0
andersk/zulip
zerver/webhooks/mention/view.py
4
1049
# Webhooks for external integrations. from typing import Any, Dict, Sequence from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import check_s...
apache-2.0
pierotofy/OpenDroneMap
stages/odm_slam.py
2
2843
"""Cell to run odm_slam.""" import os from opendm import log from opendm import io from opendm import system from opendm import context from opendm import types class ODMSlamStage(types.ODM_Stage): """Run odm_slam on a video and export to opensfm format.""" def process(self, args, outputs): tree = o...
gpl-3.0
smaffulli/libcloud
libcloud/storage/drivers/auroraobjects.py
18
1935
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
pong3489/TEST_Mission
Lib/csv.py
55
16795
""" csv.py - read/write/investigate CSV files """ import re from functools import reduce from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL,...
gpl-3.0
hengyicai/OnlineAggregationUCAS
examples/src/main/python/parquet_inputformat.py
3
2240
# # 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
westinedu/newertrends
django/contrib/gis/sitemaps/georss.py
291
2156
from django.core import urlresolvers from django.contrib.sitemaps import Sitemap class GeoRSSSitemap(Sitemap): """ A minimal hook to produce sitemaps for GeoRSS feeds. """ def __init__(self, feed_dict, slug_dict=None): """ This sitemap object initializes on a feed dictionary (as would b...
bsd-3-clause
sunlianqiang/kbengine
kbe/src/lib/python/Lib/test/test_importlib/import_/test___package__.py
84
4859
"""PEP 366 ("Main module explicit relative imports") specifies the semantics for the __package__ attribute on modules. This attribute is used, when available, to detect which package a module belongs to (instead of using the typical __path__/__name__ test). """ import unittest from .. import util from . import util as...
lgpl-3.0
40223144/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/unittest/__init__.py
900
2718
""" Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework. This module contains the core framework classes that form the basis of specific test cases and suites (TestCase, TestSuite etc.), and also a text-based utility class for running the tests and reporting the resu...
gpl-3.0
emmuchira/kps_erp
erpnext/hr/doctype/employee_loan/employee_loan.py
24
6387
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, math import erpnext from frappe import _ from frappe.utils import flt, rounded, add_months, nowdate from erpnext.controll...
gpl-3.0
yyt030/pyzmq
zmqversion.py
7
3916
"""A simply script to scrape zmq.h for the zeromq version. This is similar to the version.sh script in a zeromq source dir, but it searches for an installed header, rather than in the current dir. """ # Copyright (c) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from __future__ import wi...
bsd-3-clause
TheTimmy/spack
var/spack/repos/builtin/packages/r-htmltools/package.py
1
1623
############################################################################## # 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, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
zimolzak/poker-experiments
pokermodules/convenience_hole.py
1
11895
import numpy from convenience import reduce_h, find_pcts_multi from deuces.deuces import Deck, Card from itertools import combinations, product import random all52 = Deck.GetFullDeck() all_hole_explicit = [] for h in combinations(all52, 2): all_hole_explicit += [list(h)] deck_choose_2 = len(all_hole_explicit) asse...
mit
emergebtc/muddery
evennia/evennia/typeclasses/attributes.py
2
21055
""" Attributes are arbitrary data stored on objects. Attributes supports both pure-string values and pickled arbitrary data. Attributes are also used to implement Nicks. This module also contains the Attribute- and NickHandlers as well as the `NAttributeHandler`, which is a non-db version of Attributes. """ import r...
bsd-3-clause
GuillaumeGomez/servo
tests/wpt/css-tests/tools/wptserve/wptserve/pipes.py
87
14196
from cgi import escape import gzip as gzip_module import re import time import types import uuid from cStringIO import StringIO def resolve_content(response): rv = "".join(item for item in response.iter_content(read_file=True)) if type(rv) == unicode: rv = rv.encode(response.encoding) return rv ...
mpl-2.0
s20121035/rk3288_android5.1_repo
external/chromium_org/chrome/tools/build/repack_locales.py
25
10221
#!/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. """Helper script to repack paks for a list of locales. Gyp doesn't have any built-in looping capability, so this just provides a w...
gpl-3.0
ygol/odoo
addons/procurement_jit/__init__.py
374
1078
# -*- 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...
agpl-3.0
Soya93/Extract-Refactoring
python/lib/Lib/encodings/cp1253.py
593
13350
""" Python Character Mapping Codec cp1253 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.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,in...
apache-2.0
vladikr/nova_drafts
nova/objects/network_request.py
3
2348
# Copyright 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 a...
apache-2.0
MER-GROUP/intellij-community
python/lib/Lib/site-packages/django/contrib/localflavor/tr/tr_provinces.py
316
2191
# -*- coding: utf-8 -*- """ This exists in this standalone file so that it's only imported into memory when explicitly needed. """ PROVINCE_CHOICES = ( ('01', ('Adana')), ('02', ('Adıyaman')), ('03', ('Afyonkarahisar')), ('04', ('Ağrı')), ('68', ('Aksaray')), ('05', ('Amasya')), ('06', ('An...
apache-2.0
bwrsandman/OpenUpgrade
addons/account_analytic_analysis/migrations/8.0.1.1/pre-migration.py
9
1607
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
matejc/searx
tests/unit/engines/test_qwant.py
1
9798
from collections import defaultdict import mock from searx.engines import qwant from searx.testing import SearxTestCase class TestQwantEngine(SearxTestCase): def test_request(self): query = 'test_query' dicto = defaultdict(dict) dicto['pageno'] = 0 dicto['language'] = 'fr-FR' ...
agpl-3.0
machinalis/django-srd20
srd20/migrations/0005_auto__chg_field_spell_altname.py
1
3803
# 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): # Changing field 'Spell.altname' db.alter_column('spell', 'altname', self.gf('django.db.models.fields.Slug...
bsd-3-clause
Tejal011089/trufil-erpnext
erpnext/patches/v4_0/fields_to_be_renamed.py
101
3062
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field from frappe.modules import scrub, get_doctype_module rename_map = { "Quotation ...
agpl-3.0
OpenWinCon/OpenWinNet
web-gui/myvenv/lib/python3.4/site-packages/django/core/files/utils.py
901
1230
class FileProxyMixin(object): """ A mixin class used to forward file methods to an underlaying file object. The internal file object has to be called "file":: class FileProxy(FileProxyMixin): def __init__(self, file): self.file = file """ encoding = property(la...
apache-2.0
ThiagoGarciaAlves/intellij-community
plugins/hg4idea/testData/bin/hgext/schemes.py
96
3372
# Copyright 2009, Alexander Solovyov <piranha@piranha.org.ua> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """extend schemes with shortcuts to repository swarms This extension allows you to specify shortcuts for parent URLs wi...
apache-2.0
jalilag/apspir
objedit/gnosis/xml/pickle/test/test_4list.py
3
1604
"exercise all 4 list-writing methods --fpm" import gnosis.xml.pickle as xml_pickle import sys import funcs funcs.set_parser() class foo: pass f = foo() f.a = (1,2,3) # method 1 -- StreamWriter is an uncompressed StringIO x = xml_pickle.dumps(f) # check header (to ensure correct method used) + contents ...
lgpl-2.1
dhenrygithub/QGIS
python/plugins/processing/algs/lidar/lastools/las2lasPro_transform.py
3
4150
# -*- coding: utf-8 -*- """ *************************************************************************** las2lasPro_transform.py --------------------- Date : October 2014 and May 2016 Copyright : (C) 2014 by Martin Isenburg Email : martin near rapidlasso poi...
gpl-2.0
murat1985/bagpipe-bgp
bagpipe/bgp/engine/__init__.py
2
7221
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # encoding: utf-8 # Copyright 2014 Orange # # 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...
apache-2.0
jimi-c/ansible
lib/ansible/modules/source_control/gitlab_group.py
7
7742
#!/usr/bin/python # (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) # 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
martinbuc/missionplanner
packages/IronPython.StdLib.2.7.4/content/Lib/encodings/iso8859_15.py
93
13775
""" Python Character Mapping Codec iso8859_15 generated from 'MAPPINGS/ISO8859/8859-15.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...
gpl-3.0
jaimemaretoli/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/langcyrillicmodel.py
168
17750
######################## 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...
lgpl-2.1
danielchatfield/shreddi.es
libs/jinja2/testsuite/core_tags.py
412
11858
# -*- coding: utf-8 -*- """ jinja2.testsuite.core_tags ~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the core tags like for and if. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment...
artistic-2.0
alxgu/ansible
lib/ansible/parsing/quoting.py
241
1141
# (c) 2014 James Cammarata, <jcammarata@ansible.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) any late...
gpl-3.0
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/external/protobuf/python/google/protobuf/duration_pb2.py
43
2746
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/duration.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import ref...
mit
MountainWei/nova
nova/db/sqlalchemy/models.py
13
54014
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (...
apache-2.0
havt/odoo
addons/l10n_syscohada/__init__.py
439
1040
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2011 BAAMTU SARL (<http://www.baamtu.sn>). # contact: leadsn@baamtu.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affer...
agpl-3.0
ShaneMcC/hellanzb
Hellanzb/HellaXMLRPC/xmlrpc.py
4
13743
# -*- coding: iso-8859-1 -*- # -*- test-case-name: twisted.web.test.test_xmlrpc -*- # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """A generic resource for publishing objects via XML-RPC. Requires xmlrpclib (comes standard with Python 2.2 and later, otherwise can be downloaded f...
bsd-3-clause
nirmeshk/oh-mainline
vendor/packages/webob/webob/etag.py
80
4531
""" Does parsing of ETag-related headers: If-None-Matches, If-Matches Also If-Range parsing """ from webob.datetime_utils import ( parse_date, serialize_date, ) from webob.descriptors import _rx_etag from webob.util import ( header_docstring, warn_deprecation, ) __all__ = ['AnyETag', 'NoETag...
agpl-3.0
gochist/horizon
openstack_dashboard/openstack/common/context.py
19
2677
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.apac...
apache-2.0
hilaskis/UAV_MissionPlanner
Lib/site-packages/numpy/linalg/linalg.py
53
61098
"""Lite version of scipy.linalg. Notes ----- This module is a lite version of the linalg.py module in SciPy which contains high-level Python interface to the LAPACK library. The lite version only accesses the following LAPACK functions: dgesv, zgesv, dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr...
gpl-2.0
liveonnet/prom_notify
pn/adm/models.py
1
1343
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desired behavior. # * Remove `managed = False` lines if ...
apache-2.0
ingokegel/intellij-community
python/helpers/pydev/pydev_tests_python/test_debugger.py
10
107601
# coding: utf-8 ''' The idea is that we record the commands sent to the debugger and reproduce them from this script (so, this works as the client, which spawns the debugger as a separate process and communicates to it as if it was run from the outside) Note that it's a python script but it'll spawn a ...
apache-2.0
kubeflow/kfp-tekton-backend
samples/contrib/image-captioning-gcp/src/models.py
2
3943
# Copyright 2019 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 a...
apache-2.0
apollo13/ansible
test/support/network-integration/collections/ansible_collections/cisco/ios/plugins/modules/ios_config.py
47
21870
#!/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
nozuono/calibre-webserver
src/calibre/library/database2.py
4
164046
from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' ''' The database used to store ebook metadata ''' import os, sys, shutil, cStringIO, glob, time, functools, traceback, re, \ json, uuid, hashlib, copy, t...
gpl-3.0
Arcanemagus/SickRage
lib/pysrt/commands.py
71
8471
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable-all import os import re import sys import codecs import shutil import argparse from textwrap import dedent from chardet import detect from pysrt import SubRipFile, SubRipTime, VERSION_STRING def underline(string): return "\033[4m%s\033[0m" % string...
gpl-3.0
strands-project/robomongo
tests/gtest-1.7.0/test/gtest_env_var_test.py
2408
3487
#!/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
pgmillon/ansible
lib/ansible/modules/network/fortios/fortios_log_syslogd_override_setting.py
23
12526
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
Dave667/service
plugin.video.kinobaza.tv/resources/lib/demjson.py
2
87948
#!/usr/bin/env python # -*- coding: utf-8 -*- # r""" A JSON data encoder and decoder. This Python module implements the JSON (http://json.org/) data encoding format; a subset of ECMAScript (aka JavaScript) for encoding primitive data types (numbers, strings, booleans, lists, and associative arrays) in a language-n...
gpl-2.0
Chilledheart/chromium
chrome/test/chromedriver/test/webserver.py
17
6856
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import BaseHTTPServer import os import threading class Responder(object): """Sends a HTTP response. Used with TestWebServer.""" def __init__(self, han...
bsd-3-clause
kienpham2000/ansible-modules-core
source_control/subversion.py
28
7706
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, 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...
gpl-3.0
SkySchermer/uweclang
uweclang/query/grammar/QueryLexer.py
1
6565
# Generated from java-escape by ANTLR 4.5 # encoding: utf-8 from __future__ import print_function from antlr4 import * from io import StringIO def serializedATN(): with StringIO() as buf: buf.write(u"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2") buf.write(u"\27\u00a4\b\1\4\2\t\2\4\3\t\3\4...
mit
PetrDlouhy/django
django/db/models/sql/subqueries.py
25
7754
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.core.exceptions import FieldError from django.db import connections from django.db.models.query_utils import Q from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE, NO_RESULTS from django.db.models.sql.qu...
bsd-3-clause
qguv/config
weechat/plugins/python/weestreamer.py
1
4152
# Copyright (c) 2015 by Miblo <miblodelcarpio@gmail.com> # All rights reserved # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later ...
gpl-3.0
lawnmowerlatte/hyper
test/test_ssl_socket.py
4
2762
# -*- coding: utf-8 -*- """ test/test_ssl_socket ~~~~~~~~~~~~~~~~~~~~ This file defines tests for hyper that validate our TLS handling. """ import os import socket import ssl import threading import pytest from hyper.tls import wrap_socket, init_context from server import SocketLevelTest TEST_DIR = os.path.abspat...
mit
ibinti/intellij-community
python/helpers/py3only/docutils/utils/math/unichar2tex.py
54
16811
# LaTeX math to Unicode symbols translation table # for use with the translate() method of unicode objects. # Generated with ``write_unichar2tex.py`` from the data in # http://milde.users.sourceforge.net/LUCR/Math/ # Includes commands from: standard LaTeX, amssymb, amsmath uni2tex_table = { 160: '~', 163: '\\pounds '...
apache-2.0
daviur/py-cracking-the-coding-interview
trees-and-graphs/tg_traversal.py
1
4187
# The MIT License (MIT) # # Copyright (c) 2016 David I Urbina # # 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, mo...
mit