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
Milstein/crowdsource-platform
crowdsourcing/migrations/0022_auto_20150728_2153.py
15
6320
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0021_auto_20150728_2148'), ] operations = [ migrations.AlterField( model_name='address', ...
mit
autosportlabs/kivy
examples/widgets/label_text_size.py
21
1877
''' Label textsize ============ This example shows how the textsize and line_height property are used to format label widget ''' import kivy kivy.require('1.0.7') from kivy.app import App from kivy.uix.label import Label _long_text = ("""Lorem ipsum dolor sit amet, consectetur adipiscing elit. """ """Phasellu...
mit
DailyActie/Surrogate-Model
01-codes/scikit-learn-master/sklearn/gaussian_process/regression_models.py
1
2171
# -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # Licence: BSD 3 clause """ The built-in regression models submodule for the gaussian_process module. """ import numpy as np def constant(x): """ Zero order polynomial (c...
mit
wilvk/ansible
lib/ansible/modules/cloud/docker/docker_container.py
9
80462
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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': ['prev...
gpl-3.0
mcardacci/tools_of_the_dark_arts
droopescan/dscan/common/functions.py
2
10543
from __future__ import print_function from collections import OrderedDict from dscan.common.enum import colors, ScanningMethod try: from requests.exceptions import ConnectionError, ReadTimeout, ConnectTimeout, \ TooManyRedirects except: old_req = """Running a very old version of requests! Please `pi...
gpl-3.0
felipenaselva/felipe.repository
script.module.streamhublive/resources/modules/js2py/pyjs.py
29
1884
from base import * from constructors.jsmath import Math from constructors.jsdate import Date from constructors.jsobject import Object from constructors.jsfunction import Function from constructors.jsstring import String from constructors.jsnumber import Number from constructors.jsboolean import Boolean from constructor...
gpl-2.0
diox/app-validator
appvalidator/testcases/javascript/instanceactions.py
5
3341
import jstypes import utils from appvalidator.constants import BUGZILLA_BUG from appvalidator.csp import warn from .instanceproperties import _set_HTML_property def createElement(args, traverser, wrapper): """Handles createElement calls""" if not args: return first_as_str = utils.get_as_str(args...
bsd-3-clause
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyKDE4/kdecore/KConfigBase.py
1
1886
# encoding: utf-8 # module PyKDE4.kdecore # from /usr/lib/python2.7/dist-packages/PyKDE4/kdecore.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtNetwork as __PyQt4_QtNetwork class KConfigBase(): # skipped bases: <type 'sip.wrapper'> # no doc def accessMode(self...
gpl-2.0
bverburg/CouchPotatoServer
couchpotato/core/notifications/plex/server.py
31
5113
from datetime import timedelta, datetime from urlparse import urlparse import traceback from couchpotato.core.helpers.variable import cleanHost from couchpotato import CPLog try: import xml.etree.cElementTree as etree except ImportError: import xml.etree.ElementTree as etree log = CPLog(__name__) class Pl...
gpl-3.0
shakamunyi/ansible
lib/ansible/plugins/lookup/template.py
14
1887
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
UrusTeam/URUS
Tools/autotest/pysim/vehicleinfo.py
11
11250
class VehicleInfo(object): def __init__(self): """ make_target: option passed to make to create binaries. Usually sitl, and "-debug" may be appended if -D is passed to sim_vehicle.py default_params_filename: filename of default parameters file. Taken to be relative to autotest dir. ...
gpl-3.0
ihidalgo/uip-prog3
Parciales/practicas/kivy-designer-master/designer/project_loader.py
1
47244
import re import os import sys import inspect import time import functools import shutil import imp from six import exec_ from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.floatlayout import FloatLayout from kivy.uix.button import Button from kivy.base import runTouchApp from kivy.factor...
mit
nkgilley/home-assistant
homeassistant/components/spc/alarm_control_panel.py
7
3441
"""Support for Vanderbilt (formerly Siemens) SPC alarm systems.""" import logging from pyspcwebgw.const import AreaMode import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, SUPPORT_ALAR...
apache-2.0
OndrejIT/pyload
module/plugins/hoster/MediafireCom.py
6
3247
# -*- coding: utf-8 -*- from ..captcha.ReCaptcha import ReCaptcha from ..captcha.SolveMedia import SolveMedia from ..internal.SimpleHoster import SimpleHoster class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" __version__ = "0.98" __status__ = "testing" __pattern__ =...
gpl-3.0
AGnarlyNarwhal/cse360_webapp
cse360_webapp/urls.py
1
1946
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns #from django.conf.urls.static import static from app1 import views #This is the project/url.py urlpatterns = patterns('', # Ex...
gpl-2.0
linebp/pandas
bench/bench_groupby.py
1
1293
from pandas import * from pandas.util.testing import rands from pandas.compat import range import string import random k = 20000 n = 10 foo = np.tile(np.array([rands(10) for _ in range(k)], dtype='O'), n) foo2 = list(foo) random.shuffle(foo) random.shuffle(foo2) df = DataFrame({'A': foo, 'B': foo2, ...
bsd-3-clause
dnxbjyj/python-basic
gui/wxpython/wxPython-demo-4.0.1/demo/Button.py
1
2502
#!/usr/bin/env python import wx import images #---------------------------------------------------------------------- class TestPanel(wx.Panel): def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE) self.log = log ...
mit
ivanprjcts/equinox-spring16-API
makesdks/outputs/sdk.py
1
6152
from sdklib import SdkBase class DefaultApi(SdkBase): API_HOST = "api.spring16.equinox.local" API_USERS__PK__URL = "/users/%s/" API_USERS_URL = "/users/" API_APPLICATIONS__PK__URL = "/applications/%s/" API_APPLICATIONS_URL = "/applications/" API_INSTANCES__PK__URL = "/instances/%s/" API_...
lgpl-3.0
tensorflow/tensorflow
tensorflow/python/pywrap_mlir.py
6
3647
# Copyright 2020 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
sgerhart/ansible
lib/ansible/modules/network/illumos/ipadm_addr.py
61
11664
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@gmail.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', ...
mit
jesramirez/odoo
addons/website_certification/__init__.py
385
1030
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
plin1112/pysimm
tests/test_lmps_examples.py
2
1833
import unittest import os from os import path as osp from testing import AbstractExamplesTestCase from testing import example_tests_sort class LammpsExamplesTestCase(AbstractExamplesTestCase): def test_lammps_binary(self): binary = os.environ.get('LAMMPS_EXEC') self.assertIsNotNone(binary) d...
mit
defaultnamehere/grr
lib/aff4_objects/timeline_test.py
6
2810
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """AFF4 Timeline object tests.""" import random import time from grr.lib import aff4 from grr.lib import rdfvalue from grr.lib import test_lib class TimelineTest(test_lib.AFF4ObjectTest): """Test the timeline implementation.""" def testTim...
apache-2.0
gaberger/pybvc
samples/sampleopenflow/apps/oftool/oftool.py
2
63172
#!/usr/bin/env python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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: # 1. Redistributions of source code must retain the above copyrig...
bsd-3-clause
gclenaghan/scikit-learn
sklearn/datasets/kddcup99.py
4
12759
"""KDDCUP 99 dataset. A classic dataset for anomaly detection. The dataset page is available from UCI Machine Learning Repository https://archive.ics.uci.edu/ml/machine-learning-databases/kddcup99-mld/kddcup.data.gz """ import sys import errno from gzip import GzipFile from io import BytesIO import logging import ...
bsd-3-clause
orione7/plugin.video.streamondemand-pureita
core/servertools.py
1
18391
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand 5 # Copyright 2015 tvalacarta@gmail.com # http://www.mimediacenter.info/foro/viewforum.php?f=36 # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # -...
gpl-3.0
skg-net/ansible
test/units/module_utils/facts/test_facts.py
38
22766
# This file is part of Ansible # -*- coding: utf-8 -*- # # # 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 dis...
gpl-3.0
sdague/home-assistant
tests/components/totalconnect/test_config_flow.py
6
3882
"""Tests for the iCloud config flow.""" from homeassistant import data_entry_flow from homeassistant.components.totalconnect.const import DOMAIN from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_USER from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from tests.async_mock import patch from tests...
apache-2.0
dehivix/compilerURG
unergParse.py
1
8812
from ply import * import unergLex tokens = unergLex.tokens precedence = ( ('left', 'PLUS','MINUS'), ('left', 'TIMES','DIVIDE'), ('left', 'POWER'), ('right','UMINUS') ) #### A BASIC program is a series of statements. We represent the program as a #### dicti...
gpl-3.0
jeorgen/ngcccbase
ngcccbase/p2ptrade/protocol_objects.py
4
4722
import time from coloredcoinlib import IncompatibleTypesError from ngcccbase.txcons import RawTxSpec from utils import make_random_id from utils import CommonEqualityMixin class EOffer(CommonEqualityMixin): """ A is the offer side's ColorValue B is the replyer side's ColorValue """ def __init__(...
mit
ajanson/SCIRun
src/Externals/libxml2/check-relaxng-test-suite2.py
17
10537
#!/usr/bin/python import sys import time import os import string import StringIO sys.path.insert(0, "python") import libxml2 # Memory debug specific libxml2.debugMemory(1) debug = 0 quiet = 1 # # the testsuite description # CONF="test/relaxng/testsuite.xml" LOG="check-relaxng-test-suite2.log" log = open(LOG, "w") nb...
mit
coldzhang/cpp_features
coroutine/unit_test/gtest_unit/gtest/xcode/Scripts/versiongenerate.py
3088
4536
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
lgpl-3.0
trec-kba/streamcorpus-pipeline
examples/john_smith_chunk_writer.py
1
2313
'''Example of how to transform a corpus into the streamcorpus format and save it as a chunk file. ~/streamcorpus-pipeline$ python examples/john_smith_chunk_writer.py data/john-smith/original foo.sc ~/streamcorpus-pipeline$ streamcorpus_dump --count foo.sc 197 0 foo.sc Copyright 2012-2014 Diffeo, Inc. ''' i...
mit
ampax/edx-platform
common/lib/xmodule/xmodule/modulestore/draft_and_published.py
71
5876
""" This module provides an abstraction for Module Stores that support Draft and Published branches. """ import threading from abc import ABCMeta, abstractmethod from contextlib import contextmanager from . import ModuleStoreEnum, BulkOperationsMixin # Things w/ these categories should never be marked as version=DRAF...
agpl-3.0
CongLi/avocado-vt
virttest/staging/backports/_itertools.py
11
1278
""" This module contains some itertools functions people have been using in avocado-vt that are not present in python 2.4, the minimum supported version. """ def product(*args, **kwds): """ (avocado-vt backport) Cartesian product of input iterables. Equivalent to nested for-loops. For example, produc...
gpl-2.0
rs2/pandas
pandas/tests/window/moments/test_moments_ewm.py
1
8505
import numpy as np from numpy.random import randn import pytest import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm def check_ew(name=None, preserve_nan=False, series=None, frame=None, nan_locs=None): series_result = getattr(series.ewm(com=10), name)() assert isinstance(seri...
bsd-3-clause
CyanogenMod/android_kernel_oppo_n3
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
catapult-project/catapult-csm
third_party/gsutil/third_party/boto/boto/ec2/ec2object.py
150
5554
# Copyright (c) 2006-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 # w...
bsd-3-clause
laslabs/odoo
addons/website_project_issue/tests/test_access_rights.py
45
6654
# -*- coding: utf-8 -*- from openerp.addons.project.tests.test_access_rights import TestPortalProjectBase from openerp.exceptions import AccessError from openerp.tools import mute_logger class TestPortalProjectBase(TestPortalProjectBase): def setUp(self): super(TestPortalProjectBase, self).setUp() ...
agpl-3.0
Jgarcia-IAS/SITE
addons/account/project/report/quantity_cost_ledger.py
358
6204
# -*- 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
nooperpudd/trading-with-python
cookbook/getDataFromYahooFinance.py
77
1391
# -*- coding: utf-8 -*- """ Created on Sun Oct 16 18:37:23 2011 @author: jev """ from urllib import urlretrieve from urllib2 import urlopen from pandas import Index, DataFrame from datetime import datetime import matplotlib.pyplot as plt sDate = (2005,1,1) eDate = (2011,10,1) symbol = 'SPY' fNa...
bsd-3-clause
wuzhihui1123/django-cms
cms/test_utils/project/pluginapp/plugins/meta/south_migrations/0001_initial.py
46
4092
# -*- 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): # Adding model 'TestPluginModel' db.create_table(u'meta_testpluginmodel',...
bsd-3-clause
monoku/conekta-python
tests/test_charges.py
1
3186
#!/usr/bin/python #coding: utf-8 #(c) 2013 Julian Ceballos <@jceb> from . import BaseEndpointTestCase class OrdersEndpointTestCase(BaseEndpointTestCase): def test_card_charge_done(self): self.client.api_key = '1tv5yJp3xnVZ7eK67m4h' response = self.client.Charge.create(self.card_charge_object) ...
mit
jburger424/MediaQueueHCI
m-q-env/lib/python3.4/site-packages/flask_script/commands.py
56
18544
# -*- coding: utf-8 -*- from __future__ import absolute_import,print_function import os import sys import code import warnings import string import inspect import argparse from flask import _request_ctx_stack from .cli import prompt, prompt_pass, prompt_bool, prompt_choices from ._compat import izip, text_type cl...
mit
EasyList-Lithuania/easylist_lithuania
tools/addChecksum.py
1
2767
#!/usr/bin/env python # coding: utf-8 # This file is part of Adblock Plus <http://adblockplus.org/>, # Copyright (C) 2006-2014 Eyeo GmbH # # Adblock Plus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundati...
gpl-3.0
holmes/intellij-community
python/helpers/docutils/readers/__init__.py
70
3265
# $Id: __init__.py 5618 2008-07-28 08:37:32Z strank $ # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer # Copyright: This module has been placed in the public domain. """ This package contains Docutils Reader modules. """ __docformat__ = 'reStructuredText' from docutils import utils, parsers, Component...
apache-2.0
cevaris/pants
tests/python/pants_test/build_graph/test_build_file_parser.py
3
14916
# 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 from colle...
apache-2.0
n0m4dz/odoo
addons/delivery/sale.py
42
4541
# -*- 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
idegtiarov/ceilometer
ceilometer/storage/sqlalchemy/migrate_repo/versions/044_restore_long_uuid_data_types.py
11
1630
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
marscher/cython
Cython/Build/BuildExecutable.py
27
4322
""" Compile a Python script into an executable that embeds CPython and run it. Requires CPython to be built as a shared library ('libpythonX.Y'). Basic usage: python cythonrun somefile.py [ARGS] """ from __future__ import absolute_import DEBUG = True import sys import os from distutils import sysconfig def g...
apache-2.0
leiferikb/bitpop
src/tools/resources/find_unused_resources.py
105
6465
#!/usr/bin/env python # 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. """This script searches for unused art assets listed in a .grd file. It uses git grep to look for references to the IDR resource id or...
gpl-3.0
MinFu/youtube-dl
youtube_dl/extractor/freesound.py
192
1392
from __future__ import unicode_literals import re from .common import InfoExtractor class FreesoundIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?freesound\.org/people/([^/]+)/sounds/(?P<id>[^/]+)' _TEST = { 'url': 'http://www.freesound.org/people/miklovan/sounds/194503/', 'md5': '1228...
unlicense
jeezybrick/django
django/contrib/gis/geos/coordseq.py
374
5482
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import byref, c_double, c_uint from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.base import...
bsd-3-clause
kant/inasafe
safe_extras/raven/utils/__init__.py
25
3408
""" raven.utils ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import hashlib import hmac import logging try: import pkg_resources except ImportError: pkg_resources = None import sys logger = logging.getLogger('raven...
gpl-3.0
inspirehep/sqlalchemy
test/orm/inheritance/test_assorted_poly.py
28
59010
"""Miscellaneous inheritance-related tests, many very old. These are generally tests derived from specific user issues. """ from sqlalchemy.testing import eq_ from sqlalchemy import * from sqlalchemy import util from sqlalchemy.orm import * from sqlalchemy.orm.interfaces import MANYTOONE from sqlalchemy.testing impor...
mit
keyboard-k/youtube-dl-pet
youtube_dl/extractor/ceskatelevize.py
17
6969
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, sanitized_Request, ) class...
unlicense
dmsimard/ansible
lib/ansible/cli/__init__.py
10
20965
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import ...
gpl-3.0
baidu/Paddle
python/paddle/fluid/tests/unittests/test_mean_op.py
3
1839
# 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
yewang15215/django
django/contrib/flatpages/migrations/0001_initial.py
308
1775
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='FlatPage', fields=[ ...
bsd-3-clause
pbrod/scipy
scipy/sparse/dia.py
5
13114
"""Sparse DIAgonal format""" from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['dia_matrix', 'isspmatrix_dia'] import numpy as np from .base import isspmatrix, _formats, spmatrix from .data import _data_matrix from .sputils import (isshape, upcast_cha...
bsd-3-clause
Microsoft/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/adodbapi/is64bit.py
8
1226
"""is64bit.Python() --> boolean value of detected Python word size. is64bit.os() --> os build version""" import sys def Python(): if sys.platform == 'cli': #IronPython import System return System.IntPtr.Size == 8 else: try: return sys.maxsize > 2147483647 ...
apache-2.0
hujiajie/chromium-crosswalk
third_party/bintrees/bintrees/bintree.py
156
4928
#!/usr/bin/env python #coding:utf-8 # Author: mozman # Purpose: binary tree module # Created: 28.04.2010 # Copyright (c) 2010-2013 by Manfred Moitzi # License: MIT License from __future__ import absolute_import from .treemixin import TreeMixin __all__ = ['BinaryTree'] class Node(object): """ Internal object, ...
bsd-3-clause
pimentech/django-mongoforms
setup.py
1
1754
from setuptools import setup, find_packages from setuptools.command.test import test class TestRunner(test): def run(self): if self.distribution.install_requires: self.distribution.fetch_build_eggs( self.distribution.install_requires) if self.distribution.tests_requir...
bsd-3-clause
nicolasgallardo/TECHLAV_T1-6
bebop_ws/devel/lib/python2.7/dist-packages/bebop_msgs/msg/_Ardrone3PilotingStateAltitudeChanged.py
1
6388
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from bebop_msgs/Ardrone3PilotingStateAltitudeChanged.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import std_msgs.msg class Ardrone3PilotingStateAltitudeChanged(genpy....
gpl-2.0
keceli/RMG-Java
databases/RMG_database/kinetics_libraries/Dooley/C1/remove_unused_species.py
11
1403
#!/usr/bin/env python # encoding: utf-8 """ remove_unused_species.py Created by Richard West on 2011-03-10. Copyright (c) 2011 MIT. All rights reserved. """ import sys import os import re import fileinput species = set() for line in fileinput.input(('reactions.txt','pdepreactions.txt')): if (line.find(' = ') == ...
mit
subramani95/neutron
neutron/plugins/vmware/extensions/lsn.py
54
2634
# 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
hmen89/odoo
addons/hr_payroll/wizard/__init__.py
442
1159
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
agpl-3.0
Lightmatter/django-inlineformfield
.tox/py27/lib/python2.7/site-packages/django/utils/2to3_fixes/fix_unicode.py
349
1181
"""Fixer for __unicode__ methods. Uses the django.utils.encoding.python_2_unicode_compatible decorator. """ from __future__ import unicode_literals from lib2to3 import fixer_base from lib2to3.fixer_util import find_indentation, Name, syms, touch_import from lib2to3.pgen2 import token from lib2to3.pytree import Leaf,...
mit
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/en_DebridOnly/sceper.py
2
6849
# -*- coding: utf-8 -*- ''' Yoda Add-on 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 ...
gpl-2.0
GenoaIO/ews-python-suds
src/suds/umx/typed.py
208
4646
# 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 ...
bsd-2-clause
epssy/hue
desktop/core/ext-py/kazoo-2.0/kazoo/tests/test_connection.py
35
9658
from collections import namedtuple import os import errno import threading import time import uuid import struct from nose import SkipTest from nose.tools import eq_ from nose.tools import raises import mock from kazoo.exceptions import ConnectionLoss from kazoo.protocol.serialization import ( Connect, int_st...
apache-2.0
danielhrisca/asammdf
asammdf/blocks/mdf_v4.py
1
395012
""" ASAM MDF version 4 file format module """ import bisect from collections import defaultdict from functools import lru_cache from hashlib import md5 import logging from math import ceil import mmap import os from pathlib import Path import shutil import sys from tempfile import gettempdir, TemporaryFile from traceb...
lgpl-3.0
spmjc/plugin.video.freplay
resources/lib/channels/allocine2.py
2
5177
#-*- coding: utf-8 -*- import urllib2 import re import CommonFunctions common = CommonFunctions from resources.lib import utils from resources.lib import globalvar title=['Allocine'] img=['allocine'] readyForUse=True def list_shows(channel,folder): shows=[] if folder=='none' : ...
gpl-2.0
kopchik/qtile
libqtile/widget/notify.py
10
4444
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Mounier Florian # Copyright (c) 2012 roger # Copyright (c) 2012-2014 Tycho Andersen # Copyright (c) 2012-2013 Craig Barnes # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # # Permission is hereby granted, free of ch...
mit
alexdglover/shill-isms
venv/lib/python2.7/site-packages/pip/commands/__init__.py
344
2244
""" Package containing all pip commands """ from __future__ import absolute_import from pip.commands.completion import CompletionCommand from pip.commands.download import DownloadCommand from pip.commands.freeze import FreezeCommand from pip.commands.hash import HashCommand from pip.commands.help import HelpCommand fr...
mit
garaden/flask
flask/views.py
149
5644
# -*- coding: utf-8 -*- """ flask.views ~~~~~~~~~~~ This module provides class-based views inspired by the ones in Django. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from .globals import request from ._compat import with_metaclass http_method_funcs =...
bsd-3-clause
ff0000/red-fab-deploy
fab_deploy/joyent/postgres.py
1
5514
import os import sys import tempfile from fabric.api import run, sudo, env, local, hide, settings from fabric.contrib.files import append, sed, exists, contains from fabric.context_managers import prefix from fabric.operations import get, put from fabric.context_managers import cd from fabric.tasks import Task from ...
mit
atlassian/boto
boto/ec2/launchspecification.py
170
3829
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software wit...
mit
sporkchops81/titleplant
lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py
2931
1675
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
dlab-projects/python-taq
marketflow/clean_dsenames.py
3
12852
import pandas as pd class Permno_Map(object): """1. Reads in dsenames file from crsp 2. Subsets """ def __init__(self, dsefile='crsp/dsenames.csv'): self.dsenames = pd.read_csv(dsefile) # Once everything is working, perhaps make this automatic. # For now, it's easier to debug w...
bsd-2-clause
yglazko/socorro
socorro/unittest/testlib/testCreateJsonDumpStore.py
11
5682
# 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 socorro.unittest.testlib.createJsonDumpStore as createJDS import os import shutil from nose.tools import * def...
mpl-2.0
quanvm009/codev7
openerp/addons/sale_margin/sale_margin.py
17
4272
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
halberom/ansible
lib/ansible/modules/network/iosxr/iosxr_config.py
2
11001
#!/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
zero-rp/miniblink49
v8_7_5/tools/gen-inlining-tests.py
14
15813
#!/usr/bin/env python # Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # for py2/py3 compatibility from __future__ import print_function from collections import namedtuple import textwrap import sys SH...
apache-2.0
ojengwa/talk
venv/lib/python2.7/site-packages/markdown/extensions/abbr.py
13
2786
''' Abbreviation Extension for Python-Markdown ========================================== This extension adds abbreviation handling to Python-Markdown. See <https://pythonhosted.org/Markdown/extensions/abbreviations.html> for documentation. Oringinal code Copyright 2007-2008 [Waylan Limberg](http://achinghead.com/)...
mit
stuntman723/rap-analyzer
rap_analyzer/lib/python2.7/site-packages/django/template/base.py
29
52382
""" This is the Django template system. How it works: The Lexer.tokenize() function converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). The Parser() class takes a list ...
mit
aequitas/home-assistant
homeassistant/components/netatmo/climate.py
4
15586
"""Support for Netatmo Smart thermostats.""" import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA from homeassistant.components.climate.const import ( STATE_HEAT, SUPP...
apache-2.0
shyamalschandra/picochess
libs/ecdsa/der.py
26
7023
from __future__ import division import binascii import base64 from .six import int2byte, b, PY3, integer_types, text_type class UnexpectedDER(Exception): pass def encode_constructed(tag, value): return int2byte(0xa0+tag) + encode_length(len(value)) + value def encode_integer(r): assert r >= 0 # can't sup...
gpl-3.0
naev/naev
utils/on-valid/readers/ship.py
20
2802
# -*- coding: utf-8 -*- # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=80: import os,sys from glob import glob from ._Readers import readers class ship(readers): def __init__(self, **config): shipsXml = glob(os.path.join(config['datpath'], 'ships/*.xml')) readers.__init__(self, shipsXml, con...
gpl-3.0
HewlettPackard/oneview-ansible
test/test_oneview_rack.py
1
6732
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2020) Hewlett Packard Enterprise Development LP # # 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/licen...
apache-2.0
a115027a/Openkore
src/scons-local-2.0.1/SCons/Platform/posix.py
61
8697
"""SCons.Platform.posix Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2...
gpl-2.0
pk-sam/crosswalk-test-suite
tools/allpairs-plus/metacomm/combinatorics/all_pairs2.py
33
5816
import pairs_storage from combinatorics import xuniqueCombinations class item: def __init__(self, id, value): self.id = id self.value = value self.weights = [] def __str__(self): return str(self.__dict__) def get_max_comb_number( arr, n ):...
bsd-3-clause
cortedeltimo/SickRage
lib/twilio/rest/resources/sms_messages.py
51
6376
from .util import normalize_dates, parse_date from . import InstanceResource, ListResource class ShortCode(InstanceResource): def update(self, **kwargs): return self.parent.update(self.name, **kwargs) class ShortCodes(ListResource): name = "ShortCodes" key = "short_codes" instance = ShortC...
gpl-3.0
Isabek/python-koans
python2/koans/about_monkey_patching.py
1
1428
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Related to AboutOpenClasses in the Ruby Koans # from runner.koan import * class AboutMonkeyPatching(Koan): class Dog(object): def bark(self): return "WOOF" def test_as_defined_dogs_do_bark(self): fido = self.Dog() self.as...
mit
aljscott/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/loggers/recordbotevent.py
122
1925
# Copyright (C) 2013 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 ...
bsd-3-clause
leotrubach/sourceforge-allura
Allura/allura/command/smtp_server.py
3
1176
import smtpd import asyncore import tg from paste.script import command import allura.tasks from allura.command import base from paste.deploy.converters import asint class SMTPServerCommand(base.Command): min_args=1 max_args=1 usage = '<ini file>' summary = 'Handle incoming emails, routing them to R...
apache-2.0
developerator/Maturaarbeit
GenerativeAdversarialNets/CelebA32 with DCGAN/CelebA32_dcgan.py
1
6898
''' By Tim Ehrensberger The base of the functions for the network's training is taken from https://github.com/Zackory/Keras-MNIST-GAN/blob/master/mnist_gan.py by Zackory Erickson The network structure is inspired by https://github.com/aleju/face-generator by Alexander Jung ''' import os import numpy as np from tqdm ...
mit
lewismc/topik
topik/preprocessing.py
1
2170
""" This file is concerned with preparing input to modeling. Put things like lowercasing, tokenizing, and vectorizing here. Generally, methods to process text operate on single documents at a time. This is done to facilitate parallelization over collections. """ # this is our output from whatever preprocessing we d...
bsd-3-clause
Serag8/Bachelor
google_appengine/lib/django-1.4/django/core/mail/backends/filebased.py
394
2485
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import EmailBackend as ConsoleEmailBackend class EmailBackend(ConsoleEmailBackend): def __init__(self, *arg...
mit
aferr/TimingCompartments
src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
25
7464
# 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