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
Anlim/decode-Django
Django-1.5.1/django/core/serializers/__init__.py
113
4000
""" Interfaces for serializing Django objects. Usage:: from django.core import serializers json = serializers.serialize("json", some_query_set) objects = list(serializers.deserialize("json", json)) To add your own serializers, use the SERIALIZATION_MODULES setting:: SERIALIZATION_MODULES = { ...
gpl-2.0
mtndesign/myVim
myvim/pyflakes-pathogen/ftplugin/python/pyflakes/setup.py
37
1027
#!/usr/bin/python # (c) 2005-2009 Divmod, Inc. See LICENSE file for details from distutils.core import setup setup( name="pyflakes", license="MIT", version="0.4.0", description="passive checker of Python programs", author="Phil Frost", maintainer="Moe Aboulkheir", maintainer_email="moe@di...
mit
imply/chuu
tools/win/split_link/graph_dependencies.py
145
2291
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import shutil import subprocess import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) def main(): if len(sys.argv) != 2: print...
bsd-3-clause
bvcompsci/cemetery-map
migrations/env.py
557
2883
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig import logging # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config ...
mit
kanteshraj/ansible
lib/ansible/template/__init__.py
18
19620
# (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
hugdiniz/anuarioDjango
yearbook/migrations/0005_auto_20141214_0017.py
1
1444
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('yearbook', '0004_auto_20141212_1558'), ] operations = [ migrations.RemoveField( model_name='lotacao', ...
gpl-2.0
stevenmirabito/csh-asterisk
pystrix/ami/dahdi_events.py
3
3742
""" pystrix.ami.dahdi_events ======================== Provides defnitions and filtering rules for events that may be raised by Asterisk's DAHDI module. Legal ----- This file is part of pystrix. pystrix is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License...
apache-2.0
hargup/sympy
sympy/physics/vector/tests/test_point.py
40
3940
from sympy.physics.vector import dynamicsymbols, Point, ReferenceFrame from sympy.utilities.pytest import raises def test_point_v1pt_theorys(): q, q2 = dynamicsymbols('q q2') qd, q2d = dynamicsymbols('q q2', 1) qdd, q2dd = dynamicsymbols('q q2', 2) N = ReferenceFrame('N') B = ReferenceFrame('B') ...
bsd-3-clause
kitelightning/UnrealEnginePython
examples/fbx_curves_extractor.py
3
2909
from unreal_engine import FbxManager, FbxIOSettings, FbxImporter, FbxScene import unreal_engine as ue class FbxCurvesExtractor: def __init__(self, filename): self.manager = FbxManager() io_settings = FbxIOSettings(self.manager, 'IOSROOT') self.manager.set_io_settings(io_settings) i...
mit
nuuuboo/odoo
addons/lunch/wizard/lunch_order.py
440
1299
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
rghe/ansible
test/units/modules/network/f5/test_bigip_profile_dns.py
10
4948
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks 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 import os import json import pytest import sys from nose.plugins.skip i...
gpl-3.0
belmiromoreira/nova
nova/scheduler/filters/retry_filter.py
58
1587
# 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
gnowxilef/youtube-dl
youtube_dl/extractor/mdr.py
58
6855
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( determine_ext, int_or_none, parse_duration, parse_iso8601, xpath_text, ) class MDRIE(InfoExtractor): IE_DESC = 'MDR.DE and KiKA' _VALID_URL ...
unlicense
MeteorKepler/RICGA
ricga/eval_tools/pycocoevalcap/tokenizer/ptbtokenizer.py
1
2833
#!/usr/bin/env python # # File Name : ptbtokenizer.py # # Description : Do the PTB Tokenization and remove punctuations. # # Creation Date : 29-12-2014 # Last Modified : Thu Mar 19 09:53:35 2015 # Authors : Hao Fang <hfang@uw.edu> and Tsung-Yi Lin <tl483@cornell.edu> import os import subprocess import tempfile # pat...
apache-2.0
lmprice/ansible
test/units/playbook/role/test_role.py
12
11071
# (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
scottdangelo/cinderclient-api-microversions
cinderclient/v2/qos_specs.py
2
4789
# Copyright (c) 2013 eBay Inc. # Copyright (c) OpenStack 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 applicab...
apache-2.0
frederica07/Dragon_Programming_Process
PyOpenGL-3.0.2/OpenGL/GL/ARB/robustness_isolation.py
1
1333
'''OpenGL extension ARB.robustness_isolation This module customises the behaviour of the OpenGL.raw.GL.ARB.robustness_isolation to provide a more Python-friendly API Overview (from the spec) GL_ARB_robustness and supporting window system extensions allow creating an OpenGL context supporting graphics reset noti...
bsd-2-clause
guoxiaoyong/simple-useful
cxx_learn/cronx/spider/spider_daily_ftse100.py
2
2199
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib2; import re; import string; import sys; from BeautifulSoup import BeautifulSoup month_num = { 'Jan' : '01', 'Feb' : '02', 'Mar' : '03', 'Apr' : '04', 'May' : '05', 'Jun' : '06', 'Jul' : '07', 'Aug' : '08', 'Sep' : '09', 'Oct' : '10', 'Nov' : ...
cc0-1.0
skeuomorf/cryptography
src/cryptography/hazmat/backends/commoncrypto/hashes.py
61
2040
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography import utils from cryptography.exceptions import Unsupp...
bsd-3-clause
YAmikep/django-xmlmapping
setup.py
1
3687
""" Based entirely on Django's own ``setup.py`` for now. """ from distutils.core import setup from distutils.command.install_data import install_data from distutils.command.install import INSTALL_SCHEMES import os import sys class osx_install_data(install_data): # On MacOS, the platform-specific lib di...
bsd-3-clause
aewallin/openvoronoi
python_examples/line-segment/lineseg_3.py
1
4439
import openvoronoi as ovd import ovdvtk import time import vtk import datetime import math import random import os def drawLine(myscreen, p1, p2): myscreen.addActor(ovdvtk.Line(p1=(p1.x, p1.y, 0), p2=(p2.x, p2.y, 0), color=ovdvtk.yellow)) def writeFrame(w2if, lwr, n): w2if.Modified() current_dir = os.g...
lgpl-2.1
jcftang/ansible
lib/ansible/modules/cloud/amazon/dynamodb_table.py
25
14667
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
greent2008/ucore_lab
related_info/ostep/ostep15-disk/disk-precise.py
100
30277
#! /usr/bin/env python from Tkinter import * from types import * import math, random, time, sys, os from optparse import OptionParser from decimal import * MAXTRACKS = 1000 # states that a request/disk go through STATE_NULL = 0 STATE_SEEK = 1 STATE_ROTATE = 2 STATE_XFER = 3 STATE_DONE = 4 # # TODO # XXX tra...
gpl-2.0
mvdriel/ansible-modules-core
cloud/amazon/ec2_vpc.py
104
27780
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
ebrelsford/django-phillydata
phillydata/opa/migrations/0001_initial.py
1
3517
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('owners', '0001_initial'), ] operations = [ migrations.CreateModel( name='AccountOwner', fields=[ ...
bsd-3-clause
auferack08/edx-platform
lms/djangoapps/courseware/migrations/0003_done_grade_cache.py
194
8745
# 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): # NOTE (vshnayder): This constraint has the wrong field order, so it doesn't actually # do anything in sqlite. M...
agpl-3.0
ebar0n/django
tests/template_tests/filter_tests/test_iriencode.py
133
1538
from django.template.defaultfilters import iriencode, urlencode from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class IriencodeTests(SimpleTestCase): """ Ensure iriencode keeps safe strings. """ @setup({'iriencode01': '{{ url|iriencode }...
bsd-3-clause
ncullen93/pyBN
pyBN/inference/marginal_exact/exact_bp.py
1
2676
__author__ = """N. Cullen <ncullen.th@dartmouth.edu>""" from pyBN.classes.factor import Factor from pyBN.classes.factorization import Factorization from pyBN.utils.graph import * from copy import deepcopy, copy import numpy as np import json def exact_bp(bn, target=None, evidence=None, downward_pass=False): """ ...
mit
carnotweat/cpupimp
libs/guessit/transfo/post_process.py
142
2827
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
rgeleta/odoo
addons/account/project/__init__.py
427
1100
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
4shadoww/usploit
core/lib/past/builtins/misc.py
62
2500
from __future__ import unicode_literals import sys import inspect from collections import Mapping from future.utils import PY3, exec_ if PY3: import builtins def apply(f, *args, **kw): return f(*args, **kw) from past.builtins import str as oldstr def chr(i): """ Return a by...
mit
clody23/MToolBox
MToolBox/mt-classifier.py
1
13234
#!/usr/bin/env python import getopt, sys, re, os, glob, csv from classifier import tree, NGclassify, consts, datatypes, parse_mhcs from bioinf.seqs import SeqList import io_modules.csv import io_modules.old_table import io_modules.serialize import os.path # folder where to find data for haplogroup classification and...
gpl-3.0
ianrust/coinbase_autotrader
automated_bittrader.py
1
4459
import json,urllib2,csv,time,smtplib,string,os os.chdir('/home/ian/Documents') # Buy and sell urls sell_url = "https://coinbase.com/api/v1/sells" buy_url = "https://coinbase.com/api/v1/buys" sell_price_url = "https://coinbase.com/api/v1/prices/sell" buy_price_url = "https://coinbase.com/api/v1/prices/buy" headers = {...
mit
kvar/ansible
lib/ansible/modules/windows/win_toast.py
21
3274
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in th...
gpl-3.0
pombredanne/pulp
server/pulp/plugins/conduits/repo_sync.py
7
8610
""" Contains the definitions for all classes related to the importer's API for interacting with the Pulp server during a repo sync. Plugin implementations for repository sync will obviously vary wildly. For help in understanding the APIs, below is a short outline of a common sync process and its calls into this condui...
gpl-2.0
40223208/CDB-Final-
static/Brython3.1.1-20150328-091302/Lib/test/regrtest.py
718
65317
#! /usr/bin/python3.3 """ Usage: python -m test [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]] If no arguments or options are provided, finds all files matching the pattern "test_*" in the Lib/test subdirectory and runs them in alphabetical order ...
gpl-3.0
qwefi/nova
nova/api/openstack/compute/contrib/__init__.py
25
1608
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Justin Santa Barbara # 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.apach...
apache-2.0
cloud9UG/odoo
openerp/osv/fields.py
20
74783
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
EmanueleCannizzaro/scons
src/engine/SCons/Tool/JavaCommonTests.py
1
14898
# # Copyright (c) 2001 - 2016 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 # without limitation the rights to use, copy, modify, merge...
mit
procangroup/edx-platform
lms/djangoapps/shoppingcart/tests/payment_fake.py
24
9650
# -*- coding: utf-8 -*- """ Fake payment page for use in acceptance tests. This view is enabled in the URLs by the feature flag `ENABLE_PAYMENT_FAKE`. Note that you will still need to configure this view as the payment processor endpoint in order for the shopping cart to use it: settings.CC_PROCESSOR['CyberSource...
agpl-3.0
wshallum/ansible
lib/ansible/modules/packaging/os/yum_repository.py
19
25228
#!/usr/bin/python # encoding: utf-8 # (c) 2015-2016, Jiri Tyr <jiri.tyr@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,...
gpl-3.0
bastik/youtube-dl
youtube_dl/extractor/__init__.py
8
21846
from __future__ import unicode_literals from .abc import ABCIE from .abc7news import Abc7NewsIE from .academicearth import AcademicEarthCourseIE from .addanime import AddAnimeIE from .adobetv import ( AdobeTVIE, AdobeTVVideoIE, ) from .adultswim import AdultSwimIE from .aftenposten import AftenpostenIE from .a...
unlicense
eHealthAfrica/onadata
onadata/libs/utils/backup_tools.py
13
5473
import codecs from datetime import datetime import errno import os import shutil import sys import tempfile import zipfile from time import sleep from onadata.apps.logger.import_tools import django_file from onadata.apps.logger.models import Instance from onadata.libs.utils.logger_tools import create_instance from ona...
bsd-2-clause
hopeall/odoo
addons/account/report/account_journal.py
255
10035
# -*- 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
shsingh/ansible
test/lib/ansible_test/_internal/sanity/ignores.py
55
2978
"""Sanity test for the sanity ignore file.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ..sanity import ( SanityFailure, SanityIgnoreParser, SanityVersionNeutral, SanitySuccess, SanityMessage, ) from ..test import ( calculate_confid...
gpl-3.0
lucasdemarchi/ardupilot
mk/VRBRAIN/Tools/genmsg/test/test_genmsg_command_line.py
51
1974
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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 ...
gpl-3.0
jtg-gg/blink
Tools/Scripts/webkitpy/thirdparty/coverage/control.py
64
26459
"""Core control stuff for Coverage.""" import atexit, os, random, socket, sys from coverage.annotate import AnnotateReporter from coverage.backward import string_class from coverage.codeunit import code_unit_factory, CodeUnit from coverage.collector import Collector from coverage.config import CoverageConfig from cov...
bsd-3-clause
drcoms/jlu-drcom-client
jlu-drcom-py3/newclinet-py3.py
1
12355
#!/usr/bin/env python # coding: utf-8 # license: AGPL-V3 import re import socket import struct import time from hashlib import md5 import sys import os import random import platform # CONFIG server = '10.100.61.3' username = b'XXXXX' # 用户名 password = b'XXXXX' ...
agpl-3.0
UniversalMasterEgg8679/ansible
lib/ansible/utils/module_docs_fragments/junos.py
101
2910
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
whatrye/twister-core
libtorrent/tools/parse_memory_log.py
59
3492
#! /usr/bin/env python import os, sys, time # usage: memory.log memory_index.log lines = open(sys.argv[1], 'rb').readlines() index = open(sys.argv[2], 'rb').readlines() # logfile format: # #<allocation-point> <time(ms)> <key ('A' | 'F')> <address> <size> <total-size> <total-space-time> <peak-total-size> # example: #...
mit
ryancanhelpyou/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/handshake/_base.py
652
6143
# Copyright 2012, 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 of conditions and the f...
mpl-2.0
widespace-os/amphtml
validator/webui/build.py
14
5644
#!/usr/bin/env python2.7 # # Copyright 2016 The AMP HTML 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 # # ...
apache-2.0
Stratio/stratio-cassandra
pylib/cqlshlib/test/test_cqlsh_commands.py
147
1243
# 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
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/boto/roboto/awsqueryrequest.py
153
18579
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # withou...
mit
taotie12010/bigfour
openedx/core/djangoapps/content/course_structures/tests.py
22
6123
import json from xmodule.modulestore.django import SignalHandler from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from openedx.core.djangoapps.content.course_structures.models import CourseStructure from openedx.core.djang...
agpl-3.0
gauribhoite/personfinder
env/google_appengine/lib/django-1.5/django/contrib/gis/geos/mutable_list.py
217
10972
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://www.aryehleib.com/MutableLists.html Author: Aryeh Leib Taurog. """ from django.utils.f...
apache-2.0
madongfly/grpc
src/python/grpcio/grpc/framework/alpha/utilities.py
39
10994
# Copyright 2015, 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 of conditions and the f...
bsd-3-clause
2uller/LotF
App/Lib/stringold.py
67
12881
# module 'string' -- A collection of string operations # Warning: most of the code you see here isn't normally used nowadays. With # Python 1.6, many of these functions are implemented as methods on the # standard string object. They used to be implemented by a built-in module # called strop, but strop is now ob...
gpl-2.0
androidbftab1/bf-kernel
tools/perf/scripts/python/netdev-times.py
1544
15191
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
nmayorov/scikit-learn
sklearn/utils/sparsetools/tests/test_traversal.py
315
2001
from __future__ import division, print_function, absolute_import from nose import SkipTest import numpy as np from numpy.testing import assert_array_almost_equal try: from scipy.sparse.csgraph import breadth_first_tree, depth_first_tree,\ csgraph_to_dense, csgraph_from_dense except ImportError: # Oldi...
bsd-3-clause
msreis/SigNetSim
signetsim/json/JsonRequest.py
2
1145
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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...
agpl-3.0
XiaosongWei/crosswalk-test-suite
wrt/wrt-manifest2-android-tests/manifest2/descriptiontest.py
4
3270
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
lizardsystem/lizard-layers
lizard_layers/migrations/0005_auto__add_field_areavalue_flag__add_field_areavalue_comment.py
1
13178
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AreaValue.flag' db.add_column('lizard_layers_areavalue', 'flag', self.gf('django.db.models...
gpl-3.0
gopal1cloud/neutron
neutron/plugins/brocade/tests/noscli.py
28
2980
#!/usr/bin/env python # # Copyright (c) 2013 Brocade Communications Systems, 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...
apache-2.0
sertac/django
tests/template_tests/filter_tests/test_chaining.py
345
3940
from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class ChainingTests(SimpleTestCase): """ Chaining safeness-preserving filters should not alter the safe status. """ @setup({'chaining01': '{{ a|capfirst|center:"7" }}.{{ b|capfirst|center:"...
bsd-3-clause
leoliujie/odoo
addons/point_of_sale/report/pos_users_product.py
380
3336
# -*- 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
dbrgn/mopidy
mopidy/local/actor.py
17
1105
from __future__ import absolute_import, unicode_literals import logging import pykka from mopidy import backend from mopidy.local import storage from mopidy.local.library import LocalLibraryProvider from mopidy.local.playback import LocalPlaybackProvider logger = logging.getLogger(__name__) class LocalBackend(py...
apache-2.0
davizucon/ChatterBot
setup.py
2
2150
#!/usr/bin/env python """ ChatterBot setup file. """ from setuptools import setup # Dynamically retrieve the version information from the chatterbot module CHATTERBOT = __import__('chatterbot') VERSION = CHATTERBOT.__version__ AUTHOR = CHATTERBOT.__author__ AUTHOR_EMAIL = CHATTERBOT.__email__ URL = CHATTERBOT.__url__...
bsd-3-clause
schlueter/ansible
lib/ansible/modules/network/panos/panos_lic.py
60
4915
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
gpl-3.0
zipperX/android_kernel_oneplus_msm8974
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # 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. import errno, os FUTEX_WAIT = 0...
gpl-2.0
AladdinSonni/youtube-dl
youtube_dl/downloader/rtmp.py
95
8353
from __future__ import unicode_literals import os import re import subprocess import time from .common import FileDownloader from ..compat import compat_str from ..utils import ( check_executable, encodeFilename, encodeArgument, get_exe_version, ) def rtmpdump_version(): return get_exe_version( ...
unlicense
fametrano/BitcoinBlockchainTechnology
btclib/rfc6979.py
1
4053
#!/usr/bin/env python3 # Copyright (C) 2017-2020 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
mit
spaghetti-/rosdep
src/rosdep2/platforms/arch.py
1
3009
#!/usr/bin/env python # Copyright (c) 2009, Willow Garage, 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 # n...
bsd-3-clause
baran0119/kernel_samsung_baffinlitexx
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# 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 system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
thiagopnts/servo
tests/wpt/web-platform-tests/webdriver/tests/actions/support/keys.py
12
16359
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
mpl-2.0
objarni/splinter
setup.py
4
1253
# -*- coding: utf-8 -*- # Copyright 2012 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from setuptools import setup, find_packages import codecs README = codecs.open('README.rst', encoding='utf-8').read() setup( name=...
bsd-3-clause
roadmapper/ansible
test/units/modules/network/fortimanager/test_fmgr_secprof_web.py
38
2484
# Copyright 2018 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
joakim-hove/opm-cmake
python/pybind11/tests/test_multiple_inheritance.py
31
9225
import pytest from pybind11_tests import ConstructorStats from pybind11_tests import multiple_inheritance as m def test_multiple_inheritance_cpp(): mt = m.MIType(3, 4) assert mt.foo() == 3 assert mt.bar() == 4 def test_multiple_inheritance_mix1(): class Base1: def __init__(self, i): ...
gpl-3.0
Piratas/coleta-site
languages/zh.py
152
10080
# coding: utf8 { '!langcode!': 'zh-tw', '!langname!': '中文', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"', '%s %%{row} deleted': '已刪除 %s 筆', '%s %%{row} updated': '已更新 %s 筆', '%s s...
agpl-3.0
vbannai/neutron
neutron/plugins/vmware/dhcp_meta/constants.py
36
1139
# Copyright 2014 VMware, 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...
apache-2.0
pschella/scipy
scipy/sparse/tests/test_csr.py
127
1499
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_array_almost_equal, run_module_suite, assert_ from scipy.sparse import csr_matrix def _check_csr_rowslice(i, sl, X, Xcsr): np_slice = X[i, sl] csr_slice = Xcsr[i, sl] assert_array_almost_e...
bsd-3-clause
anryko/ansible
lib/ansible/modules/storage/netapp/_sf_check_connections.py
59
5302
#!/usr/bin/python # (c) 2017, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['deprecated'], ...
gpl-3.0
ierceg/peru
tests/test_keyval.py
4
1113
import unittest import shared from peru.keyval import KeyVal class KeyValTest(unittest.TestCase): def test_keyval(self): root = shared.create_dir() tmp_dir = shared.create_dir() keyval = KeyVal(root, tmp_dir) key = "mykey" # keyval should be empty self.assertFals...
mit
sauloal/pycluster
pypy-1.9_64/lib-python/2.7/plat-mac/appletrawmain.py
73
2005
# Emulate sys.argv and run __main__.py or __main__.pyc in an environment that # is as close to "normal" as possible. # # This script is put into __rawmain__.pyc for applets that need argv # emulation, by BuildApplet and friends. # from warnings import warnpy3k warnpy3k("In 3.x, the appletrawmain module is removed.", s...
mit
willdavidc/piel
catkin_ws/src/piel/scripts/venv/lib/python2.7/site-packages/pip/_vendor/requests/models.py
360
30532
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
mit
android-ia/platform_external_chromium_org_tools_gyp
test/win/gyptest-link-ordering.py
225
3058
#!/usr/bin/env python # Copyright (c) 2013 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. """ Make sure the link order of object files is the same between msvs and ninja. """ import TestGyp import sys if sys.platform == 'win32'...
bsd-3-clause
ealegol/kolla-newton
kolla/template/filters.py
7
1086
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
apache-2.0
welshjf/pyqtgraph
pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt5.py
38
10666
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate.ui' # # Created: Wed Mar 26 15:09:28 2014 # by: PyQt5 UI code generator 5.0.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets cl...
mit
lmazuel/ansible
lib/ansible/modules/network/avi/avi_applicationprofile.py
50
6539
#!/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
way2heavy/youtube-dl-1
youtube_dl/extractor/adobetv.py
96
4630
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, unified_strdate, str_to_int, float_or_none, ISO639Utils, ) class AdobeTVIE(InfoExtractor): _VALID_URL = r'https?://tv\.adobe\.com/watch/[^/]+/(?P<id>[^/]+)' _TEST = { '...
unlicense
BlackHole/enigma2-1
lib/python/Components/MenuList.py
142
1788
from HTMLComponent import HTMLComponent from GUIComponent import GUIComponent from enigma import eListboxPythonStringContent, eListbox class MenuList(HTMLComponent, GUIComponent): def __init__(self, list, enableWrapAround=True, content=eListboxPythonStringContent): GUIComponent.__init__(self) self.list = list ...
gpl-2.0
GaussDing/django
tests/postgres_tests/test_array.py
23
17719
import decimal import json import unittest import uuid from django import forms from django.contrib.postgres.fields import ArrayField from django.contrib.postgres.forms import SimpleArrayField, SplitArrayField from django.core import exceptions, serializers, validators from django.core.management import call_command f...
bsd-3-clause
dsquareindia/gensim
gensim/scripts/make_wikicorpus.py
75
4574
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Copyright (C) 2012 Lars Buitinck <larsmans@gmail.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s WIKI_XML_DUMP OUTPUT_PREFIX [VOCABULARY_SIZE] Convert a...
lgpl-2.1
hubert667/AIR
build/celery/build/lib.linux-i686-2.7/celery/events/__init__.py
8
14103
# -*- coding: utf-8 -*- """ celery.events ~~~~~~~~~~~~~ Events is a stream of messages sent for certain actions occurring in the worker (and clients if :setting:`CELERY_SEND_TASK_SENT_EVENT` is enabled), used for monitoring purposes. """ from __future__ import absolute_import import os import tim...
gpl-3.0
sils1297/PyGithub
github/tests/Branch.py
37
2201
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
vlas-sokolov/multicube
multicube/astro_toolbox.py
1
5386
import numpy as np from astropy.io import fits import os # TODO: rewrite this to have multiple components generated here. # Having a bundle of test filaments would be very nice. def make_test_cube(shape=(30,9,9), outfile='test.fits', sigma=None, seed=0, writeSN=False ): """ Generate...
mit
foss-transportationmodeling/rettina-server
flask/local/lib/python2.7/site-packages/whoosh/searching.py
30
64692
# Copyright 2007 Matt Chaput. 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 notice, # this list of conditions and the...
apache-2.0
mitodl/micromasters
micromasters/settings.py
1
21620
""" Django settings for MicroMasters. """ import logging import os import platform from urllib.parse import urljoin import dj_database_url from celery.schedules import crontab from django.core.exceptions import ImproperlyConfigured from micromasters.envs import ( get_any, get_bool, get_int, get_list_of...
bsd-3-clause
flavour/tldrmp
modules/s3db/survey.py
1
135539
# -*- coding: utf-8 -*- """ Sahana Eden Survey Tool @copyright: 2011-2013 (c) Sahana Software Foundation @license: MIT ADAT - Assessment Data Analysis Tool For more details see the blueprint at: http://eden.sahanafoundation.org/wiki/BluePrint/SurveyTool/ADAT Permission is hereby granted, fr...
mit
SiddheshK15/android_kernel_yu_msm8916_gcc5
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