repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
liangazhou/django-rdp
packages/eclipse/plugins/org.python.pydev.jython_4.4.0.201510052309/Lib/encodings/mac_cyrillic.py
593
13710
""" Python Character Mapping Codec mac_cyrillic generated from 'MAPPINGS/VENDORS/APPLE/CYRILLIC.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,inp...
apache-2.0
defionscode/ansible
contrib/inventory/mdt_dynamic_inventory.py
42
4539
#!/usr/bin/env python # (c) 2016, Julian Barnett <jbarnett@tableau.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 ...
gpl-3.0
fjbatresv/odoo
addons/l10n_es/__openerp__.py
314
2772
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2008-2010 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Jordi Esteve <jesteve@zikzakmedia.com> # Copy...
agpl-3.0
WangRobo/rosbridge_suite
rosbridge_server/src/tornado/platform/select.py
62
2632
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
bsd-3-clause
openstack/cinder
cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_metadata.py
2
13584
# Copyright (c) 2020 Dell Inc. or its subsidiaries. # 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 # # ...
apache-2.0
saidimu/yowsup
yowsup/layers/auth/protocolentities/success.py
69
1659
from yowsup.structs import ProtocolEntity, ProtocolTreeNode class SuccessProtocolEntity(ProtocolEntity): def __init__(self, status, kind, creation, expiration, props, t, nonce = None): super(SuccessProtocolEntity, self).__init__("success") self.status = status self.kind = kind self.c...
gpl-3.0
kcaluwae/tensegrity-el-simulator
examples/kinematic_2spring/simulator_v1_floor.py
1
20948
''' Ken Caluwaerts 2012-2013 <ken@caluwaerts.eu> ''' import numpy as np from scipy.integrate import ode as sode class Simulator(object): def __init__(self,nodes,node_velocities,constrained_nodes,bar_connections,bar_mass,bar_sigma,spring_connections,spring_k,spring_d,spring_l0,nodal_damping=0,two_way_spring=False, e...
mit
360youlun/django-cms
cms/migrations/0059_auto__del_pagemoderatorstate.py
63
17926
# -*- 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): # Deleting model 'PageModeratorState' db.delete_table(u'cms_pagemoderator...
bsd-3-clause
unreal666/outwiker
plugins/diagrammer/diagrammer/libs/blockdiag/noderenderer/base.py
2
5021
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # 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...
gpl-3.0
Kulmerov/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/bin/tweenEquations.py
16
7813
""" made with the file cjs/tweener/equations.js Original copyright notice of the source file: Copyright 2008 litl, LLC. Equations Main equations for the Tweener class @author Zeh Fernando, Nate Chatellier @version 1.0.2 Disclaimer for Robert Penner's Easing ...
gpl-2.0
mesosphere/dcos-commons
frameworks/helloworld/tests/test_backoff.py
1
2395
import logging import pytest import sdk_install import sdk_metrics import sdk_plan import sdk_utils from tests import config log = logging.getLogger(__name__) foldered_name = sdk_utils.get_foldered_name(config.SERVICE_NAME) @pytest.fixture(scope="function", autouse=True) def configure_package(configure_security): ...
apache-2.0
MikeMarcin/UIforETW
LabScripts/GeneralTracing/SummarizeData.py
2
4639
# Copyright 2017 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 ...
apache-2.0
FredLoney/nipype
nipype/pipeline/plugins/tests/test_debug.py
16
1584
import os import nipype.interfaces.base as nib from tempfile import mkdtemp from shutil import rmtree from nipype.testing import assert_raises, assert_false import nipype.pipeline.engine as pe class InputSpec(nib.TraitedSpec): input1 = nib.traits.Int(desc='a random int') input2 = nib.traits.Int(desc='a random...
bsd-3-clause
NorthernHell/linux
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
1891
3300
# 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
FedoraScientific/salome-paravis
test/VisuPrs/ScalarMap_On_DeformedShape/A3.py
1
1576
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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 # version 2.1 of the License, or (at your option) any later version. # # This library ...
lgpl-2.1
cnsoft/kbengine-cocos2dx
kbe/src/lib/python/Lib/test/test_epoll.py
8
7498
# Copyright (c) 2001-2006 Twisted Matrix Laboratories. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
lgpl-3.0
fredericlepied/ansible
lib/ansible/modules/network/f5/bigip_hostname.py
26
5767
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks 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
nextgis/NextGIS_QGIS_open
python/plugins/processing/algs/lidar/lastools/lasgroundPro.py
9
3781
# -*- coding: utf-8 -*- """ *************************************************************************** lasgroundPro.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com --------------------- ...
gpl-2.0
jicruz/heroku-bot
lib/cffi/model.py
9
21495
import types import weakref from .lock import allocate_lock from .error import CDefError, VerificationError, VerificationMissing # type qualifiers Q_CONST = 0x01 Q_RESTRICT = 0x02 Q_VOLATILE = 0x04 def qualify(quals, replace_with): if quals & Q_CONST: replace_with = ' const ' + replace_with.lstrip() ...
gpl-3.0
Azure/azure-sdk-for-python
sdk/storage/azure-storage-blob/tests/avro/test_avro_async.py
1
6722
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
mit
tejal29/pants
tests/python/pants_test/tasks/test_jar_publish.py
1
9786
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import uni...
apache-2.0
medspx/QGIS
tests/src/python/test_qgsserver_settings.py
24
6615
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServerSettings. .. note:: 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. ""...
gpl-2.0
tima/ansible
lib/ansible/utils/module_docs_fragments/cnos.py
25
3903
# Copyright (C) 2017 Lenovo, 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. # # Ansi...
gpl-3.0
aESeguridad/GERE
venv/local/lib/python2.7/encodings/iso8859_6.py
593
11089
""" Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
gpl-3.0
jazztpt/edx-platform
common/djangoapps/student/migrations/0010_auto__chg_field_courseenrollment_course_id.py
188
9725
# -*- 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 'CourseEnrollment.course_id' db.alter_column('student_courseenrollment', 'course_id', self...
agpl-3.0
gilyclem/larVolumeToObj
docs/conf.py
2
10282
# -*- coding: utf-8 -*- # # larVolumeToObj documentation build configuration file, created by # sphinx-quickstart on Fri Oct 31 13:15:05 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
mit
jay-tyler/ansible
lib/ansible/inventory/__init__.py
9
26005
# (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
mateor/pants
src/python/pants/core_tasks/list_goals.py
16
3691
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.goal.goal...
apache-2.0
mensler/ansible
lib/ansible/modules/packaging/language/npm.py
70
8945
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chris Hoffman <christopher.hoffman@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 ...
gpl-3.0
utkaar099/m7ul_kernel
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib64/scons-2.1.0/SCons/Options/BoolOption.py
21
2009
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # 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 # with...
gpl-2.0
justintweaver/mtchi-cert-game
makahiki/apps/widgets/participation/migrations/0001_initial.py
7
3822
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ParticipationSetting' db.create_table('participation_participationsetting', ( ...
gpl-3.0
Azulinho/ansible
lib/ansible/compat/selectors/_selectors2.py
46
23316
# This file is from the selectors2.py package. It backports the PSF Licensed # selectors module from the Python-3.5 stdlib to older versions of Python. # The author, Seth Michael Larson, dual licenses his modifications under the # PSF License and MIT License: # https://github.com/SethMichaelLarson/selectors2#license #...
gpl-3.0
Sorsly/subtle
google-cloud-sdk/lib/googlecloudsdk/core/metrics_reporter.py
6
1726
# 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 ag...
mit
abagh0703/RetailTrail
flask/lib/python2.7/site-packages/migrate/tests/fixture/database.py
63
6519
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import logging import sys import six from decorator import decorator from sqlalchemy import create_engine, Table, MetaData from sqlalchemy import exc as sa_exc from sqlalchemy.orm import create_session from sqlalchemy.pool import StaticPool from migrate.change...
mit
gpoesia/servo
tests/wpt/harness/wptrunner/reduce.py
156
6086
# 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 sys import tempfile from cStringIO import StringIO from collections import defaultdict import wptrunner import w...
mpl-2.0
LarsMichelsen/pmatic
ccu_pkg/python/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py
197
10094
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
gpl-2.0
JioEducation/edx-platform
common/test/acceptance/tests/lms/test_lms_dashboard_search.py
74
7060
""" Test dashboard search """ import os import json from bok_choy.web_app_test import WebAppTest from ..helpers import generate_course_key from ...pages.common.logout import LogoutPage from ...pages.common.utils import click_css from ...pages.studio.utils import add_html_component, type_in_codemirror from ...pages.stu...
agpl-3.0
tvalacarta/tvalacarta
python/version-kodi-14-helix/core/config.py
2
5310
# -*- coding: utf-8 -*- #------------------------------------------------------------ # Parámetros de configuración (kodi) #------------------------------------------------------------ # tvalacarta # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ #------------------------------------------------------------ # Crea...
gpl-3.0
michaelgallacher/intellij-community
python/lib/Lib/site-packages/django/contrib/localflavor/cz/forms.py
72
4736
""" Czech-specific form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Select, RegexField, Field from django.utils.translation import ugettext_lazy as _ import re birth_number = re.compile(r'^(?P<birth>\d{6})/?(?P<id>\d{3,4})$') ic_...
apache-2.0
nathanaevitas/odoo
openerp/addons/crm_helpdesk/crm_helpdesk.py
182
7480
# -*- 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
AlexOugh/horizon
openstack_dashboard/dashboards/admin/info/tabs.py
15
3879
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
nathanielvarona/airflow
airflow/providers/amazon/aws/hooks/ses.py
8
4028
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
mccrowjp/rRNA_pipeline
swarm_map.py
1
10402
#!/usr/bin/env python # # swarm_map - swarm OTUs constructed and output swarm FASTA, map, and sample counts # # Version: 0.4 (5/21/2016) # # Part of rRNA_pipeline - FASTQ filtering, and swarm OTU classification of 16/18S barcodes # # Original version: 4/11/2016 John P. McCrow (jmccrow [at] jcvi.org) # J. Craig Venter I...
mit
ezcall-net-tw/EZCall
jni/pjsip/sources/tests/pjsua/scripts-sendto/001_torture_4475_3_1_1_2.py
59
1125
# $Id: 001_torture_4475_3_1_1_2.py 2505 2009-03-12 11:25:11Z bennylp $ import inc_sip as sip import inc_sdp as sdp # Torture message from RFC 4475 # 3.1.1. Valid Messages # 3.1.1.2. Wide Range of Valid Characters complete_msg = \ """!interesting-Method0123456789_*+`.%indeed'~ sip:1_unusual.URI~(to-be!sure)&isn't+it$...
lgpl-3.0
bestvibes/neo4j-social-network
mac_env/lib/python2.7/site-packages/werkzeug/testsuite/debug.py
101
7859
# -*- coding: utf-8 -*- """ werkzeug.testsuite.debug ~~~~~~~~~~~~~~~~~~~~~~~~ Tests some debug utilities. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import sys import re from werkzeug.testsuite import WerkzeugTestCase from werkzeug.deb...
mit
fernandezcuesta/ansible
lib/ansible/playbook/loop_control.py
66
1328
# (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
Omegaphora/external_chromium_org_tools_gyp
buildbot/buildbot_run.py
8
8422
#!/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. """Argument-less script to select what to run on the buildbots.""" import filecmp import os import shutil import subprocess import sys i...
bsd-3-clause
mmetak/streamlink
src/streamlink/plugins/filmon.py
1
4520
import re import time from streamlink import StreamError from streamlink.plugin import Plugin from streamlink.plugin.api import http, validate from streamlink.stream import HLSStream class FilmOnHLS(HLSStream): __shortname__ = "hls-filmon" def __init__(self, session_, channel=None, vod_id=None, quality="hi...
bsd-2-clause
najce/freebook
app/factory.py
1
1988
#-*- coding:utf-8 -*- from flask import Flask from flask.ext.login import current_user from flask_admin.contrib.fileadmin import FileAdmin from app.config import config from app.extensions import admin, mongo, mail, login_manager, celery from app.models import User from app.util import bson_obj_id import os class Fil...
mit
gannetson/django
tests/auth_tests/test_forms.py
8
23657
from __future__ import unicode_literals import datetime import re from django import forms from django.contrib.auth.forms import ( AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ) from dja...
bsd-3-clause
acshi/osf.io
scripts/send_queued_mails.py
4
2401
import logging from django.db import transaction from django.utils import timezone from modularodm import Q from framework.celery_tasks import app as celery_app from website.app import init_app from website import mails, settings from scripts.utils import add_file_logger logger = logging.getLogger(__name__) loggi...
apache-2.0
Hybrid-Cloud/badam
patches_tool/aws_patch/aws_deps/libcloud/test/__init__.py
1
10644
# 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 ...
apache-2.0
nirmeshk/oh-mainline
vendor/packages/Django/tests/regressiontests/queries/models.py
20
10759
""" Various complex queries that have been problematic in the past. """ from __future__ import unicode_literals import threading from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible class DumbCategory(models.Model): pass class ProxyCategory(Dum...
agpl-3.0
gpoo/wasteland
wasteland.py
1
8883
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Waste land, Clean up unused thumbnails # # Copyright (C) 2006-2012 Germán Poo-Caamaño <gpoo@gnome.org> # # 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 Fou...
gpl-2.0
unforgiven512/android_kernel_asus_tf700t
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
ddaskal/ursula
library/logrotate.py
18
5263
#!/usr/bin/python #coding: utf-8 -*- # Copyright (c) 2014 John Dewey # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, ...
mit
Slater-Victoroff/scrapy
scrapy/utils/gz.py
76
1104
import struct try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO from gzip import GzipFile def gunzip(data): """Gunzip the given data and return as much data as possible. This is resilient to CRC checksum errors. """ f = GzipFile(fileobj=BytesIO(data)) ...
bsd-3-clause
kontais/EFI-MIPS
ToolKit/cmds/python/Lib/test/skipped/test_fork1.py
24
1693
"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. While BeOS doesn't officially support...
bsd-3-clause
gangadharkadam/vlinkerp
erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
7
15108
# 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.utils import cstr, flt, cint, nowdate, now, add_days, comma_and from frappe import msgprint, _ from frappe.model.document im...
agpl-3.0
galeone/dynamic-training-bench
dytb/models/predefined/LeNetDropout.py
1
5816
#Copyright (C) 2017 Paolo Galeone <nessuno@nerdz.eu> # #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/. #Exhibit B is not attached; this software is compatible with the #lic...
mpl-2.0
supriyasingh01/github_basics
Internetworking Distributed Project/cs558l_esha/lab10/final_submit-lab10/rs_part2.py
2
1335
#!/usr/bin/python from socket import * from sys import argv import os import sys, time, string, struct from time import sleep import time import math proto = 5000 s = socket(AF_PACKET,SOCK_RAW,proto) s.bind(("eth2",proto)) #s.bind(("eth5",proto)) ifName,ifProto,pktType,hwType,hwAddr = s.getsockname() srcAddr = hwAddr ...
cc0-1.0
tendant/ansible-modules-core
files/assemble.py
11
6786
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@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 Lice...
gpl-3.0
ramyfarid922/Quiz-Program
vendor/bundle/ruby/2.2.0/gems/libv8-3.16.14.7/vendor/gyp/pylib/gyp/sun_tool.py
314
1569
#!/usr/bin/env python # Copyright (c) 2011 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. """These functions are executed via gyp-sun-tool when using the Makefile generator.""" import fcntl import os import struct import subproces...
cc0-1.0
jch1/models
object_detection/utils/static_shape.py
27
1895
# 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
liveblog/liveblog
server/liveblog/advertisements/amp/utils.py
2
6289
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import time ...
agpl-3.0
Krist14n/guiadestinosapp
node_modules/ionic/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py
912
3325
# Copyright (c) 2011 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. """gypd output module This module produces gyp input as its output. Output files are given the .gypd extension to avoid overwriting the .gyp files that they are ...
apache-2.0
kamyu104/LeetCode
Python/next-greater-element-iii.py
2
1124
# Time: O(logn) = O(1) # Space: O(logn) = O(1) # Given a positive 32-bit integer n, you need to find the smallest 32-bit integer # which has exactly the same digits existing in the integer n and is greater in value than n. # If no such positive 32-bit integer exists, you need to return -1. # # Example 1: # Input: 12 ...
mit
fjalir/odie-server
routes/printing.py
2
3863
#! /usr/bin/env python3 import db.accounting import config import urllib.parse from flask import request from marshmallow import fields, Schema from .common import CashBoxField, PrinterField from odie import app, sqla, ClientError from login import get_user, login_required from api_utils import document_path, event_...
mit
swvist/Debexpo
debexpo/plugins/buildsystem.py
3
3377
# -*- coding: utf-8 -*- # # buildsystem.py — buildsystem plugin # # This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb <jonny@debian.org> # Copyright © 2010 Jan Dittberner <jandd@debian.org> # Copyright © 2012 Nicolas Dandrimont <nicolas.dandrimont@crans...
mit
xdegenne/cloudify-plugins-common
cloudify/proxy/client.py
2
3996
#!/usr/bin/env python ######### # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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/...
apache-2.0
cneill/barbican
barbican/tests/api/test_resources_policy.py
2
49061
# Copyright (c) 2013-2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
MonkeyZZZZ/tools_repo
git_command.py
22
5669
# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
Tejal011089/digitales_frappe
frappe/core/doctype/outgoing_email_settings/outgoing_email_settings.py
32
1093
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _, throw from frappe.utils import validate_email_add from frappe.model.document import Docum...
mit
axinging/chromium-crosswalk
tools/gn/last_commit_position.py
79
2736
# 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. """Writes the most recent "Cr-Commit-Position" value on the master branch to a C header file. Usage: last_commit_position.py <dir> <outfile> <headerguard> ...
bsd-3-clause
vipullakhani/mi-instrument
mi/dataset/parser/wc_hmr_cspp.py
5
7883
#!/usr/bin/env python """ @package mi.dataset.parser @file marine-integrations/mi/dataset/parser/wc_hmr_cspp.py @author Jeff Roy @brief wc_hmr Parser for the cspp_eng_cspp dataset driver Release notes: This is one of 4 parsers that make up that driver initial release """ __author__ = 'Jeff Roy' __license__ = 'Apache...
bsd-2-clause
mccheung/kbengine
kbe/src/lib/python/Tools/scripts/parseentities.py
51
1693
#!/usr/bin/env python3 """ Utility for parsing HTML entity definitions available from: http://www.w3.org/ as e.g. http://www.w3.org/TR/REC-html40/HTMLlat1.ent Input is read from stdin, output is written to stdout in form of a Python snippet defining a dictionary "entitydefs" mapping literal en...
lgpl-3.0
omakk/servo
tests/wpt/harness/wptrunner/executors/webdriver.py
135
16776
import errno import httplib import json import socket import time import urlparse from collections import defaultdict element_key = "element-6066-11e4-a52e-4f735466cecf" class WebDriverException(Exception): http_status = None status_code = None def __init__(self, message): self.message = message...
mpl-2.0
saimn/glue
glue/external/wcsaxes/core.py
1
14176
# Licensed under a 3-clause BSD style license - see LICENSE.rst from matplotlib.axes import Axes, subplot_class_factory from matplotlib.transforms import Affine2D, Bbox, Transform from astropy.wcs import WCS from astropy.wcs.utils import wcs_to_celestial_frame from astropy.extern import six from .transforms import (...
bsd-3-clause
steedos/odoo7
openerp/addons/google_docs/__openerp__.py
54
1538
# -*- 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
Kemaweyan/django-content-gallery
content_gallery/utils.py
1
5904
import sys import os import re import io from PIL import Image import magic from django.core import urlresolvers from django.core.files import uploadedfile from django.conf import settings as django_settings from . import settings def get_choices_url_pattern(): """ Returns the pattern of URL for getting prod...
bsd-3-clause
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_upgrade/changes_2006_09_26/classes/table_creator.py
2
3453
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.logger import logger from opus_core.database_management.database_server import DatabaseServer from opus_core.database_management.configurations.database_server_configuration impor...
gpl-2.0
jmighion/ansible
lib/ansible/modules/system/timezone.py
11
25141
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Shinichi TAMURA (@tmshn) # 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
GhostshipSoftware/avaloria
src/utils/dbserialize.py
2
14211
""" This module handles serialization of arbitrary python structural data, intended primarily to be stored in the database. It also supports storing Django model instances (which plain pickle cannot do). This serialization is used internally by the server, notably for storing data in Attributes and for piping data to ...
bsd-3-clause
edinsonbravo/Gestion
public/dist/ionicons/builder/scripts/generate_font.py
348
5381
# Font generation script from FontCustom # https://github.com/FontCustom/fontcustom/ # http://fontcustom.com/ import fontforge import os import md5 import subprocess import tempfile import json import copy SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) INPUT_SVG_DIR = os.path.join(SCRIPT_PATH, '..', '..', '...
mit
andy-d-palmer/pyIMS
pyImagingMSpec/test/imutils_test.py
2
3746
import unittest import numpy as np from ..imutils import nan_to_zero, quantile_threshold, interpolate class ImutilsTest(unittest.TestCase): def test_nan_to_zero_with_ge_zero(self): ids = ( np.zeros(1), np.ones(range(1, 10)), np.arange(1024 * 1024) ) fo...
apache-2.0
tkinz27/ansible
lib/ansible/playbook/taggable.py
128
3278
# (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
scs/uclinux
user/python/python-2.4.4/Lib/idlelib/configDialog.py
8
56542
"""IDLE Configuration Dialog: support user customization of IDLE by GUI Customize font faces, sizes, and colorization attributes. Set indentation defaults. Customize keybindings. Colorization and keybindings can be saved as user defined sets. Select startup options including shell/editor and default window size. ...
gpl-2.0
smmribeiro/intellij-community
python/helpers/pydev/_pydev_bundle/_pydev_getopt.py
108
4458
#======================================================================================================================= # getopt code copied since gnu_getopt is not available on jython 2.1 #======================================================================================================================= class Ge...
apache-2.0
HarmonyEnterpriseSolutions/harmony-platform
src/gnue/common/apps/GConfig.py
2
9419
# Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise 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, or (at your option) any later vers...
gpl-2.0
tianyi33/simple_blog
django/forms/extras/widgets.py
110
5251
""" Extra HTML Widget classes """ from __future__ import unicode_literals import datetime import re from django.forms.widgets import Widget, Select from django.utils import datetime_safe from django.utils.dates import MONTHS from django.utils.safestring import mark_safe from django.utils.formats import get_format fro...
mit
lmprice/ansible
test/units/modules/network/netscaler/test_netscaler_gslb_service.py
39
27775
# Copyright (c) 2017 Citrix Systems # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
gpl-3.0
blaze33/django
django/utils/dates.py
488
2237
"Commonly-used date structures" from django.utils.translation import ugettext_lazy as _, pgettext_lazy WEEKDAYS = { 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'), 5:_('Saturday'), 6:_('Sunday') } WEEKDAYS_ABBR = { 0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri')...
bsd-3-clause
HandyCodeJob/phillustration
fabfile.py
70
1809
from fabric.api import * import fabric.contrib.project as project import os import sys import SimpleHTTPServer import SocketServer # Local path configuration (can be absolute or relative to fabfile) env.deploy_path = 'output' DEPLOY_PATH = env.deploy_path # Remote server configuration production = 'root@localhost:22'...
agpl-3.0
Atom-machinerule/OpenQbo
qbo_stereo_anaglyph/hrl_lib/src/hrl_lib/mayavi2_util.py
4
4736
# # Copyright (c) 2009, Georgia Tech Research Corporation # 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, thi...
lgpl-2.1
MMaus/mutils
models/Slip_run.py
1
11980
# -*- coding: utf-8 -*- """ Created on Wed Mar 16 13:00:05 2011 @author: Christian simulation of spring mass model for running including energy management input parameters: vx0,y0,L0,a0,k,m,ygrd,t,fs,steps output parameters: x_sim,y_sim,vx_sim,vy_sim,t_sim,reached_steps,betaTO_sim,xF,k2,L02 """ from __futu...
gpl-2.0
nyuvis/patient-viz
poke_json.py
1
1759
# -*- coding: utf-8 -*- # -*- mode: python; -*- """exec" "`dirname \"$0\"`/call.sh" "$0" "$@";" """ from __future__ import print_function import os import sys import json def usage(): print(""" usage: {0} [-h] [-bc] -f <file> -- <key> <value>... -h: print help -b: boolean values -c: allow creating a new file -f <...
mit
VanirAOSP/kernel_samsung_skomer
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
mwx1993/TACTIC
src/pyasm/deprecated/flash/flash_code_naming.py
6
1334
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
rvanlaar/easy-transifex
src/transifex/transifex/releases/urls.py
1
1610
# -*- coding: utf-8 -*- from django.conf.urls.defaults import * from django.conf import settings from django.contrib.auth.decorators import login_required from transifex.releases.feeds import ReleaseFeed, ReleaseLanguageFeed from transifex.releases.views import * from transifex.projects.urls import PROJECT_URL_PARTIAL...
bsd-2-clause