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
ravindrapanda/tensorflow
tensorflow/python/keras/applications/mobilenet/__init__.py
73
1147
# 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
gnuhub/intellij-community
python/lib/Lib/site-packages/django/contrib/messages/tests/fallback.py
311
6978
from django.contrib.messages import constants from django.contrib.messages.storage.fallback import FallbackStorage, \ CookieStorage from django.contrib.messages.tests.base import BaseTest from django.contrib.messages.tests.cookie import set_cookie_data, \ stored_cookie_messages_count from django.contrib.message...
apache-2.0
jaimeantena4040/MiSitioWeb
lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py
6
16612
# -*- 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): # Changing field 'VariableHistory.operation' db.alter_column(u'orm_varia...
gpl-2.0
tinchoss/Python_Android
python/gdata/src/gdata/tlslite/integration/SMTP_TLS.py
319
4739
"""TLS Lite + smtplib.""" from smtplib import SMTP from gdata.tlslite.TLSConnection import TLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper class SMTP_TLS(SMTP): """This class extends L{smtplib.SMTP} with TLS support.""" def starttls(self, username=None, password...
apache-2.0
JamesMura/sentry
src/sentry/south_migrations/0008_auto__chg_field_message_view__add_field_groupedmessage_data__chg_field.py
36
5375
# 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 'Message.view' db.alter_column('sentry_message', 'view', self.gf('django.db.models.fields.CharFie...
bsd-3-clause
ArchiDroid/android_kernel_sony_msm8x27
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
TheGurke/Progenitus
sleekxmpp/plugins/xep_0004/stanza/form.py
3
8060
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import copy import logging from sleekxmpp.thirdparty import OrderedDict from sleekxmpp.xmlstream import ElementBase, ET from ...
gpl-3.0
fragaria/suds
suds/xsd/doctor.py
204
6308
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will ...
lgpl-3.0
pmelendez-shomi/cb_console
node_modules/couchbase/node_modules/prebuild/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
1569
23354
#!/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. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
mit
ionux/linux
scripts/gdb/linux/utils.py
630
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
rsalmaso/django-cms
cms/toolbar/items.py
1
16937
import json from abc import ABCMeta from collections import defaultdict from django.template.loader import render_to_string from django.utils.encoding import force_str from django.utils.functional import Promise from cms.constants import RIGHT, LEFT, REFRESH_PAGE, URL_CHANGE class ItemSearchResult: def __init__...
bsd-3-clause
NeftaliYagua/gae-init
main/auth/twitter.py
10
1457
# coding: utf-8 import flask import auth import config import model import util from main import app twitter_config = dict( access_token_url='https://api.twitter.com/oauth/access_token', authorize_url='https://api.twitter.com/oauth/authorize', base_url='https://api.twitter.com/1.1/', consumer_key=c...
mit
krissrex/python_projects
Projects/Oving10-itgk/main.py
1
6889
# -*- coding: utf-8 -*- """ Created on Sun Nov 9 00:06:24 2014 @author: kristian """ from skumleskogen import * import time ################## OPTIONS ################## debug_on = True write_to_file = True hukommelse = {} sti_totalt = ["inn"] noder_med_lås = set() forrige_retning = [] file = None try: del ...
mit
okffi/booktype
lib/booktype/convert/base.py
3
1698
# This file is part of Booktype. # Copyright (c) 2013 Borko Jandras <borko.jandras@sourcefabric.org> # # Booktype 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 # (a...
agpl-3.0
openstack/nova
nova/manager.py
2
5378
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
vmindru/ansible
lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py
31
3686
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
alikins/ansible
lib/ansible/modules/network/nxos/nxos_gir_profile_management.py
16
6135
#!/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
Nikoala/CouchPotatoServer
couchpotato/core/downloaders/nzbvortex.py
44
8228
from base64 import b64encode import os from uuid import uuid4 import hashlib import traceback from requests import HTTPError from couchpotato.core._base.downloader.main import DownloaderBase, ReleaseDownloadList from couchpotato.core.helpers.encoding import tryUrlencode, sp from couchpotato.core.helpers.variable impo...
gpl-3.0
farhaadila/django-cms
cms/south_migrations/0022_login_required_added.py
1680
20032
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
bsd-3-clause
etashjian/ECE757-final
src/arch/x86/isa/insts/general_purpose/no_operation.py
91
2323
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
bsd-3-clause
hortonworks/hortonworks-sandbox
desktop/core/ext-py/Django-1.2.3/tests/regressiontests/views/views.py
15
1663
import sys from django.http import HttpResponse, HttpResponseRedirect from django import forms from django.views.debug import technical_500_response from django.views.generic.create_update import create_object from django.core.urlresolvers import get_resolver from django.shortcuts import render_to_response from regre...
apache-2.0
sajuptpm/neutron-ipam
neutron/services/firewall/drivers/linux/iptables_fwaas.py
1
11774
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Dell 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/lice...
apache-2.0
Alwnikrotikz/l5rcm
exporters/textexporter.py
3
9080
# Copyright (C) 2011 Daniele Simonetti # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is dist...
gpl-3.0
revanthkolli/osf.io
website/settings/local-dist.py
7
1111
# -*- coding: utf-8 -*- '''Example settings/local.py file. These settings override what's in website/settings/defaults.py NOTE: local.py will not be added to source control. ''' from . import defaults DEV_MODE = True DEBUG_MODE = True # Sets app to debug mode, turns off template caching, etc. SEARCH_ENGINE = 'elas...
apache-2.0
shastikk/youtube-dl
youtube_dl/extractor/worldstarhiphop.py
114
2323
from __future__ import unicode_literals import re from .common import InfoExtractor class WorldStarHipHopIE(InfoExtractor): _VALID_URL = r'https?://(?:www|m)\.worldstar(?:candy|hiphop)\.com/(?:videos|android)/video\.php\?v=(?P<id>.*)' _TESTS = [{ "url": "http://www.worldstarhiphop.com/videos/video.p...
unlicense
DirtyPiece/dancestudio
Build/Tools/Python27/Tools/Scripts/diff.py
37
2024
#!/usr/bin/env python """ Command line interface to difflib.py providing diffs in four formats: * ndiff: lists every line and highlights interline changes. * context: highlights clusters of changes in a before/after format. * unified: highlights clusters of changes in an inline format. * html: generates side ...
mit
Acidburn0zzz/servo
components/script/dom/bindings/codegen/parser/tests/test_constructor.py
8
15051
import WebIDL def WebIDLTest(parser, harness): def checkArgument(argument, QName, name, type, optional, variadic): harness.ok(isinstance(argument, WebIDL.IDLArgument), "Should be an IDLArgument") harness.check(argument.identifier.QName(), QName, "Argument has the right QName") ...
mpl-2.0
tedi3231/openerp
build/lib/openerp/addons/l10n_in/__openerp__.py
87
1809
# -*- 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
Aaron1992/v2ex
html5lib/utils.py
104
4959
try: frozenset except NameError: #Import from the sets module for python 2.3 from sets import Set as set from sets import ImmutableSet as frozenset class MethodDispatcher(dict): """Dict with 2 special properties: On initiation, keys that are lists, sets or tuples are converted to multiple ...
bsd-3-clause
retrography/scancode-toolkit
src/commoncode/fileset.py
12
6660
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
apache-2.0
edl00k/omim
3party/protobuf/gtest/test/gtest_catch_exceptions_test.py
403
9422
#!/usr/bin/env python # # Copyright 2010 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 o...
apache-2.0
bratsche/Neutron-Drive
google_appengine/lib/django_1_2/tests/regressiontests/forms/localflavor/es.py
87
6531
from django.contrib.localflavor.es.forms import (ESPostalCodeField, ESPhoneNumberField, ESIdentityCardNumberField, ESCCCField, ESRegionSelect, ESProvinceSelect) from utils import LocalFlavorTestCase class ESLocalFlavorTests(LocalFlavorTestCase): def test_ESRegionSelect(self): f = ESRegionSelect() ...
bsd-3-clause
cchurch/ansible
lib/ansible/modules/network/ios/ios_static_route.py
15
9688
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
gpl-3.0
2013Commons/HUE-SHARK
apps/filebrowser/src/filebrowser/lib/rwx.py
4
2152
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
gtko/Sick-Beard
lib/hachoir_metadata/misc.py
90
8936
from lib.hachoir_metadata.metadata import RootMetadata, registerExtractor from lib.hachoir_metadata.safe import fault_tolerant from lib.hachoir_parser.container import SwfFile from lib.hachoir_parser.misc import TorrentFile, TrueTypeFontFile, OLE2_File, PcfFile from lib.hachoir_core.field import isString from lib.hacho...
gpl-3.0
ant31/kpm
kpm/commands/kexec.py
1
1587
from kpm.console import KubernetesExec from kpm.commands.command_base import CommandBase class ExecCmd(CommandBase): name = 'exec' help_message = "exec a command in pod from the RC or RS name.\ It executes the command on the first matching pod'" def __init__(self, options): self.output = opti...
apache-2.0
sunjeammy/tornado
tornado/test/simple_httpclient_test.py
13
22722
from __future__ import absolute_import, division, print_function, with_statement import collections from contextlib import closing import errno import gzip import logging import os import re import socket import sys from tornado import gen from tornado.httpclient import AsyncHTTPClient from tornado.httputil import HT...
apache-2.0
kjc88/sl4a
python/src/Lib/bsddb/test/test_compare.py
33
8510
""" TestCases for python DB Btree key comparison function. """ import sys, os, re import test_all from cStringIO import StringIO import unittest from test_all import db, dbshelve, test_support, \ get_new_environment_path, get_new_database_path lexical_cmp = cmp def lowercase_cmp(left, right): return c...
apache-2.0
CamelBackNotation/CarnotKE
jyhton/lib-python/2.7/encodings/cp775.py
593
34732
""" Python Character Mapping Codec cp775 generated from 'VENDORS/MICSFT/PC/CP775.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_map) def decode(self,input,errors='strict...
apache-2.0
jrowan/zulip
tools/setup/emoji/emoji_setup_utils.py
4
12939
from __future__ import absolute_import # This tool contains all of the rules that we use to decide which of # the various emoji names in emoji-map.json we should actually use in # autocomplete and emoji pickers. You can't do all of them, because # otherwise there will be a ton of duplicates alphabetically next to # ea...
apache-2.0
tensor-tang/Paddle
python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py
4
3797
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
DarrelHsu/cvsClient
third_party/logilab/common/pytest.py
24
45995
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
bsd-3-clause
tudorian/eden
modules/tests/web2unittest.py
20
42947
# -*- coding: utf-8 -*- """ Sahana Eden Test Framework @copyright: 2011-2012 (c) Sahana Software Foundation @license: MIT 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 with...
mit
xiangel/hue
desktop/core/ext-py/boto-2.38.0/boto/sdb/connection.py
153
26088
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
apache-2.0
mlperf/training_results_v0.6
Google/benchmarks/ssd/implementations/tpu-v3-1024-ssd/object_detection/tf_example_decoder.py
12
8485
# Copyright 2017 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
josesanch/django-oscar
src/oscar/apps/offer/utils.py
5
4015
from itertools import chain import logging from django.db.models import Q from django.utils.timezone import now from oscar.core.loading import get_model from oscar.apps.offer import results ConditionalOffer = get_model('offer', 'ConditionalOffer') logger = logging.getLogger('oscar.offers') class OfferApplicationE...
bsd-3-clause
Codlydodly/python-client
venv/lib/python2.7/site-packages/setuptools/command/bdist_egg.py
116
17364
"""setuptools.command.bdist_egg Build .egg distributions""" # This module should be kept compatible with Python 2.3 import sys import os import marshal import textwrap from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: # Python 2.7 or >=3.2 from sysconfig import get_path, g...
mit
JulienMcJay/eclock
windows/Python27/Lib/site-packages/docutils/languages/zh_cn.py
148
2026
# -*- coding: utf-8 -*- # $Id: zh_cn.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Pan Junyong <panjy@zopechina.com> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two ...
gpl-2.0
jim-easterbrook/pywws
src/pywws/process.py
1
29244
# pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2008-21 pywws contributors # 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;...
gpl-2.0
WillGuan105/django
django/db/backends/mysql/features.py
176
2682
from django.db.backends.base.features import BaseDatabaseFeatures from django.utils.functional import cached_property from .base import Database try: import pytz except ImportError: pytz = None class DatabaseFeatures(BaseDatabaseFeatures): empty_fetchmany_value = () update_can_self_select = False ...
bsd-3-clause
krichter722/binutils-gdb
gdb/testsuite/gdb.python/py-typeprint.py
46
1128
# Copyright (C) 2012-2015 Free Software Foundation, 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 License, or # (at your option) any later version. # # This progr...
gpl-2.0
XiaosongWei/chromium-crosswalk
third_party/closure_linter/closure_linter/error_check.py
95
3900
#!/usr/bin/env python # # Copyright 2011 The Closure Linter 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 #...
bsd-3-clause
brickfiestastem/brickfiesta
shop/views.py
1
11431
import datetime import json import urllib.error import urllib.parse import urllib.request import uuid from django.conf import settings from django.contrib import messages from django.contrib.auth.models import User from django.core.mail import EmailMessage from django.core.mail import send_mail from django.shortcuts i...
agpl-3.0
GdZ/scriptfile
software/googleAppEngine/lib/django_1_3/django/utils/translation/trans_real.py
54
22505
"""Translation helper functions.""" import locale import os import re import sys import warnings import gettext as gettext_module from cStringIO import StringIO from threading import local from django.utils.importlib import import_module from django.utils.safestring import mark_safe, SafeData # Translations are cac...
mit
2014c2g3/w16b_test
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/locals.py
603
1141
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License...
agpl-3.0
markeTIC/OCB
addons/auth_crypt/__openerp__.py
310
2298
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # Copyright (C) 2004-2014 OpenERP S.A. (<http://odoo.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
PeterWangIntel/chromium-crosswalk
chrome/browser/resources/PRESUBMIT_test.py
42
4389
# 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. import os import sys import imp import tempfile import unittest import PRESUBMIT sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dir...
bsd-3-clause
megraf/asuswrt-merlin
release/src/router/samba36/source4/lib/policy/tests/python/bindings.py
20
1188
#!/usr/bin/env python # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2010 # # 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, ...
gpl-2.0
MoritzS/django
tests/template_tests/filter_tests/test_make_list.py
85
1494
from django.template.defaultfilters import make_list from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class MakeListTests(SimpleTestCase): """ The make_list filter can destroy existing escaping, so the results are escaped. """ @setup(...
bsd-3-clause
ryfeus/lambda-packs
Sklearn_scipy_numpy/source/sklearn/preprocessing/__init__.py
268
1319
""" The :mod:`sklearn.preprocessing` module includes scaling, centering, normalization, binarization and imputation methods. """ from ._function_transformer import FunctionTransformer from .data import Binarizer from .data import KernelCenterer from .data import MinMaxScaler from .data import MaxAbsScaler from .data ...
mit
acabey/flash-dump-tool
test/test_xecrypt.py
1
35801
from unittest import TestCase from Crypto.PublicKey import RSA from lib.xecrypt import XeCryptBnQw_SwapLeBe, XeCryptBnDw_SwapLeBe, XeCryptBnQw, XeCryptBnQw_toInt, XeCryptBnQwNeMod from lib.xecrypt_rsa import XeCrypt_RSA from lib.xecrypt import XeCryptRotSum, RotSumCtx from lib.xecrypt import XeCryptRotSumSha class ...
gpl-3.0
haveal/googleads-python-lib
examples/dfp/v201411/line_item_creative_association_service/create_licas.py
4
1879
#!/usr/bin/python # # 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 b...
apache-2.0
jspraul/bite-project
deps/gdata-python-client/tests/gdata_tests/calendar_test.py
41
39080
#!/usr/bin/python # # Copyright (C) 2006 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 ...
apache-2.0
shsingh/ansible
lib/ansible/modules/cloud/azure/azure_rm_servicebus.py
24
6521
#!/usr/bin/python # # Copyright (c) 2018 Yuwei Zhou, <yuwzho@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
joseamaya/tambox
contabilidad/urls.py
1
4452
from django.conf.urls import url from django.contrib.auth.decorators import login_required from contabilidad.views import Tablero, ListadoCuentasContables, \ CargarCuentasContables, ListadoTiposDocumentos, CrearTipoDocumento, \ EliminarTipoDocumento, DetalleTipoDocumento, ModificarTipoDocumento, \ Repo...
gpl-3.0
kyubifire/softlayer-python
SoftLayer/CLI/user/permissions.py
1
1893
"""List A users permissions.""" import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.CLI import helpers @click.command() @click.argument('identifier') @environment.pass_env def cli(env, identifier): """User Permissions. TODO change to list all pe...
mit
koparasy/gemfi
src/sim/Root.py
39
3341
# Copyright (c) 2005-2007 The Regents of The University of Michigan # Copyright (c) 2010-2013 Advanced Micro Devices, Inc. # Copyright (c) 2013 Mark D. Hill and David A. Wood # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
bsd-3-clause
staslev/beam
sdks/python/apache_beam/examples/wordcount_fnapi.py
3
5575
# # 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
nicobustillos/odoo
openerp/tools/yaml_import.py
35
43133
# -*- coding: utf-8 -*- import threading import types import time # used to eval time.strftime expressions from datetime import datetime, timedelta import logging import openerp import openerp.sql_db as sql_db import openerp.workflow import misc from config import config import yaml_tag import yaml import re from lxml...
agpl-3.0
shi2wei3/virt-test
tools/run_unittests_nose.py
22
2211
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Lucas Meneghel Rodrigues <lmr@redhat.com>' from nose.selector import Selector from nose.plugins import Plugin from nose.plugins.attrib import AttributeSelector from nose.plugins.xunit import Xunit from nose.plugins.cover import Coverage import logging impo...
gpl-2.0
dracidoupe/graveyard
ddcz/migrations/0018_auto_20180617_1740.py
1
2511
# Generated by Django 2.0.2 on 2018-06-17 15:40 import ddcz.models.magic from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("ddcz", "0017_auto_20180617_1604"), ] operations = [ migrations.AddField( model_name="gallerypicture", ...
mit
actuino/unicorn-display
display-client/client.py
1
3700
#!/usr/bin/env python # Unicorn Jauge Display Client import json import os import sys, getopt # pip install socketIO-client # https://github.com/invisibleroads/socketIO-client from socketIO_client import SocketIO, LoggingNamespace current_page = 0; # The socker server Hostname DISPLAY_SERVER_HOST = 'localhost'...
mit
mathspace/libcloud
libcloud/loadbalancer/types.py
9
2298
# 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
austinvernsonger/metagoofil
hachoir_metadata/filter.py
85
1664
from hachoir_metadata.timezone import UTC from datetime import date, datetime # Year in 1850..2030 MIN_YEAR = 1850 MAX_YEAR = 2030 class Filter: def __init__(self, valid_types, min=None, max=None): self.types = valid_types self.min = min self.max = max def __call__(self, value): ...
gpl-2.0
magenta-aps/mox
oio_rest/oio_rest/validate.py
1
13865
# Copyright (C) 2015-2019 Magenta ApS, https://magenta.dk. # Contact: info@magenta.dk. # # 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/. import copy import jsonschema ...
mpl-2.0
kumar303/olympia
src/olympia/amo/tests/test_csp_headers.py
3
5843
import os from django.conf import settings from django.test.utils import override_settings from olympia.amo.tests import TestCase from olympia.lib import settings_base as base_settings def test_default_settings_no_report_only(): assert settings.CSP_REPORT_ONLY is False @override_settings(CSP_REPORT_ONLY=False...
bsd-3-clause
pniedzielski/fb-hackathon-2013-11-21
src/repl.it/jsrepl/extern/python/unclosured/lib/python2.7/encodings/shift_jisx0213.py
816
1059
# # shift_jisx0213.py: Python Unicode Codec for SHIFT_JISX0213 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jisx0213') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEnc...
agpl-3.0
withtone/depot_tools
tests/fix_encoding_test.py
50
1817
#!/usr/bin/env python # coding=utf8 # 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. """Unit tests for fix_encoding.py.""" import os import sys import unittest sys.path.insert(0, os.path.dirname(os.pa...
bsd-3-clause
hendradarwin/VTK
Examples/Infovis/Python/simple_selection.py
17
1259
from vtk import * from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(25) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) view1 = vtkGraphLayoutView() view1.AddRepresentationFromInputConnection(source.GetOutputPort()) view1.SetColorVertices(True) view1.SetEdgeColorArrayName(...
bsd-3-clause
Bitl/RBXLegacy-src
Cut/RBXLegacyDiscordBot/lib/youtube_dl/extractor/moevideo.py
46
3728
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, sanitized_Request, urlencode_postdata, ) class MoeVideoIE(InfoExtractor): IE_DESC = 'LetitBit video services: moevideo.net, playrepla...
gpl-3.0
naslanidis/ansible
lib/ansible/modules/notification/twilio.py
38
5973
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Makai <matthew.makai@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 ...
gpl-3.0
weebygames/boto
boto/mturk/price.py
170
1967
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
mit
heidtn/MeteorTracker
meteortracker/meteor_tracker.py
1
2196
""" @author(s): Nathan Heidt, Jean Nassar This is the primary program for detecting and logging Meteors. Running `python meteor_tracker.py` is sufficient. Make sure the parameters specified in the config.ini file are correct. """ import configparser from . import camera from . import find_events from . import save_...
mit
OpenSPA/dvbapp
lib/python/Screens/MessageBox.py
1
4589
from Screen import Screen from Components.ActionMap import ActionMap from Components.Label import Label from Components.Pixmap import Pixmap from Components.Sources.StaticText import StaticText from Components.MenuList import MenuList from enigma import eTimer class MessageBox(Screen): TYPE_YESNO = 0 TYPE_INFO = 1 ...
gpl-2.0
gabelula/b-counted
.google_appengine/demos/guestbook/guestbook.py
11
2240
#!/usr/bin/env python # # Copyright 2007 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 o...
apache-2.0
GheRivero/ansible
lib/ansible/modules/monitoring/logicmonitor.py
23
74401
#!/usr/bin/python # LogicMonitor Ansible module for managing Collectors, Hosts and Hostgroups # Copyright (C) 2015 LogicMonitor # 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 RETURN =...
gpl-3.0
HaoboGu/Structure-Similarity
Drugbank.py
1
6376
import random import numpy as np import time from sklearn.linear_model import LogisticRegression from sklearn.metrics import roc_auc_score def read_drugbank_data(): # read interaction data interaction_file = open('data/interacts.csv') interact_dict = {} line = interaction_file.readline() while line...
mit
Smarsh/django
django/utils/regex_helper.py
361
12079
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
bsd-3-clause
jcftang/ansible
test/units/module_utils/test_eos.py
7
4233
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
gpl-3.0
nurmd2/nurmd
addons/gamification/models/goal.py
11
25827
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import SUPERUSER_ID from openerp.osv import fields, osv from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DF from openerp.tools.safe_eval import safe_eval from openerp.tools.translate import _ from ope...
gpl-3.0
dotskapes/dotSkapes
tests/register.py
7
2013
from selenium import selenium import unittest, time, re import seleniumtest class NewTest(unittest.TestCase): def setUp(self): self.verificationErrors = [] self.selenium = selenium("localhost", 4444, "*chrome", "http://127.0.0.1:8000/") self.selenium.start() def test_new(self): ...
mit
ingadhoc/odoo
addons/l10n_si/account_wizard.py
255
1120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus.at # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
agpl-3.0
xiandiancloud/edx-platform-Y
cms/djangoapps/contentstore/views/public.py
41
2264
""" Public views """ from django_future.csrf import ensure_csrf_cookie from django.core.context_processors import csrf from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.conf import settings from edxmako.shortcuts import render_to_response from external_auth.views import (s...
agpl-3.0
dunkenj/smpy
scripts/data/fitting.py
1
27412
import numpy as np import array import os, sys import re import time import multiprocessing import h5py import logging from astropy.table import Table, Column from astropy import units as u import argparse parser = argparse.ArgumentParser() parser.add_argument("-p","--params", type=str, help = "Pa...
mit
Graghav/surabi
ADMIN/venv/lib/python2.7/site-packages/wheel/tool/__init__.py
93
13217
""" Wheel command-line utility. """ import os import hashlib import sys import json from glob import iglob from .. import signatures from ..util import (urlsafe_b64decode, urlsafe_b64encode, native, binary, matches_requirement) from ..install import WheelFile, VerifyingZipFile from ..paths import ...
apache-2.0
ledatelescope/bifrost
test/test_resizing.py
1
4303
# Copyright (c) 2016, The Bifrost 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: # * Redistributions of source code must retain the above copyright # notice, this list of conditions an...
bsd-3-clause
kszys/num2words
num2words/lang_ID.py
1
6232
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved. # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved. # This library 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 # versi...
lgpl-2.1
nhenezi/kuma
kuma/attachments/feeds.py
6
1116
from django.utils.translation import ugettext as _ from kuma.wiki.feeds import DocumentsFeed from .models import AttachmentRevision class AttachmentsFeed(DocumentsFeed): title = _("MDN recent file changes") subtitle = _("Recent revisions to MDN file attachments") def items(self): return Attachm...
mpl-2.0
Itxaka/st2
st2common/tests/unit/test_mongoescape.py
10
3679
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
laszlocsomor/tensorflow
tensorflow/contrib/model_pruning/python/layers/layers.py
17
15379
# Copyright 2017 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