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
gclenaghan/scikit-learn
examples/preprocessing/plot_function_transformer.py
158
1993
""" ========================================================= Using FunctionTransformer to select columns ========================================================= Shows how to use a function transformer in a pipeline. If you know your dataset's first principle component is irrelevant for a classification task, you ca...
bsd-3-clause
oberlin/django
django/views/defaults.py
339
3567
from django import http from django.template import Context, Engine, TemplateDoesNotExist, loader from django.utils import six from django.utils.encoding import force_text from django.views.decorators.csrf import requires_csrf_token # This can be called when CsrfViewMiddleware.process_view has not run, # therefore ne...
bsd-3-clause
kdeloach/OTM2
opentreemap/otm1_migrator/management/commands/perform_migration.py
6
12462
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from optparse import make_option import os import importlib import json import operator from functools import partial from itertools import chain from django.conf import settings fro...
gpl-3.0
ocadotechnology/aimmo
aimmo-game/tests/test_interactables/mock_world.py
1
1445
import random from simulation import map_generator from simulation.simulation_runner import SequentialSimulationRunner from tests.test_simulation.mock_communicator import MockCommunicator from tests.test_simulation.dummy_avatar import DummyAvatarManager, MoveEastDummy from tests.test_simulation.mock_turn_collector imp...
agpl-3.0
AltroCoin/altrocoin
sched/testasm.py
28
1493
!/usr/bin/env python import boinc_path_config from Boinc.assimilator import * class TestAssimilator(Assimilator): """ A minimal Assimilator example that dumps the result out to the log """ def __init__(self): Assimilator.__init__(self) def assimilate_handler(self, wu, results, c...
gpl-3.0
smerritt/swift
swift/common/daemon.py
2
11679
# Copyright (c) 2010-2012 OpenStack Foundation # # 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
akraft196/pyASC
examples/mplot1.py
1
7267
#! /usr/bin/env python # # quick and dirty processing of the MD All Sky images from astropy.io import fits import matplotlib.pyplot as plt import matplotlib.image as mpimg from scipy.misc import imsave import numpy as np import aplpy import argparse as ap import os.path import logging import time def d(ff,box=[]):...
mit
tarasane/h2o-3
h2o-py/tests/testdir_munging/binop/pyunit_vec_scaler_comparisions_medium.py
5
2274
import sys sys.path.insert(1, "../../../") import h2o, tests def vec_scaler_comparisons(): # Connect to a pre-existing cluster air = h2o.import_file(path=h2o.locate("smalldata/airlines/allyears2k_headers.zip")) rows, cols = air.dim ## H2OVec/scaler # == row_sum = 0 levels = air.level...
apache-2.0
UnbDroid/robomagellan
Codigos/Raspberry/desenvolvimentoRos/devel/lib/python2.7/dist-packages/sensor_msgs/msg/_NavSatStatus.py
1
4452
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from sensor_msgs/NavSatStatus.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class NavSatStatus(genpy.Message): _md5sum = "331cdbddfa4bc96ffc3b9ad98900a54c" _type = ...
gpl-3.0
bmenasha/appengine-mapreduce
python/test/mapreduce/api/map_job/map_job_control_test.py
15
5745
#!/usr/bin/env python import unittest from mapreduce import hooks from mapreduce import model from mapreduce import test_support from testlib import testutil from mapreduce import util from mapreduce.api import map_job from mapreduce.api.map_job import map_job_config from mapreduce.api.map_job import sample_input_read...
apache-2.0
openstack/neutron
neutron/pecan_wsgi/hooks/query_parameters.py
4
6510
# 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 # d...
apache-2.0
abhattad4/Digi-Menu
digimenu2/build/lib.linux-x86_64-2.7/django/utils/functional.py
36
16056
import copy import operator import sys import warnings from functools import wraps from django.utils import six from django.utils.deprecation import RemovedInDjango19Warning from django.utils.six.moves import copyreg # You can't trivially replace this with `functools.partial` because this binds # to classes and retu...
bsd-3-clause
MartinHjelmare/home-assistant
homeassistant/components/openweathermap/sensor.py
7
7558
"""Support for the OpenWeatherMap (OWM) service.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_API_KEY, CONF_MONITORED_CONDITIONS, CONF_NAME, TEMP_CELSIUS, TEMP_FAHR...
apache-2.0
Cisco-Talos/pyrebox
volatility/volatility/plugins/mac/lsof.py
12
2053
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
cselis86/edx-platform
common/djangoapps/django_comment_common/migrations/0001_initial.py
188
6980
# -*- coding: utf-8 -*- from south.v2 import SchemaMigration class Migration(SchemaMigration): # # cdodge: This is basically an empty migration since everything has - up to now - managed in the django_comment_client app # But going forward we should be using this migration # def forwards(self, orm): pass ...
agpl-3.0
eoncloud-dev/eonboard
eoncloud_web/cloud/api_test.py
4
3100
#-*-coding=utf-8-*- import logging from biz.instance.models import Instance from biz.instance.settings import INSTANCE_STATE_RUNNING from biz.network.models import Network from api import nova from api import neutron from api import keystone LOG = logging.getLogger("cloud.tasks") def flavor_create(request, instanc...
apache-2.0
pyblish/pyblish-win
lib/Python27/Lib/distutils/tests/test_build_scripts.py
45
3583
"""Tests for distutils.command.build_scripts.""" import os import unittest from distutils.command.build_scripts import build_scripts from distutils.core import Distribution import sysconfig from distutils.tests import support from test.test_support import run_unittest class BuildScriptsTestCase(support.TempdirMana...
lgpl-3.0
bdaroz/the-blue-alliance
controllers/admin/admin_event_controller.py
2
24308
from datetime import datetime import json import logging import os from google.appengine.api import taskqueue from google.appengine.ext import ndb from google.appengine.ext.webapp import template from consts.event_type import EventType from consts.playoff_type import PlayoffType from controllers import event_controll...
mit
sklnet/openhdf-enigma2
lib/python/Components/Sensors.py
26
2004
from Components.FanControl import fancontrol class Sensors: # (type, name, unit, directory) TYPE_TEMPERATURE = 0 # (type, name, unit, fanid) TYPE_FAN_RPM = 1 def __init__(self): # (type, name, unit, sensor_specific_dict/list) self.sensors_list = [] self.addSensors() def getSensorsCount(self, type = None)...
gpl-2.0
hoatle/odoo
addons/product/wizard/__init__.py
452
1076
# -*- 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
xHeliotrope/injustice_dropper
env/lib/python3.4/site-packages/rest_framework/settings.py
68
6840
""" Settings for REST framework are all namespaced in the REST_FRAMEWORK setting. For example your project's `settings.py` file might look like this: REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'rest_framework.renderers.JSONRenderer', 'rest_framework.renderers.TemplateHTMLRenderer', ) ...
mit
40223101/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/_collections.py
603
19111
# "High performance data structures # " # copied from pypy repo # # Copied and completed from the sandbox of CPython # (nondist/sandbox/collections/pydeque.py rev 1.1, Raymond Hettinger) # # edited for Brython line 558 : catch ImportError instead of AttributeError import operator #try: # from thread import get_i...
gpl-3.0
Daeinar/dfa-aes
simulator/inject.py
1
1300
#!/usr/bin/env python # # Licensed by "The MIT License". See file LICENSE. # # Script to simulate fault injections on AES-128. # Prints correct and corresponding faulty ciphertext. # # Usage: ./inject nr_of_example fault_location # # fault_location must be in {0,...,15}. # import sys from aes import * # (plaintext,key...
mit
Peddle/hue
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/worksheet/read_only.py
13
7391
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl """ Iterators-based worksheet reader *Still very raw* """ # compatibility from openpyxl.compat import range # package from openpyxl.xml.functions import iterparse from openpyxl.xml.functions import safe_iterator from openpyxl.xml.constants imp...
apache-2.0
doduytrung/odoo-8.0
addons/website_blog/__openerp__.py
303
1819
# -*- 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
40223147/finalexam
static/Brython3.1.1-20150328-091302/Lib/html/entities.py
814
75240
"""HTML character entity references.""" # maps the HTML entity name to the Unicode codepoint name2codepoint = { 'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 'Aacute': 0x00c1, # latin capital letter A with acute, U+00C1 ISOlat1 'Acirc': 0x00c2, # latin capit...
gpl-3.0
erwinfeser/desmontes
apps/profiles/tasks.py
2
2275
from django.conf import settings from django.contrib.gis.geos import Point from django.template.loader import render_to_string from django.utils import timezone from celery import group from econativo.celery import app fotobosque_bot = settings.FOTOBOSQUE_BOT @app.task def update_location_from_message(message): ...
gpl-3.0
takeflight/wagtail
wagtail/core/sites.py
17
1806
from django.apps import apps from django.db.models import Case, IntegerField, Q, When MATCH_HOSTNAME_PORT = 0 MATCH_HOSTNAME_DEFAULT = 1 MATCH_DEFAULT = 2 MATCH_HOSTNAME = 3 def get_site_for_hostname(hostname, port): """Return the wagtailcore.Site object for the given hostname and port.""" Site = apps.get_mo...
bsd-3-clause
wooga/airflow
airflow/providers/google/cloud/operators/natural_language.py
1
10959
# # 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
goinnn/django-multiselectfield
example/app/urls.py
1
1723
# -*- coding: utf-8 -*- # Copyright (c) 2013 by Pablo Martín <goinnn@gmail.com> # # This software is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
lgpl-3.0
Marcello-Sega/pytim
pytim/observables/layer_triangulation.py
2
3242
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 """ Module: LayerTriangulation ========================== """ from __future__ import print_function from . import Observable import numpy as np from pytim import utilities class LayerTr...
gpl-3.0
gladk/trunk
scripts/checks-and-tests/checks/checkTestTriax.py
5
1544
# encoding: utf-8 # 2011 © Bruno Chareyre <bruno.chareyre@hmg.inpg.fr> # Check the result of a triaxial test on a dense 100 spheres packing with position defined, # comparing stresses at the "peak" state. The initial positions have been generated by # internal compaction without friction, so that it is initially at equ...
gpl-2.0
kylazhang/virt-test
qemu/tests/yonit_bitmap.py
2
3586
import logging import signal from autotest.client.shared import error from virttest import utils_misc from tests import guest_test @error.context_aware def run_yonit_bitmap(test, params, env): """ Run yonit bitmap benchmark in Windows guests, especially win7 32bit, for regression test of BZ #556455. ...
gpl-2.0
ModdedPA/android_external_chromium_org
build/android/gyp/gcc_preprocess.py
35
1415
#!/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. import optparse import os import subprocess import sys from util import build_utils def DoGcc(options): build_utils.MakeDirectory...
bsd-3-clause
birkestroem/NougatUI
tools/bin/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
81
21295
#!/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. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
mit
stynr/diaphora
pygments/lexers/webmisc.py
22
35901
# -*- coding: utf-8 -*- """ pygments.lexers.webmisc ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for misc. web stuff. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, byg...
gpl-2.0
kytvi2p/Sigil
3rdparty/python/Lib/idlelib/SearchDialogBase.py
86
7009
'''Define SearchDialogBase used by Search, Replace, and Grep dialogs.''' from tkinter import (Toplevel, Frame, Entry, Label, Button, Checkbutton, Radiobutton) class SearchDialogBase: '''Create most of a 3 or 4 row, 3 column search dialog. The left and wide middle column contain: 1 or...
gpl-3.0
bunnylin/supersakura
translate.py
1
4235
#!/usr/bin/python # CC0, 2017 :: Kirinn Bunnylin / Mooncore # https://creativecommons.org/publicdomain/zero/1.0/ import sys, re, time, subprocess #from subprocess import check_output if len(sys.argv) < 2: print("Usage: python translate.py inputfile.tsv >outputfile.tsv") print("The input file should be a tsv. The ...
gpl-3.0
nju520/youtube-dl
youtube_dl/extractor/mpora.py
175
2053
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import int_or_none class MporaIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?mpora\.(?:com|de)/videos/(?P<id>[^?#/]+)' IE_NAME = 'MPORA' _TEST = { 'url': 'http://mpora.de/videos/AAdo8okx4wiz/embed?locale...
unlicense
alexsavio/scikit-learn
sklearn/metrics/cluster/bicluster.py
359
2797
from __future__ import division import numpy as np from sklearn.utils.linear_assignment_ import linear_assignment from sklearn.utils.validation import check_consistent_length, check_array __all__ = ["consensus_score"] def _check_rows_and_columns(a, b): """Unpacks the row and column arrays and checks their shap...
bsd-3-clause
sbrunner/QGIS
python/plugins/processing/gui/ConfigDialog.py
3
18975
# -*- coding: utf-8 -*- """ *************************************************************************** ConfigDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************************...
gpl-2.0
marcusmchale/breedcafs
app/cypher.py
1
76573
class Cypher: def __init__(self): pass # user procedures allowed_emails = ( ' MATCH ' ' (e: Emails) ' ' RETURN ' ' e.allowed ' ) user_allowed_emails = ( ' MATCH ' ' (u:User) ' ' WITH ' ' COLLECT (DISTINCT u.email) as registered_emails ' ' MATCH ' ' (user:User {' ' username_lower : toLower(...
gpl-3.0
tjanez/ansible
lib/ansible/module_utils/mysql.py
71
3274
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
XueqingLin/tensorflow
tensorflow/python/client/quantize_training_test.py
28
1590
# 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
encukou/freeipa
ipaserver/install/dsinstance.py
1
53454
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # Simo Sorce <ssorce@redhat.com> # # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
gpl-3.0
plissonf/scikit-learn
sklearn/metrics/tests/test_regression.py
272
6066
from __future__ import division, print_function import numpy as np from itertools import product from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils....
bsd-3-clause
alexus37/AugmentedRealityChess
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/pip/commands/show.py
344
2767
import os from pip.basecommand import Command from pip.log import logger from pip._vendor import pkg_resources class ShowCommand(Command): """Show information about one or more installed packages.""" name = 'show' usage = """ %prog [options] <package> ...""" summary = 'Show information about in...
mit
llhe/tensorflow
tensorflow/python/client/client_lib.py
111
1698
# 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
dochang/ansible-modules-core
cloud/amazon/ec2_elb_lb.py
6
39046
#!/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
conejoninja/plugin.video.pelisalacarta
lib/gdata/oauth/rsa.py
225
4528
#!/usr/bin/python """ requires tlslite - http://trevp.net/tlslite/ """ import binascii from gdata.tlslite.utils import keyfactory from gdata.tlslite.utils import cryptomath # XXX andy: ugly local import due to module name, oauth.oauth import gdata.oauth as oauth class OAuthSignatureMethod_RSA_SHA1(oauth.OAuthSign...
gpl-3.0
philid/deepjs.org
node_modules/pygmentize-bundled/vendor/pygments/pygments/filters/__init__.py
23
11506
# -*- coding: utf-8 -*- """ pygments.filters ~~~~~~~~~~~~~~~~ Module containing filter lookup functions and default filters. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.token import String, Comment, Ke...
lgpl-3.0
bdang2012/taiga-back
tests/integration/test_vote_issues.py
12
3025
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
fogleman/xy
pipes.py
2
4534
from math import radians import random import xy import xyz PIPES = 8 SIZE = 3 TURN_PROBABILITY = 0.3 UPDATE_RATE = 0.05 DIRECTIONS = [ (0, -1, 0, 0), (0, 1, 0, 0), (1, 0, -1, 0), (1, 0, 1, 0), (2, 0, 0, -1), (2, 0, 0, 1), ] def sphere(x, y, z, r, axis=2): return xyz.Sphere(r, (x, y, z)) if axis ...
mit
jaywreddy/django
tests/prefetch_related/test_uuid.py
291
4347
from __future__ import unicode_literals from django.test import TestCase from .models import Flea, House, Person, Pet, Room class UUIDPrefetchRelated(TestCase): def test_prefetch_related_from_uuid_model(self): Pet.objects.create(name='Fifi').people.add( Person.objects.create(name='Ellen'), ...
bsd-3-clause
tumbl3w33d/ansible
lib/ansible/modules/network/fortimanager/fmgr_secprof_dns.py
39
11232
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
EliotBerriot/django
django/core/mail/backends/filebased.py
558
2771
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import \ EmailBackend as ConsoleEmailBackend from django.utils import six class EmailBackend(ConsoleEmailB...
bsd-3-clause
rfuentess/RIOT
tests/periph_flashpage/tests/01-run.py
16
1369
#!/usr/bin/env python3 # Copyright (C) 2018 Federico Pellegrin <fede@evolware.org> # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import sys from testrunner import run def testfunc(child): ...
lgpl-2.1
SAPikachu/nyapass
nyapass-client.py
1
1513
#!/usr/bin/env python3 import sys import logging from common import nyapass_run_instances, Nyapass from local import ClientHandlerManager from local_socks5 import SocksClientHandler from config import Config def main(): config = Config("client") logging.basicConfig(level=config.log_level) instances = []...
gpl-3.0
kehao95/Wechat_LearnHelper
src/env/lib/python3.5/site-packages/chardet/gb2312freq.py
3132
36011
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
gpl-3.0
acgtun/acgtun.com
acgtun/leetcode/views.py
1
1338
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import os import sys from collections import OrderedDict from django.template.loader import render_to_string from django.http import HttpResponse from django.conf import settings from . import db_table from databas...
gpl-2.0
Distrotech/scons
src/engine/SCons/Tool/textfile.py
5
5943
# -*- python -*- # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # dis...
mit
iradul/qtwebkit
Tools/Scripts/webkitpy/common/system/stack_utils.py
215
2734
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
gpl-2.0
jdugge/QGIS
python/plugins/processing/algs/qgis/HubDistancePoints.py
26
6665
# -*- coding: utf-8 -*- """ *************************************************************************** HubDistancePoints.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *******************...
gpl-2.0
cvandeplas/plaso
plaso/parsers/olecf_plugins/summary_test.py
1
4825
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
apache-2.0
mancoast/CPythonPyc_test
cpython/241_regrtest.py
1
35276
#! /usr/bin/env python """Regression test. This will find all modules whose name is "test_*" in the test directory, and run them. Various command line options provide additional facilities. Command line options: -v: verbose -- run tests in verbose mode with output to stdout -q: quiet -- don't print anythin...
gpl-3.0
jdilallo/jdilallo-test
examples/dfp/v201311/label_service/create_labels.py
1
1668
#!/usr/bin/python # # Copyright 2014 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 b...
apache-2.0
MichaelDrogalis/ansible
lib/ansible/plugins/callback/syslog_json.py
136
2579
import os import json import logging import logging.handlers import socket from ansible.plugins.callback import CallbackBase class CallbackModule(CallbackBase): """ logs ansible-playbook and ansible runs to a syslog server in json format make sure you have in ansible.cfg: callback_plugins = <p...
gpl-3.0
amisrs/one-eighty
angular_flask/lib/python2.7/site-packages/gevent/win32util.py
4
3637
# Copyright (c) 2001-2007 Twisted Matrix Laboratories. # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, mer...
mit
supergis/QGIS
tests/src/python/test_qgspallabeling_server.py
12
8300
# -*- coding: utf-8 -*- """QGIS unit tests for QgsPalLabeling: label rendering output via QGIS Server From build dir, run: ctest -R PyQgsPalLabelingServer -V See <qgis-src-dir>/tests/testdata/labeling/README.rst for description. .. note:: This program is free software; you can redistribute it and/or modify it under ...
gpl-2.0
vasiliykochergin/euca2ools
euca2ools/commands/iam/putuserpolicy.py
5
2185
# Copyright 2009-2015 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions ...
bsd-2-clause
noisecapella/bostonbusmap
tools/gtfs-realtime-tester/gtfs_realtime_pb2.py
2
46583
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='gtfs-realtime.pr...
gpl-3.0
south-coast-science/scs_mfr
src/scs_mfr/aws_group_setup.py
1
4484
#!/usr/bin/env python3 """ Created on 21 Sep 2020 @author: Jade Page (jade.page@southcoastscience.com) DESCRIPTION The aws_group_setup utility is designed to automate the creation of AWS Greengrass groups using South Coast Science's configurations. The group must already exist and the ML lambdas must be associated ...
mit
cshinaver/cctools
umbrella/src/umbrella.py
1
188703
#!/usr/bin/env cctools_python # CCTOOLS_PYTHON_VERSION 2.7 2.6 # All the vanilla python package dependencies of Umbrella can be satisfied by Python 2.6. """ Umbrella is a tool for specifying and materializing comprehensive execution environments, from the hardware all the way up to software and data. A user simply in...
gpl-2.0
pedrobaeza/odoo
addons/sale/sale.py
2
67567
# -*- 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
CloudNcodeInc/django-oauth-toolkit
oauth2_provider/oauth2_backends.py
10
6834
from __future__ import unicode_literals import json from oauthlib import oauth2 from oauthlib.common import urlencode, urlencoded, quote from .exceptions import OAuthToolkitError, FatalClientError from .settings import oauth2_settings from .compat import urlparse, urlunparse class OAuthLibCore(object): """ ...
bsd-2-clause
xiangel/hue
desktop/core/ext-py/Django-1.6.10/tests/syndication/urls.py
58
1084
from __future__ import absolute_import from django.conf.urls import patterns from . import feeds urlpatterns = patterns('django.contrib.syndication.views', (r'^syndication/complex/(?P<foo>.*)/$', feeds.ComplexFeed()), (r'^syndication/rss2/$', feeds.TestRss2Feed()), (r'^syndication/rss2/guid_ispermalink_...
apache-2.0
allink/cookiecutter-allink-project
{{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/settings/production.py
1
2379
from .default import * # noqa # import djcelery # =================== # = Global Settings = # =================== DEBUG = False # =================== # = Server Settings = # =================== DATABASES['default']['CONN_MAX_AGE'] = 60 RAVEN_CONFIG = { 'dsn': '{{ cookiecutter.sentry_dsn}}', } CACHES = { ...
bsd-3-clause
microdee/IronHydra
src/IronHydra/Lib/site.py
41
20474
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
mit
elky/django
django/db/models/__init__.py
72
2714
from django.core.exceptions import ObjectDoesNotExist from django.db.models import signals from django.db.models.aggregates import * # NOQA from django.db.models.aggregates import __all__ as aggregates_all from django.db.models.deletion import ( CASCADE, DO_NOTHING, PROTECT, SET, SET_DEFAULT, SET_NULL, ProtectedEr...
bsd-3-clause
ARMmbed/yotta_osx_installer
prerequisites/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/lib/libstdc++.a-gdb.py
2
2457
# -*- python -*- # Copyright (C) 2009-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later versio...
apache-2.0
leshchevds/ganeti
lib/jqueue/__init__.py
1
52112
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 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: # # 1. Redistributions of source code must retain the above copyri...
bsd-2-clause
nvoron23/statsmodels
statsmodels/examples/tsa/try_ar.py
33
2566
# -*- coding: utf-8 -*- """ Created on Thu Oct 21 21:45:24 2010 Author: josef-pktd """ from __future__ import print_function import numpy as np from scipy import signal def armaloop(arcoefs, macoefs, x): '''get arma recursion in simple loop for simplicity assumes that ma polynomial is not longer than the ar...
bsd-3-clause
Proggie02/TestRepo
django/contrib/staticfiles/views.py
10
1620
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath try: from urllib.parse import unquote except ImportError: # Python 2 from urllib import unquote from django.conf import settings fr...
bsd-3-clause
zeroc0d3/docker-lab
ruby/rootfs/usr/lib/python2.7/dist-packages/powerline/renderers/pdb.py
34
1431
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import platform from powerline.renderers.shell.readline import ReadlineRenderer from powerline.renderer import Renderer class PDBRenderer(ReadlineRenderer): '''PDB-specific powerline render...
mit
yigitguler/django
tests/forms_tests/tests/test_formsets.py
44
55154
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.forms import (CharField, DateField, FileField, Form, IntegerField, SplitDateTimeField, ValidationError, formsets) from django.forms.formsets import BaseFormSet, formset_factory from django.forms.utils import ErrorList from...
bsd-3-clause
jonathon-love/snapcraft
snapcraft/internal/repo.py
3
17631
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in...
gpl-3.0
duke605/RunePy
tasks/configuration.py
1
5798
from secret import DISCORD_BOTS_TOKEN from db.models import objects, Configuration from datetime import datetime, timedelta from secret import MIXPANEL_SECRET import asyncio import base64 import discord import json import util class Config: def __init__(self, bot): self.bot = bot self.prune_serve...
mit
omprakasha/odoo
addons/procurement_jit/__init__.py
374
1078
# -*- 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
sonus89/FIPER
client/direct.py
1
6293
from __future__ import print_function, unicode_literals, absolute_import import sys import time from FIPER.generic.interface import InterfaceFactory from FIPER.generic.abstract import AbstractListener from FIPER.generic.subsystem import StreamDisplayer from FIPER.generic.probeclient import Probe class DirectConnect...
mit
AbhaySingh/pjproject
tests/pjsua/scripts-call/301_ice_public_b.py
42
1058
# $Id$ # from inc_cfg import * # This test: # to make call with ICE but without STUN. # Note: # - need --dis-codec to make INVITE packet less than typical MTU uas_args = "--null-audio --id=\"<sip:test1@pjsip.org>\" --registrar=sip:sip.pjsip.org --username=test1 --password=test1 --realm=pjsip.org --proxy=\"sip:sip...
gpl-2.0
ltilve/ChromiumGStreamerBackend
tools/telemetry/third_party/pyserial/serial/urlhandler/protocol_hwgrep.py
159
1526
#! python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # see __init__.py # # This module implements a special URL handler that uses the port listing to # find ports by searching the string descriptions. # # (C) 2011 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, ...
bsd-3-clause
evanlucas/npm
node_modules/node-gyp/gyp/buildbot/buildbot_run.py
1467
4228
#!/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. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os....
artistic-2.0
tmoer/multimodal_varinf
networks/network_rl.py
1
7832
# -*- coding: utf-8 -*- """ Created on Thu Mar 2 14:48:24 2017 @author: thomas """ #from layers import Latent_Layer import sys import os.path sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) sys.path.append(os.path.abspath(os.path.dirname(__file__))) import tensorflow as tf import tens...
mit
KaiserAndres/kaiserBot
bot_executables.py
1
4751
import roller import random DEFAULT_CARD_AMOUNT = 1 MAX_CARDS = 15 CARD_SEPARATOR = "||" def ping_exec(irc, message): pong = 'PONG ' + message.text.split(" ")[1] + '\r\n' irc.send(pong.encode("utf-8")) def roll_exec(irc, message): ''' A !roll comand has the following structure: !rol...
mit
gfcapalbo/website
website_sale_vat_required/controllers/main.py
13
1464
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Agile Business Group sagl (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licen...
agpl-3.0
thermokarst/advent-of-code-2015
day20.py
1
2724
# Matthew Ryan Dillon # github.com/thermokarst # # --- Day 20: Infinite Elves and Infinite Houses --- # # To keep the Elves busy, Santa has them deliver some presents by hand, # door-to-door. He sends them down a street with infinite houses numbered # sequentially: 1, 2, 3, 4, 5, and so on. # # Each Elf is assigned a n...
mit
DrMeers/django
django/contrib/gis/gdal/driver.py
104
2477
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils import six from django.utils.encoding import force_bytes # For more information, see...
bsd-3-clause
jbedorf/tensorflow
tensorflow/contrib/distribute/python/keras_dnn_correctness_test.py
3
7004
# Copyright 2019 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
PhonologicalCorpusTools/PolyglotDB
polyglotdb/structure.py
2
46121
from .exceptions import HierarchyError, GraphQueryError from .query.annotations.attributes import PauseAnnotation, AnnotationNode from datetime import datetime class Hierarchy(object): """ Class containing information about how a corpus is structured. Hierarchical data is stored in the form of a dictiona...
mit
ifuding/Kaggle
PMRCN/Code/siamese_net.py
1
22230
from sklearn import * import sklearn import pandas as pd import numpy as np import xgboost as xgb import lightgbm as lgb from time import gmtime, strftime import numpy.random as rng from multiprocessing.dummy import Pool import h5py import concurrent.futures import tensorflow as tf import multiprocessing as mp from s...
apache-2.0