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 |
|---|---|---|---|---|---|
simontakite/sysadmin | pythonscripts/learningPython/Internet/Sockets/getfile.py | 2 | 3464 | """
#############################################################################
implement client and server-side logic to transfer an arbitrary file from
server to client over a socket; uses a simple control-info protocol rather
than separate sockets for control and data (as in ftp), dispatches each
client reque... | gpl-2.0 |
hzruandd/AutobahnPython | autobahn/wamp/test/test_serializer.py | 9 | 7651 | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# 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 with... | mit |
scottpurdy/nupic | src/nupic/data/stats.py | 10 | 6351 | # ----------------------------------------------------------------------
# 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 apply:
#
# This progra... | agpl-3.0 |
MakahikiKTUH/makahiki-ktuh | makahiki/apps/widgets/smartgrid/management/commands/verify_smartgrid.py | 6 | 1233 | """Invocation: python manage.py verify_smartgrid
Verifies that all of the existing smartgrid unlock condition strings are valid.
Prints out the names of any invalid conditions."""
from apps.managers.challenge_mgr.challenge_mgr import MakahikiBaseCommand
from apps.utils import utils
from apps.widgets.smartgrid.model... | mit |
rbrito/pkg-youtube-dl | youtube_dl/extractor/pornhub.py | 1 | 26854 | # coding: utf-8
from __future__ import unicode_literals
import functools
import itertools
import operator
import re
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_str,
compat_urllib_request,
)
from .openload import PhantomJSwrapper
from ..utils import (
determine_ext... | unlicense |
zofuthan/edx-platform | common/djangoapps/student/migrations/0045_add_trk_partner_to_linkedin_config.py | 102 | 14314 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'LinkedInAddToProfileConfiguration.trk_partner_name'
db.add_column('student_linkedinaddtoprof... | agpl-3.0 |
40223141/lego | static/Brython3.1.1-20150328-091302/Lib/unittest/test/testmock/testpatch.py | 739 | 53126 | # Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
import os
import sys
import unittest
from unittest.test.testmock import support
from unittest.test.testmock.support import SomeClass, is_instance
from unittest.mock import... | agpl-3.0 |
ghchinoy/tensorflow | tensorflow/python/autograph/impl/api.py | 1 | 24373 | # 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 |
agconti/njode | env/lib/python2.7/site-packages/django/contrib/gis/forms/widgets.py | 62 | 3727 | from __future__ import unicode_literals
import logging
from django.conf import settings
from django.contrib.gis import gdal
from django.contrib.gis.geos import GEOSGeometry, GEOSException
from django.forms.widgets import Widget
from django.template import loader
from django.utils import six
from django.utils import t... | bsd-3-clause |
utecuy/edx-platform | common/lib/xmodule/xmodule/tests/xml/test_policy.py | 248 | 1262 | """
Tests that policy json files import correctly when loading XML
"""
from nose.tools import assert_equals, assert_raises # pylint: disable=no-name-in-module
from xmodule.tests.xml.factories import CourseFactory
from xmodule.tests.xml import XModuleXmlImportTest
class TestPolicy(XModuleXmlImportTest):
"""
... | agpl-3.0 |
TheWardoctor/Wardoctors-repo | script.module.fantastic/lib/resources/lib/sources/ko/dramafire.py | 7 | 5479 | # -*- coding: utf-8 -*-
"""
Covenant Add-on
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | apache-2.0 |
richleland/django-avatar | avatar/__init__.py | 4 | 1458 | from django.conf import settings
try:
from PIL import Image
dir(Image) # Placate PyFlakes
except ImportError:
import Image
AUTO_GENERATE_AVATAR_SIZES = getattr(settings, 'AUTO_GENERATE_AVATAR_SIZES', (80,))
AVATAR_RESIZE_METHOD = getattr(settings, 'AVATAR_RESIZE_METHOD', Image.ANTIALIAS)
AVATAR_STORAGE_DI... | bsd-3-clause |
refeed/coala | coalib/bearlib/aspects/Spelling.py | 9 | 1060 | from coalib.bearlib.aspects import Root
@Root.subaspect
class Spelling:
"""
This aspect describes spelling of your source code.
"""
@Spelling.subaspect
class aspectsYEAH:
"""
This aspect dictates that the term ``aspects`` and ``aspect`` must have
all letters in lower case and the term ``aspe... | agpl-3.0 |
reizencroft/euler_project_solutions | python/euler0004.py | 1 | 1218 | # Largest palindrome product
# https://projecteuler.net/problem=4
# A palindromic number reads the same both ways.
# The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
# Find the largest palindrome made from the product of two 3-digit numbers.
def get_digits_array(num):
q1 = nu... | unlicense |
yury-s/v8-inspector | Source/chrome/tools/telemetry/telemetry/internal/story_runner.py | 5 | 13801 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import optparse
import os
import sys
import time
from telemetry.core import exceptions
from telemetry.core import wpr_modes
from telemetry.i... | bsd-3-clause |
Yen-Chung-En/2015cdb_W12 | static/Brython3.1.3-20150514-095342/Lib/_string.py | 625 | 1112 | """string helper module"""
import re
class __loader__(object):
pass
def formatter_field_name_split(fieldname):
"""split the argument as a field name"""
_list=[]
for _name in fieldname:
_parts = _name.split('.')
for _item in _parts:
is_attr=False #fix me
if re.... | agpl-3.0 |
vismartltd/edx-platform | lms/djangoapps/lms_xblock/migrations/0001_initial.py | 110 | 4883 | # -*- coding: utf-8 -*-
import 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 'XBlockAsidesConfig'
db.create_table('lms_xblock_xblockasidesconfig', (
('id', se... | agpl-3.0 |
embeddedmz/restclient-cpp | vendor/gtest-1.7.0/test/gtest_env_var_test.py | 2408 | 3487 | #!/usr/bin/env python
#
# Copyright 2008, 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... | mit |
jpetso/libtorrent | tools/parse_buffer_log.py | 3 | 2997 | #!/usr/bin/env python
# Copyright Arvid Norberg 2008. Use, modification and distribution is
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import os, sys, time
lines = open(sys.argv[1], 'rb').readlines()
#keys = ['send_b... | bsd-3-clause |
laurent-george/weboob | modules/podnapisi/module.py | 7 | 2141 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... | agpl-3.0 |
savi-dev/nova | nova/tests/api/ec2/test_faults.py | 14 | 1320 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 applicabl... | apache-2.0 |
rlugojr/rekall | version.py | 1 | 6722 | #!/usr/bin/python
"""Global version file.
This program is used to manage versions. Prior to each release, please run it
with update.
"""
import argparse
import json
import os
import yaml
_VERSION_CODE = '''
import json
import os
import subprocess
try:
# We are looking for the git repo which contains this file.... | gpl-2.0 |
xianggong/m2c_unit_test | test/operator/not_equal_ushortushort/compile.py | 1861 | 4430 | #!/usr/bin/python
import os
import subprocess
import re
def runCommand(command):
p = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
p.wait()
return iter(p.stdout.readline, b'')
def dumpRunCommand(command,... | gpl-2.0 |
benjystanton/F2D-Prototype | node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/generator/cmake.py | 531 | 41681 | # Copyright (c) 2013 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.
"""cmake output module
This module is under development and should be considered experimental.
This module produces cmake (2.8.8+) input as its output. One CMake... | mit |
eul-721/The-Perfect-Pokemon-Team-Balancer | libs/env/Lib/site-packages/sqlalchemy/ext/declarative/api.py | 78 | 17872 | # ext/declarative/api.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Public API functions and helpers for declarative."""
from ...schema import ... | gpl-2.0 |
rbarlow/pulp | server/pulp/server/db/migrations/0009_qpid_queues.py | 7 | 4820 | from gettext import gettext as _
from urlparse import urlparse
import logging
try:
from qpid.messaging import Connection
QPID_MESSAGING_AVAILABLE = True
except ImportError:
QPID_MESSAGING_AVAILABLE = False
try:
from qpidtoollibs import BrokerAgent
QPIDTOOLLIBS_AVAILABLE = True
except ImportError:
... | gpl-2.0 |
mrknmc/storm-mc | storm-multicore/src/dev/resources/tester_bolt.py | 37 | 1272 | # -*- 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 |
arthurmco/ghostwriter | ghostwriter/ghtest/test_postarticle.py | 1 | 13551 | import unittest
from ghostwriter import app, mm
#
# Post basic test fixture(?)
# Copyright (C) 2017 Arthur M
#
class PostArticleTestCase(unittest.TestCase):
from flask import json
def setUp(self):
mm.setDatabaseURI('sqlite:////tmp/unittest.db')
mm.init()
mm.create()
self.ap... | mit |
hopeall/odoo | openerp/tools/yaml_import.py | 114 | 43149 | # -*- coding: utf-8 -*-
import threading
import types
import time # used to eval time.strftime expressions
from datetime import datetime, timedelta
import logging
import openerp
import openerp.sql_db as sql_db
import openerp.workflow
import misc
from config import config
import yaml_tag
import yaml
import re
from lxml... | agpl-3.0 |
ohmu/poni | poni/colors.py | 1 | 2220 | """
ANSI color code escapes for output
Copyright (c) 2010-2012 Mika Eloranta
See LICENSE for details.
"""
from __future__ import print_function
CODES = {
'reset': '\033[0;m',
'gray' : '\033[1;30m',
'red' : '\033[1;31m',
'green' : '\033[1;32m',
'yellow' : '\033[1;33m',
'blue' : '\033[1;34m',
... | apache-2.0 |
terkkila/scikit-learn | sklearn/cross_decomposition/cca_.py | 209 | 3150 | from .pls_ import _PLS
__all__ = ['CCA']
class CCA(_PLS):
"""CCA Canonical Correlation Analysis.
CCA inherits from PLS with mode="B" and deflation_mode="canonical".
Read more in the :ref:`User Guide <cross_decomposition>`.
Parameters
----------
n_components : int, (default 2).
numb... | bsd-3-clause |
sylarcp/anita | venv/lib/python2.7/site-packages/markdown/extensions/footnotes.py | 41 | 10747 | """
Footnotes Extension for Python-Markdown
=======================================
Adds footnote handling to Python-Markdown.
See <https://pythonhosted.org/Markdown/extensions/footnotes.html>
for documentation.
Copyright The Python Markdown Project
License: [BSD](http://www.opensource.org/licenses/bsd-license.php)... | mit |
jserv/codezero | tools/cml2-tools/helpmerge.py | 7 | 8752 | #!/usr/bin/env python
#
# Merge a Configure.help file into a file of CML2 symbol declarations
#
# The Configure.help file must be argument 1; the partial symbol file
# must be argument 2.
#
# When given the -c option, suppress normal output and instead
# consistency-check the prompts.
import sys, string, re, os, os.pa... | gpl-3.0 |
frewsxcv/keyczar | cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/sunar.py | 19 | 2551 | """engine.SCons.Tool.sunar
Tool-specific initialization for Solaris (Forte) ar (library archive). If CC
exists, static libraries should be built with it, so that template
instantians can be resolved.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic S... | apache-2.0 |
marnnie/Cable-buenaventura | plugin.video.kodipopcorntime/resources/site-packages/html5lib/treewalkers/__init__.py | 1229 | 2323 | """A collection of modules for iterating through different kinds of
tree, generating tokens identical to those produced by the tokenizer
module.
To create a tree walker for a new type of tree, you need to do
implement a tree walker object (called TreeWalker by convention) that
implements a 'serialize' method taking a ... | gpl-2.0 |
imtapps/python-suds-0.4.IMT | tests/public.py | 57 | 7190 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | lgpl-3.0 |
bank-netforce/netforce | netforce_general/netforce_general/models/ws_event.py | 4 | 2007 | # Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | mit |
flgiordano/netcash | +/google-cloud-sdk/lib/googlecloudsdk/core/util/archive.py | 3 | 1769 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | bsd-3-clause |
palashahuja/pgmpy | pgmpy/tests/test_models/test_NoisyOrModels.py | 12 | 4708 | import unittest
import numpy as np
import numpy.testing as np_test
from pgmpy.models import NoisyOrModel
class TestNoisyOrModelInit(unittest.TestCase):
def test_init(self):
model = NoisyOrModel(['x1', 'x2', 'x3'], [2, 3, 2], [[0.6, 0.4],
[0.2, ... | mit |
mazaclub/mazabot-core | plugins/Time/config.py | 15 | 2474 | ###
# Copyright (c) 2005, Jeremiah Fincher
# 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 conditi... | bsd-3-clause |
jasonlingo/StreetViewRoadSafety | src/coverageMap.py | 1 | 1734 | """
These functions are used to plot the points on google map by years or road types.
"""
from util import plotSampledPointMap
from config import CONFIG
def readDatePoints(filename):
f = open(filename, 'r')
yearPoints = {}
for line in f.readlines():
point, info = line.strip("\n").split("==")
... | mit |
xgds/xgds_sample | xgds_sample/defaultSettings.py | 1 | 4284 | #__BEGIN_LICENSE__
# Copyright (c) 2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All rights reserved.
#
# The xGDS platform is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance ... | apache-2.0 |
kaushik94/boto | tests/unit/utils/test_utils.py | 5 | 8877 | # Copyright (c) 2010 Robert Mela
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, dis-
# ... | mit |
rsunder10/PopularityBased-SearchEngine | lib/python3.4/site-packages/django/conf/locale/fi/formats.py | 504 | 1390 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y'
TIME_FORMAT = 'G.i'
DATET... | mit |
kun--hust/libcloud_with_cn | libcloud/compute/drivers/bluebox.py | 36 | 7518 | # 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 |
EmpireProject/Empire | lib/modules/powershell/persistence/elevated/wmi.py | 10 | 9023 | import os
from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-WMI',
'Author': ['@mattifestation', '@harmj0y'],
'Description': ('Persist a stager (or script) using a permanent WMI subscription. This has a... | bsd-3-clause |
mailhexu/pyDFTutils | pyDFTutils/vasp/procar_reader.py | 2 | 3569 | #!/usr/bin/env python
from numpy import zeros,inner
import numpy as np
import re
from pyDFTutils.ase_utils import symbol_number
import matplotlib.pyplot as plt
def fix_line(line):
line=re.sub("(\d)-(\d)", r'\1 -\2',line)
return line
class procar_reader():
def __init__(self,fname='PROCAR'):
self.re... | lgpl-3.0 |
liduanw/viewfinder | backend/storage/server_log.py | 13 | 22736 | # Copyright 2012 Viewfinder Inc. All Rights Reserved.
"""Server log handling.
- ServerLogHandler: buffers server logs up to a maximum buffer size or
outstanding time before sending to the server log object store.
"""
__author__ = 'spencer@emailscrubbed.com (Spencer Kimball)'
import datetime
import logging
imp... | apache-2.0 |
inspirehep/sqlalchemy | examples/generic_associations/table_per_related.py | 30 | 3306 | """table_per_related.py
Illustrates a generic association which persists association
objects within individual tables, each one generated to persist
those objects on behalf of a particular parent class.
This configuration has the advantage that each type of parent
maintains its "Address" rows separately, so that coll... | mit |
soarpenguin/ansible | lib/ansible/modules/network/f5/bigip_command.py | 37 | 11677 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2016 F5 Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... | gpl-3.0 |
j0nathan33/CouchPotatoServer | libs/rtorrent/peer.py | 174 | 3699 | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | gpl-3.0 |
davipeterlini/routeflow_oficial | pox/pox/forwarding/l3_learning.py | 20 | 12555 | # Copyright 2011,2012 James McCauley
#
# This file is part of POX.
#
# POX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# POX is d... | apache-2.0 |
SpaceKatt/CSPLN | apps/scaffolding/win/web2py/gluon/contrib/pysimplesoap/helpers.py | 32 | 18627 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This program 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, or (at your option) any later
# version.
#
# This program is distributed in the... | gpl-3.0 |
admiyo/python-nss | doc/examples/httplib_example.py | 1 | 12989 | #!/usr/bin/python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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.mozilla.... | gpl-2.0 |
resmo/ansible | lib/ansible/modules/network/f5/bigip_device_trust.py | 38 | 12094 | #!/usr/bin/python
# -*- 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
erybak90/Szkolenie-python | fixture/contact.py | 1 | 6261 | from model.contact import Contact
import re
class ContactHelper:
def __init__(self, app):
self.app = app
def modify_contact_by_index(self, index, new_contact_data):
wd = self.app.wd
self.select_contact_by_index(index)
wd.find_elements_by_css_selector("img[alt='Edit']")[index].... | apache-2.0 |
LakmalCaldera/real-python-test | env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py | 319 | 1348 | from socket import error as SocketError
try:
from select import poll, POLLIN
except ImportError: # `poll` doesn't exist on OSX and other platforms
poll = False
try:
from select import select
except ImportError: # `select` doesn't exist on AppEngine.
select = False
def is_connection_dr... | gpl-2.0 |
ioggstream/mysql-utilities | mysql/connector/utils.py | 30 | 9161 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... | gpl-2.0 |
alalbiol/trading-with-python | lib/qtpandas.py | 77 | 7937 | '''
Easy integration of DataFrame into pyqt framework
Copyright: Jev Kuznetsov
Licence: BSD
'''
from PyQt4.QtCore import (QAbstractTableModel,Qt,QVariant,QModelIndex,SIGNAL)
from PyQt4.QtGui import (QApplication,QDialog,QVBoxLayout, QHBoxLayout, QTableView, QPushButton,
QWidget,QTabl... | bsd-3-clause |
Lektorium-LLC/edx-platform | lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py | 5 | 4097 | """
Command to recalculate grades for all subsections with problem submissions
in the specified time range.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
from datetime import datetime
from django.core.management.base import BaseCommand, CommandError
from pytz i... | agpl-3.0 |
bukalov/phantomjs | src/qt/qtwebkit/Tools/gdb/webkit.py | 115 | 11357 | # Copyright (C) 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 of conditions and the... | bsd-3-clause |
Payshare/medida | test/gtest-1.6.0/test/gtest_xml_test_utils.py | 398 | 8029 | #!/usr/bin/env python
#
# Copyright 2006, 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... | apache-2.0 |
kilon/sverchok | nodes/matrix/shear.py | 1 | 3309 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 is distrib... | gpl-3.0 |
jelugbo/hebs_master | common/test/acceptance/pages/lms/staff_view.py | 26 | 2642 | """
Staff view of courseware
"""
from bok_choy.page_object import PageObject
class StaffPage(PageObject):
"""
View of courseware pages while logged in as course staff
"""
url = None
STAFF_STATUS_CSS = '#staffstatus'
def is_browser_on_page(self):
return self.q(css=self.STAFF_STATUS_CS... | agpl-3.0 |
ff0000/red-fab-deploy2 | fab_deploy2/operating_systems/smartos/hiredis.py | 1 | 2151 | import os
from fab_deploy2 import functions
from fab_deploy2.tasks import ContextTask
from fabric.api import run, sudo, settings
from fabric.contrib.files import exists
from fabric.context_managers import cd
class HiRedisSetup(ContextTask):
"""
Setup hiredis
"""
context_name = 'hiredis'
default_... | mit |
MasterPlexus/kernel_i8200 | tools/perf/python/twatch.py | 7370 | 1334 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 |
uclouvain/osis | base/tests/views/test_learning_unit_deletion.py | 1 | 12652 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 |
bellowsj/aiopogo | aiopogo/pogoprotos/data/raid/raid_info_pb2.py | 1 | 5828 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/data/raid/raid_info.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf impo... | mit |
naparuba/kunai | data/global-configuration/packs/mongodb/collectors/pymongo/ssl_support.py | 15 | 6538 | # Copyright 2014-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | mit |
andrewleech/SickRage | lib/chardet/langbulgarianmodel.py | 53 | 12786 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 |
JoaoVasques/aws-devtool | eb/macosx/python3/lib/aws/requests/packages/chardet/big5freq.py | 323 | 82588 | ######################## 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 ... | apache-2.0 |
GNS3/gns3-server | gns3server/main.py | 1 | 2494 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your optio... | gpl-3.0 |
littlstar/chromium.src | third_party/cython/src/Cython/Compiler/Code.py | 89 | 81819 | # cython: language_level = 2
#
# Code output module
#
import cython
cython.declare(os=object, re=object, operator=object,
Naming=object, Options=object, StringEncoding=object,
Utils=object, SourceDescriptor=object, StringIOTree=object,
DebugFlags=object, basestring=object... | bsd-3-clause |
sebalix/OpenUpgrade | addons/lunch/report/__init__.py | 441 | 1087 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | agpl-3.0 |
CivilHub/CivilHub | polls/migrations/0005_auto_20150504_1618.py | 3 | 5847 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('polls', '0004_auto_20150504_1427'),
]
operations = [
migrations.AddField(
model_name='simplepoll',
n... | gpl-3.0 |
srimai/odoo | addons/l10n_co/wizard/__init__.py | 313 | 1165 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) David Arnold (devCO).
# Author David Arnold (devCO), dar@devco.co
# Co-Authors Juan Pablo Aries (devCO), jpa@devco.co
# Hector Iva... | agpl-3.0 |
pmisik/buildbot | master/buildbot/test/integration/test_worker_upcloud.py | 5 | 5307 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 |
nguyentran/openviber | tools/scons-local/scons-local-2.0.1/SCons/Script/Main.py | 61 | 48844 | """SCons.Script
This file implements the main() function used by the scons script.
Architecturally, this *is* the scons script, and will likely only be
called from the external "scons" wrapper. Consequently, anything here
should not be, or be considered, part of the build engine. If it's
something that we expect ot... | mit |
Dhivyap/ansible | test/units/modules/network/radware/test_vdirect_file.py | 38 | 9500 | # -*- coding: utf-8 -*-
#
# Copyright 2017 Radware LTD.
#
# 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 l... | gpl-3.0 |
delta2323/chainer | chainer/serializer.py | 4 | 2590 | class AbstractSerializer(object):
"""Abstract base class of all serializers and deserializers."""
def __getitem__(self, key):
"""Gets a child serializer.
This operator creates a _child_ serializer represented by the given
key.
Args:
key (str): Name of the child se... | mit |
zachmullen/boto | boto/mturk/notification.py | 170 | 4194 | # Copyright (c) 2006,2007 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 |
wiredrive/wtframework | wtframework/wtf/web/tests/test_page_object.py | 1 | 5234 | ##########################################################################
# This file is part of WTFramework.
#
# WTFramework 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 |
arenadata/ambari | contrib/version-builder/version_builder.py | 1 | 16382 | """
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 this ... | apache-2.0 |
withtone/depot_tools | third_party/coverage/fullcoverage/encodings.py | 164 | 2386 | """Imposter encodings module that installs a coverage-style tracer.
This is NOT the encodings module; it is an imposter that sets up tracing
instrumentation and then replaces itself with the real encodings module.
If the directory that holds this file is placed first in the PYTHONPATH when
using "coverage" to run Pyt... | bsd-3-clause |
daavery/audacity | lib-src/lv2/sratom/waflib/Tools/ldc2.py | 330 | 1029 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import sys
from waflib.Tools import ar,d
from waflib.Configure import conf
@conf
def find_ldc2(conf):
conf.find_program(['ldc2'],var='D')
out=conf.cmd_and_log([conf.env.D,'-... | gpl-2.0 |
davidwtbuxton/captain-pasty | pasty/tasks.py | 1 | 2309 | import datetime
from djangae.db.migrations import mapper_library
from google.appengine.api import datastore
from google.appengine.ext import ndb
from . import index
from .models import Paste, make_relative_path
def entity_to_instance(entity):
"""Returns an ndb model instance for the datastore entity."""
key... | mit |
petrutlucian94/nova_dev | nova/api/openstack/compute/contrib/extended_ips.py | 29 | 4347 | # Copyright 2013 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 |
benjaminsoellner/DAND_3_OSMDataWranglingMongoDB | Lesson_5_Analyzing_Data/10-Using_match_and_project/followers.py | 3 | 2533 | #!/usr/bin/env python
"""
Write an aggregation query to answer this question:
Of the users in the "Brasilia" timezone who have tweeted 100 times or more,
who has the largest number of followers?
The following hints will help you solve this problem:
- Time zone is found in the "time_zone" field of the user object in e... | agpl-3.0 |
ovnicraft/odoo | addons/mrp/mrp.py | 145 | 73675 | # -*- 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 |
Reflexe/doc_to_pdf | Windows/program/python-core-3.5.0/lib/lib2to3/fixes/fix_tuple_params.py | 203 | 5565 | """Fixer for function definitions with tuple parameters.
def func(((a, b), c), d):
...
->
def func(x, d):
((a, b), c) = x
...
It will also support lambdas:
lambda (x, y): x + y -> lambda t: t[0] + t[1]
# The parens are a syntax error in Python 3
lambda (x): x + y -> lambda x: x + y
"""... | mpl-2.0 |
save-password/save-password.github.io | node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py | 1355 | 44604 | # Copyright (c) 2013 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.
"""cmake output module
This module is under development and should be considered experimental.
This module produces cmake (2.8.8+) input as its output. One CMake... | mit |
popazerty/e2-dmm | lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py | 4 | 16021 | from Screens.Wizard import wizardManager, WizardSummary
from Screens.WizardLanguage import WizardLanguage
from Screens.Rc import Rc
from Screens.MessageBox import MessageBox
from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap
from Components.Sources.Boolean import Boolean
from Components.config import confi... | gpl-2.0 |
rbuffat/pyidf | tests/test_surfacepropertyheattransferalgorithmsurfacelist.py | 1 | 1610 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.advanced_construction import SurfacePropertyHeatTransferAlgorithmSurfaceList
log = logging.getLogger(__name__)
class TestSurfacePropertyHeatTransferAlgorithmSurfaceList(unittest... | apache-2.0 |
tiena2cva/Linphone | mediastreamer2/tools/filters_graph.py | 21 | 3898 | #!/usr/bin/python
#
# mediastreamer2 library - modular sound and video processing and streaming
# Copyright (C) 2006-2013 Belledonne Communications, Grenoble
#
# 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 Softwar... | gpl-2.0 |
jimsize/PySolFC | pysollib/tile/tkhtml.py | 1 | 5073 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------##
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free softwa... | gpl-3.0 |
harshilasu/GraphicMelon | y/google-cloud-sdk/lib/jinja2/_compat.py | 638 | 4042 | # -*- coding: utf-8 -*-
"""
jinja2._compat
~~~~~~~~~~~~~~
Some py2/py3 compatibility support based on a stripped down
version of six so we don't have to depend on a specific version
of it.
:copyright: Copyright 2013 by the Jinja team, see AUTHORS.
:license: BSD, see LICENSE for details.
""... | gpl-3.0 |
proxysh/Safejumper-for-Mac | buildlinux/env32/lib/python2.7/site-packages/Crypto/SelfTest/Cipher/test_pkcs1_15.py | 118 | 7342 | # -*- coding: utf-8 -*-
#
# SelfTest/Cipher/test_pkcs1_15.py: Self-test for PKCS#1 v1.5 encryption
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone i... | gpl-2.0 |
danielfrg/jupyterhub-kubernetes_spawner | kubernetes_spawner/swagger_client/models/v1_security_context.py | 1 | 8371 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
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 |
vipulroxx/sympy | doc/ext/numpydoc.py | 66 | 5720 | """
========
numpydoc
========
Sphinx extension that handles docstrings in the Numpy standard format. [1]
It will:
- Convert Parameters etc. sections to field lists.
- Convert See Also section to a See also entry.
- Renumber references.
- Extract the signature from the docstring, if it can't be determined
otherwis... | bsd-3-clause |
siyei/python-whatsapp-bot | modules/sender.py | 2 | 1433 | import os,json
from modules.misctools import mkdir_p
import time
bot=None
outbox=[]
outboxprocessing=False
outboxempty=True
def message_send(recepient, content):
#jid=findjidbynick(recepient)
jid=recepient
content=content.encode('utf-8')
messageId = bot.methodsInterface.call("message_send",(jid,content))
print "... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.