repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
thedrow/cython
Tools/site_scons/site_tools/cython.py
125
1721
""" Tool to run Cython files (.pyx) into .c and .cpp. TODO: - Add support for dynamically selecting in-process Cython through CYTHONINPROCESS variable. - Have a CYTHONCPP option which turns on C++ in flags and changes output extension at the same time VARIABLES: - CYTHON - The path to the "cython" command li...
apache-2.0
jnayak1/osf.io
website/notifications/model.py
24
2550
from modularodm import fields from framework.mongo import StoredObject, ObjectId from modularodm.exceptions import ValidationValueError from website.project.model import Node from website.notifications.constants import NOTIFICATION_TYPES def validate_subscription_type(value): if value not in NOTIFICATION_TYPES:...
apache-2.0
szszss/CharmingTremblePlus
lib/sdl/src/joystick/sort_controllers.py
84
1974
#!/usr/bin/env python # # Script to sort the game controller database entries in SDL_gamecontroller.c import re filename = "SDL_gamecontrollerdb.h" input = open(filename) output = open(filename + ".new", "w") parsing_controllers = False controllers = [] controller_guids = {} split_pattern = re.compile(r'([^"]*")([^,...
mit
newvem/suds
suds/servicedefinition.py
200
8478
# 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 ...
lgpl-3.0
maciekcc/tensorflow
tensorflow/contrib/batching/__init__.py
85
1029
# 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
lyft/incubator-airflow
airflow/contrib/sensors/pubsub_sensor.py
5
1162
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
beni55/rinohtype
rinoh/inline.py
1
1880
# This file is part of RinohType, the Python document preparation system. # # Copyright (c) Brecht Machiels. # # Use of this source code is subject to the terms of the GNU Affero General # Public License v3. See the LICENSE file or http://www.gnu.org/licenses/. from .element import DocumentElement from .flowable impo...
agpl-3.0
matianfu/barcelona-4.3.3
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
gpl-2.0
sdague/home-assistant
tests/components/lock/test_device_action.py
7
5610
"""The tests for Lock device actions.""" import pytest import homeassistant.components.automation as automation from homeassistant.components.lock import DOMAIN from homeassistant.const import CONF_PLATFORM from homeassistant.helpers import device_registry from homeassistant.setup import async_setup_component from te...
apache-2.0
tangyiyong/odoo
openerp/addons/base/res/res_users.py
70
46571
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
zorojean/scikit-learn
sklearn/preprocessing/data.py
113
56747
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Eric Martin <eric@ericmart.in> # License: BSD 3 clause from itertools import chain, combina...
bsd-3-clause
chugle/myapp
applications/examples/models/markmin.py
13
1087
import gluon.template markmin_dict = dict( code_python=lambda code: str(CODE(code)), template=lambda code: gluon.template.render(code, context=globals()), sup=lambda code: '<sup style="font-size:0.5em;">%s</sup>' % code, br=lambda n: '<br>' * int(n), groupdates=lambda group: group_feed_read...
gpl-2.0
Pluto-tv/chromium-crosswalk
tools/telemetry/third_party/gsutilz/third_party/boto/boto/ec2/autoscale/launchconfig.py
135
10807
# Copyright (c) 2009 Reza Lotun http://reza.lotun.name/ # 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 without...
bsd-3-clause
wasiqmukhtar/tcp-eval.wasiq
src/antenna/bindings/modulegen__gcc_ILP32.py
68
90458
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
molotof/infernal-twin
build/reportlab/src/reportlab/platypus/__init__.py
29
1203
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/__init__.py __version__=''' $Id$ ''' __doc__='''Page Layout and Typography Using Scripts" - higher-level framework for flowing documents''' f...
gpl-3.0
jorsea/odoo-addons
product_force_create_variants/__openerp__.py
8
1477
# -*- 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
ikargis/horizon_fod
openstack_dashboard/dashboards/project/routers/ports/forms.py
12
7736
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Nachi Ueno, NTT MCL, 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...
apache-2.0
HuimingCheng/AutoGrading
learning/number recognization/network.py
1
12668
# # Written for Theano 0.6 and 0.7, needs some changes for more recent # # versions of Theano. # # # #### Libraries # # Standard library # import cPickle # import gzip # # # Third-party libraries # import numpy as np # import theano # import theano.tensor as T # from theano.tensor.nnet import conv # from ...
mit
yanchen036/tensorflow
tensorflow/contrib/autograph/impl/naming_test.py
4
2899
# 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
TeamTwisted/external_chromium_org
tools/binary_size/binary_size_utils.py
53
2234
# 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. """Common utilities for tools that deal with binary size information. """ import logging import re def ParseNm(nm_lines): """Parse nm output, returning ...
bsd-3-clause
frankvdp/django
django/contrib/gis/geos/prototypes/threadsafe.py
85
2309
import threading from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import ( CONTEXT_PTR, error_h, lgeos, notice_h, ) class GEOSContextHandle(GEOSBase): """Represent a GEOS context handle.""" ptr_type = CONTEXT_PTR destructor = lgeos.finishGEOS_r def __init__(...
bsd-3-clause
the-adrian/demoFlask
venv/lib/python2.7/site-packages/flask/blueprints.py
773
16320
# -*- coding: utf-8 -*- """ flask.blueprints ~~~~~~~~~~~~~~~~ Blueprints are the recommended way to implement larger or more pluggable applications in Flask 0.7 and later. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from functools import update_wrap...
gpl-3.0
benob/icsisumm
tac09/unresolved/utils.py
8
20846
import re, traceback, sys from lxml import etree import treenode # based on ~dilek/GALE-DIST/DISTILL-2008/LDC2008E39/scripts/english-preprocessing/text-cleanup.pl (from Wen) def cleanup(text): text = " " + text.replace(",", "") + " " # negative number text = re.sub(r' -([0-9])', r' minus \1', text) # decimal...
gpl-3.0
Just-D/chromium-1
remoting/host/linux/linux_me2me_host.py
12
50759
#!/usr/bin/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. # Virtual Me2Me implementation. This script runs and manages the processes # required for a Virtual Me2Me desktop, which are: X server...
bsd-3-clause
IAAAIAAIA/CS231n
thomas/assignment1/q3_sgd.py
2
3751
#!/usr/bin/env python # Save parameters every a few SGD iterations as fail-safe SAVE_PARAMS_EVERY = 5000 import glob import random import numpy as np import os.path as op import pickle as pickle def load_saved_params(): """ A helper function that loads previously saved parameters and resets iteration st...
mit
lz1988/django-web2015
django/contrib/grappelli/tests/test_related.py
3
12627
# coding: utf-8 # PYTHON IMPORTS import datetime # DJANGO IMPORTS from django.test import TestCase from django.test.utils import override_settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.utils import six, translation, timezone try: import json except I...
bsd-2-clause
cfehring/slack-onnow
slack-onnow.py
1
6863
''' This function handles a Slack slash command named "/onnow" and echoes the details back to the Slack user. Follow these steps to configure the slash command in Slack: 1. Navigate to https://<your-team-domain>.slack.com/services/new 2. Search for and select "Slash Commands". 3. Enter a name for your command...
gpl-3.0
IntelLabs/numba
numba/cuda/tests/cudapy/test_powi.py
5
3276
import math import numpy as np from numba import cuda, float64, int8, int32, void from numba.cuda.testing import unittest, CUDATestCase def cu_mat_power(A, power, power_A): y, x = cuda.grid(2) m, n = power_A.shape if x >= n or y >= m: return power_A[y, x] = math.pow(A[y, x], int32(power)) ...
bsd-2-clause
AlexHAHA/ardupilot
Tools/LogAnalyzer/LogAnalyzer.py
86
12419
#!/usr/bin/env python # # A module to analyze and identify any common problems which can be determined from log files # # Initial code by Andrew Chapman (amchapman@gmail.com), 16th Jan 2014 # # some logging oddities noticed while doing this, to be followed up on: # - tradheli MOT labels Mot1,Mot2,Mot3,Mot4,GGain # ...
gpl-3.0
Tong-Chen/scikit-learn
sklearn/cluster/bicluster/tests/test_utils.py
10
1427
"""Tests for bicluster utilities.""" import numpy as np from scipy.sparse import csr_matrix, issparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_true from sklearn.cluster.bicluster.utils import get_indicators from skle...
bsd-3-clause
felipsmartins/namebench
libnamebench/util.py
172
5175
# Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
Bismarrck/tensorflow
tensorflow/contrib/slim/python/slim/nets/inception_v2.py
96
26999
# 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
shineyear/catawampus
tr/persistobj_test.py
6
5542
#!/usr/bin/python # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
eusi/MissionPlanerHM
Lib/mailbox.py
74
78102
#! /usr/bin/env python """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes.""" # Notes for authors of new mailbox subclasses: # # Remember to fsync() changes to disk before closing a modified file # or returning from a flush() method. See functions _sync_flush() and # _sync_close(). import sys im...
gpl-3.0
ubernostrum/akismet
src/akismet.py
1
8707
import os import sys import textwrap from typing import Optional import requests __version__ = "1.1" class AkismetError(Exception): """ Base exception class for Akismet errors. """ pass class UnknownArgumentError(AkismetError): """ Indicates an unknown argument was used as part of an API...
bsd-3-clause
Yelp/paasta
paasta_tools/adhoc_tools.py
1
4751
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
zhumengyuan/kallithea
kallithea/controllers/api/__init__.py
2
10720
# -*- coding: utf-8 -*- # 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 hope that...
gpl-3.0
bezhermoso/home
lib/ansible/runner/filter_plugins/core.py
6
5614
# (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
gpl-3.0
GrognardsFromHell/TemplePlus
tpdatasrc/kotbfixes/scr/Spell093 - Cure Serious Wounds.py
2
3880
from toee import * from utilities import * def OnBeginSpellCast( spell ): print "Cure Serious Wounds OnBeginSpellCast" print "spell.target_list=", spell.target_list print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level game.particles( "sp-conjuration-conjure", spell.caster ) def OnSpellEffe...
mit
coverxiaoeye/ceryx
api/ceryx/db.py
9
3248
""" Simple Redis client, implemented the data logic of Ceryx. """ import redis from ceryx import settings class RedisRouter(object): """ Router using a redis backend, in order to route incoming requests. """ class LookupNotFound(Exception): """ Exception raised when a lookup for a spec...
mit
kamcpp/tensorflow
tensorflow/tools/docs/gen_cc_md.py
50
8418
# 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
inasafe/inasafe
safe/metadata35/test/test_provenance_step.py
6
1282
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid - **Exception Classes.** Custom exception classes for the IS application. Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Publi...
gpl-3.0
nafex/pyload
module/plugins/hoster/OboomCom.py
6
5029
# -*- coding: utf-8 -*- # # Test links: # https://www.oboom.com/B7CYZIEB/10Mio.dat import re from module.common.json_layer import json_loads from module.plugins.internal.Hoster import Hoster from module.plugins.captcha.ReCaptcha import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ =...
gpl-3.0
fooelisa/ansible-modules-extras
system/locale_gen.py
10
6423
#!/usr/bin/python # -*- coding: utf-8 -*- import os import os.path from subprocess import Popen, PIPE, call import re DOCUMENTATION = ''' --- module: locale_gen short_description: Creates or removes locales. description: - Manages locales by editing /etc/locale.gen and invoking locale-gen. version_added: "1.6" o...
gpl-3.0
AymArbyn/get-emeralds
www/vendor/library50-php-5/CS50/share/php-openid-2.3.0/admin/gettlds.py
126
1061
""" Fetch the current TLD list from the IANA Web site, parse it, and print an expression suitable for direct insertion into each library's trust root validation module Usage: python gettlds.py (php|python|ruby) Then cut-n-paste. """ import urllib2 import sys langs = { 'php': (r"'/\.(", "'", "|", ...
gpl-3.0
tensorflow/models
research/object_detection/dataset_tools/tf_record_creation_util.py
2
1718
# Lint as: python2, python3 # 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 # ...
apache-2.0
titiushko/readthedocs.org
readthedocs/rtd_tests/mocks/environment.py
30
2826
import mock from readthedocs.doc_builder.environments import BuildEnvironment class EnvironmentMockGroup(object): '''Mock out necessary environment pieces''' def __init__(self): self.patches = { 'popen': mock.patch('subprocess.Popen'), 'process': mock.Mock(), 'api...
mit
Mashape/dd-agent
tests/checks/mock/test_directory.py
35
5721
# stdlib from itertools import product import os import shutil import tempfile # project from tests.checks.common import AgentCheckTest class DirectoryTestCase(AgentCheckTest): CHECK_NAME = 'directory' FILE_METRICS = [ "system.disk.directory.file.bytes", "system.disk.directory.file.modified_...
bsd-3-clause
doutib/lobpredict
lobpredictrst/execute_model.py
1
5878
import sys import imp import yaml import csv import pandas as pd import re from rf import * from svm import * modl = imp.load_source('read_model_yaml', 'read_model_yaml.py') # Parse the YAML file location as the first parameter inp_yaml = sys.argv[1] def write_results_txt(filename, result): """ Write results ...
isc
leiferikb/bitpop
src/tools/telemetry/telemetry/core/platform/power_monitor/android_ds2784_power_monitor.py
1
4983
# 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. import logging import os from telemetry import decorators from telemetry.core.platform.profiler import android_prebuilt_profiler_helper import telemetry.cor...
gpl-3.0
liavkoren/djangoDev
tests/admin_widgets/widgetadmin.py
68
1222
from django.contrib import admin from . import models class WidgetAdmin(admin.AdminSite): pass class CarAdmin(admin.ModelAdmin): list_display = ['make', 'model', 'owner'] list_editable = ['owner'] class CarTireAdmin(admin.ModelAdmin): def formfield_for_foreignkey(self, db_field, request, **kwargs...
bsd-3-clause
tarzan0820/odoo
addons/l10n_mx/__openerp__.py
379
2559
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # All Rights Reserved ###############Credits###################################################### # Coded by: Alejandro Negrin anegrin@vauxoo.com, #...
agpl-3.0
reinbach/finance
api/finance/views/account.py
1
3764
import json from flask import abort, jsonify, request, Response from flask.views import MethodView import config from finance import utils, db from finance.forms.account import AccountForm from finance.models.account import Account from finance.stats import STATS class AccountAPI(MethodView): """Account Views"...
bsd-3-clause
dvliman/jaikuengine
.google_appengine/lib/django-1.4/django/core/context_processors.py
80
3327
""" A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by RequestContext. """ from django.conf...
apache-2.0
uglyboxer/linear_neuron
net-p3/lib/python3.5/site-packages/scipy/spatial/__init__.py
23
2970
""" ============================================================= Spatial algorithms and data structures (:mod:`scipy.spatial`) ============================================================= .. currentmodule:: scipy.spatial Nearest-neighbor Queries ======================== .. autosummary:: :toctree: generated/ ...
mit
FRESNA/vresutils
test/test_transfer.py
1
1167
from __future__ import absolute_import import pytest import numpy as np from numpy.testing import assert_allclose import scipy.sparse as sparse from vresutils import transfer @pytest.fixture def orig(): return np.array(((0., 0.), (1., 1.))) @pytest.fixture def dest(): return np.array(((1.5, 1.), (0., 0.5),...
gpl-3.0
harmy/kbengine
kbe/res/scripts/common/Lib/test/test_dbm_dumb.py
3
6028
#! /usr/bin/env python3 """Test script for the dumbdbm module Original by Roger E. Masse """ import io import os import unittest import dbm.dumb as dumbdbm from test import support _fname = support.TESTFN def _delete_files(): for ext in [".dir", ".dat", ".bak"]: try: os.unl...
lgpl-3.0
ROMFactory/android_external_chromium_org
third_party/protobuf/python/google/protobuf/internal/encoder.py
484
25695
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
fstagni/DIRAC
ConfigurationSystem/private/Refresher.py
6
6648
""" Refresh local CS (if needed) In every gConfig """ __RCSID__ = "$Id$" import threading import thread import time import random from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData from DIRAC.ConfigurationSystem.Client.PathFinder import getGatewayURLs from DIRAC.FrameworkSystem.Clie...
gpl-3.0
funkypawz/MakerRobot
tests/test_inlinekeyboardbutton.py
2
2954
#!/usr/bin/env python # encoding: utf-8 # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-3.0
hep-gc/panda-autopyfactory
bin/factory.py
1
6335
#! /usr/bin/env python # # Simple(ish) python condor_g factory for panda pilots # # $Id$ # # # Copyright (C) 2007,2008,2009 Graeme Andrew Stewart # # 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 Founda...
gpl-3.0
patrick-nicholson/spark
python/pyspark/ml/classification.py
2
69237
# # 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 us...
apache-2.0
yqm/sl4a
python/src/Tools/scripts/ftpmirror.py
89
12854
#! /usr/bin/env python """Mirror a remote ftp subtree into a local directory tree. usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat] [-l username [-p passwd [-a account]]] hostname[:port] [remotedir [localdir]] -v: verbose -q: quiet -i: interactive mode -m: macintosh server (NC...
apache-2.0
gwpy/gwpy
examples/spectrogram/rayleigh.py
3
2125
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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
jgao54/airflow
tests/contrib/hooks/test_aws_hook.py
5
8814
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
heran7/edx-platform
common/lib/sample-post.py
29
2491
# A simple script demonstrating how to have an external program post problem # responses to an edx server. # # ***** NOTE ***** # This is not intended as a stable public API. In fact, it is almost certainly # going to change. If you use this for some reason, be prepared to change your # code. # # We will be working t...
agpl-3.0
gandalfcode/gandalf
tests/paper_tests/binaryorbit.py
1
3711
#============================================================================== # freefalltest.py # Run the freefall collapse test using initial conditions specified in the # file 'freefall.dat'. #============================================================================== from gandalf.analysis.facade import * from g...
gpl-2.0
nwjs/chromium.src
tools/grit/grit/gather/rc.py
11
11211
# 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. '''Support for gathering resources from RC files. ''' from __future__ import print_function import re from grit import exception from grit import lazy...
bsd-3-clause
CKehl/pylearn2
pylearn2/costs/gated_autoencoder.py
39
5793
""" Definitions of the cost for the gated-autoencoder. """ from pylearn2.costs.cost import Cost, DefaultDataSpecsMixin from pylearn2.space import VectorSpace class SymmetricCost(DefaultDataSpecsMixin, Cost): """ Summary (Class representing the symmetric cost). Subclasses can define the type of data they...
bsd-3-clause
sriprasanna/django-1.3.1
django/contrib/gis/gdal/prototypes/generation.py
321
3766
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.prototypes.errcheck import \ check_arg_errcode, check_errcode, check_geom, check_geom_offset, \ check_pointer, check_srs, check_str...
bsd-3-clause
xkmato/yowsup
yowsup/layers/interface/interface.py
27
3897
from yowsup.layers import YowLayer, YowLayerEvent from yowsup.layers.protocol_iq.protocolentities import IqProtocolEntity from yowsup.layers.network import YowNetworkLayer from yowsup.layers.auth import YowAuthenticationProtocolLayer from yowsup.layers.protocol_receipts.protocolentities import OutgoingReceiptProtocolEn...
gpl-3.0
leiferikb/bitpop
src/third_party/libxml/src/genUnicode.py
337
12985
#!/usr/bin/python -u # # Original script modified in November 2003 to take advantage of # the character-validation range routines, and updated to the # current Unicode information (Version 4.0.1) # # NOTE: there is an 'alias' facility for blocks which are not present in # the current release, but are needed for ABI com...
gpl-3.0
guewen/odoo
openerp/addons/base/res/res_currency.py
17
12786
# -*- 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
debugger06/MiroX
osx/build/bdist.macosx-10.5-fat/lib.macosx-10.5-fat-2.7/miro/iconcache.py
3
12195
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
gpl-2.0
pchauncey/ansible
lib/ansible/modules/network/f5/bigip_gtm_datacenter.py
26
11100
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
gpl-3.0
agiliq/django
django/contrib/auth/tests/test_middleware.py
56
1409
from django.contrib.auth.middleware import SessionAuthenticationMiddleware from django.contrib.auth.models import User from django.http import HttpRequest from django.test import TestCase class TestSessionAuthenticationMiddleware(TestCase): def setUp(self): self.user_password = 'test_password' sel...
bsd-3-clause
weidongxu84/info-gatherer
django/contrib/admindocs/views.py
77
15064
import inspect import os import re from django import template from django.template import RequestContext from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.shortcuts import render_to_response from django.core.exceptions imp...
mit
asayler/tutamen-pytutamen
pytutamen/base.py
1
5612
# -*- coding: utf-8 -*- # Andy Sayler # 2015 # pytutamen Package # Tutamen Client Library ### Imports ### from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install...
lgpl-2.1
pombredanne/https-git.fedorahosted.org-git-kobo
kobo/http.py
1
4351
# -*- coding: utf-8 -*- # based on: http://code.activestate.com/recipes/146306/ import httplib import mimetypes import os from kobo.shortcuts import random_string class POSTTransport(object): """ POST transport. USAGE: >>> import kobo.http t = kobo.http.POSTTransport() t.add_vari...
lgpl-2.1
leiferikb/bitpop
src/third_party/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py
51
13189
# Copyright (c) 2009 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 retain the above...
gpl-3.0
2Guys1Python/Project-Cacophonum
data/states/player_menu.py
1
2099
""" This is the state where the player can look at his inventory, equip items and check stats. Most of the logic is in menugui.MenuGUI() """ import pygame as pg from .. import tools, setup, menugui from .. import constants as c class Player_Menu(object): def __init__(self, game_data, level): inventory = g...
mit
ojengwa/django-1
django/apps/config.py
121
8077
import os from importlib import import_module from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.utils._os import upath from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig(object): """ Class representing a Django ap...
bsd-3-clause
justajeffy/arsenalsuite
python/blur/examples/path_lister.py
11
2216
#!/usr/bin/python from PyQt4.QtCore import * from PyQt4.QtSql import * from PyQt4.QtGui import * from blur.Stone import * from blur.Classes import * from blur.Classesui import * import blur.email, blur.jabber import sys, time, re, os from math import ceil import traceback try: import popen2 except: pass app = QAppl...
gpl-2.0
Astoriane/jCrunchyroll
lib/crunchy-xml-decoder/unidecode/x00e.py
252
4092
data = ( '[?]', # 0x00 'k', # 0x01 'kh', # 0x02 'kh', # 0x03 'kh', # 0x04 'kh', # 0x05 'kh', # 0x06 'ng', # 0x07 'cch', # 0x08 'ch', # 0x09 'ch', # 0x0a 'ch', # 0x0b 'ch', # 0x0c 'y', # 0x0d 'd', # 0x0e 't', # 0x0f 'th', # 0x10 'th', # 0x11 'th', # 0x12 'n', #...
lgpl-3.0
evangelistalab/forte
forte/solvers/active_space_solver.py
1
6737
from forte.core import flog from forte.solvers.solver import Feature, Solver from forte.forte import ForteOptions from forte import to_state_nroots_map from forte import forte_options from forte.forte import make_active_space_ints, make_active_space_solver class ActiveSpaceSolver(Solver): """ A class to dia...
lgpl-3.0
tombstone/models
research/maskgan/models/rnn.py
5
7132
# 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 applicab...
apache-2.0
linktlh/Toontown-journey
toontown/suit/DistributedSuit.py
3
25748
import copy from direct.directnotify import DirectNotifyGlobal from direct.directtools.DirectGeometry import CLAMP from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.interval.IntervalGlobal import * from direct.task import Task import math from ...
apache-2.0
patrickcurl/ztruck
dj/lib/python2.7/site-packages/django/core/serializers/xml_serializer.py
95
15035
""" XML serializer. """ from __future__ import unicode_literals from xml.dom import pulldom from xml.sax import handler from xml.sax.expatreader import ExpatParser as _ExpatParser from django.apps import apps from django.conf import settings from django.core.serializers import base from django.db import DEFAULT_DB_A...
apache-2.0
irvingprog/python-pilas-experimental
pilasengine/ejemplos/ejemplos_a_revisar/asteroides/escena_juego.py
7
4423
import pilas import piedra_espacial import random class Estado: "Representa una escena dentro del juego." def actualizar(self): raise Exception("Tienes que sobrescribir este metodo...") class Jugando(Estado): "Representa el estado de juego." def __init__(self, juego, nivel): self.niv...
lgpl-3.0
hbrunn/OCB
addons/web_analytics/__openerp__.py
305
1432
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
ewindisch/nova
nova/tests/scheduler/test_caching_scheduler.py
12
6554
# Copyright (c) 2014 Rackspace Hosting # 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 req...
apache-2.0
chenjiancan/rt-thread
bsp/tm4c129x/rtconfig.py
21
2501
# BSP Note: For TI EK-TM4C1294XL Tiva C Series Connected LancuhPad (REV D) import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') #device options PART_TYPE = 'PART_TM4C129XNCZAD' # cross_tool provides the cross compiler # EXEC_PATH is t...
gpl-2.0
samanehsan/osf.io
scripts/tests/test_migrate_dates.py
54
1512
# -*- coding: utf-8 -*- import datetime from nose.tools import * # noqa from scripts.osfstorage.utils import ensure_osf_files from website import settings ensure_osf_files(settings) # Hack: Must configure add-ons before importing `OsfTestCase` from website.addons.osfstorage.tests.factories import FileVersionFactory ...
apache-2.0
jhamman/mtclim5
mtclim/share.py
1
3374
''' share.py ''' # Mountain Climate Simulator, meteorological forcing disaggregator # Copyright (C) 2015 Joe Hamman # 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
faun/django_test
tests/modeltests/aggregation/tests.py
46
20519
import datetime from decimal import Decimal from django.db.models import Avg, Sum, Count, Max, Min from django.test import TestCase, Approximate from models import Author, Publisher, Book, Store class BaseAggregateTestCase(TestCase): fixtures = ["initial_data.json"] def test_empty_aggregate(self): ...
bsd-3-clause
puttarajubr/commcare-hq
custom/_legacy/mvp/management/commands/mvp_test_indicator.py
4
1081
import dateutil from django.core.management.base import BaseCommand from corehq.apps.indicators.models import DynamicIndicatorDefinition from corehq.apps.users.models import CommCareUser from dimagi.utils.dates import DateSpan from mvp.models import MVP class Command(BaseCommand): help = "Returns the value of the...
bsd-3-clause
40223112/0623test1
static/Brython3.1.1-20150328-091302/Lib/logging/config.py
739
35619
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
gpl-3.0
CiscoSystems/avos
openstack_dashboard/dashboards/admin/flavors/panel.py
46
1059
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
pierreg/tensorflow
tensorflow/tools/test/system_info.py
31
1089
# 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
impromptuartist/impromptuartist.github.io
node_modules/pygmentize-bundled/vendor/pygments/pygments/formatters/bbcode.py
362
3314
# -*- coding: utf-8 -*- """ pygments.formatters.bbcode ~~~~~~~~~~~~~~~~~~~~~~~~~~ BBcode formatter. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_bool_opt __al...
mit