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
okoala/sublime-bak
Packages/ConvertToUTF8/chardet/euckrprober.py
2931
1675
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
kevin-intel/scikit-learn
sklearn/gaussian_process/tests/test_gpc.py
3
10065
"""Testing for Gaussian process classification """ # Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # License: BSD 3 clause import warnings import numpy as np from scipy.optimize import approx_fprime import pytest from sklearn.gaussian_process import GaussianProcessClassifier from sklearn.gaussian_proce...
bsd-3-clause
tiborsimko/invenio-pidstore
invenio_pidstore/providers/recordid.py
2
1847
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Record ID provider.""" from __future__ import absolute_import, print_function fr...
mit
linjoahow/W16_test1
static/Brython3.1.3-20150514-095342/Lib/subprocess.py
728
67282
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license for licensing details. r"""subprocess - Subpr...
gpl-3.0
ccw808/mtasa-blue
vendor/google-breakpad/src/tools/python/filter_syms.py
25
8055
#!/usr/bin/env python # Copyright (c) 2012 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 lis...
gpl-3.0
CasparLi/calibre
src/odf/config.py
100
1418
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
gpl-3.0
wilsonxiao/machinekit
scripts/troff-to-asciidoc.py
18
7279
import os, sys, re SourceFilePath = sys.argv[1] TargetFilePath = sys.argv[2] print "source = " + SourceFilePath print "target = " + TargetFilePath # open the source file SourceLines = open(SourceFilePath, 'rU').readlines() # new content ComponentTitle = [] AsciidocLines = [] IndexLines = [] #if the first characte...
gpl-3.0
10-01/alc-server
external/requests/packages/charade/latin1prober.py
950
5241
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
jpo/healthcareai-py
healthcareai/common/transformers.py
1
9289
"""Transformers This module contains transformers for preprocessing data. Most operate on DataFrames and are named appropriately. """ import numpy as np import pandas as pd from sklearn.base import TransformerMixin from imblearn.over_sampling import RandomOverSampler from imblearn.under_sampling import RandomUnderSam...
mit
HPPTECH/hpp_IOSTressTest
Refer/IOST_OLD_SRC/IOST_0.13/IOST_WRun_StationInfo.py
2
13035
#!/usr/bin/python #====================================================================== # # Project : hpp_IOStressTest # File : IOST_WRun_StationInfo.py # Date : Oct 25, 2016 # Author : HuuHoang Nguyen # Contact : hhnguyen@apm.com # : hoangnh.hpp@gmail.com # License : MIT License # Copyright : ...
mit
amyvmiwei/kbengine
kbe/src/lib/python/Lib/plat-aix4/IN.py
108
3622
# Generated by h2py from /usr/include/netinet/in.h # Included from net/nh.h # Included from sys/machine.h LITTLE_ENDIAN = 1234 BIG_ENDIAN = 4321 PDP_ENDIAN = 3412 BYTE_ORDER = BIG_ENDIAN DEFAULT_GPR = 0xDEADBEEF MSR_EE = 0x8000 MSR_PR = 0x4000 MSR_FP = 0x2000 MSR_ME = 0x1000 MSR_FE = 0x0800 MSR_FE0 = 0x0800 MSR_SE = ...
lgpl-3.0
amrdraz/brython
www/src/Lib/test/test_importlib/source/test_abc_loader.py
34
32554
import importlib from importlib import abc from .. import abc as testing_abc from .. import util from . import util as source_util import imp import inspect import io import marshal import os import sys import types import unittest import warnings class SourceOnlyLoaderMock(abc.SourceLoader): # Globals that sh...
bsd-3-clause
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.7.2/Lib/distutils/version.py
259
11433
# # distutils/version.py # # Implements multiple version numbering conventions for the # Python Module Distribution Utilities. # # $Id$ # """Provides classes to represent module version numbers (one class for each style of version numbering). There are currently two such classes implemented: StrictVersion and LooseVe...
mit
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/scipy/spatial/distance.py
15
68774
""" ===================================================== Distance computations (:mod:`scipy.spatial.distance`) ===================================================== .. sectionauthor:: Damian Eads Function Reference ------------------ Distance matrix computation from a collection of raw observation vectors stored in...
gpl-3.0
Yukarumya/Yukarum-Redfoxes
js/src/vm/make_opcode_doc.py
1
13188
#!/usr/bin/python -B """ Usage: make_opcode_doc.py PATH_TO_MOZILLA_CENTRAL This script generates SpiderMonkey bytecode documentation from js/src/vm/Opcodes.h. Output is written to stdout and should be pasted into the following MDN page: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Intern...
mpl-2.0
thetimelineproj/autopilot
src/lib/wrappers/frame.py
2
2017
# Copyright (C) 2009-2015 Contributors as noted in the AUTHORS file # # This file is part of Autopilot. # # Autopilot 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 y...
gpl-3.0
jbedorf/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/scale_tril_test.py
33
2411
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
TeemuAhola/sailelfcloud
src/qml/python/tasks.py
1
2310
''' Created on Aug 22, 2016 @author: Teemu Ahola [teemuahola7@gmail.com] ''' import uidgenerator class Task(object): def __init__(self, startCb=None, completedCb=None, failedCb=None): self.__uid = uidgenerator.getUid() self.__startCb = startCb self.__completedCb = completedCb ...
gpl-3.0
2014c2g2/2015cdag2_0421
static/Brython3.1.1-20150328-091302/Lib/datetime.py
628
75044
"""Concrete date/time and related types. See http://www.iana.org/time-zones/repository/tz-link.html for time zone and DST data sources. """ import time as _time import math as _math def _cmp(x, y): return 0 if x == y else 1 if x > y else -1 MINYEAR = 1 MAXYEAR = 9999 _MAXORDINAL = 3652059 # date.max.toordinal()...
agpl-3.0
jyotikamboj/container
dj-tests/admin_checks/tests.py
4
20485
from __future__ import unicode_literals from django import forms from django.contrib import admin from django.contrib.contenttypes.admin import GenericStackedInline from django.core import checks from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, ignore_warnings, override_setting...
mit
jjingrong/PONUS-1.2
venv/build/psycopg2/lib/tz.py
72
4427
"""tzinfo implementations for psycopg2 This module holds two different tzinfo implementations that can be used as the 'tzinfo' argument to datetime constructors, directly passed to psycopg functions or used to set the .tzinfo_factory attribute in cursors. """ # psycopg/tz.py - tzinfo implementation # # Copyright (C) ...
mit
StackPointCloud/libcloud
libcloud/compute/drivers/ktucloud.py
3
3610
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/connection_monitor_source.py
2
1193
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
40223117cda/2015_w11
static/Brython3.1.1-20150328-091302/Lib/sys.py
408
4998
# hack to return special attributes from _sys import * from javascript import JSObject has_local_storage=__BRYTHON__.has_local_storage has_session_storage = __BRYTHON__.has_session_storage has_json=__BRYTHON__.has_json brython_debug_mode = __BRYTHON__.debug argv = ['__main__'] base_exec_prefix = __BRYTHON__.brython_...
gpl-3.0
tempbottle/ironpython3
Src/StdLib/Lib/distutils/tests/test_install.py
81
8432
"""Tests for distutils.command.install.""" import os import sys import unittest import site from test.support import captured_stdout, run_unittest from distutils import sysconfig from distutils.command.install import install from distutils.command import install as install_module from distutils.command.build_ext imp...
apache-2.0
BlueBrain/NEST
testsuite/manualtests/stdp_check.py
13
4713
# -*- coding: utf-8 -*- # # stdp_check.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ...
gpl-2.0
gupascal/distcc
include_server/basics_test.py
26
4328
#! /usr/bin/python2.4 # Copyright 2007 Google 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 2 # of the License, or (at your option) any later version. # # This program i...
gpl-2.0
erwilan/ansible
lib/ansible/plugins/lookup/template.py
23
3221
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
Krossom/python-for-android
python3-alpha/python3-src/Lib/lib2to3/fixes/fix_print.py
164
2854
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for print. Change: 'print' into 'print()' 'print ...' into 'print(...)' 'print ... ,' into 'print(..., end=" ")' 'print >>x, ...' into 'print(..., file=x)' No changes are appl...
apache-2.0
ychen820/microblog
flask/lib/python2.7/site-packages/openid/cryptutil.py
136
6084
"""Module containing a cryptographic-quality source of randomness and other cryptographically useful functionality Python 2.4 needs no external support for this module, nor does Python 2.3 on a system with /dev/urandom. Other configurations will need a quality source of random bytes and access to a function that will...
bsd-3-clause
gauribhoite/personfinder
env/site-packages/pygments/lexers/other.py
77
1725
# -*- coding: utf-8 -*- """ pygments.lexers.other ~~~~~~~~~~~~~~~~~~~~~ Just export lexer classes previously contained in this module. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.sql import SqlLexer, MySqlLexe...
apache-2.0
sbadia/ifmap-python-client
ifmap/operations.py
2
2640
# Copyright 2011, Infoblox, All Rights Reserved # # Open Source, see LICENSE # from util import attr, link_ids class OperationBase: """ foundation class for operation factory """ pass class PublishUpdateOperation(OperationBase): def __init__(self, id1, metadata, id2=None, lifetime=None): self.__id = lin...
bsd-2-clause
jku/telepathy-gabble
tests/twisted/rostertest.py
2
5590
from twisted.words.protocols.jabber.client import IQ from gabbletest import (wrap_channel,) from servicetest import (assertEquals, assertLength, EventPattern, assertContains) import constants as cs import ns def make_roster_push(stream, jid, subscription, ask_subscribe=False, name=None): iq = IQ(stream, ...
lgpl-2.1
akosel/incubator-airflow
tests/plugins/test_plugin.py
1
2901
# -*- 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
SPIhub/hummingbird
src/analysis/pixel_detector.py
2
20836
# -------------------------------------------------------------------------------------- # Copyright 2016, Benedikt J. Daurer, Filipe R.N.C. Maia, Max F. Hantke, Carl Nettelblad # Hummingbird is distributed under the terms of the Simplified BSD License. # ----------------------------------------------------------------...
bsd-2-clause
tersmitten/ansible
lib/ansible/modules/cloud/vmware/vmware_host_powermgmt_policy.py
43
8768
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de> # # 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 = { 'met...
gpl-3.0
tscholl2/smc
src/scripts/build_sage.py
3
2177
#!/usr/bin/env python ############################################################################### # # CoCalc: Collaborative Calculation in the Cloud # # Copyright (C) 2016, Sagemath Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
agpl-3.0
Memeo/samba-unovero
third_party/dnspython/dns/entropy.py
91
3878
# Copyright (C) 2009, 2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND...
gpl-3.0
aduric/crossfit
nonrel/tests/regressiontests/generic_views/views.py
49
4506
from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator from django.core.urlresolvers import reverse from django.utils.decorators import method_decorator from django.views import generic from regressiontests.generic_views.models import Artist, Author, Book, Page from regre...
bsd-3-clause
samthor/intellij-community
python/lib/Lib/site-packages/django/utils/dates.py
73
1837
"Commonly-used date structures" from django.utils.translation import ugettext_lazy as _, pgettext_lazy WEEKDAYS = { 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'), 5:_('Saturday'), 6:_('Sunday') } WEEKDAYS_ABBR = { 0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri')...
apache-2.0
abhishekjairath/codeyard
commit/lib/python2.7/site-packages/pip/_vendor/requests/utils.py
222
19653
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct from . i...
mit
harshaneelhg/scikit-learn
sklearn/metrics/pairwise.py
104
42995
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Robert Layton <robertlayton@gmail.com> # Andreas Mueller <amueller@ais.uni-bonn.de> # Philippe Gervais <philippe.gervais@inria.fr> # Lars Buitinck ...
bsd-3-clause
edmond-chhung/linkchecker
linkcheck/threader.py
9
1347
# -*- coding: iso-8859-1 -*- # Copyright (C) 2000-2014 Bastian Kleineidam # # 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 versi...
gpl-2.0
rcarrillocruz/ansible
lib/ansible/modules/network/illumos/dladm_vlan.py
70
5867
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@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 L...
gpl-3.0
elpaso/arduino-slip
Esercizi_PyQT/Esercizio_1-1/Esercizio_1-1_00.py
3
4316
#!/usr/bin/python ritardo = 2 #second from PyQt4 import QtCore, QtGui import serial import sys, time SERIALPORT = '/dev/ttyACM0' class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) MainWindow.setMaximumSize(QtCor...
gpl-2.0
translate/pootle
pootle/apps/pootle_app/management/commands/revision.py
11
1070
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os os.environ['DJANGO_SETTINGS_MODUL...
gpl-3.0
stormi/weblate
weblate/trans/tests/test_charts.py
9
3501
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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-3.0
dCache/dcache-docker
dcache/deps/.vim/bundle/jedi-vim/jedi/test/test_evaluate/test_pyc.py
26
1684
""" Test completions from *.pyc files: - generate a dummy python module - compile the dummy module to generate a *.pyc - delete the pure python dummy module - try jedi on the generated *.pyc """ import os import shutil import sys import pytest import jedi from ..helpers import cwd_at SRC = """class Foo: pa...
gpl-3.0
dmnyu/bitcurator
externals/py3fpdf/tools/designer.py
8
26856
#!/usr/bin/python # -*- coding: latin-1 -*- # 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, or (at your option) any later # version. # # This program is distributed in the hope...
gpl-3.0
briancurtin/python-openstacksdk
openstack/tests/unit/network/v2/test_qos_policy.py
1
1835
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
littlstar/chromium.src
tools/symsrc/pefile.py
187
139621
# -*- coding: Latin-1 -*- """pefile, Portable Executable reader module All the PE file basic structures are available with their default names as attributes of the instance returned. Processed elements such as the import table are made available with lowercase names, to differentiate them from the upper case basic s...
bsd-3-clause
hacklab-fi/asylum
project/examples/handlers.py
2
9747
# -*- coding: utf-8 -*- import calendar import datetime import logging import environ import holviapi from creditor.handlers import BaseRecurringTransactionsHandler, BaseTransactionHandler from creditor.models import RecurringTransaction, Transaction, TransactionTag from django.core.mail import EmailMessage from djang...
mit
MobinRanjbar/hue
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/manifest.py
56
1389
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the L...
apache-2.0
dsprenkels/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/test_endtoend.py
449
26811
#!/usr/bin/env python # # Copyright 2012, 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...
mpl-2.0
Joergen/zamboni
mkt/versions/api.py
1
3297
from rest_framework import mixins, serializers, viewsets from rest_framework.exceptions import ParseError import amo from mkt.api.authorization import AllowAppOwner, AllowReviewerReadOnly from mkt.api.base import CompatRelatedField from mkt.constants import APP_FEATURES from mkt.features.api import AppFeaturesSerializ...
bsd-3-clause
gudcjfdldu/volatility
volatility/plugins/sockets.py
45
2743
# Volatility # # Authors: # Mike Auty <mike.auty@gmail.com> # # 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 op...
gpl-2.0
jackjansen/cerbero
cerbero/packages/packager.py
21
2219
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
lgpl-2.1
promptworks/horizon
openstack_dashboard/dashboards/project/database_backups/tables.py
33
6058
# Copyright 2013 Rackspace Hosting # # 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
eul721/The-Perfect-Pokemon-Team-Balancer
libs/env/Lib/encodings/mac_croatian.py
593
13889
""" Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
gpl-2.0
salfab/CouchPotatoServer
libs/requests/packages/charade/sjisprober.py
1182
3734
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
ngpestelos/ansible
lib/ansible/plugins/callback/mail.py
44
4994
# -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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 ...
gpl-3.0
RubenKelevra/rethinkdb
packaging/ami/build-ami-files/firstrun_web.py
46
1596
import subprocess import urllib2 # This web application gets launched by firstrun-init # The form in settings.html posts to /action/set_password # This application then launches firstrun.sh with the given parameters def check_instance_id(pwd): iid = urllib2.urlopen('http://169.254.169.254/latest/meta-data/instanc...
agpl-3.0
jtoppins/beaker
IntegrationTests/src/bkr/inttest/server/selenium/test_recipetasks.py
1
9452
# 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. import datetime import requests from bkr.server.model import session,...
gpl-2.0
qnib/qcollect
resources/diamond/collectors/chronyd/test/testchronyd.py
33
3277
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from chronyd import ...
apache-2.0
fritz-k/django-wiki
wiki/management/commands/wikiviz.py
13
16740
#!/usr/bin/env python from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import """Django model to DOT (Graphviz) converter by Antonio Cavedoni <antonio@cavedoni.org> edited as management script by Benjamin Bach <benjamin@overtag.dk> Depends on package 'grap...
gpl-3.0
azumimuo/family-xbmc-addon
plugin.video.sanctuary/lib/Pandora.py
1
5774
'''This section was kindly donated by the dev of the addon, join his fb group to say thanks for this amazing section - https://www.facebook.com/groups/120495048374613/''' import re, xbmcplugin, xbmcgui, process, base64, sys, urllib addon_handle = int(sys.argv[1]) Dialog = xbmcgui.Dialog() Decode = base64.decodestrin...
gpl-2.0
philanthropy-u/edx-platform
openedx/core/djangoapps/content/course_overviews/models.py
1
36633
""" Declaration of CourseOverview model """ import json import logging from urlparse import urlparse, urlunparse from django.conf import settings from django.db import models, transaction from django.db.models.fields import BooleanField, DateTimeField, DecimalField, TextField, FloatField, IntegerField from django.db.u...
agpl-3.0
willingc/oh-mainline
vendor/packages/scrapy/scrapyd/website.py
16
3773
from datetime import datetime from twisted.web import resource, static from twisted.application.service import IServiceCollection from .interfaces import IPoller, IEggStorage, ISpiderScheduler from . import webservice class Root(resource.Resource): def __init__(self, config, app): resource.Resource.__in...
agpl-3.0
switchkiller/ProjDjanko
lib/python2.7/site-packages/django/contrib/gis/maps/google/overlays.py
79
11934
from __future__ import unicode_literals from django.contrib.gis.geos import ( LinearRing, LineString, Point, Polygon, fromstr, ) from django.utils import six from django.utils.encoding import python_2_unicode_compatible from django.utils.functional import total_ordering from django.utils.html import html_safe @h...
gpl-2.0
kenshay/ImageScripter
ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/page/page_unittest.py
13
8554
# Copyright 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. import os import unittest from telemetry import story from telemetry.page import page import mock class TestPage(unittest.TestCase): def assertPathEqu...
gpl-3.0
MSeifert04/astropy
astropy/utils/diff.py
4
4980
import difflib import functools import sys import numbers import numpy as np from .misc import indent __all__ = ['fixed_width_indent', 'diff_values', 'report_diff_values', 'where_not_allclose'] # Smaller default shift-width for indent fixed_width_indent = functools.partial(indent, width=2) def diff_va...
bsd-3-clause
shsingh/ansible
lib/ansible/modules/cloud/amazon/ec2_win_password.py
13
6662
#!/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
domino14/Webolith
djAerolith/accounts/admin.py
1
1452
# Aerolith 2.0: A web-based word game website # Copyright (C) 2011 Cesar Del Solar # # 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 la...
gpl-3.0
wenottingham/ansible
lib/ansible/utils/module_docs_fragments/vyos.py
2
2807
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
mikehulluk/ProcessManager
www/js/brython/Lib/sre_parse.py
630
29657
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" # XXX: show string offset and offending ch...
bsd-2-clause
Just-D/chromium-1
tools/memory_inspector/classification_rules/default/mmap-android.py
54
1894
# 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. # This is a generic rule-tree for classifying memory maps on Android. It is a # simple hierarchical python data structure (list of dictionaries). Some rules:...
bsd-3-clause
edhuckle/statsmodels
statsmodels/datasets/cpunish/data.py
25
2597
"""US Capital Punishment dataset.""" __docformat__ = 'restructuredtext' COPYRIGHT = """Used with express permission from the original author, who retains all rights.""" TITLE = __doc__ SOURCE = """ Jeff Gill's `Generalized Linear Models: A Unified Approach` http://jgill.wustl.edu/research/books.html """...
bsd-3-clause
bgris/ODL_bgris
lib/python3.5/site-packages/Sphinx-1.5.1-py3.5.egg/sphinx/pycode/pgen2/pgen.py
4
14056
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. from __future__ import print_function from six import iteritems from collections import OrderedDict # Pgen imports from sphinx.pycode.pgen2 import grammar, token, tokenize class PgenGrammar(grammar....
gpl-3.0
uannight/reposan
plugin.video.tvalacarta/lib/youtube_dl/utils.py
1
116707
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import base64 import binascii import calendar import codecs import contextlib import ctypes import datetime import email.utils import errno import functools import gzip import io import itertools import json import locale import math import...
gpl-2.0
gregorio-project/hyphen-la
scripts/test-classical.py
1
1357
#!/usr/bin/env python3 import pyphen import sys import re hyphenator = pyphen.Pyphen(filename='patterns/hyph_la_classical.dic',left=2,right=2) seenSegs = {} line = 0 def comparenoncompletehyphens(original, obtained): i = 0 for c in obtained: if c == '-': if original[i] == '-': i = i + 1 else: if orig...
mit
ferchaure/bci
capture.py
1
7686
import numpy as np #vectores, operaciones matematicas import time #hora local from configuration import GENERAL_CONFIG as CONFIG from configuration import CONFIG_PARSER #import os from multiprocess_config import * #from configuration import DATA_FRAME_CONFIG as COMM from configuration import FILE_CONFIG from importli...
mit
YYWen0o0/python-frame-django
django/contrib/gis/db/backends/mysql/introspection.py
43
1427
from MySQLdb.constants import FIELD_TYPE from django.contrib.gis.gdal import OGRGeomType from django.db.backends.mysql.introspection import DatabaseIntrospection class MySQLIntrospection(DatabaseIntrospection): # Updating the data_types_reverse dictionary with the appropriate # type for Geometry fields. ...
bsd-3-clause
sriramsitharaman/sp17-i524
project/S17-IR-P001/code/TwitterStreaming.py
20
1982
#Import the necessary methods from tweepy library from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream OutFile = "C:\\Users\\sriram\OneDrive for Business\\Election2016-" Count=0 Fileno=1 TweetCount=0 out=open(OutFile+str(Fileno)+".txt","w") #Variables that c...
apache-2.0
roguecoin/roguecoin
SOAPpy/Errors.py
294
3002
""" ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (Gregory.R.Warnes@Pfizer.com) # Christopher Blunck (blunck@gst.com) # ##########################...
gpl-3.0
OSSESAC/odoopubarquiluz
addons/l10n_be_hr_payroll/__openerp__.py
118
1817
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
lcpt/xc
verif/tests/preprocessor/cad/arco_circunf_05.py
1
2685
# -*- coding: utf-8 -*- import xc_base import geom import xc import math import os from model import predefined_spaces from materials import typical_materials __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Copyright 2014, LCPT" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" NumDiv...
gpl-3.0
citrix-openstack/build-trove
trove/openstack/common/rpc/__init__.py
3
11700
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
apache-2.0
Lh4cKg/sl4a
python/src/Mac/Modules/win/winedit.py
39
1612
# These are inline-routines/defines, so we do them "by hand" # f = Method(Boolean, 'IsWindowVisible', (WindowRef, 'theWindow', InMode), ) methods.append(f) f = Method(void, 'GetWindowStructureRgn', (WindowRef, 'theWindow', InMode), (RgnHandle, 'r', InMode), ) methods.append(f) f = Method(void, 'G...
apache-2.0
reelai/packstack
packstack/installer/utils/network.py
8
2797
# -*- coding: utf-8 -*- import re import socket from ..exceptions import NetworkError from .shell import execute, ScriptRunner def get_localhost_ip(): """ Returns IP address of localhost. """ # TO-DO: Will probably need to find better way to find out localhost # address. # find names...
apache-2.0
pablodiguerero/asterisk.api
models/calendar.py
1
1827
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ~ Author: Pavel Ivanov from models.base import db from models.user import User from modules.sqlalchemy.uuid import GUID from modules.sqlalchemy.rrule import RRule class CalendarRubric(db.Model): """ Рубрики событий календаря """ __tablename__ = "crm_...
mit
thurt/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_multibytecodec_support.py
55
12606
#!/usr/bin/env python # # test_multibytecodec_support.py # Common Unittest Routines for CJK codecs # import sys, codecs import unittest, re from test import test_support from StringIO import StringIO class TestBase: encoding = '' # codec name codec = None # codec tuple (with 4 elements) ...
apache-2.0
ThisWeekInBlenderDev/source
content/conf.py
1
1582
import sys, os sys.path.insert(0, os.path.abspath(os.path.join('..', 'exts'))) extensions = [ # general 'youtube', 'newsfeed', 'extlinks_plus', 'googleanalytics', # sphinx extensions 'sphinx.ext.githubpages', # installed with pip 'sphinxjp.themes.basicstrap', ] extlinks_plus = { ...
apache-2.0
daevaorn/kombu
kombu/transport/django/models.py
15
1125
from __future__ import absolute_import import django from django.db import models from django.utils.translation import ugettext_lazy as _ from .managers import QueueManager, MessageManager class Queue(models.Model): name = models.CharField(_('name'), max_length=200, unique=True) objects = QueueManager() ...
bsd-3-clause
markneville/nupic
tests/unit/nupic/encoders/multi_test.py
18
4941
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
MadeiraCloud/opsagent
libs/jinja2/debug.py
620
10980
# -*- coding: utf-8 -*- """ jinja2.debug ~~~~~~~~~~~~ Implements the debug interface for Jinja. This module does some pretty ugly stuff with the Python traceback system in order to achieve tracebacks with correct line numbers, locals and contents. :copyright: (c) 2010 by the Jinja Team. :...
apache-2.0
bavardage/statsmodels
statsmodels/sandbox/tsa/examples/example_var.py
37
1218
""" Look at some macro plots, then do some VARs and IRFs. """ import numpy as np import statsmodels.api as sm import scikits.timeseries as ts import scikits.timeseries.lib.plotlib as tplt from matplotlib import pyplot as plt data = sm.datasets.macrodata.load() data = data.data ### Create Timeseries Representations ...
bsd-3-clause
wdv4758h/ZipPy
lib-python/3/encodings/charmap.py
860
2084
""" Generic Python Character Mapping Codec. Use this codec directly rather than through the automatic conversion mechanisms supplied by unicode() and .encode(). Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs class...
bsd-3-clause
feroda/gasistafelice
gasistafelice/base/utils.py
6
1951
from django.contrib.contenttypes.models import ContentType from django.template.defaultfilters import slugify import os import datetime def get_ctype_from_model_label(label): """ This helper function takes a model identifier (a string of the form 'app_label.model_name', where `app_label` is as in Django d...
agpl-3.0
edx/ansible
plugins/inventory/zabbix.py
119
3956
#!/usr/bin/env python # (c) 2013, Greg Buehler # # 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 ve...
gpl-3.0
sabi0/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/tests/test_geoforms.py
94
2671
from django.forms import ValidationError from django.contrib.gis import forms from django.contrib.gis.geos import GEOSGeometry from django.utils import unittest class GeometryFieldTest(unittest.TestCase): def test00_init(self): "Testing GeometryField initialization with defaults." fld = forms.Geo...
apache-2.0