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 |
|---|---|---|---|---|---|
djabber/Dashboard | bottle/dash/local/lib/python2.7/site-packages/pip/commands/show.py | 344 | 2767 | import os
from pip.basecommand import Command
from pip.log import logger
from pip._vendor import pkg_resources
class ShowCommand(Command):
"""Show information about one or more installed packages."""
name = 'show'
usage = """
%prog [options] <package> ..."""
summary = 'Show information about in... | mit |
fvacek/freeopcua | tests/gmock/gtest/test/gtest_uninitialized_test.py | 372 | 2482 | #!/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... | lgpl-3.0 |
inclement/kivy | examples/demo/pictures/main.py | 25 | 2279 | '''
Basic Picture Viewer
====================
This simple image browser demonstrates the scatter widget. You should
see three framed photographs on a background. You can click and drag
the photos around, or multi-touch to drop a red dot to scale and rotate the
photos.
The photos are loaded from the local images direc... | mit |
pyKun/rally | tests/unit/plugins/openstack/context/ceilometer/test_samples.py | 4 | 4459 | # 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 agreed to in writing, software
#... | apache-2.0 |
jamiepg1/zerorpc-python | zerorpc/__init__.py | 56 | 1534 | # -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | mit |
gcode-mirror/audacity | lib-src/lv2/sord/waflib/Tools/compiler_c.py | 343 | 1759 | #! /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 os,sys,imp,types
from waflib.Tools import ccroot
from waflib import Utils,Configure
from waflib.Logs import debug
c_compiler={'win32':['msvc','gcc'],'cygwin':['gcc'],'d... | gpl-2.0 |
sassoftware/conary | conary_test/repositorytest/netrepostest/proxytest.py | 1 | 13556 | #
# Copyright (c) SAS Institute 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 w... | apache-2.0 |
google/TensorNetwork | tensornetwork/tests/tensor_test.py | 1 | 14595 | # Copyright 2019 The TensorNetwork Authors
#
# 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 ... | apache-2.0 |
leafclick/intellij-community | python/helpers/coveragepy/coverage/pickle2json.py | 93 | 1489 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Convert pickle to JSON for coverage.py."""
from coverage.backward import pickle
from coverage.data import CoverageData
def pickle_read_raw_data(cls_unused, fi... | apache-2.0 |
jenia/ParkingPlan | static/open_layers/tools/BeautifulSoup.py | 307 | 69566 | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup parses a (possibly invalid) XML or HTML document into a
tree representation. It provides methods and Pythonic idioms that make
it easy to navigate, search, and modify the tree.
A well-formed X... | agpl-3.0 |
google/uncertainty-baselines | uncertainty_baselines/models/wide_resnet_condconv_test.py | 1 | 2177 | # coding=utf-8
# Copyright 2021 The Uncertainty Baselines Authors.
#
# 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 ap... | apache-2.0 |
mcking49/apache-flask | Python/Lib/test/test_abstract_numbers.py | 124 | 1685 | """Unit tests for numbers.py."""
import math
import unittest
from numbers import Complex, Real, Rational, Integral
from test import test_support
class TestNumbers(unittest.TestCase):
def test_int(self):
self.assertTrue(issubclass(int, Integral))
self.assertTrue(issubclass(int, Complex))
s... | mit |
aaron-fz/neutron_full_sync | neutron/plugins/nec/db/packetfilter.py | 8 | 9167 | # Copyright 2012-2013 NEC Corporation. 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 requ... | apache-2.0 |
fritzo/googlemock | scripts/upload.py | 2511 | 51024 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | bsd-3-clause |
Serag8/Bachelor | google_appengine/lib/django-1.5/django/contrib/contenttypes/tests.py | 99 | 10720 | from __future__ import unicode_literals
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.views import shortcut
from django.contrib.sites.models import Site, get_current_site
from django.http import HttpRequest, Http404
from django.test import Test... | mit |
johnny-bui/pygments-sablecc | pygments/cmdline.py | 75 | 13055 | # -*- coding: utf-8 -*-
"""
pygments.cmdline
~~~~~~~~~~~~~~~~
Command line interface.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
import getopt
from textwrap import dedent
from pygments import __version__, highlight
fro... | bsd-2-clause |
timkrentz/SunTracker | IMU/VTK-6.2.0/Imaging/Core/Testing/Python/TestImageProjection.py | 2 | 4799 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# this script tests vtkImageSlab with various axes permutations,
# in order to cover a nasty set of "if" statements that check
# the intersections of the raster lines with the... | mit |
wangyou/XX-Net | code/default/gae_proxy/local/http1.py | 2 | 6957 |
import threading
import Queue
import httplib
from xlog import getLogger
xlog = getLogger("gae_proxy")
import connect_control
from google_ip import google_ip
from http_common import *
from config import config
class HTTP1_worker(HTTP_worker):
version = "1.1"
idle_time = 10 * 60
def __init__(self, ssl_so... | bsd-2-clause |
opensourcechipspark/platform_external_chromium_org | chrome/test/functional/chromeos_gsm_compliance.py | 52 | 3871 | #!/usr/bin/env python
# Copyright (c) 2011 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 subprocess as sub
import pyauto_functional # Must be imported before pyauto
import pyauto
class ChromeosGSMCompliance(py... | bsd-3-clause |
MiLk/ansible-modules-core | utilities/helper/accelerate.py | 64 | 26967 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, James Cammarata <jcammarata@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of ... | gpl-3.0 |
aaltat/sublime-robot-framework-assistant | commands/scan.py | 2 | 2366 | import sublime_plugin
import sublime
import subprocess
from platform import system
from os import path, makedirs
from ..setting.setting import get_setting
from ..setting.setting import SettingObject
def scan_popen_arg_parser(mode):
arg_list = []
arg_list.append(get_setting(SettingObject.python_bina... | mit |
salmoni/Salstat | tabler.py | 1 | 7586 | """
tabler.py
Creates tables in HTML for Salstat
Submit a list of [heading: value] pairs in the desired order
p-values are automatically formatted as %1.6f (all other floats as %5.3f?)
The first two routines are generic and for single answer results.
Following are a handful of tabler functions for particular tests
(... | gpl-2.0 |
JeyZeta/Dangerous | Dangerous/Golismero/tools/sqlmap/thirdparty/colorama/initialise.py | 49 | 1222 | import atexit
import sys
from .ansitowin32 import AnsiToWin32
orig_stdout = sys.stdout
orig_stderr = sys.stderr
wrapped_stdout = sys.stdout
wrapped_stderr = sys.stderr
atexit_done = False
def reset_all():
AnsiToWin32(orig_stdout).reset_all()
def init(autoreset=False, convert=None, strip=None, wrap=True):
... | mit |
kevin8909/xjerp | openerp/addons/auth_oauth/auth_oauth.py | 70 | 1057 | from openerp.osv import osv, fields
class auth_oauth_provider(osv.osv):
"""Class defining the configuration values of an OAuth2 provider"""
_name = 'auth.oauth.provider'
_description = 'OAuth2 provider'
_order = 'name'
_columns = {
'name' : fields.char('Provider name'), # Na... | agpl-3.0 |
presidentielcoin/presidentielcoin | qa/rpc-tests/bip68-sequence.py | 1 | 18409 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Presidentielcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test BIP68 implementation
#
from test_framework.test_framework import PresidentielcoinTestF... | mit |
sadleader/odoo | addons/point_of_sale/report/pos_order_report.py | 283 | 4297 | # -*- 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 |
cycotech/WAR-app | env/lib/python3.5/site-packages/pip/_vendor/html5lib/_tokenizer.py | 385 | 76580 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import unichr as chr
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, hexDigits, EOF
from .c... | mit |
luogangyi/bcec-nova | nova/api/openstack/compute/plugins/v3/services.py | 11 | 5858 | # Copyright 2012 IBM Corp.
#
# 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 t... | apache-2.0 |
evernote/pootle | pootle/apps/staticpages/migrations/0007_auto__add_unique_legalpage_virtual_path.py | 3 | 1351 | # -*- 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 unique constraint on 'LegalPage', fields ['virtual_path']
db.create_unique('staticpages_legalpage',... | gpl-2.0 |
rs2/bokeh | examples/webgl/clustering.py | 6 | 2167 | """ Example inspired by an example from the scikit-learn project:
http://scikit-learn.org/stable/auto_examples/cluster/plot_cluster_comparison.html
"""
import numpy as np
try:
from sklearn import cluster, datasets
from sklearn.preprocessing import StandardScaler
except ImportError:
raise ImportError('This... | bsd-3-clause |
velastin/UAndes | convert_to_records.py | 1 | 7327 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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/lice... | gpl-3.0 |
ng-tony/chess-bot | node_modules/node-gyp/gyp/pylib/gyp/generator/android.py | 960 | 45344 | # 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | mit |
openmb/openblackhole-enigma2 | lib/python/Screens/TimeDateInput.py | 25 | 2498 | from Screen import Screen
from Components.config import ConfigClock, ConfigDateTime, getConfigListEntry
from Components.ActionMap import NumberActionMap
from Components.ConfigList import ConfigListScreen
from Components.Label import Label
from Components.Pixmap import Pixmap
import time
import datetime
class TimeDateI... | gpl-2.0 |
admcrae/tensorflow | tensorflow/contrib/learn/python/learn/dataframe/transforms/csv_parser.py | 86 | 2154 | # 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 |
luwensu/autotest-docker | subtests/docker_cli/syslog/syslog.py | 2 | 2788 | r"""
Summary
---------
Test monitoring containers logs from host via bind-mount
/dev/log to containers. Test containers can send log to host
Operational Summary
----------------------
#. Mount the /dev/log/ directory to container.
#. Use `logger` send a message.
#. Verify that could see the message on host.
Prereq... | gpl-2.0 |
yrobla/nova | nova/db/sqlalchemy/migrate_repo/versions/161_fix_system_metadata_none_strings.py | 22 | 1505 | # Copyright 2013 IBM Corp.
#
# 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 t... | apache-2.0 |
Belxjander/Kirito | Python-3.5.0-Amiga/Lib/multiprocessing/managers.py | 8 | 35961 | #
# Module providing the `SyncManager` class for dealing
# with shared objects
#
# multiprocessing/managers.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token' ]
#
# Imports
#
import sys
import threading
import ar... | gpl-3.0 |
KurtDeGreeff/infernal-twin | build/pip/pip/__init__.py | 174 | 10414 | #!/usr/bin/env python
from __future__ import absolute_import
import logging
import os
import optparse
import warnings
import sys
import re
from pip.exceptions import InstallationError, CommandError, PipError
from pip.utils import get_installed_distributions, get_prog
from pip.utils import deprecation
from pip.vcs im... | gpl-3.0 |
tjdavey/ninja_twitterbot | tweepy/cursor.py | 36 | 4027 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from tweepy.error import TweepError
class Cursor(object):
"""Pagination helper class"""
def __init__(self, method, *args, **kargs):
if hasattr(method, 'pagination_mode'):
if method.pagination_mode == 'cursor':
... | mit |
sashakames/COG | cog/views/views_governance.py | 2 | 16676 | from cog.forms import *
from cog.models import *
from cog.models.constants import LEAD_ORGANIZATIONAL_ROLES_DICT, \
ROLE_CATEGORY_LEAD, ROLE_CATEGORY_MEMBER, MANAGEMENT_BODY_CATEGORY_STRATEGIC, \
MANAGEMENT_BODY_CATEGORY_OPERATIONAL
from constants import PERMISSION_DENIED_MESSAGE
from django.contrib.auth.decora... | bsd-3-clause |
gwaller/mongo-connector | mongo_connector/oplog_manager.py | 1 | 30523 | # Copyright 2013-2014 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 writin... | apache-2.0 |
chris-ch/IbPy | ib/lib/__init__.py | 8 | 9189 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# Just enough auxiliary bits to make the translated code work.
#
# This package provides the support necessary to use the translated
# code. The configuration modules used in translation take care of
# many semantic differences between Java and Python, while this
# pac... | bsd-3-clause |
liushuaikobe/evermd | lib/thrift/protocol/TProtocol.py | 62 | 10839 | #
# 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... | gpl-2.0 |
swegener/libsigrokdecode | decoders/common/plugtrx/mod.py | 8 | 4761 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2016 Bert Vermeulen <bert@biot.com>
##
## 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 Lice... | gpl-3.0 |
jcpowermac/ansible | lib/ansible/modules/cloud/openstack/os_keystone_role.py | 25 | 3378 | #!/usr/bin/python
# Copyright (c) 2016 IBM
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
Mzero2010/MaxZone | plugin.video.Mzero/servers/hugefiles.py | 4 | 2338 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para hugefiles
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
# Based on the hugefiles resolver from script.modules.urlresolver
#------------------------------------------------------... | gpl-3.0 |
lenstr/rethinkdb | external/v8_3.30.33.16/build/gyp/test/win/gyptest-link-opt-ref.py | 344 | 1145 | #!/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 sure reference optimization setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = Te... | agpl-3.0 |
mrbox/django | tests/signed_cookies_tests/tests.py | 288 | 2768 | from __future__ import unicode_literals
from django.core import signing
from django.http import HttpRequest, HttpResponse
from django.test import SimpleTestCase, override_settings
from django.test.utils import freeze_time
class SignedCookieTest(SimpleTestCase):
def test_can_set_and_read_signed_cookies(self):
... | bsd-3-clause |
NAM-IL/ARM_Linux_Kernel_12b | scripts/gdb/linux/dmesg.py | 367 | 2005 | #
# gdb helper commands and functions for Linux kernel debugging
#
# kernel log buffer dump
#
# Copyright (c) Siemens AG, 2011, 2012
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
import string
from linux import utils
class LxDme... | gpl-2.0 |
JonnaStalring/AZOrange | ConfPred/conformal-master/examples/icp_classification_tree.py | 2 | 2055 | #!/usr/bin/env python3
"""
Example: inductive conformal classification using DecisionTreeClassifier
"""
import numpy as np
from sklearn.tree import DecisionTreeClassifier
import Orange
from nonconformist.acp import CrossConformalClassifier, AggregatedCp, CrossSampler
from nonconformist.icp import IcpClassifier
from... | lgpl-3.0 |
ramondelafuente/ansible | lib/ansible/plugins/action/assemble.py | 4 | 6337 | # (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Stephen Fromm <sfromm@gmail.com>
# Brian Coca <briancoca+dev@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 publish... | gpl-3.0 |
bitifirefly/edx-platform | common/djangoapps/pipeline_mako/__init__.py | 140 | 2444 | from edxmako.shortcuts import render_to_string
from pipeline.conf import settings
from pipeline.packager import Packager
from pipeline.utils import guess_type
from static_replace import try_staticfiles_lookup
def compressed_css(package_name, raw=False):
package = settings.PIPELINE_CSS.get(package_name, {})
i... | agpl-3.0 |
hehongliang/tensorflow | tensorflow/compiler/tests/segment_reduction_ops_test.py | 22 | 7761 | # 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 |
Meriipu/quodlibet | tests/plugin/test_synchronize_to_device.py | 2 | 44809 | # Copyright 2020 Daniel Petrescu
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
import os
from os import makedirs
fr... | gpl-2.0 |
jeboo/zte_a2017U_B27 | tools/perf/scripts/python/sctop.py | 1996 | 2102 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... | gpl-2.0 |
sebrandon1/nova | nova/tests/unit/notifications/objects/test_service.py | 8 | 3429 | # Copyright (c) 2016 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 |
googlecolab/colabtools | google/colab/output/_js.py | 1 | 3073 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
amasiero/approach_control | approach_control_people/nodes/approach_control_people/faces/GenderDiscover.py | 1 | 2283 | #!/usr/bin/env python
import cv2.cv
import imutils
import time
import smach
import smach_ros
import rospy
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
from approach_control_people.faces.Map import Map
from approach_control_people.faces.ULBP import ULBP... | gpl-2.0 |
bmya/addons-yelizariev | web_logo/controllers/main.py | 16 | 2317 | import openerp
from openerp import http, SUPERUSER_ID
from openerp.addons.web.controllers.main import Binary
import functools
from openerp.http import request, serialize_exception as _serialize_exception
from openerp.modules import get_module_resource
from cStringIO import StringIO
db_monodb = http.db_monodb
class Bi... | lgpl-3.0 |
pombredanne/metamorphosys-desktop | metamorphosys/META/models/DynamicsTeam/RICheckerTestModel/post_processing/RICircuit_fail.py | 3 | 4282 | # Copyright (C) 2013-2015 MetaMorph Software, Inc
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this data, including any software or models in source or binary
# form, as well as any drawings, specifications, and documentation
# (collectively "the Data"), to deal in the Data ... | mit |
jeremiahyan/odoo | addons/website_event_questions/controllers/main.py | 4 | 2117 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.http import request
from odoo.addons.website_event.controllers.main import WebsiteEventController
class WebsiteEvent(WebsiteEventController):
def _process_attendees_form(self, event, form_details):
... | gpl-3.0 |
DirtyUnicorns/android_external_chromium_org | third_party/pexpect/pexpect.py | 173 | 77354 | """Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be u... | bsd-3-clause |
Stan1989/volatility | volatility/plugins/linux/psaux.py | 45 | 1333 | # Volatility
# Copyright (C) 2007-2013 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 |
pantelis/lightup | sphinx-extensions/sphinx_numfig-r13/setup.py | 3 | 1160 | #!/usr/bin/env python
import sys, os, stat
# Locate sphinx
try:
import sphinx
except:
print "Sphinx not found. Quitting."
sys.exit(1)
print "Action is '" + sys.argv[1] + "'."
if sys.argv[1] == "build":
print "Nothing to build. Quitting."
sys.exit(0)
elif sys.argv[1] == "install":
pass
else:
print sys.... | cc0-1.0 |
sinhrks/numpy | numpy/lib/tests/test_arraysetops.py | 114 | 10084 | """Test functions for 1D array set operations.
"""
from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.testing import (
run_module_suite, TestCase, assert_array_equal, assert_equal
)
from numpy.lib.arraysetops import (
ediff1d, intersect1d, setxor1d, union1d, set... | bsd-3-clause |
eonezhang/kafka | kafka-merge-pr.py | 9 | 19028 | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Li... | apache-2.0 |
jithinbp/BTK_simulations | current_fermi.py | 1 | 2141 | import math
import pygrace
import pygame,os,time,sys
WIDTH=400
HEIGHT=100
size = [WIDTH,HEIGHT]
flags=pygame.SRCALPHA|pygame.HWSURFACE|pygame.HWACCEL
os.environ['SDL_VIDEO_WINDOW_POS'] = '700,100'
screen = pygame.display.set_mode(size,flags)
pygame.display.set_caption("Transmission and reflection")
def xmgrace():
g... | gpl-3.0 |
anguoyang/SMQTK | OLD_ROOT/WebUI/QueryRecommend/query_recommend.py | 1 | 7183 | """
LICENCE
-------
Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to
KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
"""
import os
import numpy as np
import json
thispath = os.path.dirname(os.path.abs... | bsd-3-clause |
alshedivat/tensorflow | tensorflow/contrib/distributions/python/ops/relaxed_onehot_categorical.py | 35 | 18518 | # 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 |
pbrady/sympy | sympy/physics/quantum/qasm.py | 95 | 6299 | """
qasm.py - Functions to parse a set of qasm commands into a Sympy Circuit.
Examples taken from Chuang's page: http://www.media.mit.edu/quanta/qasm2circ/
The code returns a circuit and an associated list of labels.
>>> from sympy.physics.quantum.qasm import Qasm
>>> q = Qasm('qubit q0', 'qubit q1', 'h q0', 'cnot ... | bsd-3-clause |
rossrader/destalinator | tests/test_destalinator.py | 1 | 25539 | from datetime import date, datetime, timedelta
import mock
import os
import unittest
import destalinator
import slacker
import slackbot
sample_slack_messages = [
{
"type": "message",
"channel": "C2147483705",
"user": "U2147483697",
"text": "Human human human.",
"ts": "1355... | apache-2.0 |
UpOut/UpOutDF | test.py | 1 | 2268 | from upoutdf.parse import get_class
#test = "every month on last sunday,monday starting _October_15_2012_8:00PM ending _April_1_2014 at 8:00PM lasting 120 minutes in America/Los_Angeles"
#test = "every month day 4 starting _October_1_2013 ending _April_1_2014 at 8:00PM lasting 2 hours in America/Los_Angeles"
#test =... | mit |
rbrune/android_kernel_google_steelhead_orig | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
privacyidea/privacyidea | tests/test_lib_counter.py | 1 | 5817 | """
This tests the files
lib/counter.py
"""
import mock
from contextlib import contextmanager
from .base import MyTestCase
from privacyidea.lib.counter import increase, decrease, reset, read
from privacyidea.models import EventCounter
def increase_and_read(name):
""" helper function that increases the event co... | agpl-3.0 |
windofthesky/ansible | lib/ansible/executor/play_iterator.py | 14 | 13333 | # (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 |
gregtampa/coreemu | daemon/core/misc/xmlsession.py | 7 | 1058 | #
# CORE
# Copyright (c)2011-2014 the Boeing Company.
# See the LICENSE file included in this distribution.
#
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
#
'''
Helpers for loading and saving XML files. savesessionxml(session, filename) is
the main public interface here.
'''
import os.path
from core.netn... | bsd-2-clause |
rackerlabs/timid-github | timid_github.py | 1 | 33572 | # Copyright 2016 Rackspace
# 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 app... | apache-2.0 |
maljac/odoo-addons | report_extended_purchase/__openerp__.py | 1 | 1599 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | agpl-3.0 |
j4mie/rediset | rediset/sets.py | 1 | 1992 | from .base import Node, OperationNode
class SetNode(Node):
"""
Represents a Redis set
Note that this class does *not* try too hard to look like a Python
set. For example, you cannot pass an iterable into its constructor
to provide the members of the set. This is because a set in Redis
may or... | unlicense |
chrishah/MITObim | docker/scripts/circules.py | 2 | 14307 | #!/usr/bin/python
import sys,warnings
import argparse
VERSION="0.5"
DESCRIPTION='''
circules - checks for circularity in nucleotide sequences
version: v.%s
# Disclaimer: #
The script is currently in the beta phase. Any feedback is much appreciated.
''' %VERSION
kmers = []
dic = {}
seqs = {}
motifs_by_regions = {}
... | mit |
jaggu303619/asylum-v2.0 | openerp/addons/base_import/__openerp__.py | 35 | 1565 | {
'name': 'Base import',
'description': """
New extensible file import for OpenERP
======================================
Re-implement openerp's file import system:
* Server side, the previous system forces most of the logic into the
client which duplicates the effort (between clients), makes the
import s... | agpl-3.0 |
xzturn/tensorflow | tensorflow/python/ops/quantized_ops_test.py | 23 | 4127 | # 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 |
vinegret/youtube-dl | youtube_dl/extractor/nbc.py | 4 | 20745 | from __future__ import unicode_literals
import base64
import json
import re
from .common import InfoExtractor
from .theplatform import ThePlatformIE
from .adobepass import AdobePassIE
from ..compat import compat_urllib_parse_unquote
from ..utils import (
int_or_none,
js_to_json,
parse_duration,
smuggl... | unlicense |
Tinkerforge/brickv | src/brickv/plugin_system/plugins/co2_v2/co2_v2.py | 1 | 3550 | # -*- coding: utf-8 -*-
"""
CO2 2.0 Plugin
Copyright (C) 2019 Olaf Lüke <olaf@tinkerforge.com>
co2_v2.py: CO2 2.0 Plugin Implementation
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... | gpl-2.0 |
kanpol/hk | tools/apk_retriever/apk_retriever/SlideMeMarket.py | 4 | 6112 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| |
#| Android's Hooker |
#| ... | gpl-3.0 |
dataloop/slactorbot | setup.py | 1 | 1466 | """
Slactorbot - A Python Slack Bot with hot patch!
"""
import os
import re
from setuptools import find_packages, setup
def fread(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def get_version():
VERSIONFILE = "slactorbot/_version.py"
verstrline = fread(VERSIONFILE).strip()
... | mit |
sidnarayanan/TransferErrors | bin/dump.py | 2 | 2483 | #!/usr/bin/env python
import cPickle as pickle
import TransferErrors as TE
import ROOT as root
from tdrStyle import *
setTDRStyle()
with open('stuck.pkl','rb') as pklfile:
stuck = pickle.load(pklfile)
basisMap = {
-6 : 3,
-5 : 2,
-4 : 5,
-3 : 7,
-1 : 4,
1 : 1,
2 : 6,
}
#revMap = {v:k for k,v in b... | mit |
tobetter/hardkernel-linux | 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 |
deandunbar/html2bwml | venv/lib/python2.7/site-packages/django/contrib/gis/gdal/datasource.py | 80 | 5092 | """
DataSource is a wrapper for the OGR Data Source object, which provides
an interface for reading vector geometry data from many different file
formats (including ESRI shapefiles).
When instantiating a DataSource object, use the filename of a
GDAL-supported data source. For example, a SHP file or a
TIGER/Line... | mit |
AnasGhrab/scikit-learn | examples/plot_digits_pipe.py | 250 | 1809 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Pipelining: chaining a PCA and a logistic regression
=========================================================
The PCA does an unsupervised dimensionality reduction, while the logistic
regression does the predictio... | bsd-3-clause |
mvidalgarcia/indico | indico/modules/events/registration/models/form_fields.py | 2 | 4366 | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.... | mit |
ader1990/cloudbase-init | cloudbaseinit/metadata/services/azureservice.py | 3 | 18702 | # Copyright 2017 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 |
RanadeepPolavarapu/kuma | vendor/packages/pygments/util.py | 44 | 11789 | # -*- coding: utf-8 -*-
"""
pygments.util
~~~~~~~~~~~~~
Utility functions.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import sys
split_path_re = re.compile(r'[/\\ ]')
doctype_lookup_re = re.compile(r'''(?smx)
(<\?... | mpl-2.0 |
creativecommons/open-ledger | util/scheduled-snapshots/requests/packages/urllib3/packages/ordered_dict.py | 2040 | 8935 | # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
# Copyright 2009 Raymond Hettinger, released under the MIT License.
# http://code.activestate.com/recipes/576693/
try:
from thread import get_ident as _get_iden... | mit |
saurabh6790/omnisys-app | manufacturing/doctype/bom_replace_tool/bom_replace_tool.py | 30 | 1529 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, flt
from webnotes.model.code import get_obj
from webnotes import msgprint, _
class DocType:
def _... | agpl-3.0 |
rackerlabs/quark | quark/plugin_modules/floating_ips.py | 1 | 24567 | # Copyright 2013 Rackspace Hosting 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 re... | apache-2.0 |
dirn/ansible | lib/ansible/plugins/action/script.py | 31 | 4074 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 |
was4444/chromium.src | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py | 4 | 5458 | # Copyright (C) 2010, 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions an... | bsd-3-clause |
followyourheart/airflow | airflow/example_dags/tutorial.py | 37 | 1802 | """
### Tutorial Documentation
Code that goes along with the Airflow located
[here](http://pythonhosted.org/airflow/tutorial.html)
"""
from airflow import DAG
from airflow.operators import BashOperator
from datetime import datetime, timedelta
seven_days_ago = datetime.combine(datetime.today() - timedelta(7),
... | apache-2.0 |
srikanth-viswanathan/simoorg | src/simoorg/plugins/healthcheck/KafkaHealthCheck/KafkaHealthCheck.py | 8 | 2808 | #
# Copyright 2015 LinkedIn Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.