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 |
|---|---|---|---|---|---|
mbayon/TFG-MachineLearning | vbig/lib/python2.7/site-packages/pandas/io/json/table_schema.py | 12 | 5184 | """
Table Schema builders
http://specs.frictionlessdata.io/json-table-schema/
"""
from pandas.core.dtypes.common import (
is_integer_dtype, is_timedelta64_dtype, is_numeric_dtype,
is_bool_dtype, is_datetime64_dtype, is_datetime64tz_dtype,
is_categorical_dtype, is_period_dtype, is_string_dtype
)
def as_js... | mit |
koditr/xbmc-tr-team-turkish-addons | script.module.urlresolver/lib/urlresolver/plugins/youtube.py | 2 | 3092 | """
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
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-2.0 |
iafan/zing | tests/settings.py | 1 | 3639 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
# Copyright (C) Zing contributors.
#
# This file is a part of the Zing project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
"""Test set... | gpl-3.0 |
barbarubra/Don-t-know-What-i-m-doing. | python/gdata/src/gdata/calendar/__init__.py | 135 | 35183 | #!/usr/bin/python
#
# Copyright (C) 2006 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 ... | apache-2.0 |
gras/SensorWorkshop | python/22-FindPomMoveClose/actions.py | 25 | 1423 | # Making Sense of Sensors Workshop
# Educators Edition 2015
#
# 00-SampleIncludeFiles
# actions.py
'''
@author: Dead Robot Society
'''
from time import sleep
import movement as move
import sensor
##################################
# public routines
##################################
'''
I like to document where ... | mit |
aduric/crossfit | nonrel/django/db/models/fields/subclassing.py | 229 | 4356 | """
Convenience routines for creating non-trivial Field subclasses, as well as
backwards compatibility utilities.
Add SubfieldBase as the __metaclass__ for your Field subclass, implement
to_python() and the other necessary methods and everything will work seamlessly.
"""
from inspect import getargspec
from warnings i... | bsd-3-clause |
jucapj/psutil | examples/disk_usage.py | 44 | 2031 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
List all mounted disk partitions a-la "df -h" command.
$ python examples/disk_usage.py
Device Total Used ... | bsd-3-clause |
0k/odoo | addons/hr_expense/__openerp__.py | 52 | 2896 | # -*- 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 |
frreiss/tensorflow-fred | tensorflow/python/keras/mixed_precision/experimental/get_layer_policy_test.py | 3 | 1861 | # Copyright 2019 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 |
NuxiNL/linux | scripts/gdb/linux/dmesg.py | 249 | 2059 | #
# 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
from linux import utils
class LxDmesg(gdb.Command... | gpl-2.0 |
cogeorg/BlackRhino | examples/firesales_simple/networkx/generators/ego.py | 80 | 2265 | """
Ego graph.
"""
# Copyright (C) 2010 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
__author__ = """\n""".join(['Drew Conway <drew.conway@nyu.edu>',
'Aric Hagberg <hagberg@lan... | gpl-3.0 |
xavierwu/scikit-learn | sklearn/cluster/tests/test_k_means.py | 63 | 26190 | """Testing for K-means"""
import sys
import numpy as np
from scipy import sparse as sp
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import SkipTest
from sklearn.utils.testing i... | bsd-3-clause |
adhish20/TwitterWithCassandra | users/forms.py | 1 | 1902 | import uuid
from django import forms
import cass
class LoginForm(forms.Form):
username = forms.CharField(max_length=30)
password = forms.CharField(widget=forms.PasswordInput(render_value=False))
def clean(self):
username = self.cleaned_data['username']
password = self.cleaned_data['p... | mit |
rayners/offlineimap | offlineimap/ui/Curses.py | 2 | 19447 | # Curses-based interfaces
# Copyright (C) 2003 John Goerzen
# <jgoerzen@complete.org>
#
# 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... | gpl-2.0 |
tobiasgehring/qudi | logic/sequence_generator_logic.py | 1 | 52322 | # -*- coding: utf-8 -*-
"""
This file contains the Qudi sequence generator logic for general sequence structure.
Qudi 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 ... | gpl-3.0 |
cloudfoundry/php-buildpack-legacy | builds/runtimes/python-2.7.6/lib/python2.7/idlelib/EditorWindow.py | 8 | 66031 | import sys
import os
import re
import imp
from Tkinter import *
import tkSimpleDialog
import tkMessageBox
import webbrowser
from idlelib.MultiCall import MultiCallCreator
from idlelib import idlever
from idlelib import WindowList
from idlelib import SearchDialog
from idlelib import GrepDialog
from idlelib import Repla... | mit |
tmerrick1/spack | var/spack/repos/builtin/packages/signify/package.py | 5 | 1664 | ##############################################################################
# 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 |
rcgee/oq-hazardlib | openquake/hazardlib/site.py | 1 | 18827 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2012-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | agpl-3.0 |
27himanshu/image-fiters | linear-scaling.py | 2 | 2025 | # -*- coding: utf-8 -*-
"""
Scaling of greyscale images using linear interpolation.
@author: himanshu
"""
import numpy as np
import scipy.misc as misc
default_image = misc.lena()
save_as = "/home/user/lena-scaled.png"
class Scale():
""" Linear scaling of image 'k' times. (k>1)
k should be an integer.""... | gpl-3.0 |
pagaille/libsigrok | bindings/cxx/enums.py | 6 | 6749 | ##
## This file is part of the libsigrok project.
##
## Copyright (C) 2014 Martin Ling <martin-sigrok@earth.li>
##
## 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 |
SUSE/azure-sdk-for-python | azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/models/storage_account_update_parameters.py | 2 | 3194 | # 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 |
nburn42/tensorflow | tensorflow/python/debug/lib/grpc_debug_server.py | 57 | 18749 | # 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 |
Guilhermeslucas/jarbas | jarbas/frontend/tests/test_static_files.py | 2 | 1333 | from io import StringIO
from os import path, remove, rename
from unittest.mock import patch
from django.conf import settings
from django.contrib.staticfiles import finders
from django.core.management import call_command
from django.test import TestCase
class TestStatic(TestCase):
def test_digitalocean(self):
... | mit |
LTD-Beget/unbound | libunbound/python/examples/dns-lookup.py | 18 | 1871 | #!/usr/bin/python
'''
dns-lookup.py : This example shows how to resolve IP address
Authors: Zdenek Vasicek (vasicek AT fit.vutbr.cz)
Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz)
Copyright (c) 2008. All rights reserved.
This software is open source.
Redistribution and use in source and binary forms... | bsd-3-clause |
byterom/android_external_chromium_org | tools/update_reference_build.py | 41 | 10057 | #!/usr/bin/env python
#
# Copyright (c) 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.
"""Updates the Chrome reference builds.
Before running this script, you should first verify that you are authenticated
for SVN. ... | bsd-3-clause |
tedi3231/openerp | openerp/addons/membership/__openerp__.py | 52 | 2226 | # -*- 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 |
chandrikas/sm | drivers/ISOSR.py | 1 | 27571 | #!/usr/bin/python
#
# Copyright (C) Citrix Systems Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; version 2.1 only.
#
# This program is distributed in the hope that it will be u... | lgpl-2.1 |
Outernet-Project/librarian | tests/routes/test_auth.py | 1 | 7612 | try:
import __builtin__ as builtins
except ImportError:
import builtins
import mock
import librarian.routes.auth as mod
# Test login route handler
@mock.patch.object(mod.Login, 'perform_redirect')
@mock.patch.object(mod.Login, 'request')
def test_login_form_valid(request, perform_redirect):
route = mo... | gpl-3.0 |
vanloswang/TeamTalk | win-client/3rdParty/src/json/scons-tools/srcdist.py | 264 | 5224 | import os
import os.path
from fnmatch import fnmatch
import targz
##def DoxyfileParse(file_contents):
## """
## Parse a Doxygen source file and return a dictionary of all the values.
## Values will be strings and lists of strings.
## """
## data = {}
##
## import shlex
## lex = shlex.shlex(instream = fil... | apache-2.0 |
Zord13appdesa/python-for-android | python-build/python-libs/gdata/samples/base/baseQueryExample.py | 94 | 1680 | #!/usr/bin/python
#
# Copyright (C) 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 ... | apache-2.0 |
zenoss/Community-Zenpacks | ZenPacks.community.HPMon/ZenPacks/community/HPMon/cpqFcaLogDrv.py | 2 | 1868 | ################################################################################
#
# This program is part of the HPMon Zenpack for Zenoss.
# Copyright (C) 2008, 2009, 2010 Egor Puzanov.
#
# This program can be used under the GNU General Public License version 2
# You can find full information here: http://www.zenoss.co... | gpl-2.0 |
gsnbng/erpnext | erpnext/loan_management/doctype/loan_disbursement/test_loan_disbursement.py | 1 | 3110 | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import (nowdate, add_days, get_datetime, get_first_day, get_last_day, date_diff, flt, add_to_date)
from erpnext.loan_mana... | agpl-3.0 |
tannishk/airmozilla | airmozilla/main/migrations/0056_auto.py | 6 | 30241 | # -*- 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):
# Removing M2M table for field region on 'Location'
db.delete_table('main_location_region')
# Addin... | bsd-3-clause |
jmhal/CCAPython | framework/manage/services.py | 1 | 9027 | from CCAPython.gov.cca import Services
from CCAPython.gov.cca.ports import ConnectionEventService
from CCAPython.gov.cca.ports import EventType
from CCAPython.framework.info.connectioninfo import ConnectionEvent
from CCAPython.framework.common.typemap import TypeMapDict
from CCAPython.framework.common.exceptions import... | apache-2.0 |
3dfxmadscientist/CBSS | openerp/tools/win32.py | 457 | 1993 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
kris71990/China_info | chinadicts.py | 1 | 1299 | prov_cap = {
"Hebei": "Shijiazhuang",
"Shanxi": "Taiyuan",
"Liaoning": "Shenyang",
"Jilin": "Changchun",
"Heilongjiang": "Harbin",
"Jiangsu": "Nanjing",
"Zhejiang": "Hangzhou",
"Anhui": "Hefei",
"Fujian": "Fuzhou",
"Jiangxi": "Nanchang",
"Shandong": "Jinan",
"Henan": "Zhe... | mit |
kanagasabapathi/python-for-android | python-build/python-libs/python-twitter/setup.py | 90 | 2207 | #!/usr/bin/python2.4
#
# Copyright 2007 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... | apache-2.0 |
jlegendary/nupic | nupic/regions/PictureSensorExplorers/random1DOF.py | 8 | 5523 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | gpl-3.0 |
intlabs/cannyos-backend-dashboard | horizon-master/openstack_dashboard/dashboards/identity/domains/constants.py | 88 | 1055 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | mit |
hsluo/youtube-dl | youtube_dl/extractor/anysex.py | 224 | 2085 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
int_or_none,
)
class AnySexIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?anysex\.com/(?P<id>\d+)'
_TEST = {
'url': 'http://anysex.com/156592/',
'md5': '023... | unlicense |
alazaro/tennis_tournament | django/conf/locale/lv/formats.py | 316 | 1490 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y. \g\a\d\a j. F'
TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = r'Y. \g\a\d\a ... | gpl-3.0 |
JensTimmerman/radical.pilot | src/radical/pilot/utils/analysis.py | 1 | 12671 |
import os
# ------------------------------------------------------------------------------
#
def get_experiment_frames(experiments, datadir=None):
"""
read profiles for all sessions in the given 'experiments' dict. That dict
is expected to be like this:
{ 'test 1' : [ [ 'rp.session.thinkie.merzky.01... | mit |
seberg/numpy | numpy/typing/tests/data/reveal/testing.py | 3 | 8824 | from __future__ import annotations
import re
import sys
from typing import Any, Callable, TypeVar
from pathlib import Path
import numpy as np
import numpy.typing as npt
AR_f8: npt.NDArray[np.float64]
AR_i8: npt.NDArray[np.int64]
bool_obj: bool
suppress_obj: np.testing.suppress_warnings
FT = TypeVar("FT", bound=Call... | bsd-3-clause |
Kiiv/Sick-Beard | sickbeard/nzbget.py | 48 | 3207 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... | gpl-3.0 |
ludojmj/treelud | server/paramiko/dsskey.py | 1 | 6975 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 2.1 of the License,... | mit |
bpgc-cte/python2017 | Week 7/django/lib/python3.6/site-packages/django/contrib/gis/gdal/prototypes/generation.py | 50 | 4363 | """
This module contains functions that generate ctypes prototypes for the
GDAL routines.
"""
from ctypes import c_char_p, c_double, c_int, c_int64, c_void_p
from functools import partial
from django.contrib.gis.gdal.prototypes.errcheck import (
check_arg_errcode, check_const_string, check_errcode, check_geom,
... | mit |
Curious72/sympy | sympy/geometry/tests/test_point.py | 17 | 8537 | from __future__ import division
from sympy import I, Rational, Symbol, pi, sqrt
from sympy.geometry import Line, Point, Point2D, Point3D, Line3D
from sympy.geometry.entity import rotate, scale, translate
from sympy.matrices import Matrix
from sympy.utilities.pytest import raises
def test_point():
x = Symbol('x',... | bsd-3-clause |
lakshmi-kannan/st2 | st2common/st2common/util/keyvalue.py | 5 | 1200 | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | apache-2.0 |
eckucukoglu/arm-linux-gnueabihf | lib/python2.7/idlelib/HyperParser.py | 64 | 10562 | """
HyperParser
===========
This module defines the HyperParser class, which provides advanced parsing
abilities for the ParenMatch and other extensions.
The HyperParser uses PyParser. PyParser is intended mostly to give information
on the proper indentation of code. HyperParser gives some information on the
structure ... | gpl-2.0 |
fernandojunior/searching-techniques | python/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py | 3127 | 1902 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit |
alexandrebarachant/mne-python | mne/decoding/tests/test_ems.py | 1 | 3384 | # Author: Denis A. Engemann <d.engemann@gmail.com>
#
# License: BSD (3-clause)
import os.path as op
import numpy as np
from numpy.testing import assert_array_almost_equal
from nose.tools import assert_equal, assert_raises
from mne import io, Epochs, read_events, pick_types
from mne.utils import requires_sklearn, chec... | bsd-3-clause |
snipsco/snipsskills | snipsmanager/utils/microphone_setup.py | 1 | 1997 | # -*-: coding utf-8 -*-
""" Downloader for Snips assistants. """
import os
import shutil
from .os_helpers import cmd_exists, is_raspi_os, execute_command, pipe_commands
from .. import ASOUNDCONF_DEST_PATH
# pylint: disable=too-few-public-methods
class MicrophoneSetup:
""" Downloader for Snips assistants. """
... | mit |
muku42/bokeh | bokeh/charts/builder/tests/test_dot_builder.py | 4 | 3924 | """ This is the Bokeh charts testing interface.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with thi... | bsd-3-clause |
onitake/ansible | lib/ansible/modules/network/avi/avi_vsvip.py | 31 | 4747 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.2
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | gpl-3.0 |
alisdair/pygments.rb | vendor/pygments-main/pygments/lexers/__init__.py | 48 | 8329 | # -*- coding: utf-8 -*-
"""
pygments.lexers
~~~~~~~~~~~~~~~
Pygments lexers.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
import types
import fnmatch
import re
from os.path import basename
from pygments.lexers._mapping ... | mit |
mpare002/HackTech_2017 | env/Lib/site-packages/setuptools/tests/test_msvc9compiler.py | 135 | 5893 | """
Tests for msvc9compiler.
"""
import os
import contextlib
import distutils.errors
import pytest
try:
from unittest import mock
except ImportError:
import mock
from . import contexts
# importing only setuptools should apply the patch
__import__('setuptools')
pytest.importorskip("distutils.msvc9compiler")... | mit |
pixlra/HARP-fork | Various/ThirdParty/pyqtgraph/widgets/MultiPlotWidget.py | 3 | 1548 | # -*- coding: utf-8 -*-
"""
MultiPlotWidget.py - Convenience class--GraphicsView widget displaying a MultiPlotItem
Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more infomation.
"""
from .GraphicsView import GraphicsView
import pyqtgraph.graphicsItems.MultiPlotItem as MultiPlo... | gpl-3.0 |
vsandoria/php-cf-build | lib/build_pack_utils/builder.py | 10 | 28070 | import os
import sys
import shutil
import re
import logging
from collections import defaultdict
from subprocess import Popen
from subprocess import PIPE
from cloudfoundry import CloudFoundryUtil
from cloudfoundry import CloudFoundryInstaller
from detecter import TextFileSearch
from detecter import RegexFileSearch
from ... | apache-2.0 |
vegarwe/luma | luma/base/gui/AboutPlugin.py | 3 | 1260 | # -*- coding: utf-8 -*-
#
# base.gui.AboutPlugin
#
# Copyright (c) 2011
# Johannes Harestad, <johanhar@stud.ntnu.no>
#
# 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... | gpl-2.0 |
kingvuplus/b-p | keymapparser.py | 12 | 3239 | import enigma
import xml.etree.cElementTree
from keyids import KEYIDS
# these are only informational (for help)...
from Tools.KeyBindings import addKeyBinding
class KeymapError(Exception):
def __init__(self, message):
self.msg = message
def __str__(self):
return self.msg
def getKeyId(id):
... | gpl-2.0 |
edickie/ciftify | ciftify/bin/ciftify_seed_corr.py | 1 | 8983 | #!/usr/bin/env python3
"""
Produces a correlation map of the mean time series within the seed with
every voxel in the functional file.
Usage:
ciftify_seed_corr [options] <func> <seed>
Arguments:
<func> functional data (nifti or cifti)
<seed> seed mask (nifti, cifti or gifti)
Options:
... | mit |
indera/olass-client | setup.py | 2 | 2851 | """
OLASS Client
------------
OneFlorda Linkage Submission System (OLASS) client software
<https://github.com/ufbmi/olass-client> is designed to compute hashes of the
specific patient data elements and submit them to the OLASS server
<https://github.com/ufbmi/olass-server> to achieve de-duplication.
The client author... | mit |
jfpla/odoo | addons/mrp/product.py | 180 | 4590 | # -*- 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 |
yasoob/PythonRSSReader | venv/lib/python2.7/dist-packages/twisted/manhole/telnet.py | 37 | 3494 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""Telnet-based shell."""
# twisted imports
from twisted.protocols import telnet
from twisted.internet import protocol
from twisted.python import log, failure
# system imports
import string, copy, sys
from cStringIO import StringIO
class Shel... | mit |
asridharan/dcos | packages/bootstrap/extra/dcos_internal_utils/bootstrap.py | 7 | 4043 | import logging
import os
import pwd
import random
import string
import uuid
import kazoo.exceptions
from kazoo.client import KazooClient
from kazoo.retry import KazooRetry
from kazoo.security import ACL, ANYONE_ID_UNSAFE, Permissions
from dcos_internal_utils import utils
log = logging.getLogger(__name__)
ANYONE_RE... | apache-2.0 |
ArcherSys/ArcherSys | Lib/site-packages/tornado/test/options_test.py | 81 | 10058 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, with_statement
import datetime
import os
import sys
from tornado.options import OptionParser, Error
from tornado.util import basestring_type
from tornado.test.util import unittest
try:
from cStringIO import StringIO # pyth... | mit |
miurahr/translate | translate/lang/fa.py | 26 | 2366 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007, 2010 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 ... | gpl-2.0 |
coxmediagroup/googleads-python-lib | examples/dfp/v201411/creative_set_service/update_creative_set.py | 4 | 2945 | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 |
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools | third_party/boto/__init__.py | 51 | 28525 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
# Copyright (c) 2011, Nexenta Systems Inc.
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# Copyright (c) 2010, Google, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, ... | bsd-3-clause |
gangadhar-kadam/verve_test_frappe | frappe/templates/pages/print.py | 5 | 8954 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, os, copy, json, re
from frappe import _
from frappe.modules import get_doc_path
from jinja2 import TemplateNotFound
from frappe.utils import cint, strip_html
from... | mit |
openshift/openshift-tools | scripts/monitoring/cron-certificate-expirations.py | 12 | 3907 | #!/usr/bin/python
''' script to report on expiration dates (in days) for
certificate expiration '''
# Reason: disable invalid-name because pylint does not like our naming convention
# pylint: disable=invalid-name
import argparse
import datetime
from dateutil import parser
import OpenSSL.crypto
import os
from stat... | apache-2.0 |
NoisyText/canvas-contrib | API_Examples/change_sis_ids/python/change_user_sisid.py | 4 | 1315 | #!/usr/bin/env python
import requests, json
import csv
""" Example change_users.csv file
old_user_id,new_user_id
201.bobby,2013.bobby
"""
filename = '/path/to/file/users_to_change.csv' # Change this to the file with the two columns
domain = 'yourcollege.instructure.com' # Change this
token = 'tokenhere' # Change t... | agpl-3.0 |
pschmitt/home-assistant | homeassistant/components/websocket_api/commands.py | 2 | 8513 | """Commands part of Websocket API."""
import asyncio
import voluptuous as vol
from homeassistant.auth.permissions.const import POLICY_READ
from homeassistant.const import EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MATCH_ALL
from homeassistant.core import DOMAIN as HASS_DOMAIN, callback
from homeassistant.exceptions imp... | apache-2.0 |
coolhacks/python-hacks | examples/codebreaker/freqAnalysis.py | 2 | 3215 | # Frequency Finder
# http://inventwithpython.com/hacking (BSD Licensed)
# frequency taken from http://en.wikipedia.org/wiki/Letter_frequency
englishLetterFreq = {'E': 12.70, 'T': 9.06, 'A': 8.17, 'O': 7.51, 'I': 6.97, 'N': 6.75, 'S': 6.33, 'H': 6.09, 'R': 5.99, 'D': 4.25, 'L': 4.03, 'C': 2.78, 'U': 2.76, 'M': 2.41, ... | mit |
catapult-project/catapult | third_party/google-endpoints/requests/packages/chardet/utf8prober.py | 2919 | 2652 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... | bsd-3-clause |
Linutronix/elbe | elbepack/initvmaction.py | 1 | 23779 | # ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2015-2017 Manuel Traut <manut@linutronix.de>
# Copyright (c) 2015-2018 Torben Hohn <torben.hohn@linutronix.de>
# Copyright (c) 2015 Silvio Fricke <silvio.fricke@gmail.com>
# Copyright (c) 2017 Philipp Arras <philipp.arras@linutronix.de>
# Copyright (... | gpl-3.0 |
Capitains/Nautilus | capitains_nautilus/flask_ext.py | 1 | 7289 | from pkg_resources import resource_filename
import logging
from copy import deepcopy
from collections import defaultdict
from flask import Blueprint, Response
from capitains_nautilus.apis.cts import CTSApi
from capitains_nautilus.apis.dts import DTSApi
def _all_origins():
return "*"
class FlaskNautilus(objec... | mpl-2.0 |
manasi24/jiocloud-tempest-qatempest | tempest/api/compute/admin/test_flavors_access_negative.py | 11 | 6837 | # Copyright 2013 IBM 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 required ... | apache-2.0 |
tofu-rocketry/apel | test/test_loader.py | 2 | 7887 | import dirq
import mock
import os
import shutil
import tempfile
import unittest
import logging
from mock import call
import apel.db.loader
schema = {"body": "string", "signer": "string",
"empaid": "string?", "error": "string?"}
class LoaderTest(unittest.TestCase):
def setUp(self):
# Create te... | apache-2.0 |
sbg2133/miscellaneous_projects | carina/ItoNH.py | 1 | 1115 | import numpy as np
import matplotlib.pyplot as plt
from astropy.io import fits
import aplpy
from astropy.wcs import WCS
import sys, os
from getIQU import IQU
from astropy import coordinates as coord
from astropy.coordinates import SkyCoord
from astropy import units as u
from scipy.interpolate import griddata
plt.ion()
... | gpl-3.0 |
trasa/sprout | sprout/sprout/servicehosts.py | 1 | 1382 | import os
from fabric.api import *
def create_objects(cfg, service_hosts):
""" Turn a list of service host info into objects that can do
starting, stopping of services, or other things that
we think up.
"""
return [ServiceHost(
s['hostname'],
s['services'],... | apache-2.0 |
imply/chuu | tools/perf/benchmarks/jsgamebench.py | 24 | 1273 | # 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.
"""Runs Facebook's JSGameBench benchmark."""
import os
from telemetry import test
from telemetry.core import util
from telemetry.page import page_measu... | bsd-3-clause |
willzhang05/postgrestesting1 | postgrestesting1/lib/python3.5/site-packages/django/core/validators.py | 11 | 11717 | from __future__ import unicode_literals
import re
from django.core.exceptions import ValidationError
from django.utils import six
from django.utils.deconstruct import deconstructible
from django.utils.encoding import force_text
from django.utils.ipv6 import is_valid_ipv6_address
from django.utils.six.moves.urllib.par... | mit |
hqcckes/python-scheduler | Server/message.py | 1 | 2650 | # coding=utf-8
import os
import sys
import codecs
import json
import logging
import logging.config
from rpyc import Service
from rpyc.utils.server import ThreadedServer
from ConfigParser import SafeConfigParser
class Message(Service):
@staticmethod
def exposed_send(message):
import urllib2
l... | gpl-3.0 |
varunasingh/ustadmobile-tincanlrs | lrs/tests/StatementsMoreTests.py | 2 | 62552 | import os
from django.test import TestCase
from django.core.urlresolvers import reverse
from lrs import views, models
import json
import base64
import uuid
from datetime import datetime, timedelta
from django.utils.timezone import utc
import time
from lrs.util import retrieve_statement
from django.conf import settings
... | apache-2.0 |
gauribhoite/personfinder | env/google_appengine/lib/graphy/graphy/bar_chart.py | 233 | 5769 | #!/usr/bin/python2.4
#
# Copyright 2008 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... | apache-2.0 |
adelez/grpc | tools/buildgen/mako_renderer.py | 14 | 5564 | #!/usr/bin/env python2.7
# Copyright 2015 gRPC 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 la... | apache-2.0 |
ContinuumIO/ashiba | enaml/enaml/qt/qt_stack_item.py | 1 | 3902 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | bsd-3-clause |
jvrsantacruz/XlsxWriter | examples/tutorial3.py | 9 | 1717 | ##############################################################################
#
# A simple program to write some data to an Excel file using the XlsxWriter
# Python module.
#
# This program is shown, with explanations, in Tutorial 3 of the XlsxWriter
# documentation.
#
# Copyright 2013-2015, John McNamara, jmcnamara@c... | bsd-2-clause |
murrown/cyder | vendor-local/src/django-extensions/build/lib/django_extensions/mongodb/fields/encrypted.py | 40 | 2084 | """
Encrypted fields from Django Extensions, modified for use with mongoDB
"""
from mongoengine.base import BaseField
from django.core.exceptions import ImproperlyConfigured
from django import forms
from django.conf import settings
try:
from keyczar import keyczar
except ImportError:
raise ImportError('Using ... | bsd-3-clause |
whereismyjetpack/ansible | lib/ansible/modules/network/nxos/nxos_ntp_options.py | 11 | 8641 | #!/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 distribut... | gpl-3.0 |
forgeservicelab/ansible-roles.django_saml_app | templates/settings.py | 1 | 5840 | """
Django settings for samldemo project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | mit |
LLihao/Lego-Adventure | LegoAdventure.py | 2 | 11278 | # Panda3d Library
from direct.gui.DirectGui import *
from direct.showbase.InputStateGlobal import inputState
from panda3d.core import ClockObject
# My Game Classes
from GameScene import *
from Settings import *
from FireBalls import FireBalls
class LegoAdventure(GameScene):
def __init__(self):
GameScene.__... | gpl-3.0 |
pizzapanther/Church-Source | dependencies/south/management/commands/__init__.py | 21 | 1098 |
# Common framework for syncdb actions
import copy
from django.core import management
from django.conf import settings
# Make sure the template loader cache is fixed _now_ (#448)
import django.template.loaders.app_directories
from south.management.commands.syncdb import Command as SyncCommand
class MigrateAndSyncC... | gpl-3.0 |
wil/pyroman | examples/example1/03_standard_chains.py | 1 | 1452 | """
Pyroman uses some standard chains, set in it's config.
These chains are used by the "allow()", "reject()" and "drop()" commandos
for nicer rule writing, and probably should do exactly that.
If you want maximal performance, you'll want to change these to ACCEPT and DROP
directly by calling 'Firewall.accept = "ACCEP... | mit |
alx-eu/django | django/contrib/auth/tests/remote_user.py | 91 | 7817 | from datetime import datetime
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth.backends import RemoteUserBackend
from django.contrib.auth.models import User, AnonymousUser
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase... | bsd-3-clause |
idovear/odoo | addons/base_geolocalize/models/res_partner.py | 239 | 3743 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013_Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
dtroyer/python-openstacksdk | openstack/tests/functional/network/v2/test_network.py | 4 | 3174 | # 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 |
benschmaus/catapult | third_party/gsutil/gslib/util.py | 8 | 40698 | # -*- coding: utf-8 -*-
# Copyright 2010 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 require... | bsd-3-clause |
djenniex/CouchPotatoServer | libs/CodernityDB/rr_cache.py | 82 | 3673 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2013 Codernity (http://codernity.com)
#
# 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/L... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.