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
rhelmer/socorro
socorro/unittest/database/createSchema.py
11
2145
#! /usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # XXX Set to be deprecated in favor of socorro/external/postgresql/models.py """ Just set up the...
mpl-2.0
toshywoshy/ansible
lib/ansible/modules/network/netconf/netconf_get.py
19
9775
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
bitforks/pysilfont
scripts/samples/demoExecuteScript.py
1
1573
#!/usr/bin/env python 'FontForge: Demo code to paste into the "Execute Script" dialog' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2013, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'David Ray...
mit
Foxboron/SyncBox
tests/test_syncAPI.py
1
1395
""" Testing src/syncAPI """ import unittest import src.syncAPI class SyncAPITest(unittest.TestCase): """Test the SyncAPI class methods""" def setUp(self): """Set up the test""" self.syncAPI = src.syncAPI.SyncAPI() def test_syncAPI_has_a_shared_state(self): """Test the share...
bsd-3-clause
MasonLeeBack/PolyEngine
thirdparty/vulkan/shaderc/glslc/test/option_mfmt.py
8
8194
# Copyright 2016 The Shaderc Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
mit
skoef/Sick-Beard
lib/hachoir_core/tools.py
90
17259
# -*- coding: utf-8 -*- """ Various utilities. """ from lib.hachoir_core.i18n import _, ngettext import re import stat from datetime import datetime, timedelta, MAXYEAR from warnings import warn def deprecated(comment=None): """ This is a decorator which can be used to mark functions as deprecated. It wi...
gpl-3.0
iraghumitra/incubator-metron
metron-deployment/packaging/ambari/elasticsearch-mpack/src/main/resources/common-services/ELASTICSEARCH/5.6.2/package/scripts/params.py
17
6818
#!/usr/bin/env python """ 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");...
apache-2.0
simvisage/oricreate
oricreate/gu/gu_dofs.py
1
2557
''' #------------------------------------------------------------------------------- # # Copyright (c) 2009, IMB, RWTH Aachen. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in simvisage/LICENSE.txt and may be redistributed only # under the conditions...
gpl-3.0
Scriptopathe/simso-exp
clientapi/doc/source/conf.py
1
8209
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # simsoexp documentation build configuration file, created by # sphinx-quickstart on Tue Jul 28 16:53:27 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
bsd-2-clause
submergerock/avatar-hadoop
build/hadoop-0.20.1-dev/src/contrib/hod/hodlib/Hod/hod.py
182
29420
#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 thi...
apache-2.0
sorenk/ansible
test/units/modules/network/f5/test_bigip_partition.py
23
6168
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys from nose.plugins.skip import SkipTest i...
gpl-3.0
rzambre/servo
tests/wpt/web-platform-tests/XMLHttpRequest/resources/authentication.py
247
1292
def main(request, response): if "logout" in request.GET: return ((401, "Unauthorized"), [("WWW-Authenticate", 'Basic realm="test"')], "Logged out, hopefully") session_user = request.auth.username session_pass = request.auth.password expected_user_name = request.h...
mpl-2.0
google/contentbox
third_party/unidecode/x0cc.py
4
5007
data = ( 'jjyim', # 0x00 'jjyib', # 0x01 'jjyibs', # 0x02 'jjyis', # 0x03 'jjyiss', # 0x04 'jjying', # 0x05 'jjyij', # 0x06 'jjyic', # 0x07 'jjyik', # 0x08 'jjyit', # 0x09 'jjyip', # 0x0a 'jjyih', # 0x0b 'jji', # 0x0c 'jjig', # 0x0d 'jjigg', # 0x0e 'jjigs', ...
apache-2.0
ruibarreira/linuxtrail
usr/lib/python3.4/asyncio/base_events.py
2
41913
"""Base implementation of event loop. The event loop can be broken up into a multiplexer (the part responsible for notifying us of I/O events) and the event loop proper, which wraps a multiplexer with functionality for scheduling callbacks, immediately or at a given time in the future. Whenever a public API takes a c...
gpl-3.0
dongjoon-hyun/tensorflow
tensorflow/contrib/metrics/python/metrics/classification.py
2
8319
# 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
GinnyN/towerofdimensions-django
django/utils/archive.py
78
6642
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributers. 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 So...
bsd-3-clause
ehigh2014/rt-thread
bsp/lpc43xx/M0/rtconfig.py
27
3667
import os # core to be use USE_CORE = 'CORE_M0' # toolchains options ARCH='arm' CPU = 'cortex-m0' CROSS_TOOL='keil' # get setting from environment. if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, Code...
gpl-2.0
ofayans/freeipa
ipaclient/plugins/migration.py
3
3020
# Authors: # Pavel Zuna <pzuna@redhat.com> # # Copyright (C) 2009 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 published by # the Free Software Foundation, either versio...
gpl-3.0
aristanetworks/neutron
neutron/db/migration/alembic_migrations/portsec_init_ops.py
61
1452
# Copyright 2014 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 ...
apache-2.0
MQQiang/kbengine
kbe/src/lib/python/Lib/test/test_builtin.py
72
58513
# Python test set -- built-in functions import ast import builtins import collections import io import locale import os import pickle import platform import random import sys import traceback import types import unittest import warnings from operator import neg from test.support import TESTFN, unlink, run_unittest, c...
lgpl-3.0
abhitopia/tensorflow
tensorflow/python/ops/special_math_ops.py
13
17117
# 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
JamesShaeffer/QGIS
tests/src/python/test_qgslayoutshape.py
17
2357
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayoutItemShape. .. note:: 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. ""...
gpl-2.0
xushuwei202/Vintageous
ex/parser/scanner.py
9
4444
''' Tokenization for the Vim command line. ''' from Vintageous.ex.ex_error import ERR_UNKNOWN_COMMAND from Vintageous.ex.ex_error import VimError from . import subscanners from .state import EOF from .state import ScannerState from .tokens import TokenComma from .tokens import TokenDigits from .tokens import TokenDol...
mit
jorik041/zmqproto
zmqproto/zre.py
5
2863
import struct import random class ZreProtocol: # http://rfc.zeromq.org/spec:20 def __init__(self, ipaddr): self.uuid = random.randint(0,20000) self.port = 50000 + random.randint(0,10000) self.seq = 0 self.ipaddr = ipaddr self.groups = [] self.group_status_seq = 0...
lgpl-3.0
yaojingwu1992/XlsxWriter
xlsxwriter/test/sharedstrings/test_write_sst.py
8
1422
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...sharedstrings import SharedStringTable from ...sharedstrings import SharedStrings c...
bsd-2-clause
joker946/nova
nova/tests/unit/image/fake.py
22
9432
# Copyright 2011 Justin Santa Barbara # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
apache-2.0
jmcarp/django
django/core/management/__init__.py
32
13476
from __future__ import unicode_literals import collections import os import pkgutil import sys from importlib import import_module import django from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import ( BaseComma...
bsd-3-clause
ABaldwinHunter/django-clone-classic
tests/middleware_exceptions/tests.py
119
44368
import sys from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.core.signals import got_request_exception from django.http import HttpResponse from django.template import engines from django.template.response import TemplateResponse from django.test import RequestFactory, S...
bsd-3-clause
suvarnaraju/robotframework
src/robot/libdocpkg/__init__.py
27
1580
# Copyright 2008-2015 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
TeachAtTUM/edx-platform
openedx/core/djangoapps/content/block_structure/transformer.py
25
9130
""" This module provides the abstract base class for all Block Structure Transformers. """ from abc import abstractmethod class BlockStructureTransformer(object): """ Abstract base class for all block structure transformers. """ # All Transformers are expected to maintain version-related class # ...
agpl-3.0
ahmadiga/min_edx
lms/djangoapps/courseware/student_field_overrides.py
164
3118
""" API related to providing field overrides for individual students. This is used by the individual due dates feature. """ import json from .field_overrides import FieldOverrideProvider from .models import StudentFieldOverride class IndividualStudentOverrideProvider(FieldOverrideProvider): """ A concrete i...
agpl-3.0
Korkki/django
tests/syndication_tests/feeds.py
278
4547
from __future__ import unicode_literals from django.contrib.syndication import views from django.utils import feedgenerator from django.utils.timezone import get_fixed_timezone from .models import Article, Entry class TestRss2Feed(views.Feed): title = 'My blog' description = 'A more thorough description of ...
bsd-3-clause
johankaito/fufuka
microblog/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py
1009
2281
import codecs from uuid import uuid4 from io import BytesIO from .packages import six from .packages.six import b from .fields import RequestField writer = codecs.lookup('utf-8')[3] def choose_boundary(): """ Our embarassingly-simple replacement for mimetools.choose_boundary. """ return uuid4().hex...
apache-2.0
inspyration/odoo
addons/website_crm_partner_assign/controllers/main.py
271
7541
# -*- coding: utf-8 -*- import werkzeug from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import slug, unslug from openerp.tools.translate import _ class WebsiteCrmPartnerAssign(http.Controller): _references_...
agpl-3.0
noelbk/neutron-juniper
neutron/openstack/common/rpc/impl_fake.py
11
5842
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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/LICEN...
apache-2.0
repotvsupertuga/repo
plugin.program.super.favourites/yt.py
19
16890
# # Copyright (C) 2013 Sean Poyser # # # This code is a derivative of the YouTube plugin for XBMC # released under the terms of the GNU General Public License as published by # the Free Software Foundation; version 3 # Copyright (C) 2010-2012 Tobias Ussing And Henrik Mosgaard Jensen # # This Program is free soft...
gpl-2.0
mazimm/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/Draw/DrawMCtrueSpectrum.py
41
5799
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
bsd-3-clause
ar7z1/ansible
lib/ansible/modules/cloud/openstack/os_group.py
34
4758
#!/usr/bin/python # Copyright (c) 2016 IBM # 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
vimagick/youtube-dl
youtube_dl/extractor/canal13cl.py
154
1912
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class Canal13clIE(InfoExtractor): _VALID_URL = r'^http://(?:www\.)?13\.cl/(?:[^/?#]+/)*(?P<id>[^/?#]+)' _TEST = { 'url': 'http://www.13.cl/t13/nacional/el-circulo-de-hierro-de-michelle-bachelet-en-su-...
unlicense
coolbombom/CouchPotato
library/imdb/parser/http/companyParser.py
143
3439
""" parser.http.companyParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a company. E.g., for "Columbia Pictures [us]" the referred page would be: main details: http://akas.imdb.com/company/co0071509/ Copyright 2008...
gpl-3.0
SUSE/kiwi
test/unit/tasks/base_test.py
1
2767
import sys from mock import patch from pytest import ( raises, fixture ) import logging from ..test_helper import argv_kiwi_tests import kiwi.xml_parse from kiwi.tasks.base import CliTask from kiwi.exceptions import KiwiConfigFileNotFound class TestCliTask: @fixture(autouse=True) def inject_fixtures(se...
gpl-3.0
fxfitz/ansible
lib/ansible/plugins/lookup/password.py
8
12096
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2013, Javier Candeira <javier@candeira.com> # (c) 2013, Maykel Moya <mmoya@speedyrails.com> # (c) 2017 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, divisio...
gpl-3.0
apocquet/django
django/utils/ipv6.py
225
7971
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
bsd-3-clause
openstates/openstates.org
dashboards/models.py
1
1807
from django.db import models from openstates.data.models import LegislativeSession class DataQualityReport(models.Model): chamber = models.CharField(max_length=20) session = models.ForeignKey(LegislativeSession, on_delete=models.CASCADE) total_bills = models.PositiveIntegerField() latest_bill_create...
mit
marissazhou/django
django/contrib/staticfiles/storage.py
334
14776
from __future__ import unicode_literals import hashlib import json import os import posixpath import re from collections import OrderedDict from django.conf import settings from django.contrib.staticfiles.utils import check_settings, matches_patterns from django.core.cache import ( InvalidCacheBackendError, cache...
bsd-3-clause
dhmncivichacks/timewebsite
tests/test_events.py
2
1294
import unittest from base import BaseTestCase from flask.ext.login import current_user class TestEvents(BaseTestCase): # Ensure route was set up correctly def test_events_route(self): response = self.client.get('/events', content_type='html/text') self.assertEqual(response.status_code, 200) ...
isc
siddhartharay007/PCV
PCV/classifiers/bayes.py
21
1884
from numpy import * class BayesClassifier(object): def __init__(self): """ Initialize classifier with training data. """ self.labels = [] # class labels self.mean = [] # class mean self.var = [] # class variances self.n = 0 # nbr o...
bsd-2-clause
theguardian/headphones
lib/unidecode/x089.py
252
4628
data = ( 'Ji ', # 0x00 'Zhi ', # 0x01 'Gua ', # 0x02 'Ken ', # 0x03 'Che ', # 0x04 'Ti ', # 0x05 'Ti ', # 0x06 'Fu ', # 0x07 'Chong ', # 0x08 'Xie ', # 0x09 'Bian ', # 0x0a 'Die ', # 0x0b 'Kun ', # 0x0c 'Duan ', # 0x0d 'Xiu ', # 0x0e 'Xiu ', # 0x0f 'He ', # 0x10 'Yuan ...
gpl-3.0
Javiercerna/MissionPlanner
Lib/chunk.py
65
5539
"""Simple class to read IFF chunks. An IFF chunk (used in formats such as AIFF, TIFF, RMFF (RealMedia File Format)) has the following structure: +----------------+ | ID (4 bytes) | +----------------+ | size (4 bytes) | +----------------+ | data | | ... | +----------------+ The ID...
gpl-3.0
tmpgit/intellij-community
python/testData/inspections/PyNumpyType/Empty.py
69
1456
def empty(shape, dtype=None, order='C'): # real signature unknown; restored from __doc__ """ empty(shape, dtype=float, order='C') Return a new array of given shape and type, without initializing entries. Parameters ---------- shape : int or tuple of int Shape of the...
apache-2.0
ngageoint/voxel-globe
voxel_globe/meta/tools.py
2
2031
import numpy import voxel_globe.meta.models import inspect def projectPoint(K, T, llh_xyz, xs, ys, distances=None, zs=None): ''' Project a set of points xs, ys (Nx1 numpy array each) through the K (3x3) T (4x4) model at llh_xyz (3x1). You must either specify the distances to project (scalar) or the z in...
mit
leimaohui/dnf-yocto
dnf/subject.py
2
5147
# subject.py # Implements Subject. # # Copyright (C) 2012-2016 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is ...
gpl-2.0
patriciolobos/desa8
openerp/addons/mass_mailing/wizard/mail_compose_message.py
308
3066
# -*- coding: utf-8 -*- from openerp.osv import osv, fields class MailComposeMessage(osv.TransientModel): """Add concept of mass mailing campaign to the mail.compose.message wizard """ _inherit = 'mail.compose.message' _columns = { 'mass_mailing_campaign_id': fields.many2one( 'ma...
agpl-3.0
Vagab0nd/SiCKRAGE
lib3/twilio/rest/verify/v2/service/rate_limit/bucket.py
2
15795
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
gpl-3.0
vnsofthe/odoo
addons/website/models/website.py
25
35943
# -*- coding: utf-8 -*- import cStringIO import contextlib import datetime import hashlib import inspect import logging import math import mimetypes import unicodedata import os import re import time import urlparse from PIL import Image from sys import maxint import werkzeug # optional python-slugify import (https:/...
agpl-3.0
WoLpH/CouchPotatoServer
couchpotato/core/providers/info/couchpotatoapi/main.py
1
3986
from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.logger import CPLog from couchpotato.core.providers.info.base import MovieProvider from couchpotato.environment import Env import base64 import time log = CPLog(__name__) class Couc...
gpl-3.0
Eyeless95/samsung_g531_kernel
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
OpenPymeMx/OCB
addons/account_followup/report/__init__.py
447
1108
# -*- 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
gtko/CouchPotatoServer
libs/suds/bindings/multiref.py
209
4181
# 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 ...
gpl-3.0
cherez/youtube-dl
youtube_dl/extractor/dropbox.py
236
1299
# coding: utf-8 from __future__ import unicode_literals import os.path import re from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote from ..utils import url_basename class DropboxIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dropbox[.]com/sh?/(?P<id>[a-zA-Z0-9]{15})/.*' ...
unlicense
andyzsf/edx
lms/djangoapps/bulk_email/tests/test_course_optout.py
4
4827
# -*- coding: utf-8 -*- """ Unit tests for student optouts from course email """ import json from mock import patch from django.core import mail from django.core.management import call_command from django.core.urlresolvers import reverse from django.conf import settings from django.test.utils import override_settings ...
agpl-3.0
navycrow/Sick-Beard
lib/configobj.py
145
86447
# configobj.py # A config file reader/writer that supports nested sections in config files. # Copyright (C) 2005-2009 Michael Foord, Nicola Larosa # E-mail: fuzzyman AT voidspace DOT org DOT uk # nico AT tekNico DOT net # ConfigObj 4 # http://www.voidspace.org.uk/python/configobj.html # Released subject to th...
gpl-3.0
dhutty/ansible
plugins/inventory/docker.py
132
12104
#!/usr/bin/env python # (c) 2013, Paul Durivage <paul.durivage@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 # (a...
gpl-3.0
kernow/ansible-modules-core
system/setup.py
40
5577
#!/usr/bin/python # -*- coding: utf-8 -*- # (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...
gpl-3.0
alexlo03/ansible
lib/ansible/modules/cloud/rackspace/rax_mon_check.py
77
10762
#!/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
tomkrus007/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/euckrfreq.py
3121
45978
######################## 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...
lgpl-2.1
chadnetzer/numpy-gaurdro
numpy/doc/ufuncs.py
6
5520
""" =================== Universal Functions =================== Ufuncs are, generally speaking, mathematical functions or operations that are applied element-by-element to the contents of an array. That is, the result in each output array element only depends on the value in the corresponding input array (or arrays) a...
bsd-3-clause
alacritythief/django-allauth
allauth/socialaccount/south_migrations/0008_client_id.py
78
6323
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." for app in orm.SocialApp.objects.all(): app.client_id = app.key ...
mit
aperigault/ansible
lib/ansible/modules/cloud/vmware/vmware_dvswitch_pvlans.py
23
24477
#!/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
PaulDeStefano/pythonsamples
sbf2PVTGeo.py
1
7187
#!/usr/local/bin/python2.7 """ sbf2offset.py Reads SBF binary data files and produces plain text file containing PVTGeoblock data Copyright (C) 2013 Paul R. DeStefano This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publis...
gpl-3.0
benpatterson/edx-platform
common/djangoapps/student/tests/test_recent_enrollments.py
63
7937
""" Tests for the recently enrolled messaging within the Dashboard. """ import datetime from django.conf import settings from django.core.urlresolvers import reverse from opaque_keys.edx import locator from pytz import UTC import unittest import ddt from shoppingcart.models import DonationConfiguration from student.te...
agpl-3.0
rockstor/rockstor-core
src/rockstor/storageadmin/south_migrations/0022_auto__add_dvolume__add_unique_dvolume_container_dest_dir__add_containe.py
9
35685
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'DVolume' db.create_table(u'storageadmin_dvolume', ( ...
gpl-3.0
webOS-ports/qtwebkit
Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py
130
1524
# # Copyright (C) 2011 Google Inc. All rights reserved. # # 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; either # version 2 of the License, or (at your option) any later version. # # T...
gpl-2.0
khendarg/ubi
filter_sps.py
1
6189
#!/usr/bin/env python2 from __future__ import print_function import argparse, json, sys, time, os import yaml VERBOSITY = 1 def info(*substrs): print('[INFO]: ', end='', file=sys.stderr) print(*substrs, file=sys.stderr) def warn(*substrs): print('[WARNING]: ', end='', file=sys.stderr) print(*substrs, file=sy...
bsd-3-clause
eadgarchen/tensorflow
tensorflow/examples/saved_model/saved_model_half_plus_two.py
56
9383
## 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 applic...
apache-2.0
mapr/sahara
sahara/plugins/mapr/domain/service.py
1
8580
# Copyright (c) 2015, MapR Technologies # # 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...
apache-2.0
aivarsk/scrapy
setup.py
83
1605
from os.path import dirname, join from setuptools import setup, find_packages with open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f: version = f.read().decode('ascii').strip() setup( name='Scrapy', version=version, url='http://scrapy.org', description='A high-level Web Crawling and Web...
bsd-3-clause
phlax/translate
translate/misc/multistring.py
2
4223
# -*- coding: utf-8 -*- # # Copyright 2006 Zuza Software Foundation # # This file is part of translate. # # translate 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 y...
gpl-2.0
w1ll1am23/home-assistant
homeassistant/components/totalconnect/alarm_control_panel.py
3
5026
"""Interfaces with TotalConnect alarm control panels.""" import logging import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, SUPPORT_ALARM_ARM_NIGHT, ) from homeassistant.const import ( ...
apache-2.0
nrz/ylikuutio
external/bullet3/examples/pybullet/numpy/humanoid_running.py
4
494200
import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import sys import numpy as np import argparse import pybullet as p import time gui = True cid = p.connect(p.SHARED_MEMORY...
agpl-3.0
gandrewstone/BitcoinUnlimited
qa/rpc-tests/test_framework/netutil.py
328
4562
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Linux network utilities import sys import socket import fcntl import struct import array import os import bi...
mit
Nico60/kernel_lge_hammerhead
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
hatstand/webcal-filter
lib/icalendar/tests/test_recurrence.py
4
2062
# -*- coding: utf-8 -*- from icalendar.caselessdict import CaselessDict from icalendar.tests import unittest import datetime import icalendar import os import pytz class TestRecurrence(unittest.TestCase): def setUp(self): directory = os.path.dirname(__file__) self.cal = icalendar.Calendar.from_i...
mit
bblacey/FreeCAD-MacOS-CI
src/Tools/generate.py
15
2336
#! python # -*- coding: utf-8 -*- # (c) 2006 Jürgen Riegel GPL Usage = """generate - generates a FreeCAD Module out of an XML model Usage: generate [Optionen] Model.xml Model2.xml Model3.xml ... Options: -h, --help print this help -o, --outputPath specify the output path if differs fr...
lgpl-2.1
joshzarrabi/e-mission-server
emission/analysis/plotting/leaflet_osm/our_plotter.py
1
14864
import pandas as pd import folium.folium as folium import itertools import numpy as np import logging import geojson as gj import copy import attrdict as ad from functional import seq # import emission.analysis.classification.cleaning.location_smoothing as ls import bson.json_util as bju import emission.storage.decor...
bsd-3-clause
tijme/angularjs-sandbox-escape-scanner
acstis/helpers/FileLoggingHelper.py
2
3000
# -*- coding: utf-8 -*- # MIT License # # Copyright (c) 2017 Tijme Gommers # # 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...
mit
Evervolv/android_external_chromium_org
third_party/closure_linter/closure_linter/error_check.py
137
3620
#!/usr/bin/env python # # Copyright 2011 The Closure Linter 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 #...
bsd-3-clause
andyzsf/django
django/core/cache/backends/base.py
104
8793
"Base Cache class." from __future__ import unicode_literals import time import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRun...
bsd-3-clause
GaetanCambier/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/ign.py
23
5296
from __future__ import unicode_literals import re from .common import InfoExtractor class IGNIE(InfoExtractor): """ Extractor for some of the IGN sites, like www.ign.com, es.ign.com de.ign.com. Some videos of it.ign.com are also supported """ _VALID_URL = r'https?://.+?\.ign\.com/(?P<type>video...
gpl-3.0
gratefulfrog/lib
python/pmg_tk/skins/normal/ColorMap.py
1
2882
from Tkinter import * class ColorMap: """ A simple converter from a ColorRamp (a gradient of nColors) to a ColorMap (a graph of data + visual way pts) """ def __init__(self,parent,ramp,width=None,height=None,data=None): """ just produces the canvas/image for the ColorRamp ...
gpl-2.0
ryancoleman/tdt2014-part2
scripts/pdbMostOccupied.py
1
1325
#!/usr/bin/env python #ryan g coleman ryangc@mail.med.upenn.edu #kim sharp, brian shoichet, upenn, ucsf own this, whatevers #reads a pdb file, for each atom, pick the most occupied one. #useful when the alternate positions and occupancies are meaningful. #if tie, just pick a consistent set for each residue. import ...
gpl-2.0
imron/scalyr-agent-2
benchmarks/scripts/send_usage_data_to_codespeed.py
2
13778
#!/usr/bin/env python # Copyright 2014-2020 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
yelfathi/juniper-mpls-check
lsp_ping.py
1
5582
# -- coding: utf-8 -- __author__ = "yelfathi" import argparse import os import re import time from jnpr.junos import Device from multiprocessing import Process class LSPping(Process): def __init__(self, device, user, passwd, treetrace): self.device = device self.user = user self.passwd ...
unlicense
tombstone/models
official/nlp/transformer/misc.py
1
10095
# 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
tutengfei/sulley
unit_tests/legos.py
10
1500
from sulley import * def run (): tag() ndr_string() ber() # clear out the requests. blocks.REQUESTS = {} blocks.CURRENT = None ######################################################################################################################## def tag (): s_initialize("UNIT TEST TAG...
gpl-2.0
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/cinderclient/v1/availability_zones.py
7
1427
# Copyright 2011-2013 OpenStack Foundation # Copyright 2013 IBM Corp. # 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/license...
mit
disqus/django-mailviews
mailviews/messages.py
4
9335
from django.core.exceptions import ImproperlyConfigured from django.core.mail.message import EmailMessage, EmailMultiAlternatives from django.template import Context from django.template.loader import get_template, select_template from mailviews.utils import unescape class EmailMessageView(object): """ Base ...
apache-2.0
a-doumoulakis/tensorflow
tensorflow/contrib/graph_editor/tests/match.py
186
5700
# 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
meabsence/python-for-android
python3-alpha/extra_modules/gdata/calendar/data.py
121
9852
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
freedomhui/cinder
cinder/tests/image/fake.py
4
8738
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Justin Santa Barbara # Copyright 2012 OpenStack LLC # 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 ...
apache-2.0