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
Turlough/keyczar
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/RCS.py
19
2190
"""SCons.Tool.RCS.py Tool-specific initialization for RCS. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Perm...
apache-2.0
Scille/parsec-cloud
parsec/core/mountpoint/thread_fs_access.py
1
2647
# Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS import trio class ThreadFSAccess: def __init__(self, trio_token, workspace_fs): self.workspace_fs = workspace_fs self._trio_token = trio_token def _run(self, fn, *args): return trio.from_thread.run(fn, *a...
agpl-3.0
hotzenklotz/Flask-React-Webpack-Server
server.py
1
7310
# System imports import subprocess import time from os import path import shutil import numpy as np from flask.ext.cors import CORS from flask import * from werkzeug import secure_filename from flask_extensions import * import math # Local predicition modules # find modules in parent_folder/predictions # sys.path.app...
mit
ToontownUprising/src
otp/chat/ChatInputNormal.py
3
4076
from direct.gui.DirectGui import * from direct.showbase import DirectObject from pandac.PandaModules import * import sys from otp.otpbase import OTPGlobals from otp.otpbase import OTPLocalizer from toontown.chat.ChatGlobals import * class ChatInputNormal(DirectObject.DirectObject): def __init__(self, chatMgr): ...
mit
bitcraze/toolbelt
src/toolbelt/test/utils/test_git.py
1
2105
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Toolbelt - a utility tu run tools in do...
gpl-3.0
meabsence/python-for-android
python3-alpha/python3-src/Lib/test/test_dummy_threading.py
182
1807
from test import support import unittest import dummy_threading as _threading import time class DummyThreadingTestCase(unittest.TestCase): class TestThread(_threading.Thread): def run(self): global running global sema global mutex # Uncomment if testing ano...
apache-2.0
moomou/heron
heron/tools/ui/src/python/args.py
2
3283
# Copyright 2016 Twitter. 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 agree...
apache-2.0
lyndsysimon/osf.io
scripts/tests/test_email_registration_contributors.py
60
2231
import mock from nose.tools import * # noqa from tests.base import OsfTestCase from tests.factories import RegistrationFactory, UserFactory from website import models from scripts.email_registration_contributors import ( get_registration_contributors, send_retraction_and_embargo_addition_message, main, MAIL...
apache-2.0
alexvanboxel/airflow
tests/contrib/operators/ecs_operator.py
8
7382
# -*- coding: utf-8 -*- # # 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
jamesblunt/sympy
sympy/functions/elementary/hyperbolic.py
4
31649
from __future__ import print_function, division from sympy.core import S, C, sympify, cacheit from sympy.core.function import Function, ArgumentIndexError, _coeff_isneg from sympy.functions.elementary.miscellaneous import sqrt ############################################################################### ##########...
bsd-3-clause
hansonrobotics/perception
test/test_perception.py
1
7152
#!/usr/bin/env python # Copyright (c) 2013-2018 Hanson Robotics, Ltd. import unittest import os import yaml import roslaunch import rostopic from roslaunch import core from testing_tools.misc import wait_for, wait_for_message from genpy.message import fill_message_args from sensor_msgs.msg import JointState from tf...
lgpl-2.1
theoryno3/pygr
tests/annotation_hg18_megatest.py
4
63613
import unittest from testlib import testutil, PygrTestProgram import ConfigParser import os import string import sys from pygr.mapping import Collection import pygr.Data try: import hashlib except ImportError: import md5 as hashlib config = ConfigParser.ConfigParser({'testOutputBaseDir': '.', ...
bsd-3-clause
Alwnikrotikz/volatility
volatility/plugins/overlays/windows/win2003_sp2_x64_vtypes.py
58
337862
ntkrnlmp_types = { 'LIST_ENTRY64' : [ 0x10, { 'Flink' : [ 0x0, ['unsigned long long']], 'Blink' : [ 0x8, ['unsigned long long']], } ], 'LIST_ENTRY32' : [ 0x8, { 'Flink' : [ 0x0, ['unsigned long']], 'Blink' : [ 0x4, ['unsigned long']], } ], '__unnamed_1015' : [ 0x8, { 'LowPart' : [ 0x0, ['unsig...
gpl-2.0
codelv/enaml-native
src/enamlnative/android/android_toggle_button.py
1
1623
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on June 7, 2017 @author: jrm """ from atom.api import Typed, set_default from enamlnative.widgets.toggle_button import ProxyToggleButton from .and...
mit
dbertha/odoo
addons/account/wizard/account_move_line_unreconcile_select.py
385
1864
# -*- 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
LeartS/odoo
addons/stock/res_config.py
61
8107
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
MyAOSP/external_chromium_org
chrome/test/pyautolib/pyauto.py
27
194924
#!/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. """PyAuto: Python Interface to Chromium's Automation Proxy. PyAuto uses swig to expose Automation Proxy interfaces to Python. For comp...
bsd-3-clause
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/rest_framework/tests/test_renderers.py
6
24350
# -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal from django.core.cache import cache from django.db import models from django.test import TestCase from django.utils import unittest from django.utils.translation import ugettext_lazy as _ from rest_framework import status, perm...
agpl-3.0
HackBulgaria/Odin
courses/views.py
1
4037
from datetime import date from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import HttpResponseForbidden, JsonResponse from django.shortcuts import render, get_object_or_404 from django.conf import settings from django.views.decorators.csrf import csrf_exempt fro...
agpl-3.0
douban/pygit2
pygit2/settings.py
3
2226
# -*- coding: utf-8 -*- # # Copyright 2010-2014 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public Li...
gpl-2.0
midnighteuler/BioBayesGraph
BioBayesGraph/examples/sifter/test_sifter_deaminase.py
1
7202
""" Created on Jul 1, 2012 @author: msouza """ import unittest import os import sys import sifter import FunctionModels.Sifter2 from pprint import pprint class Test_Sifter_Deaminase(unittest.TestCase): """ Tests SIFTER inference and leave one out on a toy family. """ def setUp(self): """ ...
gpl-3.0
wallrj/kubernetes
hack/boilerplate/boilerplate.py
300
6214
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
simonsdave/cloudfeaster-services
cloudfeaster_services/main.py
2
9992
"""This module contains an extensible mainline that's used by all Cloudfeaster services. """ import logging import optparse import signal import sys import time import tor_async_util import tornado.httpclient import tornado.httpserver import tornado.web from cloudfeaster_services import __version__ from config impor...
mit
loli10K/linux-hardkernel
scripts/analyze_suspend.py
1537
120394
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
gpl-2.0
RafaelTorrealba/odoo
addons/hr_timesheet_invoice/wizard/__init__.py
433
1159
# -*- 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
t794104/ansible
lib/ansible/plugins/doc_fragments/opennebula.py
44
1422
# -*- coding: utf-8 -*- # Copyright: (c) 2018, www.privaz.io Valletech AB # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # OpenNebula common documentation DOCUMENTATION = r''' options: api_url: description: ...
gpl-3.0
luizcieslak/AlGDock
Example/test_python.py
2
1452
import AlGDock.BindingPMF_plots import os, shutil, glob for run_type in ['cool','dock','postprocess','free_energies']: self = AlGDock.BindingPMF_plots.BPMF_plots(\ dir_dock='dock', dir_cool='cool',\ ligand_tarball='prmtopcrd/ligand.tar.gz', \ ligand_database='ligand.db', \ forcefield='prmtopcrd/gaff....
mit
windskyer/nova
nova/api/openstack/compute/hide_server_addresses.py
32
2998
# Copyright 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 requ...
gpl-2.0
aliceedn/piz-aioli
vendor/doctrine/orm/docs/en/conf.py
2448
6497
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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. ...
bsd-3-clause
atsnyder/ITK
Wrapping/Generators/Python/Tests/notYetUsable/itkCurvatureFlowTestPython2.py
11
3693
#========================================================================== # # Copyright Insight Software Consortium # # 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...
apache-2.0
GraysonP/codecombat-1
scripts/devSetup/which.py
79
2385
__author__ = 'root' #copied from python3 import os import sys def which(cmd, mode=os.F_OK | os.X_OK, path=None): """Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. `mode` defaults to os.F_OK | os.X_OK. `path` def...
mit
writefaruq/lionface-app
django/contrib/gis/gdal/layer.py
12
8701
# Needed ctypes routines from ctypes import c_double, byref # Other GDAL imports. from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope from django.contrib.gis.gdal.error import OGRException, OGRIndexError, SRSException from django.contrib.gis.gdal....
bsd-3-clause
OptiPop/external_chromium_org
tools/findit/match_set.py
26
4358
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re from threading import Lock import crash_utils REVIEW_URL_PATTERN = re.compile(r'Review URL:( *)(.*?)/(\d+)') class Match(object): """Re...
bsd-3-clause
alikins/ansible
lib/ansible/modules/cloud/openstack/os_keystone_endpoint.py
25
6710
#!/usr/bin/python # Copyright: (c) 2017, VEXXHOST, 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': ['pr...
gpl-3.0
notsambeck/siftsite
siftsite/skeleton.py
1
3619
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following line in the entry_points section in setup.cfg: console_scripts = fibonacci = siftsite.skeleton:run Then run `python setup.py ins...
mit
hugheaves/ardupilot-solo
mk/PX4/Tools/gencpp/scripts/gen_cpp.py
214
2168
#!/usr/bin/env python # Software License Agreement (BSD License) # # 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...
gpl-3.0
SimtterCom/gyp
test/actions/gyptest-all.py
243
3677
#!/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. """ Verifies simple actions when using an explicit build target of 'all'. """ import glob import os import TestGyp test = TestGyp.TestGyp(...
bsd-3-clause
sinkuri256/python-for-android
python3-alpha/extra_modules/gdata/Crypto/Cipher/__init__.py
271
1145
"""Secret-key encryption algorithms. Secret-key encryption algorithms transform plaintext in some way that is dependent on a key, producing ciphertext. This transformation can easily be reversed, if (and, hopefully, only if) one knows the key. The encryption modules here all support the interface described in PEP 272...
apache-2.0
omwomotieno/tunza_v3
config/settings/production.py
2
8273
# -*- coding: utf-8 -*- """ Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku - Use sentry for error logging - Use opbeat for error reporting """ from __future__ import absolute_import, unicode_literals fro...
mit
simplyvikram/google-chartwrapper
setup.py
7
2547
from distutils.core import setup CLASSIFIERS = ( ('Development Status :: 5 - Production/Stable'), ('Environment :: Console'), ('Environment :: Web Environment'), ('Framework :: Django'), #('Framework :: Zope3'), #('Framework :: Trac'), #('Framework :: TurboGears :: Widgets'), #('Framewo...
bsd-3-clause
BaconPancakes/valor
lib/pip/_vendor/lockfile/pidlockfile.py
536
6090
# -*- coding: utf-8 -*- # pidlockfile.py # # Copyright © 2008–2009 Ben Finney <ben+python@benfinney.id.au> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Foundation. # No ...
gpl-3.0
martynovp/edx-platform
cms/djangoapps/contentstore/features/problem-editor.py
116
12757
# disable missing docstring # pylint: disable=missing-docstring import json from lettuce import world, step from nose.tools import assert_equal, assert_true # pylint: disable=no-name-in-module from common import type_in_codemirror, open_new_course from advanced_settings import change_value, ADVANCED_MODULES_KEY from ...
agpl-3.0
wakermahmud/sync-engine
inbox/util/consistency_check/__main__.py
6
9625
""" Integrity check debugging tool for IMAP accounts. Run as: python -m inbox.util.consistency_check --help """ from __future__ import absolute_import, division, print_function import argparse import errno import os import pkg_resources import subprocess import sys from fnmatch import fnmatch from inbox.models...
agpl-3.0
0-wiz-0/audacity
lib-src/lv2/lv2/plugins/eg-sampler.lv2/waflib/Configure.py
181
9880
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,shlex,sys,time from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors try: from urllib import request except ImportError: from urllib import urlopen ...
gpl-2.0
Hairo/trackma
trackma/ui/curses.py
1
40982
# This file is part of Trackma. # # 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
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/reportlab-3.2.0/src/reportlab/pdfbase/_fontdata_widths_courieroblique.py
224
3664
widths = {'A': 600, 'AE': 600, 'Aacute': 600, 'Acircumflex': 600, 'Adieresis': 600, 'Agrave': 600, 'Aring': 600, 'Atilde': 600, 'B': 600, 'C': 600, 'Ccedilla': 600, 'D': 600, 'E': 600, 'Eacute': 600, 'Ecircumflex': 600, 'Edieresis': 600, 'Egrave': 600, 'Eth': 600, 'Euro': 600, 'F': 600, 'G': 600, '...
mit
newerthcom/savagerebirth
libs/python-2.72/Lib/plat-mac/gensuitemodule.py
40
44464
""" gensuitemodule - Generate an AE suite module from an aete/aeut resource Based on aete.py. Reading and understanding this code is left as an exercise to the reader. """ from warnings import warnpy3k warnpy3k("In 3.x, the gensuitemodule module is removed.", stacklevel=2) import MacOS import EasyDialogs import os ...
gpl-2.0
hefen1/chromium
third_party/closure_compiler/checker.py
1
10762
#!/usr/bin/python # 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. """Runs Closure compiler on a JavaScript file to check for errors.""" import argparse import os import re import subprocess import sys imp...
bsd-3-clause
vauxoo-dev/docker-odoo-image
build.py
1
2810
# coding: utf-8 """Check if any file has changed and then build this Dockerfile""" import os import sys import subprocess import argparse class DockerOdooImages(object): """Class to build if has changed any file""" def __init__(self, folder, docker_image): """Init method folder : Folder to c...
gpl-2.0
vdods/fabric
bddtests/steps/peer_rest_impl.py
11
1869
# # Copyright IBM Corp. 2016 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 ...
apache-2.0
dalepartridge/seapy
roms/interp.py
1
32584
#!/usr/bin/env python """ roms.interp Methods to interpolate ROMS fields onto other grids Written by Brian Powell on 11/02/13 Copyright (c)2017 University of Hawaii under the BSD-License. """ import numpy as np import netCDF4 import os import seapy from seapy.timeout import timeout, TimeoutError from joblib...
mit
WillamLi/itool
mysql_tool/mysql_concat/test.py
1
2436
#!/bin/python #coding=utf-8 import MySQLdb import sys from optparse import OptionParser user_value="reboot" pass_value='reboot123' port_value=3306 def CHECK_ARGV(): argv_dict = {} usage = "usage: %prog [options] arg1 arg2" parser = OptionParser(usage) parser.add_option("-H","--host",dest="hostn...
gpl-2.0
alvin319/CarnotKE
jyhton/lib-python/2.7/multiprocessing/queues.py
103
12318
# # Module implementing queues # # multiprocessing/queues.py # # Copyright (c) 2006-2008, R Oudkerk # 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 ret...
apache-2.0
rmoorman/feedhq
feedhq/reader/authentication.py
2
1407
from django.core.cache import cache from rest_framework.authentication import (BaseAuthentication, get_authorization_header) from ..profiles.models import User from .exceptions import PermissionDenied from .models import check_auth_token class GoogleLoginAuthentication(Base...
bsd-3-clause
taaviteska/django
tests/staticfiles_tests/test_storage.py
24
26035
import os import shutil import sys import tempfile import unittest from io import StringIO from django.conf import settings from django.contrib.staticfiles import finders, storage from django.contrib.staticfiles.management.commands.collectstatic import \ Command as CollectstaticCommand from django.core.cache.backe...
bsd-3-clause
daevaorn/sentry
src/sentry/migrations/0034_auto__add_groupbookmark__add_unique_groupbookmark_project_user_group.py
36
14391
# 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 'GroupBookmark' db.create_table('sentry_groupbookmark', ( ('id', self.gf('sentry.db.mod...
bsd-3-clause
isotoma/django-cms
cms/migrations/0016_author_copy.py
525
20033
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
bsd-3-clause
YangLiu928/NDP_Projects
Python_Projects/Python_MySQL/pipe_delimit_2014_FTD/pipe_delimition.py
1
1719
import codecs from os.path import join,isfile,isdir from os import mkdir def get_intervals(layout): results = [] layout = codecs.open(layout,'r') count = 0 for line in layout: count = count + 1 if count < 8: continue if line.strip()=='': continue # print line.split(' ') numbers = '' segment...
mit
supergis/micropython
drivers/onewire/onewire.py
66
11789
""" OneWire library ported to MicroPython by Jason Hildebrand. TODO: * implement and test parasite-power mode (as an init option) * port the crc checks The original upstream copyright and terms follow. ------------------------------------------------------------------------------ Copyright (c) 2007, Jim Studt ...
mit
retsu0/FFmepg-Android
jni/x264/tools/test_x264.py
138
16077
#!/usr/bin/env python import operator from optparse import OptionGroup import sys from time import time from digress.cli import Dispatcher as _Dispatcher from digress.errors import ComparisonError, FailedTestError, DisabledTestError from digress.testing import depends, comparer, Fixture, Case from digress.comparer...
mit
maestrano/odoo
addons/resource/faces/task.py
433
126405
#@+leo-ver=4 #@+node:@file task.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; ...
agpl-3.0
mjfarmer/scada_py
env/lib/python2.7/site-packages/twisted/internet/_win32serialport.py
19
4617
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Serial port support for Windows. Requires PySerial and pywin32. """ from __future__ import division, absolute_import # system imports from serial import PARITY_NONE from serial import STOPBITS_ONE from serial import EIGHTBITS import win32fi...
gpl-3.0
digris/openbroadcast.org
website/tools/l10n/models.py
2
5224
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.conf import settings CONTINENTS = ( ("AF", _("Africa")), ("NA", _("North America")), ...
gpl-3.0
tiagofrepereira2012/tensorflow
tensorflow/contrib/keras/python/keras/losses_test.py
27
3551
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
pauloschilling/sentry
src/sentry/models/releasefile.py
20
1259
""" sentry.models.releasefile ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.db import models from hashlib import sha1 from sentry.db.models import FlexibleForei...
bsd-3-clause
kobejean/tensorflow
tensorflow/contrib/distribute/python/input_ops_test.py
7
9593
# Copyright 2018 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
jarshwah/django
django/contrib/contenttypes/migrations/0002_remove_content_type_name.py
582
1168
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def add_legacy_name(apps, schema_editor): ContentType = apps.get_model('contenttypes', 'ContentType') for ct in ContentType.objects.all(): try: ct.name = apps.get_model(ct.app_label, c...
bsd-3-clause
scrollback/kuma
vendor/lib/python/taggit/models.py
12
5092
import django from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic import GenericForeignKey from django.db import models, IntegrityError, transaction from django.template.defaultfilters import slugify as default_slugify from django.utils.translation import ugettext_lazy as...
mpl-2.0
enriclluelles/ansible-modules-extras
notification/sns.py
8
5738
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Michael J. Schultz <mjschultz@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 ...
gpl-3.0
packages/psutil
examples/nettop.py
11
4712
#!/usr/bin/env python # # $Id: iotop.py 1160 2011-10-14 18:50:36Z g.rodola@gmail.com $ # # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Shows real-time network statistics. Author: Giampaolo Rodola'...
bsd-3-clause
nanolearning/edx-platform
lms/djangoapps/certificates/migrations/0001_added_generatedcertificates.py
188
6863
# -*- 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): # Adding model 'GeneratedCertificate' db.create_table('certificates_generatedcertificate', ( ('i...
agpl-3.0
yamila-moreno/nikola
nikola/plugins/command/install_theme.py
9
6202
# -*- coding: utf-8 -*- # Copyright © 2012-2015 Roberto Alsina and others. # 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 t...
mit
trishnaguha/ansible
lib/ansible/modules/network/fortios/fortios_system_sdn_connector.py
7
18926
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # 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 Lic...
gpl-3.0
resba/gnuradio
gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py
11
7437
#!/usr/bin/env python # # Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at you...
gpl-3.0
Oliver2213/NVDAYoutube-dl
addon/globalPlugins/nvdaYoutubeDL/youtube_dl/extractor/senateisvp.py
19
6075
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, unsmuggle_url, ) from ..compat import ( compat_parse_qs, compat_urlparse, ) class SenateISVPIE(InfoExtractor): _COMM_MAP = [ ["ag", "76440", "http://ag...
gpl-2.0
sylvan5/PRML
ch5/digits.py
2
2415
#coding:utf-8 import numpy as np from mlp import MultiLayerPerceptron from sklearn.datasets import load_digits from sklearn.cross_validation import train_test_split from sklearn.preprocessing import LabelBinarizer from sklearn.metrics import confusion_matrix, classification_report """ 簡易手書き数字データの認識 scikit-learnのインストール...
mit
alexryndin/ambari
ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/PIG/package/scripts/pig_client.py
4
1154
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
apache-2.0
shsingh/ansible
test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/action/net_get.py
47
6707
# (c) 2018, Ansible Inc, # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is di...
gpl-3.0
tareqalayan/ansible
lib/ansible/modules/cloud/cloudstack/cs_disk_offering.py
24
11291
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2018, David Passante <@dpassante> # (c) 2017, René Moser <mail@renemoser.net> # 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_M...
gpl-3.0
dendisuhubdy/tensorflow
tensorflow/contrib/distributions/python/ops/vector_laplace_diag.py
3
8336
# 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
mrquim/repository.mrquim
plugin.video.mrpiracy/resources/lib/js2py/legecy_translators/nodevisitor.py
54
15965
from jsparser import * from utils import * import re from utils import * #Note all white space sent to this module must be ' ' so no '\n' REPL = {} #PROBLEMS # <<=, >>=, >>>= # they are unusual so I will not fix that now. a++ +b works fine and a+++++b (a++ + ++b) does not work even in V8 ASSIGNMENT_MATCH = '(?<!=|!...
gpl-2.0
bluemurder/mlfl
config.py
1
3279
version = "1.0" start_date = '2009-01-01' # Start date for all the computations ref_symbol = 'ETFMIB.MI' # Symbol used to map main market (SPY, ETFMIB,...) test_portfolio = ['STS.MI', 'ENEL.MI', 'SFER.MI'] ftsemib_symbols = ['A2A.MI', 'ATL.MI', 'BMPS.MI', 'BAMI.MI', 'BMED.MI', 'BPE.MI', 'BRE.MI', 'BZU.MI', 'CPR.MI', ...
mit
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/theano/scan_module/scan.py
3
48450
""" This module provides the Scan Op. Scanning is a general form of recurrence, which can be used for looping. The idea is that you *scan* a function along some input sequence, producing an output at each time-step that can be seen (but not modified) by the function at the next time-step. (Technically, the function ca...
mit
noroutine/ansible
lib/ansible/modules/cloud/google/gce_snapshot.py
122
6781
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: Ansible Project # 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
myself659/linux
tools/perf/scripts/python/check-perf-trace.py
1997
2539
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
MaralAfris/wasp-summer-school-team6
drone/bebop_controller/src/PID.py
2
1594
from copy import deepcopy import numpy from PIDParameters import * class PID(object): def __init__(self): p = PIDParameters() p.Beta = 1.0 p.H = 0.05 p.integratorOn = False p.K = 0.25 # start 0.1 # used to be 0.20 p.N = 10 p.Td = 0.0 # start 0.1 p...
gpl-3.0
NeuralSpaz/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/codingstatemachine.py
2931
2318
######################## 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...
lgpl-2.1
HBEE/odoo-addons
sale_require_purchase_order_number/__openerp__.py
2
1599
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
MalloyDelacroix/DownloaderForReddit
Tests/unittests/core/test_content_filter.py
1
5834
from unittest import TestCase from unittest.mock import MagicMock from DownloaderForReddit.core.content_filter import ContentFilter from DownloaderForReddit.database.database_handler import DatabaseHandler from DownloaderForReddit.utils import injector from Tests.mockobjects.mock_objects import (get_user, get_post, ge...
gpl-3.0
JamesAng/oe
lib/oe/types.py
25
3409
import re class OEList(list): """OpenEmbedded 'list' type Acts as an ordinary list, but is constructed from a string value and a separator (optional), and re-joins itself when converted to a string with str(). Set the variable type flag to 'list' to use this type, and the 'separator' flag may be ...
mit
13xforever/webserver
qa/141-FastCGI-EmptyVars.py
8
1608
import os from base import * DIR = "/FCGI-EmptyVars/" MAGIC = "Cherokee and FastCGI rocks!" PORT = get_free_port() PYTHON = look_for_python() SCRIPT = """ from fcgi import * def app (environ, start_response): start_response('200 OK', [("Content-Type", "text/plain")]) resp = "" for k in environ: ...
gpl-2.0
alanjw/GreenOpenERP-Win-X86
openerp/addons/crm_todo/__init__.py
66
1071
# -*- 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
ApuliaSoftware/odoo
openerp/addons/base/tests/test_basecase.py
379
3895
# -*- coding: utf-8 -*- import unittest2 from openerp.tests import common class test_single_transaction_case(common.SingleTransactionCase): """ Check the whole-class transaction behavior of SingleTransactionCase. """ def test_00(self): """Create a partner.""" cr, uid = self.cr, self.u...
agpl-3.0
krieger-od/nwjs_chromium.src
third_party/pycoverage/coverage/bytecode.py
209
2036
"""Bytecode manipulation for coverage.py""" import opcode, types from coverage.backward import byte_to_int class ByteCode(object): """A single bytecode.""" def __init__(self): # The offset of this bytecode in the code object. self.offset = -1 # The opcode, defined in the `opcode` mod...
bsd-3-clause
kai11/ansible-modules-core
cloud/amazon/ec2_vol.py
50
15330
#!/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
dkodnik/Ant
addons/l10n_gt/__openerp__.py
170
2385
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009-2010 Soluciones Tecnologócias Prisma S.A. All Rights Reserved. # José Rodrigo Fernández Menegazzo, Soluciones Tecnologócias Prisma S.A. # (http://www.solucionesprisma.com) # # This program is ...
agpl-3.0
goodfeli/pylearn2
pylearn2/datasets/vector_spaces_dataset.py
41
6009
"""TODO: module-level docstring.""" __authors__ = "Pascal Lamblin and Razvan Pascanu" __copyright__ = "Copyright 2010-2013, Universite de Montreal" __credits__ = ["Pascal Lamblin", "Razvan Pascanu", "Ian Goodfellow", "Mehdi Mirza"] __license__ = "3-clause BSD" __maintainer__ = "Pascal Lamblin" __email__ ...
bsd-3-clause
kkoksvik/FreeCAD
src/Mod/Ship/shipCapacityCurve/PlotAux.py
8
5494
#*************************************************************************** #* * #* Copyright (c) 2011, 2016 * #* Jose Luis Cercos Pita <jlcercos@gmail.com> * #* ...
lgpl-2.1
eusi/MissionPlanerHM
Lib/site-packages/scipy/optimize/linesearch.py
55
17394
from scipy.optimize import minpack2 import numpy as np from numpy.compat import asbytes __all__ = ['line_search_wolfe1', 'line_search_wolfe2', 'scalar_search_wolfe1', 'scalar_search_wolfe2', 'line_search_armijo'] #------------------------------------------------------------------------------ # M...
gpl-3.0
DarkPurpleShadow/ConnectFour
urwid/main_loop.py
2
41354
#!/usr/bin/python # # Urwid main loop code # Copyright (C) 2004-2012 Ian Ward # Copyright (C) 2008 Walter Mundt # Copyright (C) 2009 Andrew Psaltis # # 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 ...
bsd-3-clause