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
TeamEOS/kernel_lge_dory
scripts/gcc-wrapper.py
10
3507
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. 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 th...
gpl-2.0
eformat/vertx-web
vertx-web/src/test/sockjs-protocol/venv/lib/python2.7/site-packages/pip/commands/install.py
342
12694
import os import sys import tempfile import shutil from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.log import logger from pip.locations import (src_prefix, virtualenv_no_global, distutils_scheme, build_prefix) from pip.basecommand import Command from pip.in...
apache-2.0
jandecaluwe/myhdl
myhdl/test/bugs/test_issue_169.py
5
1060
from myhdl import Signal, block, delay, instance import pytest class Test1: def __init__(self): self.clock = Signal(bool(0)) @block def test(self): @instance def func(): i = 0 while i <= 100: yield delay(10) self.clock....
lgpl-2.1
danielharbor/openerp
addons/account_voucher/report/account_voucher_sales_receipt.py
326
5808
############################################################################## # # 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 Affero General Public L...
agpl-3.0
msrb/freeipa
daemons/ipa-otpd/test.py
5
1887
#!/usr/bin/python2 # # FreeIPA 2FA companion daemon # # Authors: Nathaniel McCallum <npmccallum@redhat.com> # # Copyright (C) 2013 Nathaniel McCallum, Red Hat # see file 'COPYING' for use and warranty information # # This program is free software you can redistribute it and/or modify # it under the terms of the GNU Ge...
gpl-3.0
menegon/OWSLib
owslib/swe/sensor/sml.py
22
14826
# encoding: utf-8 from __future__ import (absolute_import, division, print_function) from owslib.etree import etree from owslib import crs, util from owslib.util import testXMLValue, testXMLAttribute, nspath_eval, xmltag_split, dict_union, extract_xml_list from owslib.namespaces import Namespaces def get_namespaces(...
bsd-3-clause
bitmazk/django-document-library
document_library/templatetags/document_library_tags.py
1
1256
"""Templatetags for the ``document_library`` app.""" from django import template from ..models import Document register = template.Library() @register.assignment_tag def get_files_for_document(document): """ Returns the available files for all languages. In case the file is already present in another ...
mit
Lazar-T/scrapy
scrapy/utils/iterators.py
6
3006
import re, csv, six try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO from scrapy.http import TextResponse, Response from scrapy.selector import Selector from scrapy import log from scrapy.utils.python import re_rsearch, str_to_unicode def xmliter(obj, nodename): ...
bsd-3-clause
vortex-ape/scikit-learn
examples/datasets/plot_random_multilabel_dataset.py
278
3402
""" ============================================== Plot randomly generated multilabel dataset ============================================== This illustrates the `datasets.make_multilabel_classification` dataset generator. Each sample consists of counts of two features (up to 50 in total), which are differently distri...
bsd-3-clause
fabianopetroni/connector
connector/connector.py
1
1179
import os import sys # Constant for verify connection FTRACK_CONNECTED = False sys.path += ["D:/server/apps/3rdparty/ftrack-python"] os.environ['FTRACK_SERVER'] = 'https://cas.ftrackapp.com' os.environ['LOGNAME'] = 'fabianopetroni' import ftrack FTRACK_CONNECTED = True class Connector(object): """Class for Co...
mit
taedori81/shoop
shoop/utils/settings_doc.py
6
3436
# This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import os import re import sys import token import tokenize import django.conf import six import s...
agpl-3.0
jefffohl/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/backends/__init__.py
72
2225
import matplotlib import inspect import warnings # ipython relies on interactive_bk being defined here from matplotlib.rcsetup import interactive_bk __all__ = ['backend','show','draw_if_interactive', 'new_figure_manager', 'backend_version'] backend = matplotlib.get_backend() # validates, to match all_bac...
gpl-3.0
quodlibet/quodlibet
quodlibet/qltk/songlistcolumns.py
1
16188
# Copyright 2005 Joe Wreschnig # 2012 Christoph Reiter # 2011-2020 Nick Boultbee # 2014 Jan Path # # 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 th...
gpl-2.0
jonas2295/m7_kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
Pajn/RAXA-Django
common/models/Temp.py
1
1389
''' Copyright (C) 2013 Rasmus Eneman <rasmus@eneman.eu> 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, or (at your option) any later version. This program is...
agpl-3.0
hujiajie/chromium-crosswalk
third_party/typ/typ/__init__.py
81
3167
# 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 ag...
bsd-3-clause
mezz64/home-assistant
tests/components/humidifier/test_intent.py
12
6859
"""Tests for the humidifier intents.""" from homeassistant.components.humidifier import ( ATTR_AVAILABLE_MODES, ATTR_HUMIDITY, ATTR_MODE, DOMAIN, SERVICE_SET_HUMIDITY, SERVICE_SET_MODE, intent, ) from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES, SERVICE_T...
apache-2.0
geomf/omf-fork
omf/model/user.py
1
2023
# # Open Modeling Framework (OMF) Software for simulating power systems behavior # Copyright (c) 2015, 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 Foundat...
gpl-2.0
mysociety/yournextmp-popit
candidates/templatetags/metadescription.py
3
2031
from __future__ import unicode_literals import re from django import template from django.contrib.sites.models import Site from django.utils.translation import ugettext as _ from django.utils.translation import get_language register = template.Library() @register.simple_tag def metadescription(person, last_candidac...
agpl-3.0
gratefulfrog/ArduGuitar
Ardu2/design/POC-3_MAX395/pyboard/V1_WithHMI/pyboard_no_debug/defaultPresets.py
2
7665
# defaultPresets.py defPresetDict = {(0,0): {'Name':'(0,0) seq-0', 'M' : [5,5],'A' : [5,5], 'B' : [5,5], 'C' : [0,0], 'D' : [0,0], 'TR' : [None,5], 'S' :'(+AB)', 'TREM' : 0, 'VIB' : 0, 'AUX0' : 0, 'AUX1' : 0, 'SEQ' : ...
gpl-2.0
pmclanahan/bedrock
bedrock/legal_docs/tests.py
29
6102
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from os.path import join from django.http import Http404, HttpResponse from django.test import RequestFactory from moc...
mpl-2.0
state-hiu/geonode
geonode/groups/views.py
31
8608
from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseForbidden, HttpResponseRedirect, HttpResponseNotAllowed from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import RequestContext from dj...
gpl-3.0
ruslanloman/nova
nova/tests/unit/pci/test_whitelist.py
43
2916
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
spacetelescope/asv
asv/console.py
3
11846
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ A set of utilities for writing output to the console. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import io import contextlib import locale import logging i...
bsd-3-clause
xpansa/hr
hr_contract_multi_jobs/models/hr_job.py
23
1203
# -*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publish...
agpl-3.0
ditupao/shadowsocks
shadowsocks/local.py
1015
2248
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2012-2015 clowwindy # # 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 r...
apache-2.0
jjmiranda/edx-platform
common/djangoapps/startup_configurations/validate_config.py
22
1199
""" Common Functions to Validate Configurations """ def validate_lms_config(settings): """ Validates configurations for lms and raise ValueError if not valid """ validate_common_config(settings) # validate feature based configurations validate_marketing_site_config(settings) def validate_cm...
agpl-3.0
sohyongsheng/kaggle-carvana
plot_learning_curves.py
1
2337
import numpy import matplotlib.pyplot import pylab import sys def plot_learning_curves(experiment, epochs, train_losses, cross_validation_losses, dice_scores, x_limits = None, y_limits = None): axes = matplotlib.pyplot.figure().gca() x_axis = axes.get_xaxis() x_axis.set_major_locator(pylab.MaxNLocator(...
gpl-3.0
CraigHarris/gpdb
src/test/tinc/tincrepo/mpp/models/regress/sql_related/regress_diff_answer_files/regress_diff_ans_file.py
9
2238
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
apache-2.0
JeshuaOfficial/DeveloperSpace
views/plugins/ionicons/builder/generate.py
357
9438
from subprocess import call import os import json BUILDER_PATH = os.path.dirname(os.path.abspath(__file__)) ROOT_PATH = os.path.join(BUILDER_PATH, '..') FONTS_FOLDER_PATH = os.path.join(ROOT_PATH, 'fonts') CSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'css') SCSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'scss') LESS_FOLDER_...
mit
ppiotr/Invenio
modules/miscutil/lib/plotextractor_unit_tests.py
6
15778
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2012 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 yo...
gpl-2.0
czcorpus/kontext
lib/plugins/default_query_history/__init__.py
1
13623
# Copyright (c) 2013 Charles University in Prague, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2013 Tomas Machalek <tomas.machalek@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License #...
gpl-2.0
MikeTheGreat/GLT
glt/MyClasses/CourseInfo.py
1
21912
"""Contains the CourseInfo object""" import datetime import collections import csv import os import shutil import sys #import git import subprocess import tempfile import gitlab from colorama import Fore, Style, init # Back, init() from glt.MyClasses.Student import Student from glt.MyClasses.StudentCollection import ...
gpl-3.0
nickleefly/node-gyp
legacy/tools/gyp/pylib/gyp/generator/ninja_test.py
39
1480
#!/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. """ Unit tests for the ninja.py file. """ import gyp.generator.ninja as ninja import unittest import StringIO import TestCommon class Tes...
mit
TsinghuaX/edx-platform
common/lib/capa/capa/util.py
19
3128
from calc import evaluator from cmath import isinf #----------------------------------------------------------------------------- # # Utility functions used in CAPA responsetypes def compare_with_tolerance(v1, v2, tol): ''' Compare v1 to v2 with maximum tolerance tol tol is relative if it ends in %; otherwis...
agpl-3.0
Serag8/Bachelor
google_appengine/lib/django-0.96/django/contrib/syndication/feeds.py
32
5316
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.template import Context, loader, Template, TemplateDoesNotExist from django.contrib.sites.models import Site from django.utils import feedgenerator from django.conf import settings def add_domain(domain, url): if not url.starts...
mit
mynuolr/GD-esurfingschoolclient-portal
import library(May need)/urllib2.py
37
52407
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
agpl-3.0
mxOBS/deb-pkg_trusty_chromium-browser
third_party/skia/tools/skp/page_sets/skia_blogger_desktop.py
9
1330
# Copyright 2014 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. # pylint: disable=W0401,W0614 from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class SkiaBuildbotDesk...
bsd-3-clause
DanaOshri/Open-Knesset
auxiliary/migrations/0003_auto__chg_field_tidbit_content.py
14
1386
# -*- 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): # Changing field 'Tidbit.content' db.alter_column('auxiliary_tidbit', 'content', self.gf('tinymce.models.HT...
bsd-3-clause
keithroe/vtkoptix
ThirdParty/Twisted/twisted/mail/test/test_pop3client.py
22
21466
# -*- test-case-name: twisted.mail.test.test_pop3client -*- # Copyright (c) 2001-2004 Divmod Inc. # See LICENSE for details. import sys import inspect from zope.interface import directlyProvides from twisted.mail.pop3 import AdvancedPOP3Client as POP3Client from twisted.mail.pop3 import InsecureAuthenticationDisallo...
bsd-3-clause
tengqm/senlin
senlin/tests/apiv1/shared.py
1
4578
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
apache-2.0
geokrety/geokrety-api
tests/unittests/utils/responses/user.py
2
6124
# -*- coding: utf-8 -*- from .base import BaseResponse from .collections import BaseCollectionResponse class UserResponse(BaseResponse): def assertHasRelationshipNews(self): self.assertHasRelationshipSelf('news', '/v1/users/%s/relationships/news' % self.id) self.assertHasRelationshipRelated('new...
gpl-3.0
michaelgugino/turbo-lister
werkzeug/_compat.py
448
6184
import sys import operator import functools try: import builtins except ImportError: import __builtin__ as builtins PY2 = sys.version_info[0] == 2 _identity = lambda x: x if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) int_to_byte = c...
gpl-3.0
citrix-openstack-build/python-novaclient
novaclient/tests/test_utils.py
5
5092
import sys import mock import six from novaclient import exceptions from novaclient import utils from novaclient import base from novaclient.tests import utils as test_utils UUID = '8e8ec658-c7b0-4243-bdf8-6f7f2952c0d0' class FakeResource(object): NAME_ATTR = 'name' def __init__(self, _id, properties): ...
apache-2.0
h3biomed/eggo
bin/toaster.py
1
1048
#! /usr/bin/env python # Licensed to Big Data Genomics (BDG) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The BDG licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you...
apache-2.0
ambujone/breath-hackathon
gae/lib/PIL/PcfFontFile.py
40
6335
# # THIS IS WORK IN PROGRESS # # The Python Imaging Library # $Id$ # # portable compiled font file parser # # history: # 1997-08-19 fl created # 2003-09-13 fl fixed loading of unicode fonts # # Copyright (c) 1997-2003 by Secret Labs AB. # Copyright (c) 1997-2003 by Fredrik Lundh. # # See the README file for informa...
mit
im-infamou5/volatility
volatility/plugins/crashinfo.py
44
5868
# Volatility # Copyright (C) 2009-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
NixaSoftware/CVis
venv/bin/tools/regression/xsl_reports/test/generate_test_results_v1.py
30
4499
import xml.sax.saxutils import common import os import time num_of_libs = 2 num_of_toolsets = 3 num_of_tests = 10 tag = "1_30_0" def library_build_failed( library_idx ): return library_idx % 2 def make_test_results(): if not os.path.exists( tag ): os.makedirs( tag ) g = xml.sax.saxuti...
apache-2.0
sandsmark/kate
addons/pate/src/plugins/block.py
3
6648
# -*- coding: utf-8 -*- # # Kate/Pâté plugins to work with code blocks # Copyright 2010-2013 by Alex Turbov <i.zaufi@gmail.com> # # # This software 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...
lgpl-2.1
tswast/google-cloud-python
bigquery/samples/client_query_destination_table_legacy.py
2
1582
# Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
dalegregory/odoo
addons/stock_account/__init__.py
384
1060
# -*- 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
sameer2800/sam-s-club-auctions
flask/lib/python3.6/site-packages/markupsafe/tests.py
674
6107
# -*- coding: utf-8 -*- import gc import sys import unittest from markupsafe import Markup, escape, escape_silent from markupsafe._compat import text_type class MarkupTestCase(unittest.TestCase): def test_adding(self): # adding two strings should escape the unsafe one unsafe = '<script type="appl...
apache-2.0
thonkify/thonkify
src/lib/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, #...
mit
PyMamba/mamba-storm
storm/schema/schema.py
1
4673
# # Copyright (c) 2006, 2007 Canonical # # Written by Gustavo Niemeyer <gustavo@niemeyer.net> # # This file is part of Storm Object Relational Mapper. # # Storm 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 Found...
lgpl-2.1
texastribune/tx_election_scrapers
tx_elections_scrapers/sos/test_utils.py
1
1962
from __future__ import unicode_literals import unittest from .utils import slugify, corrected from . import utils class correctedTest(unittest.TestCase): def test_it_works(self): utils._corrections_cache = { 'all': { 'a0': 'a1', }, 'foo': { ...
bsd-3-clause
erja-gp/openthread
tools/harness-automation/cases/sed_9_2_18.py
16
1871
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
ynkjm/ryu
ryu/lib/packet/ipv6.py
11
20882
# Copyright (C) 2012 Nippon Telegraph and Telephone 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 # # Unless required by appli...
apache-2.0
maxogden/npm-www
node_modules/npm/node_modules/node-gyp/gyp/test/configurations/target_platform/gyptest-target_platform.py
351
1112
#!/usr/bin/env python # Copyright (c) 2009 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. """ Tests the msvs specific msvs_target_platform option. """ import TestGyp import TestCommon def RunX64(exe, stdout): try: test.ru...
bsd-2-clause
darkleons/BE
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
rosexu/latex-my-notes
webenv/lib/python2.7/site.py
784
27543
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
mit
robweber/maraschino
lib/sqlalchemy/dialects/informix/informixdb.py
22
1963
# informix/informixdb.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Support for the informixdb DBAPI. informixdb is available at: http://...
mit
MehdiSfr/tensor-flow
tensorflow/python/ops/control_flow_ops_test.py
9
3952
# 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 by applicable law or a...
apache-2.0
sysalexis/kbengine
kbe/res/scripts/common/Lib/idlelib/EditorWindow.py
61
66718
import importlib import importlib.abc import importlib.util import os import platform import re import string import sys from tkinter import * import tkinter.simpledialog as tkSimpleDialog import tkinter.messagebox as tkMessageBox import traceback import webbrowser from idlelib.MultiCall import MultiCallCreator from i...
lgpl-3.0
steveklabnik/servo
tests/wpt/css-tests/tools/wptserve/tests/functional/test_stash.py
299
1231
import os import unittest import urllib2 import json import uuid import wptserve from wptserve.router import any_method from base import TestUsingServer, doc_root class TestResponseSetCookie(TestUsingServer): def test_put_take(self): @wptserve.handlers.handler def handler(request, response): ...
mpl-2.0
jbinary/django-database-email-backend
database_email_backend/admin.py
1
5693
#-*- coding: utf-8 -*- from functools import update_wrapper from django.core.exceptions import PermissionDenied from django.http import HttpResponseRedirect from django.contrib import admin from django import forms from django.http import HttpResponse from django.core.urlresolvers import reverse from django.core.mail i...
mit
cytec/SickRage
lib/hachoir_parser/program/java.py
84
57979
""" Compiled Java classes parser. Author: Thomas de Grenier de Latour (TGL) <degrenier@easyconnect.fr> Creation: 2006/11/01 Last-update: 2006/11/06 Introduction: * This parser is for compiled Java classes, aka .class files. What is nice with this format is that it is well documented in the official Java VM specs...
gpl-3.0
sarvex/depot-tools
testing_support/trial_dir.py
47
2749
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import atexit import logging import os import sys import tempfile from testing_support import auto_stub import gclient_utils class TrialDir(object):...
bsd-3-clause
Zhongqilong/kbengine
kbe/src/lib/python/Lib/nntplib.py
63
42782
"""An NNTP client class based on: - RFC 977: Network News Transfer Protocol - RFC 2980: Common NNTP Extensions - RFC 3977: Network News Transfer Protocol (version 2) Example: >>> from nntplib import NNTP >>> s = NNTP('news') >>> resp, count, first, last, name = s.group('comp.lang.python') >>> print('Group', name, 'ha...
lgpl-3.0
odpi/bigtop
bigtop-packages/src/common/ambari/ODPi/1.0/hooks/before-START/scripts/hook.py
15
1268
""" 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 this ...
apache-2.0
pedrobaeza/stock-logistics-workflow
__unported__/stock_move_on_hold/stock.py
33
27541
# -*- coding: utf-8 -*- ################################################################################# # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Julius Network Solutions SARL <contact@julius.fr> # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
RadioFreeAsia/RDacity
lib-src/lv2/sratom/waflib/Tools/dmd.py
316
1511
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import sys from waflib.Tools import ar,d from waflib.Configure import conf @conf def find_dmd(conf): conf.find_program(['dmd','dmd2','ldc'],var='D') out=conf.cmd_and_log([co...
gpl-2.0
sdlBasic/sdlbrt
win32/mingw/opt/lib/python2.7/idlelib/idle_test/htest.py
27
13897
'''Run human tests of Idle's window, dialog, and popup widgets. run(*tests) Create a master Tk window. Within that, run each callable in tests after finding the matching test spec in this file. If tests is empty, run an htest for each spec dict in this file after finding the matching callable in the module named in ...
lgpl-2.1
RohitDas/cubeproject
lib/django/contrib/admin/utils.py
21
17140
from __future__ import unicode_literals import datetime import decimal from collections import defaultdict from django.contrib.auth import get_permission_codename from django.core.exceptions import FieldDoesNotExist from django.core.urlresolvers import NoReverseMatch, reverse from django.db import models from django....
bsd-3-clause
sonaht/ansible
lib/ansible/modules/cloud/ovirt/ovirt_datacenters.py
45
7379
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
troismph/matasano-challenges
src/dh.py
1
1134
from math_g4z3 import mod_exp from converts import big_int_to_bin_str import random DH_p = 0xffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64...
gpl-3.0
Health123/ansible
lib/ansible/plugins/connections/paramiko_ssh.py
18
14656
# (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 the License, or # (at your option) any lat...
gpl-3.0
asimshankar/tensorflow
tensorflow/python/training/proximal_adagrad_test.py
22
9701
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
avneesh91/django
tests/signals/tests.py
69
12177
from unittest import mock from django.apps.registry import Apps from django.db import models from django.db.models import signals from django.dispatch import receiver from django.test import TestCase from django.test.utils import isolate_apps from .models import Author, Book, Car, Person class BaseSignalTest(TestCa...
bsd-3-clause
chronicle/api-samples-python
detect/v2/get_error_test.py
1
2456
# Copyright 2021 Google LLC # # 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, s...
apache-2.0
40323203/bg4_cdw11
static/local_publishconf.py
31
1680
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * # 因為 publishconf.py 在 pelicanconf.py 之後, 因此若兩處有相同變數的設定, ...
agpl-3.0
marcua/qurk_experiments
qurkexp/hitlayer/models.py
1
10554
import sys,os,base64,time,math,hashlib,traceback from datetime import datetime, timedelta from qurkexp.hitlayer import settings from django.db import models from django.db import transaction from boto.mturk import connection, question, price, qualification class HIT(models.Model): hid = models.CharField(max_le...
bsd-3-clause
aleju/ImageAugmenter
checks/check_polygons_stay_valid_during_augmentation.py
2
1729
from __future__ import print_function, division import numpy as np import imgaug as ia import imgaug.augmenters as iaa from imgaug.augmentables.polys import Polygon, PolygonsOnImage def main(): nb_checked = 0 augs = iaa.SomeOf((1, None), [ iaa.Resize({"height": (1, 100), "width": (1, 100)}), ...
mit
ehabkost/avocado-vt
virttest/step_editor.py
22
50721
#!/usr/bin/python """ Step file creator/editor. :copyright: Red Hat Inc 2009 :author: mgoldish@redhat.com (Michael Goldish) """ import pygtk import gtk import os import glob import shutil import sys import logging import ppm_utils pygtk.require('2.0') # General utilities def corner_and_size_clipped(startpoint, end...
gpl-2.0
gdub/django
tests/db_typecasts/tests.py
206
2412
# Unit tests for typecast functions in django.db.backends.util import datetime import unittest from django.db.backends import utils as typecasts from django.utils import six TEST_CASES = { 'typecast_date': ( ('', None), (None, None), ('2005-08-11', datetime.date(2005, 8, 11)), ('1...
bsd-3-clause
jruiperezv/ANALYSE
common/lib/logsettings.py
39
5740
import os import platform import sys from logging.handlers import SysLogHandler LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] def get_logger_config(log_dir, logging_env="no_env", tracking_filename="tracking.log", edx_filename="edx.log...
agpl-3.0
shaufi10/odoo
addons/point_of_sale/wizard/pos_confirm.py
343
2403
# -*- 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
WarriorIng64/type-fight
gamelog.py
1
1492
#!/bin/python import datetime, logging, platform, pygame, os from gameglobals import * # Logging setup if platform.system() == 'Windows': # Logging on Windows logdir = os.path.join(os.getenv('APPDATA'), 'typefight') else: # Assume Linux logdir = os.path.join(os.path.expanduser('~'), '.typefight') try:...
gpl-3.0
CloudVLab/professional-services
examples/dataflow-python-examples/streaming-examples/slowlychanging-sideinput/sideinput_refresh/main.py
2
11347
# Copyright 2020 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 law or agreed to in writing,...
apache-2.0
varunr047/homefile
homeassistant/components/zigbee.py
4
14946
""" Support for ZigBee devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/zigbee/ """ import logging import pickle from binascii import hexlify, unhexlify from base64 import b64encode, b64decode import voluptuous as vol from homeassistant.const i...
mit
ravibhure/ansible
lib/ansible/modules/network/iosxr/iosxr_netconf.py
14
6097
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
gpl-3.0
RevelSystems/django
tests/gis_tests/geos_tests/test_mutable_list.py
166
14952
# Copyright (c) 2008-2009 Aryeh Leib Taurog, http://www.aryehleib.com # All rights reserved. # # Modified from original contribution by Aryeh Leib Taurog, which was # released under the New BSD license. import unittest from django.contrib.gis.geos.mutable_list import ListMixin from django.utils import six class Use...
bsd-3-clause
mgunyho/pyspread
pyspread/src/interfaces/test/test_xls.py
1
18810
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright Martin Manns # Distributed under the terms of the GNU General Public License # -------------------------------------------------------------------- # pyspread is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
gpl-3.0
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/grpc/tools/run_tests/run_build_statistics.py
7
9169
#!/usr/bin/env python2.7 # Copyright 2016, 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 lis...
gpl-3.0
pasupulaphani/spacy-nlp-docker
thrift/spacyThrift/SpacyThrift.py
1
7116
# # Autogenerated by Thrift Compiler (0.9.3) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:utf8strings # from thrift.Thrift import TType, TMessageType, TException, TApplicationException import logging from ttypes import * from thrift.Thrift import TProcessor from thrift.t...
mit
oas89/iktomi
tests/web/url.py
1
8574
# -*- coding: utf-8 -*- import unittest from urllib import quote from iktomi.web.reverse import URL from iktomi.web.url_templates import UrlTemplate from iktomi.web.url_converters import Converter, ConvertError class URLTests(unittest.TestCase): def test_rendering_without_params(self): 'Url without para...
mit
EqAfrica/machinekit
configs/sim/gscreen/gscreen_custom/tester_handler.py
18
2473
import hal # This is a handler file for using Gscreen's infrastructure # to load a completely custom glade screen. # The only things that really matters is that it's saved as a GTK builder project, # the toplevel window is caller window1 (The default name) and you connect a destroy # window signal else you can't close...
lgpl-2.1
kevinnguyeneng/django-uwsgi-nginx
app/naf_otp/models.py
1
3570
from __future__ import unicode_literals from django.db import models from django.conf import settings # Create your models here. class Department(models.Model): departname = models.CharField(max_length=50 , unique=True) description = models.TextField(max_length=2000) class Meta: db_table = ...
gpl-3.0
NoBodyCam/TftpPxeBootBareMetal
nova/compute/manager.py
1
137624
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
apache-2.0
Yanivmd/TRACY
vulnsFinder.py
2
9616
#!/usr/bin/python import os import sys import igraph from myutils import GradeSystemsInfo,borders,getDurationStr,CounterXlsReport,functionsGraphsDirectoryName import split2k import time import itertools import threading import multiprocessing import numpy from GraphletsCompareMyNG import getMatchedCmdsWithGrade,compa...
epl-1.0
cpatrick/ITK-RemoteIO
Wrapping/WrapITK/Languages/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/__init__.py
13
11154
# Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) """ contains classes that describe different C++ declarations """ import compilers from dependencies import dependency_info_t...
apache-2.0