repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
SmarTS-Lab/OpenIPSL
CI/CITests.py
4
2135
import os from OMPython import OMCSessionZMQ class CITests(): ''' Python class used to run CI tests ''' def __init__(self, rootPath): ''' Constructor starts omc and loads MSL ''' self.rootPath = rootPath self.omc = OMCSessionZMQ() os.chdir(self.rootPath) ...
mpl-2.0
ProjectQ-Framework/ProjectQ
projectq/ops/_metagates_test.py
1
9268
# -*- coding: utf-8 -*- # Copyright 2017 ProjectQ-Framework (www.projectq.ch) # # 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
pelya/commandergenius
project/jni/python/src/Tools/scripts/svneol.py
94
2931
#! /usr/bin/env python """ SVN helper script. Try to set the svn:eol-style property to "native" on every .py, .txt, .c and .h file in the directory tree rooted at the current directory. Files with the svn:eol-style property already set (to anything) are skipped. svn will itself refuse to set this property on a file...
lgpl-2.1
alkaitz/starloot
src/gameengine/webSocketServer/lib/tornado-3.0.1/demos/s3server/s3server.py
10
9692
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
adminneyk/codificacionproyectando
application/views/Generacion/Generacion/lib/openoffice/openoffice.org/basis3.4/program/python-core-2.6.1/lib/hotshot/__init__.py
215
2670
"""High-perfomance logging profiler, mostly written in C.""" import _hotshot from _hotshot import ProfilerError from warnings import warnpy3k as _warnpy3k _warnpy3k("The 'hotshot' module is not supported in 3.x, " "use the 'profile' module instead.", stacklevel=2) class Profile: def __init__(self, logf...
mit
Changaco/oh-mainline
vendor/packages/twisted/twisted/test/test_text.py
18
5440
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.python import text import string from cStringIO import StringIO sampleText = \ """Every attempt to employ mathematical methods in the study of chemical questions must be considered profoundly irr...
agpl-3.0
Ant-OS/android_packages_apps_OTAUpdates
jni/boost_1_57_0/tools/build/src/tools/types/lib.py
71
2703
# Status: ported # Base revision: 64456. # Copyright David Abrahams 2004. # Copyright Vladimir Prus 2010. # Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import b2.build.type as type # The following naming scheme ...
apache-2.0
rossant/galry
experimental/fireworks.py
1
4794
from galry import * import pylab as plt import numpy as np import numpy.random as rdn import time import timeit import os from OpenGL import GL as gl class ParticleVisual(Visual): def get_position_update_code(self): return """ // update position position.x += velocities.x * tloc; p...
bsd-3-clause
liyi193328/seq2seq
seq2seq/data/postproc.py
7
1619
# -*- coding: utf-8 -*- # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
ccrook/Quantum-GIS
python/plugins/processing/algs/grass7/ext/i_gensig.py
5
1761
# -*- coding: utf-8 -*- """ *************************************************************************** i_gensig.py ----------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ***************************************...
gpl-2.0
JavML/django
tests/postgres_tests/fields.py
302
1087
""" Indirection layer for PostgreSQL-specific fields, so the tests don't fail when run with a backend other than PostgreSQL. """ from django.db import models try: from django.contrib.postgres.fields import ( ArrayField, BigIntegerRangeField, DateRangeField, DateTimeRangeField, FloatRangeField, HSto...
bsd-3-clause
simmetria/sentry
src/sentry/web/frontend/projects.py
1
12321
""" sentry.web.frontend.projects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from crispy_forms.helper import FormHelper from django.core.context_processors import csrf from django.core.urlresolvers import reverse f...
bsd-3-clause
garrettcap/Bulletproof-Backup
wx/lib/pdfviewer/bezier.py
3
2012
# Name: bezier.py # Package: wx.lib.pdfviewer # # Purpose: Compute Bezier curves for PDF rendered using wx.DC # Adapted from the original source code, see below. # # Author: David Hughes dfh@forestfield.co.uk # Copyright: Forestfield Software Ltd # Licence: Public doma...
gpl-2.0
kawamon/hue
desktop/core/ext-py/django-extensions-1.8.0/django_extensions/management/commands/runjobs.py
7
3445
# -*- coding: utf-8 -*- from django.apps import apps from django.core.management.base import BaseCommand from django_extensions.management.jobs import get_jobs, print_jobs from django_extensions.management.utils import signalcommand class Command(BaseCommand): help = "Runs scheduled maintenance jobs." when_...
apache-2.0
Aloomaio/googleads-python-lib
examples/ad_manager/v201805/report_service/run_report_and_create_match_table.py
1
3150
#!/usr/bin/env python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
askeing/fxos-certsuite
mcts/webapi_tests/semiauto/runner.py
6
3105
# 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 collections import sys import unittest from moztest.adapters.unit import StructuredTestRunner from mcts.webapi_...
mpl-2.0
vietch2612/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/scm/detection.py
164
3834
# Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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 reta...
bsd-3-clause
taedori81/shoop
shoop/addons/admin_module/__init__.py
1
1677
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.utils.translation import ugettext_lazy as _ from shoop.admin.ba...
agpl-3.0
stamparm/tsusen
core/httpd.py
1
12666
#!/usr/bin/env python """ Copyright (c) 2015-2016 Miroslav Stampar (@stamparm) See the file 'LICENSE' for copying permission """ import BaseHTTPServer import csv import cStringIO import datetime import httplib import json import mimetypes import glob import gzip import os import re import socket import SocketServer i...
mit
egabancho/invenio
invenio/modules/upgrader/upgrades/invenio_2013_11_12_new_param_websubmit_function.py
3
1227
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
gpl-2.0
napalm-automation/napalm-yang
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls/config/__init__.py
1
12287
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
apache-2.0
theguardian/LazyLibrarian_Old
cherrypy/lib/jsontools.py
5
3684
import sys import cherrypy from cherrypy._cpcompat import basestring, ntou, json, json_encode, json_decode def json_processor(entity): """Read application/json data into request.json.""" if not entity.headers.get(ntou("Content-Length"), ntou("")): raise cherrypy.HTTPError(411) body = entity.fp...
gpl-3.0
sgraham/nope
tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py
44
12697
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Unit tests for grit.format.policy_templates.writers.plist_strings_writer''' import os import sys if __name__ == '__main__': ...
bsd-3-clause
pradyu1993/scikit-learn
sklearn/covariance/outlier_detection.py
1
6766
""" Class for outlier detection. This class provides a framework for outlier detection. It consists in several methods that can be added to a covariance estimator in order to assess the outlying-ness of the observations of a data set. Such a "outlier detector" object is proposed constructed from a robust covariance es...
bsd-3-clause
Matt-Deacalion/django
tests/utils_tests/test_http.py
78
7444
from __future__ import unicode_literals import sys import unittest from datetime import datetime from django.utils import http, six from django.utils.datastructures import MultiValueDict class TestUtilsHttp(unittest.TestCase): def test_urlencode(self): # 2-tuples (the norm) result = http.urlenc...
bsd-3-clause
peterzdeb/torrent-gateway
src/python/bin/process_all.py
1
1438
import logging import os import sys PROD_ROOT = os.environ.get('PROD_ROOT', os.getcwd()) sys.path.append(os.path.join(PROD_ROOT, 'src', 'python')) from core.utils import remove_xdc from processors.file_analyzer import FileAnalyzer if __name__ == '__main__': logging.basicConfig(filename='/var/log/torrent_gw.log'...
bsd-3-clause
bybyby/shadowsocks
shadowsocks/lru_cache.py
983
4290
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
starcraftman/python-client
test/test_vim.py
2
4492
# -*- coding: utf-8 -*- import os, tempfile from nose.tools import with_setup, eq_ as eq, ok_ as ok from common import vim, cleanup def source(code): fd, fname = tempfile.mkstemp() with os.fdopen(fd,'w') as f: f.write(code) vim.command('source '+fname) os.unlink(fname) @with_setup(setup=clean...
apache-2.0
cortedeltimo/SickRage
lib/rtorrent/lib/xmlrpc/scgi.py
14
7949
#!/usr/bin/python # rtorrent_xmlrpc # (c) 2011 Roger Que <alerante@bellsouth.net> # # Modified portions: # (c) 2013 Dean Gardiner <gardiner91@gmail.com> # # Python module for interacting with rtorrent's XML-RPC interface # directly over SCGI, instead of through an HTTP server intermediary. # Inspired by Glenn Washburn...
gpl-3.0
hyperized/ansible
lib/ansible/module_utils/network/frr/providers/providers.py
114
3943
# # (c) 2019, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # import json from threading import RLock from ansible.module_utils.six import itervalues from ansible.module_utils.network.common.utils import to_list from ansible.module_utils.network.c...
gpl-3.0
kawamon/hue
desktop/core/ext-py/Django-1.11.29/django/conf/locale/it/formats.py
504
2079
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' # 25 Ottobre 2006 TIME_FO...
apache-2.0
mdehollander/bioconda-recipes
recipes/phylip/phylip.py
48
8900
#!/usr/bin/env python # # Wrapper script for phylip program when installed from # bioconda. Adapted from shell scripts provided in the biolbuilds # conda recipe by Cheng H. Lee. import sys import os import subprocess def main(): print("running main") print(sys.argv) bindir = get_script_path(sys.argv[0]) ...
mit
jmighion/ansible
test/legacy/cleanup_ec2.py
149
6962
''' Find and delete AWS resources matching the provided --match string. Unless --yes|-y is provided, the prompt for confirmation prior to deleting resources. Please use caution, you can easily delete you're *ENTIRE* EC2 infrastructure. ''' import boto import boto.ec2.elb import optparse import os import os.path impor...
gpl-3.0
jamesob/bitcoin
test/functional/p2p_eviction.py
15
5741
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test node eviction logic When the number of peers has reached the limit of maximum connections, the ...
mit
malayaleecoder/servo
tests/wpt/harness/wptrunner/browsers/chrome.py
99
2845
# 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/. from .base import Browser, ExecutorBrowser, require_arg from ..webdriver_server import ChromeDriverServer from ..executo...
mpl-2.0
newswangerd/ansible
lib/ansible/__init__.py
23
1299
# (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
denisshockwave/image_processing_ocr_server
venv/lib/python2.7/site-packages/jinja2/environment.py
332
48120
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import BLOCK_S...
gpl-3.0
HarllanAndrye/nilmtk
nilmtk/elecmeter.py
5
30305
from __future__ import print_function, division from warnings import warn from collections import namedtuple from copy import deepcopy from itertools import izip import numpy as np import pandas as pd import matplotlib.pyplot as plt import random from .preprocessing import Clip from .stats import TotalEnergy, GoodSecti...
apache-2.0
Akylas/zxing
cpp/scons/scons-local-2.0.0.final.0/SCons/Scanner/LaTeX.py
34
15021
"""SCons.Scanner.LaTeX This module implements the dependency scanner for LaTeX code. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation f...
apache-2.0
hongliang5623/sentry
src/sentry/migrations/0138_migrate_team_members.py
30
30381
# -*- coding: utf-8 -*- import datetime from collections import defaultdict from south.db import db from south.v2 import DataMigration from django.db import IntegrityError, models, transaction class Migration(DataMigration): def forwards(self, orm): from sentry.utils.query import ( RangeQueryS...
bsd-3-clause
ECP-CANDLE/Benchmarks
common/darts/modules/mixed_layer.py
1
1592
import torch import torch.nn as nn import torch.nn.functional as F from darts.api import Model class MixedLayer(Model): """ A mixture of 8 unit types We use weights to aggregate these outputs while training. and softmax to select the strongest edges while inference. """ def __init__(self, c, str...
mit
j00bar/ansible
lib/ansible/plugins/callback/foreman.py
47
7209
# -*- coding: utf-8 -*- # (C) 2015, 2016 Daniel Lobato <elobatocs@gmail.com> # 2016 Guido Günther <agx@sigxcpu.org> # # 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 Foundati...
gpl-3.0
jtpedersen/Maze-o-tron
gmock-1.7.0/test/gmock_output_test.py
986
5999
#!/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...
gpl-3.0
Tokutek/tokudb-engine
mysql-test/suite/tokudb/t/change_column_int_not_supported.py
56
1592
#!/usr/bin/env python import sys def supported(from_int, from_modifier, to_int, to_modifer): if from_modifier != to_modifer: return False if from_int > to_int: return False return True def gen_tests_for_int(from_int, from_modifier, int_types, modifiers): for to_int in range(len(int_types...
gpl-2.0
kaeff/pixelated-user-agent
service/pixelated/adapter/mailstore/body_parser.py
1
2298
# # Copyright (c) 2015 ThoughtWorks, Inc. # # Pixelated is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Pixelated is distrib...
agpl-3.0
lsst/sims_catalogs_generation
python/lsst/sims/catalogs/generation/deprecated/jobAllocator/myJobTracker.py
2
2951
import sys, random, time from lsst.sims.catalogs.generation.db import jobDB def howManyJobs(eM, jobid): t0 = eM.queryState(jobid + '_NumJobs') if t0 == None: t0 = 0 else: t0 = int(t0) return t0 def qsubJob(eM, stateKey, jobid): t0 = howManyJobs(eM, jobid) print 'AddedJob: Current number of act...
gpl-3.0
papouso/odoo
openerp/addons/base/res/res_request.py
342
1677
# -*- 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
openstack/cloudbase-init
cloudbaseinit/tests/plugins/common/userdataplugins/test_shellscript.py
4
3275
# Copyright 2013 Cloudbase Solutions Srl # # 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 l...
apache-2.0
miles0411/pm
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py
679
3293
import socket try: from select import poll, POLLIN except ImportError: # `poll` doesn't exist on OSX and other platforms poll = False try: from select import select except ImportError: # `select` doesn't exist on AppEngine. select = False def is_connection_dropped(conn): # Platform-...
apache-2.0
nwjs/chromium.src
third_party/protobuf/python/google/protobuf/internal/testing_refleaks.py
25
4659
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
bsd-3-clause
indictranstech/focal-erpnext
support/doctype/newsletter/newsletter.py
31
4539
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.utils from frappe.utils import cstr from frappe import throw, _ from frappe.model.document import Document import erpnex...
agpl-3.0
h3biomed/ansible
lib/ansible/modules/cloud/amazon/s3_website.py
39
10634
#!/usr/bin/python # 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', 'status': ['preview'], ...
gpl-3.0
bank-netforce/netforce
netforce_support/setup.py
4
1260
#!/usr/bin/env python3 # Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, co...
mit
buqing2009/MissionPlanner
Lib/imaplib.py
55
49183
"""IMAP4 client. Based on RFC 2060. Public class: IMAP4 Public variable: Debug Public functions: Internaldate2tuple Int2AP ParseFlags Time2Internaldate """ # Author: Piers Lauder <piers@cs.su.oz.au> December 19...
gpl-3.0
Elandril/Sick-Beard
cherrypy/lib/caching.py
35
15405
import datetime import threading import time import cherrypy from cherrypy.lib import cptools, httputil class Cache(object): def get(self): raise NotImplemented def put(self, obj, size): raise NotImplemented def delete(self): raise NotImplemented ...
gpl-3.0
gwsu2008/automation
python/apa-branch-diff.py
1
2959
#!/usr/bin/env python3 import urllib3 import sys import os import json import re from datetime import datetime import urllib.parse import requests import time urllib3.disable_warnings() projects_url = 'https://bitbucket.test.com/rest/api/1.0/projects' project_key = 'AMA' batch_size = 100 workspace = os.getenv('WORKSPA...
gpl-2.0
mengxn/tensorflow
tensorflow/python/kernel_tests/matrix_solve_ls_op_test.py
80
8075
# Copyright 2015 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
slisson/intellij-community
python/testData/MockSdk2.7/Lib/__future__.py
257
4380
"""Record of phased-in incompatible language changes. Each line is of the form: FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," CompilerFlag ")" where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples of the same form as sys.version_info: (...
apache-2.0
CoCoMol/CoCoPy
modules/experiment/drivers/srsDG645.py
20
1453
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # CoCoPy - A python toolkit for rotational spectroscopy # # Copyright (c) 2013 by David Schmitz (david.schmitz@chasquiwan.de). # # Permission is hereby granted, free of charge, to any person obt...
mit
vicente-gonzalez-ruiz/QSVC
trunk/src/old_py/synthesize_COPIA_SIN_LIST.py
1
4032
#!/usr/bin/python # -*- coding: iso-8859-15 -*- # synthesize.py # # Deshace la transformación temporal. import os import sys from GOP import GOP from subprocess import check_call from subprocess import CalledProcessError from MCTF_parser import MCTF_parser SEARCH_RANGE_MAX = 128 block_overlaping = 0 block_size = 16...
gpl-2.0
def-/commandergenius
project/jni/python/src/Lib/ctypes/macholib/dyld.py
253
5341
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### """ dyld emulation """ import os from framework import framework_info from dylib import dylib_info from it...
lgpl-2.1
cevaris/pants
src/python/pants/goal/aggregated_timings.py
13
1740
# 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
edermartioli/ExoplanetLight
src/test/exoplanetInfo.py
1
2002
#!/opt/anaconda/bin/python # -*- coding: iso-8859-1 -*- """ --> !#/usr/bin/python Created on Nov 22 2016 Description: A module to test the ExoplanetLight libraries @author: Eder Martioli <emartioli@lna.br> Laboratorio Nacional de Astrofisica, Brazil. Simple usage example: ...
mit
akarki15/mozillians
vendor-local/lib/python/south/orm.py
119
15142
""" South's fake ORM; lets you not have to write SQL inside migrations. Roughly emulates the real Django ORM, to a point. """ from __future__ import print_function import inspect from django.db import models from django.db.models.loading import cache from django.core.exceptions import ImproperlyConfigured from sout...
bsd-3-clause
dtysky/Gal2Renpy
Gal2Renpy/Main.py
1
7524
#coding:utf-8 ################################# #Copyright(c) 2014 dtysky ################################# import sys import os import pickle from G2R import * from G2R.ReadBlock import * FileAll=[] Files=[] FS=MyFS() FO=MyFS() US=UserSource('../') UT=UserTag(US) TxtC=TextCreat() SpC=SpCreat() Tmp=TmpC() sys.path...
mit
museomix/2013_Quebec_thermoscope
raspberry/pygame-1.9.1release/examples/scrap_clipboard.py
8
2693
#!/usr/bin/env python """ Demonstrates the clipboard capabilities of pygame. """ import os import pygame from pygame.locals import * import pygame.scrap as scrap import StringIO def usage (): print ("Press the 'g' key to get all of the current clipboard data") print ("Press the 'p' key to put a string into th...
mit
kaushik94/boto
boto/datapipeline/layer1.py
10
29008
# Copyright (c) 2013 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 without restriction, including # without limitation the rights ...
mit
grap/OpenUpgrade
addons/account_budget/wizard/__init__.py
444
1196
# -*- 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
IljaGrebel/OpenWrt-SDK-imx6_HummingBoard
staging_dir/host/lib/scons-2.3.5/SCons/Platform/win32.py
1
15007
"""SCons.Platform.win32 Platform-specific initialization for Win32 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 - 2015 The SCons Foundation # # Permission is hereby...
gpl-2.0
deadRaccoons/MameAirlines
tabo/cherrypy/cherrypy/_cperror.py
57
22680
"""Exception classes for CherryPy. CherryPy provides (and uses) exceptions for declaring that the HTTP response should be a status other than the default "200 OK". You can ``raise`` them like normal Python exceptions. You can also call them and they will raise themselves; this means you can set an :class:`HTTPError<ch...
gpl-2.0
pombredanne/pyjnius
docs/source/conf.py
13
7792
# -*- coding: utf-8 -*- # # Pyjnius documentation build configuration file, created by # sphinx-quickstart on Thu Aug 16 11:38:14 2012. # # 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. # # All...
mit
mattseymour/django
tests/swappable_models/tests.py
2
1786
from io import StringIO from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core import management from django.test import TestCase, override_settings from .models import Article class SwappableModelTests(TestCase): @override_settings(TEST_AR...
bsd-3-clause
Communities-Communications/cc-odoo
addons/base_import_module/models/ir_module.py
238
4795
import logging import os import sys import zipfile from os.path import join as opj import openerp from openerp.osv import osv from openerp.tools import convert_file from openerp.tools.translate import _ _logger = logging.getLogger(__name__) MAX_FILE_SIZE = 100 * 1024 * 1024 # in megabytes class view(osv.osv): _...
agpl-3.0
Funtimezzhou/TradeBuildTools
Document/szse/Quantitative Trading/sat-ebook-and-full-source-20150618/algo-ebook-full-source-code-20150618/chapter14/performance.py
5
1431
#!/usr/bin/python # -*- coding: utf-8 -*- # performance.py from __future__ import print_function import numpy as np import pandas as pd def create_sharpe_ratio(returns, periods=252): """ Create the Sharpe ratio for the strategy, based on a benchmark of zero (i.e. no risk-free rate information). P...
gpl-3.0
mhallin/knitty-gritty
knittygritty/util.py
1
2068
def nibble_bits(ns): '''Convert a stream of 4 bit numbers to a stream of bits >>> list(nibble_bits([1, 2])) [0, 0, 0, 1, 0, 0, 1, 0] ''' for n in ns: yield (n & 0x8) >> 3 yield (n & 0x4) >> 2 yield (n & 0x2) >> 1 yield (n & 0x1) >> 0 def to_nibbles(bs): '''Con...
bsd-3-clause
Kubuxu/cjdns
node_build/dependencies/libuv/build/gyp/test/mac/gyptest-identical-name.py
94
1547
#!/usr/bin/env python # Copyright (c) 2014 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 libraries (in identical-names) are properly handeled by xcode. The names for all libraries participating in this build are: li...
gpl-3.0
pombredanne/btnet
beautifulsoup4-4.3.2/bs4/__init__.py
417
15401
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate...
gpl-2.0
angstwad/ansible
lib/ansible/plugins/callback/syslog_json.py
54
2725
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import logging import logging.handlers import socket from ansible.plugins.callback import CallbackBase class CallbackModule(CallbackBase): """ logs ansible-playbook a...
gpl-3.0
balanced/wtforms
wtforms/ext/sqlalchemy/validators.py
4
1073
from wtforms import ValidationError from sqlalchemy.orm.exc import NoResultFound class Unique(object): """Checks field value unicity against specified table field. :param get_session: A function that return a SQAlchemy Session. :param model: The model to check unicity against. :param ...
bsd-3-clause
evensonbryan/yocto-autobuilder
lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/schedulers/base.py
4
19387
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
mancoast/CPythonPyc_test
cpython/279_test_bigmem.py
68
38156
from test import test_support from test.test_support import bigmemtest, _1G, _2G, _4G, precisionbigmemtest import unittest import operator import string import sys # Bigmem testing houserules: # # - Try not to allocate too many large objects. It's okay to rely on # refcounting semantics, but don't forget that 's ...
gpl-3.0
ryfeus/lambda-packs
Tensorflow/source/tensorflow/python/ops/distributions/uniform.py
73
6818
# 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...
mit
changsimon/trove
trove/tests/unittests/common/test_context.py
5
2104
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
Russell-IO/ansible
test/units/parsing/yaml/test_dumper.py
91
2322
# coding: utf-8 # 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 i...
gpl-3.0
privateip/ansible
lib/ansible/modules/system/lvol.py
23
17012
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@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 So...
gpl-3.0
gbenson/binutils-gdb
gdb/contrib/cleanup_check.py
46
13267
# Copyright 2013-2015 Free Software Foundation, Inc. # # This 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 prog...
gpl-2.0
aprefontaine/TMScheduler
django/contrib/auth/management/commands/changepassword.py
320
1527
from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User import getpass class Command(BaseCommand): help = "Change a user's password for django.contrib.auth." requires_model_validation = False def _get_pass(self, prompt="Password: "): p = getpa...
bsd-3-clause
cordis/pycloudia
pycloudia/respondent/runner.py
1
1212
from pycloudia.respondent.exceptions import ResponseTimeoutError, ResponseNotHandledError from pycloudia.respondent.interfaces import IRunner class Runner(IRunner): """ :type reactor: L{pycloudia.reactor.interfaces.IReactor} :type dao: L{pycloudia.respondent.interfaces.IDao} """ reactor = None ...
mit
rbbratta/virt-test
libvirt/tests/src/virsh_cmd/domain/virsh_setmaxmem.py
3
7562
import logging from autotest.client.shared import utils, error from virttest import virsh, virt_vm from virttest.libvirt_xml import vm_xml def run_virsh_setmaxmem(test, params, env): """ Test command: virsh setmaxmem. 1) Prepare vm environment. 2) Handle params 3) Run test command and get vm star...
gpl-2.0
Edraak/circleci-edx-platform
common/djangoapps/student/models.py
1
76830
""" Models for User Information (students, staff, etc) Migration Notes If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py lms schemamigration student --auto description_of_...
agpl-3.0
alex/sqlalchemy
test/orm/test_loading.py
4
3189
from . import _fixtures from sqlalchemy.orm import loading, Session, aliased from sqlalchemy.testing.assertions import eq_ from sqlalchemy.util import KeyedTuple # class InstancesTest(_fixtures.FixtureTest): # class GetFromIdentityTest(_fixtures.FixtureTest): # class LoadOnIdentTest(_fixtures.FixtureTest): # class Ins...
mit
cryptovein/p2pool-zeitcoin
nattraverso/ipdiscover.py
288
4180
""" Generic methods to retreive the IP address of the local machine. TODO: Example @author: Raphael Slinckx @copyright: Copyright 2005 @license: LGPL @contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>} @version: 0.1.0 """ __revision__ = "$id" import random, socket, logging, itertools from twisted.internet...
gpl-3.0
wmodes/crs
conductor/connector.py
1
4273
#!/usr/bin/env python # -*- coding: utf-8 -*- """Data elements for CRS. Co-related Space is an interactive multimedia installation that engages the themes of presence, interaction, and place. Using motion tracking, laser light and a generative soundscape, it encourages interactions between participants, visually and s...
gpl-3.0
CubicERP/odoo
addons/purchase/stock.py
1
16217
# -*- 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
Qining/shaderc
glslc/test/option_dash_c.py
16
1889
# Copyright 2015 The Shaderc 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 applicable...
apache-2.0
Djabbz/wakatime
wakatime/packages/pygments_py3/pygments/lexers/javascript.py
29
47525
# -*- coding: utf-8 -*- """ pygments.lexers.javascript ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for JavaScript and related languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, ...
bsd-3-clause
maurofm1992/smartpanel
hello.py
1
2686
from cloudant.client import Cloudant from cloudant.error import CloudantException from cloudant.result import Result, ResultByKey client = Cloudant("39a4348e-3ce1-40cd-b016-1f85569d409e-bluemix", "48e26645f504209f85b4c44d74a4cb14bc0d059a22b361534b78f406a513f8ff", url="https://39a4348e-3ce1-40cd-b016-1f85569d409e-bluem...
apache-2.0
ThetaTauMiami/ThetaTauMiami-old
ThetaTauMiami/settings.py
1
2517
""" Django settings for ThetaTauMiami project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ import dj_database_url # Build paths inside the project like this: ...
apache-2.0
arthru/OpenUpgrade
addons/website_mail/tests/test_controllers.py
390
1644
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
Dfelker/ansible
lib/ansible/playbook/play_context.py
6
14450
# -*- coding: utf-8 -*- # (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,...
gpl-3.0