repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
signed/intellij-community | python/lib/Lib/site-packages/django/contrib/auth/tests/signals.py | 234 | 1774 | from django.test import TestCase
from django.contrib.auth import signals
class SignalTestCase(TestCase):
urls = 'django.contrib.auth.tests.urls'
fixtures = ['authtestdata.json']
def listener_login(self, user, **kwargs):
self.logged_in.append(user)
def listener_logout(self, user, **kwargs):
... | apache-2.0 |
TathagataChakraborti/resource-conflicts | PLANROB-2015/seq-sat-lama/Python-2.5.2/Mac/Modules/osa/osasupport.py | 39 | 3761 | # This script generates a Python interface for an Apple Macintosh Manager.
# It uses the "bgen" package to generate C code.
# The function specifications are generated by scanning the mamager's header file,
# using the "scantools" package (customized for this particular manager).
import string
# Declarations that cha... | mit |
solashirai/edx-platform | common/lib/xmodule/xmodule/modulestore/split_migrator.py | 180 | 11920 | '''
Code for migrating from other modulestores to the split_mongo modulestore.
Exists at the top level of modulestore b/c it needs to know about and access each modulestore.
In general, it's strategy is to treat the other modulestores as read-only and to never directly
manipulate storage but use existing api's.
'''
i... | agpl-3.0 |
zhaishaomin/LDS-prefetcher-research | gem5_src/mem/slicc/ast/ExprAST.py | 91 | 2002 | # Copyright (c) 2009 The Hewlett-Packard Development Company
# 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... | apache-2.0 |
flaircoin/main | share/qt/make_spinner.py | 4415 | 1035 | #!/usr/bin/env python
# W.J. van der Laan, 2011
# Make spinning .mng animation from a .png
# Requires imagemagick 6.7+
from __future__ import division
from os import path
from PIL import Image
from subprocess import Popen
SRC='img/reload_scaled.png'
DST='../../src/qt/res/movies/update_spinner.mng'
TMPDIR='/tmp'
TMPNAM... | mit |
hirenvasani/foobar | disorderly_escape.py | 1 | 4537 | '''
Challenge 5.1
Disorderly Escape
=================
Oh no! You've managed to free the bunny prisoners and escape Commander Lambdas exploding space station, but her team of elite starfighters has flanked your ship. If you dont jump to hyperspace, and fast, youll be shot out of the sky!
Problem is, to avoid detection... | mit |
tmerrick1/spack | var/spack/repos/builtin/packages/perl-http-message/package.py | 5 | 1910 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
CSC301H-Fall2013/JuakStore | site-packages/django/views/decorators/clickjacking.py | 550 | 1759 | from functools import wraps
from django.utils.decorators import available_attrs
def xframe_options_deny(view_func):
"""
Modifies a view function so its response has the X-Frame-Options HTTP
header set to 'DENY' as long as the response doesn't already have that
header set.
e.g.
@xframe_optio... | mit |
oesterle/Espruino | boards/ARIETTA_G25.py | 9 | 1442 | #!/bin/false
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers
#
# Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
#
# 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 h... | mpl-2.0 |
vbannai/neutron | neutron/plugins/vmware/common/config.py | 2 | 8811 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 VMware, 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
#
# ... | apache-2.0 |
parpg/parpg | tools/map_editor/scripts/tests/__init__.py | 2 | 1140 | # -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2009 by the FIFE team
# http://www.fifengine.de
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# ... | gpl-3.0 |
ZhangXinNan/tensorflow | tensorflow/contrib/boosted_trees/python/kernel_tests/prediction_ops_test.py | 16 | 53958 | # Copyright 2017 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 |
AllisonWang/incubator-airflow | airflow/operators/check_operator.py | 42 | 9423 | # -*- coding: utf-8 -*-
#
# 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
... | apache-2.0 |
avilaton/transitfeed | extensions/googletransit/pybcp47/bcp47languageparser.py | 2 | 15277 | #!/usr/bin/python2.5
# Copyright (C) 2011 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 la... | apache-2.0 |
sexroute/commandergenius | project/jni/python/src/Lib/idlelib/WidgetRedirector.py | 143 | 4476 | from Tkinter import *
class WidgetRedirector:
"""Support for redirecting arbitrary widget subcommands.
Some Tk operations don't normally pass through Tkinter. For example, if a
character is inserted into a Text widget by pressing a key, a default Tk
binding to the widget's 'insert' operation is acti... | lgpl-2.1 |
lindsayad/sympy | sympy/stats/crv.py | 38 | 15024 | """
Continuous Random Variables Module
See Also
========
sympy.stats.crv_types
sympy.stats.rv
sympy.stats.frv
"""
from __future__ import print_function, division
from sympy.stats.rv import (RandomDomain, SingleDomain, ConditionalDomain,
ProductDomain, PSpace, SinglePSpace, random_symbols, ProductPSpace,
... | bsd-3-clause |
lorien/grab | docs/source/conf.py | 1 | 8706 | # -*- coding: utf-8 -*-
#
# Grab documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 27 02:27:14 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
# autogenerated file.
#
# All ... | mit |
ManageIQ/integration_tests | cfme/tests/test_rest_manual.py | 2 | 2723 | """Manual tests"""
import pytest
from cfme import test_requirements
from cfme.utils.appliance.implementations.rest import ViaREST
from cfme.utils.appliance.implementations.ui import ViaUI
pytestmark = [pytest.mark.manual]
@test_requirements.rest
@pytest.mark.customer_scenario
@pytest.mark.tier(1)
@pytest.mark.manua... | gpl-2.0 |
rudimeier/numpy | numpy/ma/__init__.py | 64 | 1455 | """
=============
Masked Arrays
=============
Arrays sometimes contain invalid or missing data. When doing operations
on such arrays, we wish to suppress invalid values, which is the purpose masked
arrays fulfill (an example of typical use is given below).
For example, examine the following array:
>>> x = np.array(... | bsd-3-clause |
oasiswork/odoo | addons/mail/ir_attachment.py | 378 | 5643 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-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 |
asm666/sympy | sympy/functions/__init__.py | 7 | 2725 | """A functions module, includes all the standard functions.
Combinatorial - factorial, fibonacci, harmonic, bernoulli...
Elementary - hyperbolic, trigonometric, exponential, floor and ceiling, sqrt...
Special - gamma, zeta,spherical harmonics...
"""
from sympy.functions.combinatorial.factorials import (factorial, fac... | bsd-3-clause |
ioam/topographica | topo/tests/unit/testfeaturemap.py | 2 | 8555 | """
TestFeatureMap
"""
# CEBALERT: this isn't finished.
import unittest
from topo.base.arrayutil import arg, wrap
from math import pi
import numpy as np
from numpy import exp
from topo.base.sheet import Sheet
from topo.base.boundingregion import BoundingBox
# for making a simulation:
from topo.sheet import Gener... | bsd-3-clause |
ThinkOpen-Solutions/odoo | addons/hw_scanner/controllers/main.py | 77 | 7438 | # -*- coding: utf-8 -*-
import logging
import os
import time
from os import listdir
from os.path import join
from threading import Thread, Lock
from select import select
from Queue import Queue, Empty
import openerp
import openerp.addons.hw_proxy.controllers.main as hw_proxy
from openerp import http
from openerp.http ... | agpl-3.0 |
jimsimon/sky_engine | sky/tools/webkitpy/common/system/zipfileset.py | 167 | 2891 | # 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:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... | bsd-3-clause |
DazWorrall/ansible | lib/ansible/modules/cloud/amazon/redshift.py | 4 | 16914 | #!/usr/bin/python
# Copyright 2014 Jens Carl, Hothead Games Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... | gpl-3.0 |
IKholopov/HackUPC2017 | hackupc/env/lib/python3.5/site-packages/oauthlib/oauth1/rfc5849/parameters.py | 87 | 4949 | # -*- coding: utf-8 -*-
"""
oauthlib.parameters
~~~~~~~~~~~~~~~~~~~
This module contains methods related to `section 3.5`_ of the OAuth 1.0a spec.
.. _`section 3.5`: http://tools.ietf.org/html/rfc5849#section-3.5
"""
from __future__ import absolute_import, unicode_literals
try:
from urlparse import urlparse, url... | apache-2.0 |
spatialsuite/qgis2sps | help/source/conf.py | 1 | 7030 | # -*- coding: utf-8 -*-
#
# qgis2sps documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 12 17:11:03 2012.
#
# 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
# autogenerated file.
#
# Al... | gpl-3.0 |
elsdrm/Conque-Shell | autoload/conque_term/conque_screen.py | 30 | 7429 | # FILE: autoload/conque_term/conque_screen.py
# AUTHOR: Nico Raffo <nicoraffo@gmail.com>
# WEBSITE: http://conque.googlecode.com
# MODIFIED: 2011-09-02
# VERSION: 2.3, for Vim 7.0
# LICENSE:
# Conque - Vim terminal/console emulator
# Copyright (C) 2009-2011 Nico Raffo
#
# MIT License
#
# Permission is hereby gr... | lgpl-3.0 |
andybak/ansible-modules-extras | windows/win_updates.py | 51 | 1744 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Peter Mounce <public@neverrunwithscissors.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... | gpl-3.0 |
goerz/pelican | pelican/server.py | 16 | 2217 | from __future__ import print_function
import os
import sys
import logging
from six.moves import SimpleHTTPServer as srvmod
from six.moves import socketserver
try:
from magic import from_file as magic_from_file
except ImportError:
magic_from_file = None
class ComplexHTTPRequestHandler(srvmod.SimpleHTTPReques... | agpl-3.0 |
Softmotions/edx-platform | common/test/acceptance/pages/studio/auto_auth.py | 155 | 2446 | """
Auto-auth page (used to automatically log in during testing).
"""
import re
import urllib
from bok_choy.page_object import PageObject
from . import BASE_URL
class AutoAuthPage(PageObject):
"""
The automatic authorization page.
When allowed via the django settings file, visiting
this url will crea... | agpl-3.0 |
mrDoctorWho/vk4xmpp | library/xmpp/protocol.py | 1 | 54896 | ## protocol.py
##
## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov
##
## 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, or (at your option)
## any later ... | mit |
henkelis/sonospy | web2py/fcgihandler.py | 1 | 1250 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a handler for lighttpd+fastcgi
This file has to be in the PYTHONPATH
Put something like this in the lighttpd.conf file:
server.port = 8000
server.bind = '127.0.0.1'
server.event-handler = 'freebsd-kqueue'
server.modules = ('mod_rewrite', 'mod_fastcgi')
server.... | gpl-3.0 |
docusign/docusign-python-client | docusign_esign/models/signature_user.py | 1 | 5330 | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | mit |
ryjmacdonell/geomtools | gimbal/molecule.py | 1 | 33690 | """
The Molecule and MoleculeBundle objects and tools for generating and
querying molecular geometries.
Molecule creates a saved copy of the geometry after input for reversion
after an operation. Can add/remove individual atoms or groups or set the
full geometry.
Likewise, MoleculeBundle creates a saved copy of a set... | mit |
chase-qi/workload-automation | wlauto/tests/test_diff.py | 5 | 1436 | # Copyright 2013-2015 ARM Limited
#
# 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 w... | apache-2.0 |
eeshangarg/zulip | zerver/lib/cache_helpers.py | 6 | 6560 | # See https://zulip.readthedocs.io/en/latest/subsystems/caching.html for docs
import datetime
import logging
from typing import Any, Callable, Dict, List, Tuple
from django.conf import settings
from django.contrib.sessions.models import Session
from django.db.models import Q
from django.utils.timezone import now as ti... | apache-2.0 |
jsteemann/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/functools.py | 66 | 2162 | """functools.py - Tools for working with functions and callable objects
"""
# Python module wrapper for _functools C module
# to allow utilities written in Python to be added
# to the functools module.
# Written by Nick Coghlan <ncoghlan at gmail.com>
# Copyright (C) 2006 Python Software Foundation.
# See C source co... | apache-2.0 |
lgscofield/phoenix | bin/phoenix_utils.py | 9 | 6567 | #!/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 A... | apache-2.0 |
patricklaw/pip | pip/_vendor/requests/packages/chardet/chardetect.py | 1786 | 2504 | #!/usr/bin/env python
"""
Script which takes one or more file paths and reports on their detected
encodings
Example::
% chardetect somefile someotherfile
somefile: windows-1252 with confidence 0.5
someotherfile: ascii with confidence 1.0
If no paths are provided, it takes its input from stdin.
"""
from... | mit |
marcel-dancak/QGIS | python/plugins/processing/modeler/ProjectProvider.py | 8 | 5639 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ProjectProvider.py
------------------------
Date : July 2018
Copyright : (C) 2018 by Nyall Dawson
Email : nyall dot dawson at gmail dot com
*************... | gpl-2.0 |
amudalab/concept-graphs | document retrieval/shortest_path_tree_per_node.py | 1 | 6530 | import sys
class Vertex:
def __init__(self, node):
self.id = node
self.adjacent = {}
# Set distance to infinity for all nodes
self.distance = sys.maxsize
# Mark all nodes unvisited
self.visited = False
# Predecessor
self.previous ... | mit |
deluge-clone/libtorrent | tools/parse_disk_access.py | 57 | 2523 | #! /usr/bin/env python
import os, sys, time
lines = open(sys.argv[1], 'rb').readlines()
# logfile format:
# <time(us)> <key>: <value>
# example:
# 16434 read cache: 17
keys = ['read', 'write', 'head movement', 'seek per read byte', 'seek per written byte',
'read operations per second', 'write operations per second... | bsd-3-clause |
zobe123/Plex-CS | lib/unidecode/x0fd.py | 252 | 3764 | data = (
'', # 0x00
'', # 0x01
'', # 0x02
'', # 0x03
'', # 0x04
'', # 0x05
'', # 0x06
'', # 0x07
'', # 0x08
'', # 0x09
'', # 0x0a
'', # 0x0b
'', # 0x0c
'', # 0x0d
'', # 0x0e
'', # 0x0f
'', # 0x10
'', # 0x11
'', # 0x12
'', # 0x13
'', # 0x14
'', # 0x15
'',... | gpl-3.0 |
cindyyu/kuma | vendor/packages/translate/convert/po2ts.py | 25 | 3395 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2004-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... | mpl-2.0 |
KnechtRootrechtCH/Mimir | content/Mods/XVM/XVM_Base/res_mods_content/mods/xfw_packages/xvm_tooltips/python/__init__.py | 1 | 31477 | """ XVM (c) https://modxvm.com 2013-2020 """
#####################################################################
# imports
import traceback
import sys
from math import degrees, pi
from constants import SHELL_TYPES
import game
import gui.shared.tooltips.vehicle as tooltips_vehicle
from gun_rotation_shared import ca... | mit |
agentfog/qiime | tests/test_map_reads_to_reference.py | 15 | 24126 | #!/usr/bin/env python
# File created on 13 Jul 2012
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2011, The QIIME project"
__credits__ = ["Greg Caporaso"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Greg Caporaso"
__email__ = "gregcaporaso@gmail.com"
from... | gpl-2.0 |
j-carl/boto | boto/ec2/autoscale/__init__.py | 105 | 37102 | # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/
# Copyright (c) 2011 Jann Kleen
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this sof... | mit |
ipylypiv/grpc | src/python/grpcio_tests/tests/protoc_plugin/protos/requests/__init__.py | 901 | 1528 | # Copyright 2015, 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 f... | bsd-3-clause |
hmen89/odoo | addons/google_calendar/google_calendar.py | 12 | 47463 | # -*- coding: utf-8 -*-
import operator
import simplejson
import urllib2
import openerp
from openerp import tools
from openerp import SUPERUSER_ID
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.translate import _
from openerp.http import request
from datetime i... | agpl-3.0 |
mindbender-studio/setup | bin/windows/python36/Lib/importlib/abc.py | 45 | 10782 | """Abstract base classes related to import."""
from . import _bootstrap
from . import _bootstrap_external
from . import machinery
try:
import _frozen_importlib
except ImportError as exc:
if exc.name != '_frozen_importlib':
raise
_frozen_importlib = None
try:
import _frozen_importlib_external
exc... | mit |
jorik041/plaso | tests/cli/tools.py | 2 | 10715 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the CLI tools classes."""
import argparse
import io
import sys
import unittest
from plaso.cli import tools
from tests.cli import test_lib
class CLIToolTest(test_lib.CLIToolTestCase):
"""Tests for the CLI tool base class."""
_EXPECTED_BASIC_OPTIONS = u'\n'... | apache-2.0 |
hkariti/ansible | docs/docsite/rst/conf.py | 8 | 7468 | # -*- coding: utf-8 -*-
#
# documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... | gpl-3.0 |
Byzantium/Byzantium | captive_portal/captive_portal.py | 2 | 17618 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: set expandtab tabstop=4 shiftwidth=4 :
# Project Byzantium: http://wiki.hacdc.org/index.php/Byzantium
__license__ = 'GPL v3'
# captive_portal.py
# This application implements a little web server that mesh clients will be
# redirected to if they haven't been added to... | gpl-3.0 |
ChenJunor/hue | desktop/core/ext-py/Django-1.6.10/tests/m2m_recursive/models.py | 153 | 1124 | """
28. Many-to-many relationships between the same two tables
In this example, a ``Person`` can have many friends, who are also ``Person``
objects. Friendship is a symmetrical relationship - if I am your friend, you
are my friend. Here, ``friends`` is an example of a symmetrical
``ManyToManyField``.
A ``Person`` can... | apache-2.0 |
ioannistsanaktsidis/invenio | modules/bibindex/lib/bibindex_engine_stemmer_unit_tests.py | 16 | 4323 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 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 t... | gpl-2.0 |
UManPychron/pychron | pychron/graph/regression_graph.py | 1 | 24596 | # ===============================================================================
# Copyright 2012 Jake Ross
#
# 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/licens... | apache-2.0 |
scriptnull/coala | coalib/tests/bearlib/abstractions/SectionCreatableTest.py | 28 | 2353 | import unittest
from coalib.bearlib.abstractions.SectionCreatable import SectionCreatable
from coalib.settings.Section import Section, Setting
class TestObject(SectionCreatable):
def __init__(self,
setting_one: int,
raw_setting,
setting_two: bool=False,
... | agpl-3.0 |
shivamk11/phantom_taoshan | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # 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 system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
mhajiloo/persiantools | persiantools/characters.py | 1 | 1414 | # -*- coding: utf-8 -*-
from persiantools import utils, PY2
def ar_to_fa(string):
"""Convert Arabic characters to Persian
Usage::
from persiantools import characters
converted = characters.ar_to_fa("السلام عليكم")
:param string: A string, will be converted
:rtype:... | mit |
DataONEorg/d1_python | lib_client/src/d1_client/iter/base_multi.py | 1 | 7674 | # This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | apache-2.0 |
openhdf/enigma2-wetek | lib/python/Screens/InstallWizard.py | 3 | 5585 | from Screens.Screen import Screen
from Components.ConfigList import ConfigListScreen
from Components.Sources.StaticText import StaticText
from Components.config import config, ConfigSubsection, ConfigBoolean, getConfigListEntry, ConfigSelection, ConfigYesNo, ConfigIP
from Components.Network import iNetwork
from Compone... | gpl-2.0 |
thanhpete/selenium | py/selenium/webdriver/support/select.py | 67 | 8536 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 |
Insoleet/aiohttp | tests/test_websocket_parser.py | 1 | 13270 | import aiohttp
import pytest
import random
import struct
from unittest import mock
from aiohttp.websocket import Message
from aiohttp import websocket
def build_frame(message, opcode, use_mask=False, noheader=False):
"""Send a frame over the websocket with message as its payload."""
msg_length = len(message)
... | apache-2.0 |
RichDijk/eXe | exe/webui/orientacionestutoriafpdblock.py | 11 | 3626 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ===========================================================================
# Bloque para el iDevice "Orientaciones Tutoría" creado para la FPD por
# José Ramón Jiménez Reyes
# (Block for the iDevice "FPD - Guidelines Teacher", created by
# José Ramón Jiménez Reyes for t... | gpl-2.0 |
ramanajee/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/filter_unittest.py | 124 | 9830 | # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
#
# 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, this list of conditions... | bsd-3-clause |
rupran/ansible | lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py | 5 | 4578 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 |
freezmeinster/avagata-site | django/core/management/commands/testserver.py | 234 | 1837 | from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--noinput', action='store_false', dest='interactive', default=True,
help='Tells Django to NOT prompt the user for input of any... | bsd-3-clause |
CodingCat/mxnet | tools/caffe_converter/convert_caffe_modelzoo.py | 24 | 7220 | # 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 |
gorcz/mercurial | mercurial/transaction.py | 2 | 19961 | # transaction.py - simple journaling scheme for mercurial
#
# This transaction scheme is intended to gracefully handle program
# errors and interruptions. More serious failures like system crashes
# can be recovered with an fsck-like tool. As the whole repository is
# effectively log-structured, this should amount to s... | gpl-2.0 |
amenonsen/ansible | lib/ansible/modules/network/fortios/fortios_log_null_device_filter.py | 14 | 13803 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, 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 Lic... | gpl-3.0 |
Balannen/LSMASOMM | atom3/Formalisms/LSMASOMM/graph_Association_12_Center.py | 1 | 1659 | """
__graph_Association_12_Center.py___________________________________________________________
Automatically generated graphical appearance ---> MODIFY DIRECTLY WITH CAUTION
__________________________________________________________________________________________
"""
import tkFont
from graphEntity import *
from... | gpl-3.0 |
bluemonk482/tdparse | src/tdparse.py | 1 | 21840 | """
For generating libsvm-formated feature vectors.
Many functions here are borrowed from Duy-Tin Vo's implementation
"""
import sys
sys.path.insert(0, r'../')
import os
import re
import numpy as np
import gensim
from collections import defaultdict
import argparse
from argparse import ArgumentParser
from utilities imp... | mit |
amol-mandhane/konnactivity | login/models.py | 1 | 5145 | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
#
class City(models.Model):
city = models.CharField(max_length=255, unique=True)
created_at = models.DateTimeField(auto_now_add=True, editable=False)
updated_at = models.DateTimeField(au... | mit |
Pablo126/SSBW | Entrega1/lib/python3.5/site-packages/django/core/signing.py | 115 | 7060 | """
Functions for creating and restoring url-safe signed JSON objects.
The format used looks like this:
>>> signing.dumps("hello")
'ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk'
There are two components here, separated by a ':'. The first component is a
URLsafe base64 encoded JSON of the object passed to dumps(). T... | gpl-3.0 |
jvkops/django | tests/force_insert_update/tests.py | 381 | 2213 | from __future__ import unicode_literals
from django.db import DatabaseError, IntegrityError, transaction
from django.test import TestCase
from .models import (
Counter, InheritedCounter, ProxyCounter, SubCounter, WithCustomPK,
)
class ForceTests(TestCase):
def test_force_update(self):
c = Counter.ob... | bsd-3-clause |
s-monisha/LibreHatti | src/librehatti/catalog/request_change.py | 4 | 14780 | from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic import View
from django.shortcuts import render
from librehatti.voucher.models import VoucherId
from librehatti.voucher.models import FinancialSession
from librehatti.catalog.models import Bill
from librehatti.catalog.models import ... | gpl-2.0 |
pi-2r/volatility | volatility/plugins/vboxinfo.py | 45 | 1725 | # Volatility
# Copyright (C) 2009-2012 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your o... | gpl-2.0 |
kittiu/odoo | addons/l10n_at/account_wizard.py | 379 | 1234 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) conexus.at
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public ... | agpl-3.0 |
sillydan1/WhatEverEngine | packages/IronPython.StdLib.2.7.5/content/Lib/lib2to3/fixes/fix_apply.py | 315 | 1904 | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer for apply().
This converts apply(func, v, k) into (func)(*v, **k)."""
# Local imports
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Call, Comma, parenthesi... | apache-2.0 |
mSenyor/sl4a | python-build/python-libs/gdata/src/atom/data.py | 136 | 8060 | #!/usr/bin/env 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 ... | apache-2.0 |
selinerguncu/password | numberGame/code.py | 1 | 1814 | import random
from numberGame.constants import Constants
class Password:
def __init__(self, length, complexity, goldCoins, silverCoins):
self.length = int(length)
self.complexity = int(complexity)
self.goldCoins = int(goldCoins)
self.silverCoins = int(silverCoins)
def create(se... | mit |
yeldartoktasynov/app-landing-page | vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/pygments/__init__.py | 62 | 2981 | # -*- coding: utf-8 -*-
"""
Pygments
~~~~~~~~
Pygments is a syntax highlighting package written in Python.
It is a generic syntax highlighter for general use in all kinds of software
such as forum systems, wikis or other applications that need to prettify
source code. Highlights are:
* a ... | mit |
inclement/kivy | kivy/core/audio/audio_pygame.py | 4 | 3536 | '''
AudioPygame: implementation of Sound with Pygame
.. warning::
Pygame has been deprecated and will be removed in the release after Kivy
1.11.0.
'''
__all__ = ('SoundPygame', )
from kivy.clock import Clock
from kivy.utils import platform, deprecated
from kivy.core.audio import Sound, SoundLoader
_platfor... | mit |
ubergeek42/ansible-modules-core | cloud/openstack/nova_compute.py | 14 | 22259 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, Benno Joy <benno@ansible.com>
# (c) 2013, John Dewey <john@dewey.ws>
#
# This module 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 Li... | gpl-3.0 |
sahildua2305/libcloud | libcloud/compute/drivers/gce.py | 2 | 227565 | # 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 |
vikingMei/mxnet | tests/nightly/compilation_warnings/process_output.py | 32 | 2198 | # 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 |
halfak/Mediawiki-Utilities | mw/lib/sessions/tests/test_functions.py | 3 | 1058 | from itertools import chain
from nose.tools import eq_
from .. import defaults
from ..functions import sessions
EVENTS = {
"foo": [
[
("foo", 1234567890, 1),
("foo", 1234567892, 2),
("foo", 1234567894, 3)
],
[
("foo", 1234567894 + defaults.C... | mit |
opendata-swiss/ckanext-geocat | ckanext/geocat/tests/test_dataset_metadata.py | 1 | 10120 | """Tests for metadata """
from ckanext.geocat.utils import csw_mapping
from nose.tools import * # noqa
import os
from datetime import datetime
import time
import unittest
from pprint import pprint
__location__ = os.path.realpath(
os.path.join(
os.getcwd(),
os.path.dirname(__file__)
)
)
class... | agpl-3.0 |
acsone/odoo | addons/mrp/report/price.py | 56 | 11687 | # -*- 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 |
harshilasu/GraphicMelon | y/google-cloud-sdk/.install/.backup/lib/requests/packages/chardet/chardistribution.py | 2755 | 9226 | ######################## 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 |
shawncaojob/LC | PY/689_maximum_sum_of_3_non_overlapping_subarrays.py | 1 | 3556 | # 689. Maximum Sum of 3 Non-Overlapping Subarrays
# DescriptionHintsSubmissionsDiscussSolution
# DiscussPick One
# In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum.
#
# Each subarray will be of size k, and we want to maximize the sum of all 3*k entries.
#
# Return the ... | gpl-3.0 |
fwang2/gcam | src/prettytable.py | 1 | 23798 | #!/usr/bin/env python3.2
#
# PrettyTable 0.5
# Copyright (c) 2009, Luke Maurits <luke@maurits.id.au>
# All rights reserved.
# With contributions from:
# * Chris Clark
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#... | agpl-3.0 |
openaid-IATI/OIPA | OIPA/iati/forms.py | 2 | 4764 | from django import forms
from django.contrib.gis.geos import GEOSGeometry, Point
from django.core.exceptions import ObjectDoesNotExist
from django.forms import ModelForm
from iati.models import (
Activity, ActivityParticipatingOrganisation, ActivityReportingOrganisation,
DocumentLink, Location, Narrative, Rela... | agpl-3.0 |
dreispt/maintainer-tools | tests/test_autopep8_extended.py | 5 | 3556 |
import os
import tempfile
import unittest
from tools import autopep8_extended
class TestAutopep8Extended(unittest.TestCase):
def setUp(self):
self.directory_name = tempfile.mkdtemp()
def run_autopep8_extended(self, fname, msgs):
"""Run autopep8 extended command.
:param fname: String ... | agpl-3.0 |
ColoredInsaneAsylums/DarkArchiveWorkflow | metadatautilspkg/premis.py | 1 | 25653 | # -*- coding: utf-8 -*-
# BSD 3-Clause License
#
# Copyright (c) 2017, ColoredInsaneAsylums
# 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 ab... | bsd-3-clause |
dushu1203/chromium.src | chrome/common/extensions/docs/server2/app_yaml_helper.py | 78 | 4676 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
from extensions_paths import APP_YAML
_APP_YAML_CONTAINER = '''
application: chrome-apps-doc
version: %s
runtime: python27
api_version: 1
t... | bsd-3-clause |
lucashmorais/x-Bench | mozmill-env/python/Lib/distutils/util.py | 64 | 18037 | """distutils.util
Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
"""
__revision__ = "$Id$"
import sys, os, string, re
from distutils.errors import DistutilsPlatformError
from distutils.dep_util import newer
from distutils.spawn import spawn
from distutils import ... | mit |
edisonlz/fruit | web_project/base/site-packages/sorl/thumbnail/templatetags/thumbnail.py | 2 | 7943 | # encoding=utf-8
from __future__ import unicode_literals
import logging
import sys
import re
import os
from functools import wraps
from django.template import Library, Node, NodeList, TemplateSyntaxError
from django.utils.encoding import smart_str
from django.conf import settings
from sorl.thumbnail.conf import sett... | apache-2.0 |
assumptionsoup/pymel | maya/app/startup/basic.py | 8 | 7463 | """
This module is always imported during Maya's startup. It is imported from
both the maya.app.startup.batch and maya.app.startup.gui scripts
"""
# We don't have to want to keep maintaining this module... ideally, we'd get
# autodesk to eventually incorporate our "siteSetup.py" change, or just
# drop support for it ... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.