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 |
|---|---|---|---|---|---|
godLoveLucifer/viewfinder | backend/www/test/fetch_logs_test.py | 13 | 7976 | # Copyright 2012 Viewfinder Inc. All Rights Reserved.
# -*- coding: utf-8 -*-
__author__ = 'spencer@emailscrubbed.com (Spencer Kimball)'
import iso8601
import logging
import math
import shutil
import sys
import tempfile
import time
from datetime import datetime
from tornado import options
from StringIO import String... | apache-2.0 |
ominux/personfinder | tests/server_test_cases/api_key_management_tests.py | 8 | 7855 | #!/usr/bin/python2.7
# encoding: utf-8
# Copyright 2010 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 ... | apache-2.0 |
leixinstar/twisted-intro | twisted-client-2/get-poetry.py | 10 | 3108 | # This is the Twisted Get Poetry Now! client, version 2.0.
# NOTE: This should not be used as the basis for production code.
import datetime, optparse
from twisted.internet.protocol import Protocol, ClientFactory
def parse_args():
usage = """usage: %prog [options] [hostname]:port ...
This is the Get Poetry No... | mit |
shabab12/edx-platform | lms/djangoapps/verify_student/tests/test_ssencrypt.py | 63 | 3638 | import base64
from nose.tools import assert_equals
from lms.djangoapps.verify_student.ssencrypt import (
aes_decrypt, aes_encrypt, encrypt_and_encode, decode_and_decrypt,
rsa_decrypt, rsa_encrypt
)
def test_aes():
key_str = "32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae"
key = key_... | agpl-3.0 |
shadow000902/blog_source | node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py | 2637 | 9586 | #!/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.
"""Make the format of a vcproj really pretty.
This script normalize and sort an xml. It also fetches all the properties
inside linked... | mit |
salomon1184/bite-project | deps/gdata-python-client/src/gdata/Crypto/PublicKey/qNEW.py | 228 | 5545 | #
# qNEW.py : The q-NEW signature algorithm.
#
# Part of the Python Cryptography Toolkit
#
# Distribute and use freely; there are no restrictions on further
# dissemination and usage except those imposed by the laws of your
# country of residence. This software is provided "as is" without
# warranty of fitness fo... | apache-2.0 |
jordij/wagtail | wagtail/wagtailcore/tests/test_management_commands.py | 8 | 11327 | from datetime import timedelta
from django.test import TestCase
from django.core import management
from django.utils import timezone
from django.utils.six import StringIO
from django.db import models
from wagtail.wagtailcore.models import Page, PageRevision
from wagtail.wagtailcore.signals import page_published, page... | bsd-3-clause |
gwwfps/boxrps | flask/testing.py | 7 | 1356 | # -*- coding: utf-8 -*-
"""
flask.testing
~~~~~~~~~~~~~
Implements test support helpers. This module is lazily imported
and usually not used in production environments.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from werkzeug import Client
from f... | mit |
weolar/miniblink49 | v8_7_5/tools/testrunner/local/pool.py | 3 | 9357 | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# for py2/py3 compatibility
from __future__ import print_function
from contextlib import contextmanager
from multiprocessing import ... | apache-2.0 |
iw3hxn/LibrERP | purchase_order_version/models/inherit_purchase_order_line.py | 1 | 2019 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2004-2014 Didotech srl (<http://www.didotech.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publish... | agpl-3.0 |
Tealium/nagios | files/default/plugins/check_mongodb_backup.py | 1 | 6143 | #!/usr/bin/env python
desc = """
Checks the status of the most recent MongoDB backup or, with the --snap option,
checks that the snapshots for the most recent backup were completed.
"""
import kazoo
from kazoo.client import KazooClient
from kazoo.client import KazooState
import yaml
import argparse
import time
from d... | apache-2.0 |
ellipsis14/dolfin-adjoint | tests_dolfin/ode_tentusscher_quick/tentusscher_2004_mcell.py | 2 | 20036 | from __future__ import division
import numpy as _np
list_types = (_np.ndarray, list)
inf = float("infinity")
def value_formatter(value, width=0):
"""
Return a formated string of a value
Arguments
---------
value : any
The value which is formatted
width : int
A min str length va... | lgpl-3.0 |
Antiun/c2c-rd-addons | hr_attendance_sheet_check/__init__.py | 4 | 1180 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>)
#
# ... | agpl-3.0 |
tima/ansible | lib/ansible/playbook/attribute.py | 39 | 4253 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
nishigori/boto | boto/ec2/zone.py | 152 | 2601 | # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | mit |
fkie/rosrepo | src/rosrepo/util.py | 1 | 6206 | # coding=utf-8
#
# ROSREPO
# Manage ROS workspaces with multiple Gitlab repositories
#
# Author: Timo Röhling
#
# Copyright 2016 Fraunhofer FKIE
#
# 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 a... | apache-2.0 |
purpleidea/macaronic-net | django/contrib/gis/measure.py | 398 | 12282 | # Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
# 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 copyright notice,
#... | agpl-3.0 |
kaksmet/servo | tests/wpt/web-platform-tests/tools/html5lib/html5lib/filters/whitespace.py | 1730 | 1142 | from __future__ import absolute_import, division, unicode_literals
import re
from . import _base
from ..constants import rcdataElements, spaceCharacters
spaceCharacters = "".join(spaceCharacters)
SPACES_REGEX = re.compile("[%s]+" % spaceCharacters)
class Filter(_base.Filter):
spacePreserveElements = frozenset... | mpl-2.0 |
yingerj/rdflib | rdflib/plugins/parsers/pyMicrodata/microdata.py | 13 | 23539 | # -*- coding: utf-8 -*-
"""
The core of the Microdata->RDF conversion, a more or less verbatim implementation of the
U{W3C IG Note<http://www.w3.org/TR/microdata-rdf/>}. Because the implementation was also used to check
the note itself, it tries to be fairly close to the text.
@organization: U{World Wide Web Consort... | bsd-3-clause |
GladeRom/android_external_chromium_org | third_party/cython/src/Tools/site_scons/site_tools/cython.py | 125 | 1721 | """
Tool to run Cython files (.pyx) into .c and .cpp.
TODO:
- Add support for dynamically selecting in-process Cython
through CYTHONINPROCESS variable.
- Have a CYTHONCPP option which turns on C++ in flags and
changes output extension at the same time
VARIABLES:
- CYTHON - The path to the "cython" command li... | bsd-3-clause |
simone-campagna/zirkon | zirkon/toolbox/undefined.py | 2 | 1262 | # -*- coding: utf-8 -*-
#
# Copyright 2013 Simone Campagna
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 |
amenonsen/ansible | lib/ansible/modules/network/layer2/_net_vlan.py | 21 | 1872 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, 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 |
InfinitiveOS-Devices/android_kernel_oneplus_msm8974 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
ShaningSoul/pi-qmc | lib/gtest-1.6.0/test/gtest_catch_exceptions_test.py | 414 | 9312 | #!/usr/bin/env python
#
# Copyright 2010 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 o... | gpl-2.0 |
Hearen/OnceServer | pool_management/bn-xend-core/xend/BNVMAPI.py | 1 | 374814 | import traceback
import inspect
import os
import Queue
import string
import sys
import threading
import time
import xmlrpclib
import socket
import struct
import copy
import re
import XendDomain, XendDomainInfo, XendNode, XendDmesg, XendConfig
import XendLogging, XendTaskManager, XendAPIStore, XendIOCont... | mit |
ssarangi/numba | numba/tests/test_operators.py | 2 | 45894 | from __future__ import print_function
import copy
import itertools
import operator
import warnings
import numpy as np
from numba.compiler import compile_isolated, Flags
from numba import types, typeinfer, utils
from numba.config import PYVERSION
from .support import TestCase
from numba.tests.true_div_usecase import ... | bsd-2-clause |
KyleKing/PiAlarm | .archive-python/modules/tm1637.py | 1 | 6795 | """Manipulate a TM1637 7-segment display."""
import math
import threading
from time import localtime, sleep
from . import config as cg
from .context import IO
IO.setwarnings(False)
IO.setmode(IO.BCM)
HexDigits = [0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d,
0x07, 0x7f, 0x6f, 0x77, 0x7c, 0x39, 0x5e, 0x79, ... | mit |
switowski/invenio | invenio/modules/workflows/client.py | 16 | 5135 | # -*- coding: utf-8 -*-
# This file is part of Invenio.
# Copyright (C) 2012, 2013, 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option)... | gpl-2.0 |
iradul/phantomjs-clone | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/expectedfailures.py | 126 | 2626 | # 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 ... | bsd-3-clause |
fresskarma/tinyos-1.x | tools/python/pytos/util/MessageSnooper.py | 1 | 4759 | #!/usr/bin/python
#$Id: MessageSnooper.py,v 1.2 2005/10/27 02:23:37 kaminw Exp $
# "Copyright (c) 2000-2003 The Regents of the University of California.
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose, without fee, and without written a... | bsd-3-clause |
ybenitezf/miner | core/pydal/adapters/mssql.py | 11 | 33043 | # -*- coding: utf-8 -*-
import re
import sys
from .._globals import IDENTITY
from .._compat import PY2, to_unicode, iteritems, integer_types
from ..objects import Expression
from ..helpers.methods import varquote_aux
from .base import BaseAdapter
long = integer_types[-1]
class MSSQLAdapter(BaseAdapter):
drivers ... | gpl-2.0 |
espenak/awsfabrictasks | awsfabrictasks/tests/s3/test_api.py | 2 | 1830 | from __future__ import unicode_literals
from unittest import TestCase
from shutil import rmtree
from tempfile import mkdtemp
from os import makedirs
from os.path import join, exists, dirname
from awsfabrictasks.s3.api import dirlist_absfilenames
from awsfabrictasks.s3.api import localpath_to_s3path
from awsfabrictask... | bsd-3-clause |
stankovski/AutoRest | ClientRuntimes/Python/msrestazure/msrestazure/azure_active_directory.py | 1 | 17399 | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | mit |
jcda/magpie | tests/test_basics.py | 5 | 1537 | # coding=UTF-8
from os import makedirs, path, rmdir
from shutil import rmtree
from urllib import quote
from base import BaseTest
class Test(BaseTest):
def test_proof_of_concept(self):
res = self.get('/')
def test_bad_notebook_redirects_home(self):
home = self.get('/')
dne = self.get('... | mit |
memnonila/django-cms | cms/south_migrations/0051_fix_content_type.py | 63 | 16221 | # -*- coding: 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."
try:
# Let's fix the brokem page entry
ct = orm['cont... | bsd-3-clause |
jalexvig/tensorflow | tensorflow/python/saved_model/saved_model_test.py | 4 | 61453 | # 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 |
LennartP/flask-admin | examples/mongoengine/app.py | 37 | 3126 | import datetime
from flask import Flask
import flask_admin as admin
from flask_mongoengine import MongoEngine
from flask_admin.form import rules
from flask_admin.contrib.mongoengine import ModelView
# Create application
app = Flask(__name__)
# Create dummy secrey key so we can use sessions
app.config['SECRET_KEY'] ... | bsd-3-clause |
thaskell1/linux | tools/perf/scripts/python/net_dropmonitor.py | 1812 | 1749 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... | gpl-2.0 |
QinerTech/QinerApps | openerp/addons/project_issue/__openerp__.py | 27 | 1329 | # -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Issue Tracking',
'version': '1.0',
'category': 'Project Management',
'sequence': 40,
'summary': 'Support, Bug Tracker, Helpdesk',
'description': """
Track Issues/Bugs Management for P... | gpl-3.0 |
jclakkis/discus-inferno | flaskenv/lib/python2.7/site-packages/pip/_vendor/requests/auth.py | 294 | 6173 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import logging
from base64 import b64encode
from .compat import urlparse, str
from .cookies import extract_cookies_to_jar
from .utils import pars... | mit |
dmnfarrell/peat | pKaTool/pKa_system.py | 1 | 55804 | #!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
#
# pKaTool - analysis of systems of titratable groups
# Copyright (C) 2010 Jens Erik Nielsen
#
# 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... | mit |
Elettronik/SickRage | lib/dogpile/cache/backends/memory.py | 47 | 3640 | """
Memory Backends
---------------
Provides simple dictionary-based backends.
The two backends are :class:`.MemoryBackend` and :class:`.MemoryPickleBackend`;
the latter applies a serialization step to cached values while the former
places the value as given into the dictionary.
"""
from dogpile.cache.api import Ca... | gpl-3.0 |
ryokochang/Slab-GCS | packages/IronPython.StdLib.2.7.5-beta1/content/Lib/stringold.py | 293 | 12449 | # module 'string' -- A collection of string operations
# Warning: most of the code you see here isn't normally used nowadays. With
# Python 1.6, many of these functions are implemented as methods on the
# standard string object. They used to be implemented by a built-in module
# called strop, but strop is now obsolet... | gpl-3.0 |
beni55/django | django/core/mail/message.py | 8 | 16462 | from __future__ import unicode_literals
import mimetypes
import os
import random
import sys
import time
from email import (
charset as Charset, encoders as Encoders, generator, message_from_string,
)
from email.header import Header
from email.message import Message
from email.mime.base import MIMEBase
from email.m... | bsd-3-clause |
alexfalcucc/anaconda | anaconda_lib/linting/pep8.py | 1 | 79405 | #!/usr/bin/env python
# pep8.py - Check Python source code formatting, according to PEP 8
# Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net>
# Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com>
# Copyright (C) 2014 Ian Lee <ianlee1521@gmail.com>
#
# Permission is hereby granted, free of c... | gpl-3.0 |
mustafat/odoo-1 | addons/event/wizard/__init__.py | 435 | 1067 | # -*- 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 |
andnovar/ggplot | ggplot/geoms/geom_vline.py | 12 | 1496 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from .geom import geom
class geom_vline(geom):
DEFAULT_AES = {'color': 'black', 'linetype': 'solid',
'size': 1.0, 'alpha': None, 'x': None,
'ymin': None, 'ymax': None}... | bsd-2-clause |
dudanogueira/microerp | microerp/producao/management/commands/nfe.py | 1 | 6041 | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from cadastro.models import Cidade, Bairro
from rh.models import Funcionario, PeriodoTrabalhado, Cargo, Departamento
from account.models import User
from optparse import make_option
import os, cs... | lgpl-3.0 |
rjpower/spark | python/pyspark/shell.py | 5 | 1332 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 |
shinho/SC2 | bin/add-opt-in.py | 1 | 7666 | #!/usr/bin/env python
# Copyright (c) 2012, Adobe Systems Incorporated
# 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 not... | gpl-3.0 |
rvazarkar/Empire | lib/modules/situational_awareness/network/powerview/process_hunter.py | 2 | 5523 | from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-ProcessHunter',
'Author': ['@harmj0y'],
'Description': ('Query the process lists of remote machines, searching for processes with a specific name or ow... | bsd-3-clause |
aguirrea/lucy | tests/testBalieroWalk.py | 1 | 2371 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Andrés Aguirre Dorelo
# MINA/INCO/UDELAR
#
# Execution of individuals resulted from the Baliero and Pias work
#
# 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 Softwa... | gpl-3.0 |
dhstack/gae-init | main/auth/dropbox.py | 8 | 1407 | # coding: utf-8
import flask
import auth
import config
import model
import util
from main import app
dropbox_config = dict(
access_token_method='POST',
access_token_url='https://api.dropbox.com/1/oauth2/token',
authorize_url='https://www.dropbox.com/1/oauth2/authorize',
base_url='https://www.dropbox.com/1/'... | mit |
rlugojr/django | django/utils/dates.py | 41 | 2295 | "Commonly-used date structures"
from django.utils.translation import gettext_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'), ... | bsd-3-clause |
afandria/sky_engine | build/android/pylib/device/device_utils.py | 17 | 62963 | # 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.
"""Provides a variety of device interactions based on adb.
Eventually, this will be based on adb_wrapper.
"""
# pylint: disable=unused-argument
import coll... | bsd-3-clause |
nikolaichik/SigmoID | Python/RepeatGen.py | 1 | 23652 | import sys
import argparse
from time import process_time
import Bio
from Bio.SeqFeature import FeatureLocation
from Bio.SeqFeature import SeqFeature
from decimal import *
class MySeqFeature(SeqFeature):
def __str__(self):
out = "type: %s\n" % self.type
if self.strand == 1:
out += "loca... | gpl-3.0 |
lorensen/VTKExamples | src/Python/VisualizationAlgorithms/Cutter.py | 1 | 1710 | #!/usr/bin/env python
# A simple script to demonstrate the vtkCutter function
import vtk
def main():
colors = vtk.vtkNamedColors()
# Create a cube
cube = vtk.vtkCubeSource()
cube.SetXLength(40)
cube.SetYLength(30)
cube.SetZLength(20)
cubeMapper = vtk.vtkPolyDataMapper()
cubeMapper.S... | apache-2.0 |
leomao10/shadowsocks | shadowsocks/lru_cache.py | 983 | 4290 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 |
idekerlab/graph-services | services/ig_community/service/Adapter_test/Adapter.py | 3 | 6020 | import igraph as ig
import logging
import itertools
import cxmate
from cxmate.cxmate_pb2 import NetworkElement
logger = logging.getLogger('IgraphAdapter')
logger.setLevel(logging.INFO)
class IgraphAdapter(cxmate.Adapter):
@staticmethod
def to_igraph(ele_iter):
networks = []
while ele_iter:
... | mit |
chand3040/cloud_that | common/test/acceptance/pages/lms/open_response.py | 165 | 4579 | """
Open-ended response in the courseware.
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from .rubric import RubricPage
class OpenResponsePage(PageObject):
"""
Open-ended response in the courseware.
"""
url = None
def is_browser_on_page(self):
... | agpl-3.0 |
courtarro/gnuradio | gr-blocks/python/blocks/qa_pipe_fittings.py | 57 | 4060 | #!/usr/bin/env python
#
# Copyright 2005,2007,2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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... | gpl-3.0 |
kickstandproject/python-ami | ami/openstack/common/local.py | 57 | 1722 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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.apac... | apache-2.0 |
sanethd/device-cloud-appliances | Arduino Robot/PC_Clients/PythonRobotController/DirectPublishClient/BAMPythonPublisher/thrift/server/TNonblockingServer.py | 111 | 11818 | #
# 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 u... | apache-2.0 |
alxgu/ansible-modules-core | cloud/azure/azure_rm_networkinterface.py | 46 | 25027 | #!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.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 Soft... | gpl-3.0 |
glneo/gnuradio-davisaf | grc/gui/Block.py | 27 | 6589 | """
Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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... | gpl-3.0 |
ctlajoie/ansible-modules-core | files/lineinfile.py | 8 | 13705 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com>
# (c) 2014, Ahti Kitsik <ak@ahtik.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 S... | gpl-3.0 |
ngsxfem/ngsxfem | demos/fictdom_mlset.py | 1 | 4537 | """
In this example we solve an unfitted Poisson problem similar to the one in
`fictdom.py`, however this time with the unfitted geometry being the
unit square. This example shall illustrate the functionality of ngsxfem to
solve PDE problems on geometries described via multiple level set functions.
PDE problem + Discr... | lgpl-3.0 |
timpalpant/calibre | src/calibre/utils/chm/chmlib.py | 24 | 3975 | # This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
from calibre.constants import plugins
_chmlib, chmlib_err = plugins['chmlib']
if chmlib_err:
raise RuntimeError('Failed to load chmlib: '+... | gpl-3.0 |
ujjwalwahi/odoo | addons/crm_profiling/wizard/open_questionnaire.py | 333 | 3800 | # -*- 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 |
Communities-Communications/cc-odoo | addons/marketing/__init__.py | 378 | 1071 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
odooindia/odoo | addons/hr_recruitment/report/hr_recruitment_report.py | 56 | 5161 | # -*- 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 |
like9729/interactive-tutorials | suds/bindings/rpc.py | 209 | 3141 | # 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 ... | apache-2.0 |
TalShafir/ansible | lib/ansible/modules/cloud/amazon/aws_config_aggregation_authorization.py | 35 | 5272 | #!/usr/bin/python
# Copyright: (c) 2018, Aaron Smith <ajsmith10381@gmail.com>
# 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 |
selassid/canopener | canopener/s3file.py | 1 | 1324 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
import tempfile
from boto.s3.connection import S3Connection
def make_s3_connection(aws_access_key_id=None, aws_secr... | bsd-2-clause |
DreadPirateRobert/stock_visualiser | stock_visualiser_virtualenv/lib/python3.5/site-packages/tornado/test/options_test.py | 18 | 10325 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import datetime
import os
import sys
from tornado.options import OptionParser, Error
from tornado.util import basestring_type, PY3
from tornado.test.util import unittest
if PY3:
from io import StringIO
else:
from cString... | mit |
kartikdhar/djangotest | virt1/lib/python2.7/site-packages/django/core/files/utils.py | 901 | 1230 | class FileProxyMixin(object):
"""
A mixin class used to forward file methods to an underlaying file
object. The internal file object has to be called "file"::
class FileProxy(FileProxyMixin):
def __init__(self, file):
self.file = file
"""
encoding = property(la... | mit |
qoo00783/linux | tools/perf/scripts/python/failed-syscalls-by-pid.py | 1996 | 2233 | # failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | gpl-2.0 |
dietrichc/streamline-ppc-reports | examples/adwords/adwords_appengine_demo/handlers/api_handler.py | 4 | 8958 | #!/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 |
kumulustech/openstack_for_web_apps | openstack-load-users-from-csv.py | 2 | 7413 | #!/usr/bin/python
#
# Copyright 2012 Cisco Systems, 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 requi... | apache-2.0 |
hankshz/dockers | memcached/script/test-memcached.py | 1 | 1304 | #!/usr/bin/env python3
import time
from pymemcache.client.base import Client
master = Client(('memcached-master', 11211))
slave1 = Client(('memcached-slave1', 11211))
slave2 = Client(('memcached-slave2', 11211))
slave3 = Client(('memcached-slave3', 11211))
# Invalidate all
# mcrouter seems not work properly with pym... | apache-2.0 |
DarthMaulware/EquationGroupLeaks | Leak #4 - Don't Forget Your Base/EQGRP-Auction-File/Linux/bin/pyside/sidetrack.py | 1 | 72163 | import base
import crypto
import echocmd
import string
import struct
import time
import re
import os
import sys
from socket import *
import rawtcp
import types
class SIDECMD(echocmd.ECHOCMD):
def __init__(self):
echocmd.ECHOCMD.__init__(self)
def TypeConvert(self, stype):
#print "In Ty... | unlicense |
eptmp3/Sick-Beard | lib/subliminal/core.py | 30 | 12890 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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... | gpl-3.0 |
simondolle/hls-autocomplete | hls_autocomplete/parse.py | 1 | 5470 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import datetime
from time import strptime
import re
import os
import json
class FileStatus(object):
def __init__(self, path, rights, nbFiles, owner, group, size, date, relpath = None):
self.path = path
self.rights = rights
self.nbFiles = nbFil... | mit |
shendo/taskq | tests/test_queue.py | 1 | 6485 | # TaskQ - Priority queue with task categorisation support
# Copyright (C) 2014 Steve Henderson
#
# 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 o... | gpl-3.0 |
tommo/gii | lib/3rdparty/common/psd_tools/decoder/image_resources.py | 5 | 6594 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals, division
import io
import warnings
import collections
from psd_tools.utils import (read_pascal_string, unpack, read_fmt,
read_unicode_string, be_array_from_bytes,
decode_fixed_poi... | mit |
lipro-yocto/git-repo | subcmds/prune.py | 1 | 1907 | # Copyright (C) 2008 The Android Open Source Project
#
# 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 |
caiocsalvador/whats_the_craic | lib/python3.4/site-packages/django/core/cache/backends/db.py | 480 | 8628 | "Database cache backend."
import base64
from datetime import datetime
from django.conf import settings
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.db import DatabaseError, connections, models, router, transaction
from django.utils import six, timezone
from django.utils.encoding i... | mit |
igemsoftware/SYSU-Software2013 | project/Python27/Lib/distutils/core.py | 175 | 9093 | """distutils.core
The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script). Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
"""
__revision__ = "$Id$"... | mit |
heeraj123/oh-mainline | vendor/packages/Django/tests/modeltests/fixtures/tests.py | 41 | 29331 | from __future__ import absolute_import
from django.contrib.sites.models import Site
from django.core import management
from django.db import connection, IntegrityError
from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature
from django.utils import six
from .models import Article, Book, Spy, Tag, V... | agpl-3.0 |
edmstudio/ansible | test/integration/cleanup_ec2.py | 163 | 6761 | '''
Find and delete AWS resources matching the provided --match string. Unless
--yes|-y is provided, the prompt for confirmation prior to deleting resources.
Please use caution, you can easily delete you're *ENTIRE* EC2 infrastructure.
'''
import os
import re
import sys
import boto
import optparse
import yaml
import ... | gpl-3.0 |
Quikling/gpdb | src/test/tinc/ext/suds/wsse.py | 195 | 5981 | # 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 ... | apache-2.0 |
BillTheBest/openstack-dashboard | openstack-dashboard/dashboard/urls.py | 3 | 1686 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Fourth Paradigm Development, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "Licen... | apache-2.0 |
Archassault/archassaultweb | packages/views/flag.py | 3 | 6706 | import re
from django import forms
from django.conf import settings
from django.contrib.auth.decorators import permission_required
from django.core.mail import EmailMessage
from django.db import transaction
from django.shortcuts import get_object_or_404, redirect, render
from django.template import loader, Context
fro... | gpl-2.0 |
antb/TPT----My-old-mod | src/python/stdlib/encodings/hp_roman8.py | 647 | 7391 | """ Python Character Mapping Codec generated from 'hp_roman8.txt' with gencodec.py.
Based on data from ftp://dkuug.dk/i18n/charmaps/HP-ROMAN8 (Keld Simonsen)
Original source: LaserJet IIP Printer User's Manual HP part no
33471-90901, Hewlet-Packard, June 1989.
"""#"
import codecs
### Codec APIs
class ... | gpl-2.0 |
neudesk/neucloud | openstack_dashboard/dashboards/admin/roles/urls.py | 9 | 1120 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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.... | apache-2.0 |
dylanjbarth/luigi | test/optparse_test.py | 13 | 1475 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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 |
LarsDu/DeepNuc | scripts/BedToHdf5.py | 2 | 2396 | import gflags
import sys
import os
#Go one directory up and append to path to access the deepdna package
#The following statement is equiv to sys.path.append("../")
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__),os.path.pardir)))
from deepnuc.converters import ConvertToHdf5
from deepnuc.r... | gpl-3.0 |
Big-B702/python-for-android | python3-alpha/python3-src/Tools/pybench/Tuples.py | 92 | 8034 | from pybench import Test
class TupleSlicing(Test):
version = 2.0
operations = 3 * 25 * 10 * 7
rounds = 500
def test(self):
r = range(25)
t = tuple(range(100))
for i in range(self.rounds):
for j in r:
m = t[50:]
m = t[:25]
... | apache-2.0 |
scorphus/django | tests/model_formsets/models.py | 143 | 7751 | from __future__ import unicode_literals
import datetime
import uuid
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=100)
class Meta:
or... | bsd-3-clause |
dims/nova | nova/tests/unit/virt/libvirt/volume/test_glusterfs.py | 27 | 7543 | # 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.