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 |
|---|---|---|---|---|---|
kr41/ggrc-core | src/docbuilder/descriptors/model.py | 6 | 1241 | # Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Model related descriptors."""
from cached_property import cached_property
from sqlalchemy.dialects import mysql
from sqlalchemy.schema import CreateTable
from docbuilder.descriptors.base import Descript... | apache-2.0 |
blakedewey/nipype | nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py | 9 | 2494 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.camino.dti import TrackBootstrap
def test_TrackBootstrap_inputs():
input_map = dict(anisfile=dict(argstr='-anisfile %s',
),
anisthresh=dict(argstr='-anisthresh %f',
),
args=dict(args... | bsd-3-clause |
adamtiger/tensorflow | tensorflow/contrib/slim/python/slim/data/test_utils.py | 163 | 3795 | # 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 |
bpagon13/vent | vent/core/network_tap/ncontrol/rest/create.py | 1 | 3287 | import ast
import docker
import redis
import socket
import sys
import web
import uuid
sys.path.append('/vent/plugins/vent')
from vent.api.actions import Action
class CreateR:
"""
This endpoint is for creating a new filter
"""
@staticmethod
def POST():
"""
Send a POST request wit... | apache-2.0 |
telwertowski/Books-Mac-OS-X | Books/Bundled plugins/Amazon Importer.app/Contents/Resources/amazonScript.py | 20 | 2938 | #!/usr/bin/python
from amazon import Bag
from xml.dom.minidom import Document
import amazon
import sys
localeArgs = sys.argv[1]
fieldArgs = sys.argv[2]
query = sys.argv[3]
fieldMap = {
"Asin" : "ASIN",
"Authors" : "Authors",
"ImageUrlLarge" : "CoverImageURL",
"ImageUrlMedium" : "ImageUrlMedium"... | mit |
ederign/kindergarten | node/building_web_apps/examples/challenge6/start/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima-six/tools/generate-unicode-regex.py | 341 | 5096 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# By Yusuke Suzuki <utatane.tea@gmail.com>
# Modified by Mathias Bynens <http://mathiasbynens.be/>
# http://code.google.com/p/esprima/issues/detail?id=110
import sys
import string
import re
class RegExpGenerator(object):
def __init__(self, detector):
self.de... | apache-2.0 |
leafclick/intellij-community | python/helpers/pydev/_pydev_bundle/_pydev_getopt.py | 108 | 4458 |
#=======================================================================================================================
# getopt code copied since gnu_getopt is not available on jython 2.1
#=======================================================================================================================
class Ge... | apache-2.0 |
2013Commons/hue | desktop/core/ext-py/tablib-develop/tablib/packages/xlwt/examples/formulas.py | 46 | 1358 | #!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
from xlwt import *
w = Workbook()
ws = w.add_sheet('F')
ws.write(0, 0, Formula("-(1+1)"))
ws.write(1, 0, Formula("-(1+1)/(-2-2)"))
ws.write(2, 0, Formula("-(134.8780789+1)"))
ws.write(3, 0, Formula("-(134.8780789e-10+1)"))
ws.wr... | apache-2.0 |
trailofbits/manticore | examples/script/symbolic_file.py | 1 | 2570 | #!/usr/bin/env python
"""
Example to show usage of introducing a file with symbolic contents
This script should be the equivalent of:
$ echo "+++++++++++++" > symbolic_file.txt
$ manticore -v --file symbolic_file.txt ../linux/fileio symbolic_file.txt
"""
import copy
import glob
import os
import pathlib
import... | agpl-3.0 |
kalev/anaconda | pyanaconda/iw/iw_gui.py | 3 | 1290 | #
# iw_gui.py: install window base class
#
# Copyright (C) 2000, 2001, 2002 Red Hat, Inc. All rights reserved.
#
# 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... | gpl-2.0 |
bcoca/ansible-modules-extras | monitoring/honeybadger_deployment.py | 46 | 4172 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2014 Benjamin Curtis <benjamin.curtis@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 versi... | gpl-3.0 |
libos-nuse/net-next-nuse | tools/perf/scripts/python/sched-migration.py | 1910 | 11965 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
mrtommyb/GP_model_Kepler_data | code/transitemcee.py | 3 | 44176 | import sys
import numpy as np
#import matplotlib.pyplot as plt
import emcee
import tmodtom as tmod
import time as thetime
from scipy.stats import truncnorm
from claretquadpy import claretquad
from claret4ppy import claretlimb4p
from copy import deepcopy
from numpy import random
#from bilin_interp import ld_quad
clas... | mit |
antb/TPT----My-old-mod | src/python/stdlib/uuid.py | 187 | 21095 | r"""UUID objects (universally unique identifiers) according to RFC 4122.
This module provides immutable UUID objects (class UUID) and the functions
uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1() ... | gpl-2.0 |
papedaniel/oioioi | oioioi/similarsubmits/models.py | 1 | 1206 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from oioioi.base.utils.deps import check_django_app_dependencies
from oioioi.contests.models import Submission, Contest
check_django_app_dependencies(__name__, ['oioioi.disqualification'],
strict=True)
... | gpl-3.0 |
eduNEXT/edunext-platform | common/djangoapps/track/tracker.py | 4 | 2197 | """
Module that tracks analytics events by sending them to different
configurable backends.
The backends can be configured using Django settings as the example
below::
TRACKING_BACKENDS = {
'tracker_name': {
'ENGINE': 'class.name.for.backend',
'OPTIONS': {
'host': ... ,
... | agpl-3.0 |
BaconPancakes/valor | lib/youtube_dl/extractor/tnaflix.py | 34 | 11665 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
fix_xml_ampersands,
float_or_none,
int_or_none,
parse_duration,
str_to_int,
unescapeHTML,
xpath_text,
)
class TNAFlixNetworkBaseIE(InfoExtractor):
... | gpl-3.0 |
hexxter/home-assistant | tests/components/mqtt/test_init.py | 5 | 12504 | """The tests for the MQTT component."""
from collections import namedtuple
import unittest
from unittest import mock
import socket
import voluptuous as vol
from homeassistant.bootstrap import _setup_component
import homeassistant.components.mqtt as mqtt
from homeassistant.const import (
EVENT_CALL_SERVICE, ATTR_D... | mit |
jendap/tensorflow | tensorflow/python/framework/tensor_spec_test.py | 9 | 10234 | # Copyright 2018 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 |
emergent-interfaces/open-playout | scrap/rebuilding_ustream_sink.py | 1 | 2866 | import os
import gi
try:
gi.require_version('Gst', '1.0')
except ValueError:
print 'Could not find required Gstreamer library'
sys.exit(1)
from gi.repository import GObject, Gst
os.environ["GST_DEBUG"] = "4"
os.environ["GST_DEBUG_DUMP_DOT_DIR"] = "/tmp"
os.putenv('GST_DEBUG_DUMP_DIR_DIR', '/tmp')
GObject.... | gpl-3.0 |
KevinBiomech/GameCredits-revision | contrib/testgen/gen_base58_test_vectors.py | 10 | 4343 | #!/usr/bin/env python
'''
Generate valid and invalid base58 address and private key test vectors.
Usage:
gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
'''
# 2012 Wladimir J. van der Laan
# R... | mit |
Stratoscale/solvent | solvent/bring.py | 1 | 1131 | from solvent import config
from solvent import run
from solvent import requirementlabel
import logging
import os
class Bring:
def __init__(self, repositoryBasename, product, hash, destination):
self._repositoryBasename = repositoryBasename
self._product = product
self._hash = hash
... | apache-2.0 |
pkdevbox/trac | sample-plugins/permissions/debug_perm.py | 5 | 1512 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2013 Edgewall Software
# Copyright (C) 2007 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://tr... | bsd-3-clause |
mpimenov/omim | tools/python/routing/run_heap_comparison_benchmark.py | 4 | 10276 | import os
import sys
import re
from multiprocessing import Pool
import argparse
from src.utils import Omim
from src.utils import ConfigINI
from src.logger import LOG
from src import graph_scripts, utils
def get_version_dump_path(*, config_ini, version):
results_save_dir = config_ini.read_value_by_path(path=['PAT... | apache-2.0 |
linsicai/or-tools | examples/tests/issue46.py | 7 | 2861 | # Copyright 2010-2014 Google
# 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, so... | apache-2.0 |
erikdejonge/youtube-dl | youtube_dl/extractor/urort.py | 64 | 2249 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
)
from ..utils import (
unified_strdate,
)
class UrortIE(InfoExtractor):
IE_DESC = 'NRK P3 Urørt'
_VALID_URL = r'https?://(?:www\.)?urort\.p3\.no/#!/Band/(?P<id>[^/]+)... | unlicense |
Northshoot/maestro | datamining/instance_run.py | 1 | 3647 | '''
Created on Oct 3, 2013
@author: lauril
'''
import os
import numpy as np
import ast
from defines import time_d,t_format, cpu
class InstanceData(object):
'''
classdocs
'''
def __init__(self,mainDir, directory, files):
'''
Constructor
'''
self.path=mainDir+'/'+direct... | apache-2.0 |
codekaki/odoo | addons/hr_holidays/wizard/hr_holidays_summary_department.py | 52 | 2366 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# $Id: account.py 1005 2005-07-25 08:41:42Z nicoe $
#
# This program is free software: you can redistrib... | agpl-3.0 |
marcsans/cnn-physics-perception | phy/lib/python2.7/site-packages/scipy/sparse/csgraph/tests/test_reordering.py | 93 | 3457 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import assert_equal
from scipy.sparse.csgraph import reverse_cuthill_mckee,\
maximum_bipartite_matching
from scipy.sparse import diags, csr_matrix, coo_matrix
def test_graph_reverse_cuthill_mckee():
A = ... | mit |
ccn-2m/django | django/contrib/messages/api.py | 321 | 2952 | from django.contrib.messages import constants
from django.contrib.messages.storage import default_storage
__all__ = (
'add_message', 'get_messages',
'get_level', 'set_level',
'debug', 'info', 'success', 'warning', 'error',
)
class MessageFailure(Exception):
pass
def add_message(request, level, mess... | bsd-3-clause |
vikingMei/mxnet | example/sparse/wide_deep/model.py | 12 | 2756 | # 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 |
SSG-DRD-IOT/commercial-iot-security-system | opencv/tutorials/imageProcessing/smoothing/convolution.py | 1 | 1116 | """
Smoothing images
blur images with various low pass filters
apply custom-made filters to images (2D Convolution)
2D Convolution (image filtering)
images can be filtered with various low-pass filters (LPF), high-pass filters (HPF), ...
LPF helps remove noises, blur images
HPF filters help find edges in image... | mit |
keithhendry/treadmill | treadmill/kafka/__init__.py | 3 | 6938 | """Treadmill Kafka API"""
import logging
import os
import re
import socket
from .. import admin as tadmin
from .. import context
from .. import dnsutils
from .. import discovery
from .. import fs
_LOGGER = logging.getLogger(__name__)
KAFKA_ZK_ROOT = 'kafka'
DEFAULT_KAFKA_DIR = '/var/tmp/kafka'
RUN_CLASS_SCRIPT_NAM... | apache-2.0 |
GLMeece/namebench | nb_third_party/dns/rdtypes/IN/NSAP.py | 248 | 2173 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 |
andyxhadji/incubator-airflow | airflow/utils/helpers.py | 1 | 11892 | # -*- 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 |
jomyhuang/sdwle | testsHB/card_tests/hunter_tests.py | 3 | 40078 | import random
import unittest
from hearthbreaker.agents.basic_agents import DoNothingAgent, PredictableAgent
from hearthbreaker.constants import MINION_TYPE
from tests.agents.testing_agents import CardTestingAgent, OneCardPlayingAgent, WeaponTestingAgent, \
PlayAndAttackAgent, SelfSpellTestingAgent
from tests.test... | mit |
STL1te/wot-xvm | src/xpm/xpm/mods/lib/simplejson/__init__.py | 6 | 22438 | r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | gpl-3.0 |
zhouzhenghui/python-for-android | python-build/python-libs/python-twitter/simplejson/encoder.py | 138 | 15836 | """Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from simplejson._speedups import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
... | apache-2.0 |
olekw/cyphesis | data/rulesets/basic/scripts/mind/goals/humanoid/fire.py | 1 | 1365 | # This file is distributed under the terms of the GNU General Public license.
# Copyright (C) 1999 Aloril (See the file COPYING for details).
from atlas import Operation, Entity
from mind.Goal import Goal
from mind.goals.common.move import move_me
from mind.goals.dynamic.add_unique_goal import add_unique_goal_by_perce... | gpl-2.0 |
cursorzz/myweb | app/pingback.py | 11 | 5006 | # vim: sw=4:expandtab:foldmethod=marker
#
# Copyright (c) 2003, Mathieu Fenniak
# 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 abov... | mit |
machinaut/gym | gym/monitoring/video_recorder.py | 3 | 12286 | import logging
import json
import os
import subprocess
import tempfile
import os.path
import distutils.spawn, distutils.version
import numpy as np
from six import StringIO
import six
import six.moves.urllib as urlparse
from gym import error
logger = logging.getLogger(__name__)
def touch(path):
open(path, 'a').cl... | mit |
Elico-Corp/odoo_OCB | openerp/addons/test_converter/tests/test_html.py | 5 | 13549 | # -*- encoding: utf-8 -*-
import json
import os
import datetime
from lxml import etree
from openerp.tests import common
from openerp.tools import html_escape as e
from openerp.addons.base.ir import ir_qweb
directory = os.path.dirname(__file__)
class TestExport(common.TransactionCase):
_model = None
def set... | agpl-3.0 |
jaywink/shoop | shoop/core/models/suppliers.py | 2 | 2649 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db import models
from enumfields import Enum, EnumIntegerField
f... | agpl-3.0 |
korepwx/tfsnippet | tests/variational/test_chain.py | 1 | 3275 | import numpy as np
import tensorflow as tf
from mock import Mock
from tfsnippet.variational import VariationalChain, VariationalInference
class VariationalChainTestCase(tf.test.TestCase):
def prepare_model(self):
variational_local_log_probs = Mock(
return_value=[tf.constant(1.), tf.constant(... | mit |
dnanexus/dx-toolkit | src/python/test/test_dx-docker.py | 1 | 8184 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2016 DNAnexus, Inc.
#
# This file is part of dx-toolkit (DNAnexus platform client libraries).
#
# 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 c... | apache-2.0 |
gregdek/ansible | lib/ansible/module_utils/gitlab.py | 42 | 1179 | # -*- coding: utf-8 -*-
# (c) 2018, Marcus Watkins <marwatk@marcuswatkins.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import json
from ansible.module_utils.urls import fetch_url
try:
from urllib import quote_plus # Python 2.X
except ImportError:
from ur... | gpl-3.0 |
meteorcloudy/tensorflow | tensorflow/contrib/data/python/kernel_tests/slide_dataset_op_test.py | 6 | 11153 | # Copyright 2018 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 |
mattbierbaum/tmpr | setup.py | 2 | 1442 | import os
import re
import glob
from setuptools import setup
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
try:
readme = read('README.md')
except IOError as e:
readme = ''
templates = glob.glob('templates/*')
setup(
name='tmper',
license='MIT License',... | mit |
hastexo/edx-platform | openedx/core/djangoapps/auth_exchange/tests/test_views.py | 10 | 7379 | """
Tests for OAuth token exchange views
"""
# pylint: disable=no-member
from datetime import timedelta
import json
import mock
import unittest
import ddt
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import TestCase
import httpretty
import provider.constants
from pro... | agpl-3.0 |
WindCanDie/spark | python/pyspark/sql/types.py | 2 | 67075 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 |
weso/landportal-importers | LandMatrixExtractor/Main.py | 1 | 1829 | '''
Created on 13/01/2014
@author: Dani
'''
import os
import sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir), 'CountryReconciler'))
sys.path.append(os.path.join(os.path.join(os.path.dirname(os.path.real... | unlicense |
windedge/odoo | addons/email_template/wizard/email_template_preview.py | 377 | 3851 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it ... | agpl-3.0 |
CZ-NIC/thug | src/Classifier/BaseClassifier.py | 5 | 2022 | #!/usr/bin/env python
#
# BaseClassifier.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARR... | gpl-2.0 |
John-Lin/ryu | ryu/tests/unit/packet/test_cfm.py | 23 | 58383 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
#
# 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 applicab... | apache-2.0 |
androidarmv6/android_external_chromium_org | chrome/common/extensions/docs/server2/server_instance.py | 23 | 7344 | # Copyright (c) 2012 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.
from api_categorizer import APICategorizer
from api_data_source import APIDataSource
from api_list_data_source import APIListDataSource
from api_models i... | bsd-3-clause |
echoi/snac_bmi | pythia-0.8/packages/opal/opal/weaver/HeadMill.py | 2 | 1775 | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 1998-2005 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~... | gpl-2.0 |
etkirsch/scikit-learn | sklearn/datasets/lfw.py | 141 | 19372 | """Loader for the Labeled Faces in the Wild (LFW) dataset
This dataset is a collection of JPEG pictures of famous people collected
over the internet, all details are available on the official website:
http://vis-www.cs.umass.edu/lfw/
Each picture is centered on a single face. The typical task is called
Face Veri... | bsd-3-clause |
Southpaw-TACTIC/TACTIC | src/pyasm/biz/repo_handler.py | 2 | 2226 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without writte... | epl-1.0 |
scollis/iris | lib/iris/tests/unit/experimental/raster/test_export_geotiff.py | 1 | 6048 | # (C) British Crown Copyright 2013 - 2014, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | gpl-3.0 |
wangscript/qb-archetype | quickbundle-rmwebdemo/WebContent/WEB-INF/jython/qb/tools/support/zip/zip_file.py | 2 | 2695 | #coding=UTF-8
import os.path
import os,zipfile
from os.path import join
from datetime import date
from time import time
from qb.tools.helper import date_helper
default_encode = 'UTF-8'
class zip_file(object):
def __init__(self, filename, mode='r', basedir=''):
self.filename = filename
self.mode = ... | apache-2.0 |
sub77/kernel_msm | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
cfjhallgren/shogun | applications/tapkee/faces_embedding.py | 5 | 2075 | #!/usr/bin/env python
# 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.
#
# Written (W) 2011 Sergey Lisitsyn
# Copyright ... | gpl-3.0 |
icodedev7/customap | devkit/mingw/bin/lib/inspect.py | 40 | 42462 | # -*- coding: iso-8859-1 -*-
"""Get useful information from live Python objects.
This module encapsulates the interface provided by the internal special
attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.
Here are some of the usef... | mit |
robertmattmueller/sdac-compiler | sympy/interactive/printing.py | 31 | 15830 | """Tools for setting up printing in interactive sessions. """
from __future__ import print_function, division
import sys
from distutils.version import LooseVersion as V
from io import BytesIO
from sympy import latex as default_latex
from sympy import preview
from sympy.core.compatibility import integer_types
from sy... | gpl-3.0 |
gtoonstra/airflow | airflow/api/common/experimental/get_dag_run_state.py | 18 | 1631 | # -*- 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 |
cntnboys/410Lab6 | build/django/django/utils/six.py | 408 | 30194 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# 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 with... | apache-2.0 |
rubencabrera/odoo | openerp/addons/base/tests/test_osv.py | 446 | 4722 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 OpenERP S.A. http://www.openerp.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
shl198/Projects | Modules/ParseFasta.py | 2 | 1838 | from Bio import SeqIO
import os
def change_ncbi_annotation_name(outputfile,inputfile,inter):
"""this function can change the reference name of fasta file to accession number
"""
reference = SeqIO.parse(open(inputfile,'rU'),'fasta')
output = open(inter,'w')
for item in reference:
name =... | mit |
Thor77/youtube-dl | youtube_dl/extractor/twentyfourvideo.py | 10 | 3802 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
parse_iso8601,
int_or_none,
xpath_attr,
xpath_element,
)
class TwentyFourVideoIE(InfoExtractor):
IE_NAME = '24video'
_VALID_URL = r'https?://(?:www\.)?24video\.net/(?:video/(?:view|... | unlicense |
chokribr/invenioold | modules/bibformat/lib/elements/bfe_record_id.py | 39 | 1223 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 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 the
## Licens... | gpl-2.0 |
kxliugang/edx-platform | cms/djangoapps/course_creators/models.py | 183 | 4070 | """
Table for storing information about whether or not Studio users have course creation privileges.
"""
from django.db import models
from django.db.models.signals import post_init, post_save
from django.dispatch import receiver, Signal
from django.contrib.auth.models import User
from django.utils import timezone
from... | agpl-3.0 |
alphapapa/youtube-dl | youtube_dl/extractor/pbs.py | 64 | 10501 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
determine_ext,
int_or_none,
unified_strdate,
US_RATINGS,
)
class PBSIE(InfoExtractor):
_VALID_URL = r'''(?x)https?://
(?:
# Direct vide... | unlicense |
okadate/romspy | romspy/dataset.py | 1 | 3249 | # coding: utf-8
# (c) 2015-09-26 Teruhisa Okada
import netCDF4
import numpy as np
import datetime
import romspy
class Dataset():
def __init__(self, ncfile, mapfile=None, grdfile=None):
print '\nDataset(ncfile={})'.format(ncfile)
self.ncfile = ncfile
self.mapfile = mapfile
... | mit |
vuntz/glance | glance/db/sqlalchemy/migrate_repo/versions/014_add_image_tags_table.py | 15 | 2997 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
std05048/Thesis | .waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Tools/winres.py | 331 | 2807 | #! /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 re,traceback
from waflib import Task,Logs,Utils
from waflib.TaskGen import extension
from waflib.Tools import c_preproc
@extension('.rc')
def rc_file(self,node):
obj_e... | gpl-2.0 |
wangheda/youtube-8m | youtube-8m-zhangteng/YM_framemean.py | 1 | 7668 | from __future__ import print_function
import tensorflow as tf
from tensorflow import app
from tensorflow import flags
import numpy as np
import os, fnmatch
import threading
import Queue
import utils
flags.DEFINE_string("src_path", "/Youtube-8M/data/frame/train", "")
flags.DEFINE_string("des_path", "./mean_std.tfrecor... | apache-2.0 |
shivam1111/odoo | addons/account_asset/account_asset_invoice.py | 141 | 3088 | # -*- encoding: 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 G... | agpl-3.0 |
jcftang/ansible | lib/ansible/modules/cloud/openstack/os_flavor_facts.py | 27 | 7655 | #!/usr/bin/python
# Copyright (c) 2015 IBM
#
# 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 License, or
# (at your option) any later version.
#
# This software is distri... | gpl-3.0 |
kmather73/ggplot | ggplot/tests/test_basic.py | 12 | 9308 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from six.moves import xrange
from nose.tools import assert_equal, assert_true, assert_raises
from . import get_assert_same_ggplot, cleanup
assert_same_ggplot = get_assert_same_ggplot(__file__)
from ggplot im... | bsd-2-clause |
mxOBS/deb-pkg_trusty_chromium-browser | tools/telemetry/third_party/pyserial/serial/rfc2217.py | 141 | 59056 | #! python
#
# Python Serial Port Extension for Win32, Linux, BSD, Jython
# see __init__.py
#
# This module implements a RFC2217 compatible client. RF2217 descibes a
# protocol to access serial ports over TCP/IP and allows setting the baud rate,
# modem control lines etc.
#
# (C) 2001-2013 Chris Liechti <cliechti@gmx.ne... | bsd-3-clause |
hachreak/invenio-previewer | invenio_previewer/extensions/zip.py | 2 | 4143 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015, 2016 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your... | gpl-2.0 |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/address.py | 1 | 2794 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/Address) on 2016-06-23.
# 2016, SMART Health IT.
from . import element
class Address(element.Element):
""" A postal address.
There is a variety of postal address formats defined ar... | bsd-3-clause |
garrett-schlesinger/python-social-auth | social/apps/cherrypy_app/views.py | 77 | 1029 | import cherrypy
from social.utils import setting_name, module_member
from social.actions import do_auth, do_complete, do_disconnect
from social.apps.cherrypy_app.utils import psa
class CherryPyPSAViews(object):
@cherrypy.expose
@psa('/complete/%(backend)s')
def login(self, backend):
return do_aut... | bsd-3-clause |
roscoche/pyflowcontrol | utils/patternrecognition.py | 1 | 4470 | import math
import cv2
import numpy
def calculaLBP(src, quadrantesX, quadrantesY):
#int i,j,pixelsQuadrante,inicioX,inicioY,fimX,fimY;
if len(src.shape) is 2:
rows,cols = src.shape
channels=1
else:
rows,cols,channels = src.shape
#print(rows)
#print(cols)
#asMat=cv2.cv.... | gpl-3.0 |
anbangleo/NlsdeWeb | Python-3.6.0/Lib/test/sortperf.py | 9 | 4806 | """Sort performance test.
See main() for command line syntax.
See tabulate() for output format.
"""
import sys
import time
import random
import marshal
import tempfile
import os
td = tempfile.gettempdir()
def randfloats(n):
"""Return a list of n random floats in [0, 1)."""
# Generating floats is expensive,... | mit |
Juniper/ceilometer | ceilometer/storage/sqlalchemy/migrate_repo/versions/001_add_meter_table.py | 2 | 3511 | # 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
# distributed under t... | apache-2.0 |
sfrenza/test-for-bot | venv/Lib/site-packages/nltk/stem/wordnet.py | 7 | 1393 | # Natural Language Toolkit: WordNet stemmer interface
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
# Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
from __future__ import unicode_literals
from nltk.corpus.reader.wo... | mit |
ajstarna/RicochetRobots | Brobot/ricochet.py | 1 | 4260 | from ctypes import *
import MCPlayer
COLORS = {
0: 'R',
1: 'G',
2: 'B',
3: 'Y',
}
DIRECTIONS = {
1: 'N',
2: 'E',
4: 'S',
8: 'W',
}
dll = CDLL('/home/yifeng/Projects/Ricochet/_ricochet')
class Game(Structure):
_fields_ = [
('grid', c_uint * 256),
('moves', c_uint * ... | bsd-2-clause |
gogetdata/ggd-cli | ggd/predict_path.py | 1 | 7740 | # -------------------------------------------------------------------------------------------------------------
## Import Statements
# -------------------------------------------------------------------------------------------------------------
from __future__ import print_function
import sys
from .utils import get_g... | mit |
hujiajie/chromium-crosswalk | chrome/test/chromedriver/test/test_environment.py | 20 | 3500 | # 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.
"""TestEnvironment classes.
These classes abstract away the various setups needed to run the WebDriver java
tests in various environments.
"""
import loggi... | bsd-3-clause |
yubbie/password-alert | server/auth.py | 4 | 7353 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 |
SUSE/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2016_09_01/operations/application_gateways_operations.py | 2 | 29726 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
abagh0703/RetailTrail | flask/lib/python2.7/site-packages/pbr/testr_command.py | 59 | 5446 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | mit |
blaze33/django | tests/regressiontests/queryset_pickle/models.py | 65 | 1056 | from __future__ import absolute_import
import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
def standalone_number(self):
return 1
class Numbers(object):
@staticmethod
def get_static_number(self):
return 2
@classmethod
def get_class_number... | bsd-3-clause |
dnkn/rk3188_tablet | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
F5Networks/f5-common-python | f5/bigiq/tm/sys/global_settings.py | 1 | 1420 | # coding=utf-8
#
# Copyright 2016 F5 Networks 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 a... | apache-2.0 |
swinter2011/login-page-update | markdown/extensions/smart_strong.py | 65 | 1453 | '''
Smart_Strong Extension for Python-Markdown
==========================================
This extention adds smarter handling of double underscores within words.
Simple Usage:
>>> import markdown
>>> print markdown.markdown('Text with double__underscore__words.',
... extensions=['smart... | apache-2.0 |
formiano/enigma2 | lib/python/Components/Converter/ServiceInfo.py | 5 | 10613 | from Components.Converter.Converter import Converter
from enigma import iServiceInformation, iPlayableService
from Components.Element import cached
from os import path
WIDESCREEN = [1, 3, 4, 7, 8, 0xB, 0xC, 0xF, 0x10]
class ServiceInfo(Converter, object):
HAS_TELETEXT = 1
IS_MULTICHANNEL = 2
AUDIO_STEREO = 3
IS_... | gpl-2.0 |
hainm/scikit-learn | examples/model_selection/randomized_search.py | 201 | 3214 | """
=========================================================================
Comparing randomized search and grid search for hyperparameter estimation
=========================================================================
Compare randomized search and grid search for optimizing hyperparameters of a
random forest.
... | bsd-3-clause |
chatelak/RMG-Py | rmgpy/reaction.py | 1 | 54024 | #!/usr/bin/env python
# encoding: utf-8
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2009-2011 by the RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of thi... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.