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 |
|---|---|---|---|---|---|
rlr/fjord | vendor/packages/translate-toolkit/translate/filters/spelling.py | 3 | 2125 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007 Zuza Software Foundation
# 2013 F Wolff
#
# 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... | bsd-3-clause |
cryptickp/heat | heat/tests/clients/test_keystone_client.py | 6 | 25062 | #
# 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 |
nicupavel/opp | src/opp.py | 1 | 9757 | #!/usr/bin/python
import openpanzer as op
from oppSql import *
from oppRdf import *
import util
from dbpedia import DbpediaQuery
from websearch import GoogleQuery, BingQuery
from urllib import quote, unquote
from pprint import pprint
import time,os, sys, errno
reload(sys)
sys.setdefaultencoding("utf-8")
OFFLINE_JSON... | gpl-2.0 |
nitin-cherian/Webapps | SimpleIsBetterThanComplex.com/myproject/.env/lib/python3.5/site-packages/django/contrib/gis/geos/prototypes/io.py | 41 | 11415 | import threading
from ctypes import POINTER, Structure, byref, c_char, c_char_p, c_int, c_size_t
from django.contrib.gis.geos.base import GEOSBase
from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory
from django.contrib.gis.geos.prototypes.errcheck import (
check_geom, check_sized_string, check_st... | mit |
UpYou/relay | my_gnuradio/gr/qa_pll_carriertracking.py | 6 | 7835 | #!/usr/bin/env python
#
# Copyright 2004,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your opt... | gpl-3.0 |
CodeDJ/qt5-hidpi | qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py | 123 | 7521 | # Copyright (C) 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 and the ... | lgpl-2.1 |
rghe/ansible | lib/ansible/modules/cloud/azure/azure_rm_image_facts.py | 18 | 9598 | #!/usr/bin/python
#
# 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'],
'support... | gpl-3.0 |
DTUWindEnergy/Python4WindEnergy | lesson 3/results/ebra.py | 1 | 8402 | # -*- coding: utf-8 -*- <nbformat>3.0</nbformat>
# <headingcell level=1>
# Plotting with Matplotlib
# <headingcell level=2>
# Prepare for action
# <codecell>
import numpy as np
import scipy as sp
import sympy
# Pylab combines the pyplot functionality (for plotting) with the numpy
# functionality (for mathematics... | apache-2.0 |
charlesccychen/incubator-beam | sdks/python/apache_beam/io/sources_test.py | 5 | 4179 | #
# 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 |
ymero/pulsar | pulsar/async/futures.py | 5 | 11508 | from collections import Mapping
from inspect import isgeneratorfunction
from functools import wraps, partial
from asyncio import Future, CancelledError, TimeoutError, async, sleep
from .consts import MAX_ASYNC_WHILE
from .access import get_event_loop, LOGGER, isfuture, is_async
__all__ = ['maybe_async',
'... | bsd-3-clause |
jmlopez-rod/promus | promus/core/__init__.py | 1 | 5429 | """ Promus core
This package contains the object that executes commands on your
behave as well as other utility functions.
"""
import re
import os
import sys
import socket
from promus.command import exec_cmd, date
from promus.core.ssh import (
make_key,
get_keys,
get_public_key,
read_config,
writ... | bsd-3-clause |
dimagi/django-digest | django_digest/__init__.py | 1 | 6603 | from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import random
import time
from django.http import HttpResponse
from django.contrib.auth.signals import user_login_failed
import python_digest
from django_digest.utils import get_backend, get_setting, DEFAULT_REALM
import si... | bsd-3-clause |
amarant/servo | tests/wpt/css-tests/tools/pywebsocket/src/test/test_stream_hixie75.py | 496 | 2285 | #!/usr/bin/env python
#
# Copyright 2011, 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... | mpl-2.0 |
alshedivat/tensorflow | tensorflow/python/data/experimental/kernel_tests/sql_dataset_test_base.py | 8 | 4409 | # 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 |
zhangjunfang/eclipse-dir | foundation-springMVC/src/main/resources/views/scripts/lib/fckeditor/editor/filemanager/connectors/py/fckoutput.py | 46 | 3847 | #!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.or... | bsd-2-clause |
batisteo/django-countries-french | django_countries/tests/fields.py | 4 | 1566 | from django.test import TestCase
from django_countries import settings
class TestCountryField(TestCase):
def create_person(self, country='NZ'):
from django_countries.tests import Person
return Person.objects.create(name='Chris Beaven', country=country)
def test_logic(self):
person = ... | mit |
zhoulingjun/django | tests/gis_tests/gdal_tests/test_geom.py | 256 | 20748 | import json
import unittest
from binascii import b2a_hex
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.utils.six.moves import range
from ..test_data import TestDataMixin
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
if... | bsd-3-clause |
BonexGu/Blik2D-SDK | Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/contrib/graph_editor/__init__.py | 112 | 1658 | # 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... | mit |
kampanita/pelisalacarta | python/main-classic/lib/requests/packages/chardet/codingstatemachine.py | 2931 | 2318 | ######################## 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... | gpl-3.0 |
mitocw/edx-platform | common/djangoapps/entitlements/api/v1/filters.py | 3 | 1208 |
from django_filters import rest_framework as filters
from entitlements.models import CourseEntitlement
class CharListFilter(filters.CharFilter):
""" Filters a field via a comma-delimited list of values. """
def filter(self, qs, value):
if value not in (None, ''):
value = value.split(',... | agpl-3.0 |
SilverIce/JContainers | dep/boost/tools/build/src/tools/stage.py | 17 | 13457 | # Status: ported.
# Base revision 64444.
#
# Copyright 2003 Dave Abrahams
# Copyright 2005, 2006 Rene Rivera
# Copyright 2002, 2003, 2004, 2005, 2006, 2010 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# This... | mit |
jostep/tensorflow | tensorflow/contrib/metrics/__init__.py | 32 | 6185 | # 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 |
ASCrookes/django | django/utils/decorators.py | 60 | 5921 | "Functions that help with dynamically creating decorators for views."
try:
from contextlib import ContextDecorator
except ImportError:
ContextDecorator = None
from functools import WRAPPER_ASSIGNMENTS, update_wrapper, wraps
from django.utils import six
class classonlymethod(classmethod):
def __get__(se... | bsd-3-clause |
gquirozbogner/contentbox-master | third_party/django/conf/locale/pl/formats.py | 118 | 1148 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y'
TIME_FORMAT = 'H:i:s'
DATE... | apache-2.0 |
ajrbyers/smw | src/core/logic.py | 2 | 66344 | import os
from builtins import any as string_any
import datetime
import json
import mimetypes
import re
from uuid import uuid4
from bs4 import BeautifulSoup
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.models import User
from django.core.files.storage import default_sto... | gpl-2.0 |
912/M-new | virtualenvironment/experimental/lib/python2.7/site-packages/django/conf/locale/ru/formats.py | 82 | 1271 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y г.'
TIME_FORMAT = 'G:i:s'
D... | gpl-2.0 |
brocade/pysdn | samples/sampleopenflow/demos/demo19.py | 1 | 7388 | #!/usr/bin/python
# Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright n... | bsd-3-clause |
ljchang/neurolearn | docs/conf.py | 1 | 11594 | # -*- coding: utf-8 -*-
#
# nltools documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 4 07:22:28 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | mit |
aospx-kitkat/platform_external_chromium_org | chrome/test/chromedriver/test/unittest_util.py | 134 | 4320 | # 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.
"""Utilities for dealing with the python unittest module."""
import fnmatch
import sys
import unittest
class _TextTestResult(unittest._TextTestResult):
... | bsd-3-clause |
mhvk/astropy | astropy/io/misc/asdf/connect.py | 12 | 4008 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
# This file connects ASDF to the astropy.table.Table class
import functools
from astropy.io import registry as io_registry
from astropy.table import Table
def read_table(filename, data_key=None, find_table=None, **kwargs):
"... | bsd-3-clause |
ieguiguren/menu | conf/menuconf.py | 1 | 2865 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import time, os, calendar , datetime, recordatorio
#Generico
hostname = os.uname()[1]
if hostname == "server1":
prepath = "/opt"
elif hostname == "octopussy":
prepath = "/home/xir/dev"
path = prepath + "/menu/"
tpath = path + "tmp/"
datapath = path + "data/"
db... | gpl-3.0 |
olsonse/linuxcnc | src/emc/usr_intf/touchy/mdi.py | 8 | 10469 | # Touchy is Copyright (c) 2009 Chris Radek <chris@timeguy.com>
#
# Touchy 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.
#
# Touchy i... | gpl-2.0 |
JonasT/pysnapshotd | src/pysnapshotd/backuplocation.py | 2 | 57502 |
# This file is a part of pysnapshotd, a program for automated backups
# Copyright (C) 2015-2016 Jonas Thiem
#
# 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 |
B3AU/waveTree | sklearn/utils/testing.py | 4 | 12125 | """Testing utilities."""
# Copyright (c) 2011, 2012
# Authors: Pietro Berkes,
# Andreas Muller
# Mathieu Blondel
# Olivier Grisel
# Arnaud Joly
# License: BSD 3 clause
import inspect
import pkgutil
import warnings
import scipy as sp
from functools import wraps
try:
# Python 2
... | bsd-3-clause |
allenlavoie/tensorflow | tensorflow/python/kernel_tests/rnn_test.py | 2 | 26456 | # 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 |
denisenkom/django | django/forms/models.py | 2 | 51990 | """
Helper functions for creating Form classes from Django models
and database field objects.
"""
from __future__ import unicode_literals
from collections import OrderedDict
import warnings
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS, FieldError
from django.forms.fields import Field, ChoiceF... | bsd-3-clause |
dondeli/php-buildpack-scs | lib/build_pack_utils/runner.py | 42 | 6178 | import os
import os.path
import sys
import tempfile
import subprocess
import logging
# This and check_output are shims to support features of Python 2.7
# on Python 2.6.
#
# This code was borrowed from PyPy 2.7.
# bitbucket.org/pypy/pypy/src/9d88b4875d6e/lib-python/2.7/subprocess.py
#
# This can be removed when t... | apache-2.0 |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/comtypes/test/test_createwrappers.py | 6 | 3854 | import glob
import os
import unittest
import warnings
import comtypes.typeinfo
import comtypes.client
import comtypes.client._generate
from comtypes.test import requires
requires("typelibs")
# filter warnings about interfaces without a base interface; they will
# be skipped in the code generation.
warnings.filterwarn... | agpl-3.0 |
saneyuki/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edgechromium.py | 3 | 4302 | from .base import Browser, ExecutorBrowser, require_arg
from .base import get_timeout_multiplier # noqa: F401
from ..webdriver_server import EdgeChromiumDriverServer
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F4... | mpl-2.0 |
alincalinciuc/packstack | tests/test_ospluginutils.py | 12 | 2297 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013, Red Hat, 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/LI... | apache-2.0 |
kylerbrown/scikit-learn | sklearn/covariance/tests/test_robust_covariance.py | 213 | 3359 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Virgile Fritsch <virgile.fritsch@inria.fr>
#
# License: BSD 3 clause
import numpy as np
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_alm... | bsd-3-clause |
pranav01/Xeon_sprout | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/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 |
shaufi10/odoo | addons/l10n_be_coda/__init__.py | 430 | 1105 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it u... | agpl-3.0 |
perlygatekeeper/glowing-robot | Little_Alchemy_2/Scraper_python/env/lib/python3.7/site-packages/pip/_internal/__init__.py | 9 | 2797 | #!/usr/bin/env python
from __future__ import absolute_import
import locale
import logging
import os
import warnings
import sys
# 2016-06-17 barry@debian.org: urllib3 1.14 added optional support for socks,
# but if invoked (i.e. imported), it will issue a warning to stderr if socks
# isn't available. requests uncond... | artistic-2.0 |
arifgursel/pyglet | pyglet/window/key.py | 22 | 10707 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | bsd-3-clause |
potatolondon/django-nonrel-1-4 | django/contrib/formtools/tests/wizard/wizardtests/forms.py | 313 | 2203 | import os
import tempfile
from django import forms
from django.contrib.auth.models import User
from django.core.files.storage import FileSystemStorage
from django.forms.formsets import formset_factory
from django.forms.models import modelformset_factory
from django.http import HttpResponse
from django.template import ... | bsd-3-clause |
YKonovalov/guesti | guesti/cloud/common.py | 1 | 1089 | # This file is part of GuestI.
#
# GuestI 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.
#
# SSP is distributed in the hope that it wi... | gpl-3.0 |
XiaosongWei/blink-crosswalk | Tools/Scripts/webkitpy/thirdparty/coverage/misc.py | 66 | 3720 | """Miscellaneous stuff for Coverage."""
import inspect
from coverage.backward import md5, sorted # pylint: disable=W0622
from coverage.backward import string_class, to_bytes
def nice_pair(pair):
"""Make a nice string representation of a pair of numbers.
If the numbers are equal, just return the number... | bsd-3-clause |
rouault/mapnik | scons/scons-local-2.3.4/SCons/Tool/MSCommon/vs.py | 9 | 19885 | #
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge... | lgpl-2.1 |
tlksio/tlksio | env/lib/python3.4/site-packages/django/db/models/base.py | 16 | 75879 | from __future__ import unicode_literals
import copy
import inspect
import warnings
from itertools import chain
from django.apps import apps
from django.conf import settings
from django.core import checks
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,... | mit |
bmoar/ansible | lib/ansible/plugins/callback/default.py | 46 | 7038 | # (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 |
JCash/voronoi | test/makereport.py | 1 | 8207 | #!/usr/bin/python
import os
import sys
import time
import subprocess
import argparse
from collections import OrderedDict
def find_time_unit(t):
if t < 0.000001:
return 'ns'
if t < 0.001:
return '\xc2\xb5s'
if t < 0.1:
return 'ms'
return 's'
def convert_time(t, unit):
if un... | mit |
AuyaJackie/odoo | addons/hw_proxy/__openerp__.py | 313 | 1675 | # -*- 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 |
hyphyphyph/lascaux | instlatte/subsystem.py | 1 | 1214 | # -*- coding: utf-8 -*-
import weakref
from instlatte.logger import logger
logger = logger(__name__)
class Subsystem(object):
manager = None
package_dir = None
module_name = None
name = None
config = dict()
plugins = list()
def __init__(self, manager=None, package_dir=None, modul... | mit |
pipsiscool/audacity | lib-src/lv2/serd/waflib/Tools/c.py | 329 | 1066 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib import TaskGen,Task,Utils
from waflib.Tools import c_preproc
from waflib.Tools.ccroot import link_task,stlink_task
@TaskGen.extension('.c')
def c_hook(self,node):
... | mit |
Blahus/acemod-ACE3 | tools/build.py | 4 | 2348 | #!/usr/bin/env python3
import os
import sys
import subprocess
def mod_time(path):
if not os.path.isdir(path):
return os.path.getmtime(path)
maxi = os.path.getmtime(path)
for p in os.listdir(path):
maxi = max(mod_time(os.path.join(path, p)), maxi)
return maxi
def check_for_changes(ad... | gpl-2.0 |
alexras/pylsdj | pylsdj/test_clock.py | 2 | 1373 | import os
from nose.tools import assert_equal
from .project import load_lsdsng
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
def test_read_clocks():
proj = load_lsdsng(
os.path.join(SCRIPT_DIR, 'test_data', 'UNTOLDST.lsdsng'))
project_clock = proj.song.clock
total_clock = proj.song.gl... | mit |
aaltinisik/OCBAltinkaya | addons/account_analytic_analysis/__openerp__.py | 262 | 2243 | # -*- 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 |
willingc/oh-mainline | vendor/packages/gdata/tests/gdata_tests/health/service_test.py | 127 | 8108 | #!/usr/bin/python
#
# Copyright 2009 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... | agpl-3.0 |
mzhou/lge-kernel-p880-cyanogenmod | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
ivano666/tensorflow | tensorflow/python/kernel_tests/fft_ops_test.py | 9 | 8247 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
smajohusic/simple-app-with-vue | node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py | 2767 | 2174 | # Copyright (c) 2011 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.
"""Applies a fix to CR LF TAB handling in xml.dom.
Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
Working around this: http://bugs.python.or... | mit |
daskol/ml-cipher-cracker | bigram_model.py | 3 | 2620 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
import numpy as np
import math
import random
import metropolis
import random_permutation as rm
import functools as ft
import sgt
ABC = 'abcdefghijklmnopqrstuvwxyz'
PLAIN_TEXT_FILENAME = 'main/oliver_twist.txt'
TRAIN_TEXT_FILENAME = 'main/war_and_peace.txt'
def gen... | mit |
adamjmcgrath/glancydesign | django/core/cache/backends/locmem.py | 229 | 4336 | "Thread-safe in-memory cache backend."
import time
try:
import cPickle as pickle
except ImportError:
import pickle
from django.core.cache.backends.base import BaseCache
from django.utils.synch import RWLock
# Global in-memory store of cache data. Keyed by name, to provide
# multiple named local memory caches... | bsd-3-clause |
nagyistoce/odoo-dev-odoo | addons/l10n_at/__init__.py | 438 | 1050 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) conexus.at
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public ... | agpl-3.0 |
2ndQuadrant/ansible | lib/ansible/modules/network/avi/avi_useraccount.py | 10 | 4005 | #!/usr/bin/python
"""
# Created on Aug 12, 2016
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com) GitHub ID: grastogi23
#
# module_check: not supported
#
# 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 publ... | gpl-3.0 |
edx/ansible | v2/ansible/plugins/action/async.py | 16 | 2739 | # (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 |
mostaphaRoudsari/Butterfly | butterfly/snappyHexMeshDict.py | 2 | 16257 | # coding=utf-8
"""snappyHexMeshDict class."""
from collections import OrderedDict
import re
from .foamfile import FoamFile, foam_file_from_file
from .utilities import get_snappyHexMesh_geometry_feild, \
get_snappyHexMesh_refinement_surfaces, get_snappyHexMesh_surface_layers
from .refinementRegion import refinemen... | gpl-3.0 |
ovnicraft/edx-platform | common/lib/xmodule/xmodule/tests/test_word_cloud.py | 166 | 1792 | # -*- coding: utf-8 -*-
"""Test for Word cloud Xmodule functional logic."""
from webob.multidict import MultiDict
from xmodule.word_cloud_module import WordCloudDescriptor
from . import LogicTest
class WordCloudModuleTest(LogicTest):
"""Logic tests for Word Cloud Xmodule."""
descriptor_class = WordCloudDescr... | agpl-3.0 |
basquith16/EtsyClone | node_modules/node-gyp/gyp/pylib/gyp/common_test.py | 2542 | 1970 | #!/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.
"""Unit tests for the common.py file."""
import gyp.common
import unittest
import sys
class TestTopologicallySorted(unittest.TestCase):
... | mit |
itsjustshana/project2 | main.py | 1 | 1149 | """`main` is the top level module for your Flask application."""
# Import the Flask Framework
from flask import Flask
from flask import render_template
app = Flask(__name__)
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
def game... | apache-2.0 |
acabey/acabey.github.io | projects/demos/engineering.purdue.edu/scriptingwithobjects/swocode/chap9/MySingleton.py | 1 | 1916 | #!/usr/bin/python
### MySingleton.py
#------------------------- class Singleton --------------------------
class Singleton( object ): #(A)
def __new__( cls, *args, **kwds ): #(B)
# it = cls.__dict__.get( "__it__" ) ... | gpl-3.0 |
cl4rke/scikit-learn | sklearn/metrics/tests/test_regression.py | 272 | 6066 | from __future__ import division, print_function
import numpy as np
from itertools import product
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.... | bsd-3-clause |
Gamebasis/3DGamebasisServer | GameData/blender-2.71-windows64/2.71/scripts/modules/rna_info.py | 1 | 22979 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 |
markgw/pimlico | src/python/pimlico/old_datatypes/modules/features/term_feature_matrix_builder/execute.py | 1 | 1433 | # This file is part of Pimlico
# Copyright (C) 2020 Mark Granroth-Wilding
# Licensed under the GNU LGPL v3.0 - https://www.gnu.org/licenses/lgpl-3.0.en.html
import numpy
from scipy.sparse.dok import dok_matrix
from pimlico.core.modules.base import BaseModuleExecutor
from pimlico.old_datatypes.arrays import ScipySpars... | gpl-3.0 |
IanSav/enigma2 | lib/python/Screens/Ci.py | 2 | 18127 | from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Tools.BoundFunction import boundFunction
from Components.Sources.StaticText import StaticText
from Components.ActionMap import ActionMap
from Components.ActionMap import NumberActionMap
from Components.Label import Label
from Components.co... | gpl-2.0 |
pythonbyexample/PBE | dbe/businesstest/migrations/0008_auto__add_field_message_to_factory.py | 1 | 7041 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Message.to_factory'
db.add_column('businesstest_message', 'to_factory', self.gf('django.db... | bsd-3-clause |
eeshangarg/zulip | zerver/migrations/0143_realm_bot_creation_policy.py | 6 | 1752 | # Generated by Django 1.11.6 on 2018-03-09 18:00
from django.db import migrations, models
from django.db.backends.postgresql.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
BOT_CREATION_EVERYONE = 1
def set_initial_value_for_bot_creation_policy(
apps: StateApps, schema_editor:... | apache-2.0 |
rartino/ENVISIoN | demo/molecular_dynamics.py | 1 | 2653 | ## ENVISIoN
##
## Copyright (c) 2021 Gabriel Anderberg, Didrik Axén, Adam Engman,
## Kristoffer Gubberud Maras, Joakim Stenborg
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are met:
##
## 1.... | bsd-2-clause |
sbusso/rethinkdb | external/v8_3.30.33.16/build/gyp/test/rename/gyptest-filecase.py | 320 | 1110 | #!/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.
"""
Checks that files whose file case changes get rebuilt correctly.
"""
import os
import TestGyp
test = TestGyp.TestGyp()
CHDIR = 'fileca... | agpl-3.0 |
rolandmansilla/microblog | flask/lib/python2.7/site-packages/flask/templating.py | 783 | 4707 | # -*- coding: utf-8 -*-
"""
flask.templating
~~~~~~~~~~~~~~~~
Implements the bridge to Jinja2.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import posixpath
from jinja2 import BaseLoader, Environment as BaseEnvironment, \
TemplateNotFound
from .glo... | bsd-3-clause |
saisaizhang/Food | flask/lib/python2.7/site-packages/pip/_vendor/requests/auth.py | 44 | 6702 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
from base64 import b64encode
from .compat import urlparse, str
from .cookies import extract_cookies_to_jar
from .utils import parse_dict_header, ... | bsd-3-clause |
dangerdak/apuniverse | apuniverse/blog/migrations/0001_initial.py | 1 | 2045 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Post'
db.create_table('blog_post', (
('id', s... | mit |
bigbiff/android_kernel_samsung_sm-p605 | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
ucbvislab/radiotool | radiotool/composer/timestretchsegment.py | 1 | 1360 | from segment import Segment
from scipy.signal import resample
class TimeStretchSegment(Segment):
"""Like a :py:class:`radiotool.composer.Segment`, but stretches
time to fit a specified duration.
"""
def __init__(self, track, comp_location, start, orig_duration, new_duration):
"""Create a time-... | isc |
sputnik13/kubernetes | vendor/github.com/ugorji/go/codec/test.py | 181 | 4029 | #!/usr/bin/env python
# This will create golden files in a directory passed to it.
# A Test calls this internally to create the golden files
# So it can process them (so we don't have to checkin the files).
# Ensure msgpack-python and cbor are installed first, using:
# sudo apt-get install python-dev
# sudo apt-g... | apache-2.0 |
kevclarx/ansible | lib/ansible/modules/source_control/github_release.py | 12 | 3323 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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.
... | gpl-3.0 |
mezz64/home-assistant | homeassistant/components/zeroconf/__init__.py | 7 | 12731 | """Support for exposing Home Assistant via Zeroconf."""
import fnmatch
from functools import partial
import ipaddress
import logging
import socket
import voluptuous as vol
from zeroconf import (
DNSPointer,
DNSRecord,
Error as ZeroconfError,
InterfaceChoice,
IPVersion,
NonUniqueNameException,
... | apache-2.0 |
matiasdecarli/ansible-modules-core | cloud/amazon/ec2_snapshot.py | 67 | 10167 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 |
wraiden/spacewalk | client/tools/rhn-kickstart/rhnkickstart/lilo.py | 7 | 8581 | #
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 |
Rocky5/XBMC-Emustation | Mod Files/system/scripts/_modules/script.module.requests/lib/requests/packages/urllib3/util/request.py | 1008 | 2089 | from base64 import b64encode
from ..packages.six import b
ACCEPT_ENCODING = 'gzip,deflate'
def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
basic_auth=None, proxy_basic_auth=None, disable_cache=None):
"""
Shortcuts for generating request headers.
:param keep_ali... | gpl-3.0 |
wasade/networkx | networkx/algorithms/flow/mincost.py | 9 | 11222 | # -*- coding: utf-8 -*-
"""
Minimum cost flow algorithms on directed connected graphs.
"""
__author__ = """Loïc Séguin-C. <loicseguin@gmail.com>"""
# Copyright (C) 2010 Loïc Séguin-C. <loicseguin@gmail.com>
# All rights reserved.
# BSD license.
__all__ = ['min_cost_flow_cost',
'min_cost_flow',
... | bsd-3-clause |
c1728p9/pyOCD | pyOCD/target/target_lpc800.py | 5 | 1453 | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... | apache-2.0 |
chase-kernan/lsc-seis-gcm | gcm/io/triggers.py | 1 | 3825 |
from gcm.data import triggers as tr
from gcm import utils
import numpy as np
from os.path import join
_ROOT_ATTR_MAP = dict(time='time',
time_min='tstart', time_max='tend',
freq='frequency',
freq_min='fstart', freq_max='fend',
amp... | gpl-2.0 |
McKabue/CSS3HTML5AzurePortalDesign | node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py | 1812 | 9537 | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions shared amongst the Windows generators."""
import copy
import os
# A dictionary mapping supported target types to extensions.
TARGET_TYPE_EX... | gpl-3.0 |
newerthcom/savagerebirth | libs/python-2.72/Lib/binhex.py | 216 | 14476 | """Macintosh binhex compression/decompression.
easy interface:
binhex(inputfilename, outputfilename)
hexbin(inputfilename, outputfilename)
"""
#
# Jack Jansen, CWI, August 1995.
#
# The module is supposed to be as compatible as possible. Especially the
# easy interface should work "as expected" on any platform.
# XXX... | gpl-2.0 |
Dreizan/csci1200OnlineCourse | models/roles.py | 7 | 8356 | # Copyright 2012 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 |
viacoin/viacoin | contrib/devtools/copyright_header.py | 13 | 22431 | #!/usr/bin/env python3
# Copyright (c) 2016-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
import datetime
import os
########################... | mit |
IT-Department-Projects/OOAD-Project | Flask_App/oakcrest/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py | 75 | 15139 | """
SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* pyOpenSSL (tested w... | mit |
chinnuabhi/pjsip | tests/pjsua/scripts-sendto/252_multipart_ok_clutter.py | 40 | 1058 | # $Id$
import inc_sip as sip
import inc_sdp as sdp
body = \
"""
This is the preamble. It is to be ignored, though it
is a handy place for composition agents to include an
explanatory note to non-MIME conformant readers.
--123:45
Content-Type: text/plain
The first part is definitely not SDP
--123:45
This is implic... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.