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 |
|---|---|---|---|---|---|
lgarren/spack | var/spack/repos/builtin/packages/r-yaqcaffy/package.py | 1 | 1795 | ##############################################################################
# Copyright (c) 2013-2017, 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 |
cohortfsllc/cohort-cocl2-sandbox | src/trusted/validator_arm/dgen_input.py | 10 | 43651 | #!/usr/bin/python
#
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
"""
A simple recursive-descent parser for the table file format.
The grammar implemented here is roughly (taking some liberti... | bsd-3-clause |
s0enke/boto | boto/cloudhsm/__init__.py | 111 | 1654 | # Copyright (c) 2015 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# 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... | mit |
ProjectSWGCore/NGECore2 | scripts/mobiles/dathomir/mutant_rancor.py | 2 | 1401 | import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate()
mobil... | lgpl-3.0 |
struempelix/mbed | workspace_tools/compliance/ioper_base.py | 106 | 1992 | """
mbed SDK
Copyright (c) 2011-2015 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | apache-2.0 |
indictranstech/tele-erpnext | erpnext/patches/v4_2/fix_recurring_orders.py | 113 | 1943 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
sales_orders = frappe.db.sql("""select name from `tabSales Order`
where docstatus = 1 and ifnull(is_recurring, 0) =... | agpl-3.0 |
alvaroaleman/ansible | lib/ansible/modules/notification/campfire.py | 48 | 5329 | #!/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 |
junbochen/pylearn2 | pylearn2/utils/logger.py | 44 | 11385 | """Local facilities to configure the logger to our needs."""
__author__ = "David Warde-Farley"
__copyright__ = "Copyright 2012, Universite de Montreal"
__credits__ = ["David Warde-Farley"]
__license__ = "3-clause BSD"
__email__ = "wardefar@iro"
__maintainer__ = "David Warde-Farley"
# Portions cribbed from the standar... | bsd-3-clause |
mplpl/m7z | lib7z/googletest/scripts/fuse_gtest_files.py | 346 | 8884 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | lgpl-2.1 |
hastexo/edx-platform | lms/djangoapps/instructor/tests/test_enrollment_store_provider.py | 10 | 2740 | """
Exercises tests on the base_store_provider file
"""
from django.test import TestCase
from lms.djangoapps.instructor.enrollment_report import AbstractEnrollmentReportProvider
from lms.djangoapps.instructor.paidcourse_enrollment_report import PaidCourseEnrollmentReportProvider
class BadImplementationAbstractEnrol... | agpl-3.0 |
miguelinux/vbox | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/UiSection.py | 1 | 2838 | ## @file
# process UI section generation
#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license... | gpl-2.0 |
lpirl/ansible | lib/ansible/utils/module_docs_fragments/vmware.py | 19 | 1474 | # (c) 2016, Charles Paul <cpaul@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | gpl-3.0 |
WANdisco/hive | testutils/ptest/hivetest.py | 18 | 24138 | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lic... | apache-2.0 |
jostep/tensorflow | tensorflow/contrib/linalg/python/ops/linear_operator_full_matrix.py | 31 | 6339 | # 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 |
sjohannes/exaile | xlgui/panel/playlists.py | 1 | 38162 | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... | gpl-2.0 |
celiafish/VisTrails | vistrails/gui/mashups/mashups_widgets.py | 2 | 15700 | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | bsd-3-clause |
yfried/ansible | lib/ansible/modules/source_control/git_config.py | 18 | 6941 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Marius Gedminas <marius@pov.lt>
# (c) 2016, Matthew Gamble <git@matthewgamble.net>
#
# 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
... | gpl-3.0 |
yarikoptic/seaborn | doc/sphinxext/ipython_console_highlighting.py | 78 | 4181 | """reST directive for syntax-highlighting ipython interactive sessions.
XXX - See what improvements can be made based on the new (as of Sept 2009)
'pycon' lexer for the python console. At the very least it will give better
highlighted tracebacks.
"""
#-----------------------------------------------------------------... | bsd-3-clause |
statik/grr | gui/api_plugins/artifact_test.py | 2 | 4077 | #!/usr/bin/env python
"""This modules contains tests for artifact API renderer."""
import os
from grr.gui import api_test_lib
from grr.gui.api_plugins import artifact as artifact_plugin
from grr.lib import artifact
from grr.lib import artifact_registry
from grr.lib import artifact_test
from grr.lib import config_li... | apache-2.0 |
scode/pants | src/python/pants/backend/python/tasks/checkstyle/future_compatibility.py | 3 | 2640 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import ast
from pan... | apache-2.0 |
jespino/GalaxduS | libs/screens/newgame.py | 1 | 2534 | from galaxdustk.buttons import Button, CircularSelectButton, SelectButton
from galaxdustk.label import Label
from galaxdustk.screen import BaseScreen
import handlers
from gettext import gettext as _
class NewGameScreen(BaseScreen):
background_path = 'data/images/backgrounds/menu.png'
def __init__(self, cont... | gpl-3.0 |
melphi/algobox | python/algobox/src/algobox/client/generated/datacollector/models/__init__.py | 1 | 1283 | # coding: utf-8
"""
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in com... | apache-2.0 |
jairideout/scikit-bio | skbio/sequence/tests/test_base.py | 10 | 1423 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio 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 |
goyalankit/ride-agg | requests/packages/chardet/langgreekmodel.py | 2763 | 12628 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | apache-2.0 |
maggnus/eloipool-crypto | jsonrpc_getwork.py | 14 | 3506 | # Eloipool - Python Bitcoin pool server
# Copyright (C) 2011-2012 Luke Dashjr <luke-jr+eloipool@utopios.org>
#
# This program 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
# L... | agpl-3.0 |
lolz0r/pytorch-es | envs.py | 2 | 2404 | # Taken from https://github.com/ikostrikov/pytorch-a3c
from __future__ import absolute_import, division, print_function
import numpy as np
import gym
from gym.spaces.box import Box
from universe import vectorized
from universe.wrappers import Unvectorize, Vectorize
import cv2
# Taken from https://github.com/openai... | mit |
lichong012245/django-lfs-0.7.8 | lfs/integrationtests/windmilltests/managetests/test_manage.py | 5 | 1684 | from windmill.authoring import WindmillTestClient
def setup_module(module):
pass
def test_manage_setting_of_price_calculator():
client = WindmillTestClient(__name__)
client.open(url="/product/chocolate")
client.waits.forPageLoad(timeout=u'20000')
# check that product includes vat
client.as... | bsd-3-clause |
MSeifert04/astropy | astropy/table/tests/test_operations.py | 3 | 67327 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from collections import OrderedDict
import pytest
import numpy as np
from astropy.tests.helper import catch_warnings
from astropy.table import Table, QTable, TableMergeError, Column, MaskedColumn
from astropy.table.operations import _get_out_class
from ... | bsd-3-clause |
Communities-Communications/cc-odoo | addons/website_gengo/__openerp__.py | 385 | 1387 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | agpl-3.0 |
leilihh/novaha | nova/tests/scheduler/test_filters.py | 18 | 8712 | # 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 req... | apache-2.0 |
tadebayo/myedge | myvenv/Lib/site-packages/easy_thumbnails/widgets.py | 12 | 2612 | from django.forms.widgets import ClearableFileInput
from django.utils.safestring import mark_safe
from easy_thumbnails.files import get_thumbnailer
from easy_thumbnails.conf import settings
class ImageClearableFileInput(ClearableFileInput):
"""
Use this widget to show a thumbnail of the image next to the imag... | mit |
Avira/pootle | pootle/apps/pootle_app/management/commands/dump.py | 6 | 5768 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle 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.
import os
import sys... | gpl-3.0 |
mayankcu/Django-social | app/vkontakte.py | 8 | 3231 | from django.contrib.auth import BACKEND_SESSION_KEY
from django.contrib.auth.models import AnonymousUser
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.core.cache import cache
from django.conf import settings
from soc... | bsd-3-clause |
wuhengzhi/crosswalk | tools/patcher.py | 1 | 2403 | # Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
# reserved.
# Copyright (c) 2013 Intel Corporation. All rights reserved.
# Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
from optparse import OptionParser
import os
import sys
from patch_util ... | bsd-3-clause |
anshimagupta/kubernetes | cluster/juju/charms/trusty/kubernetes/hooks/hooks.py | 72 | 8088 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 |
Stibbons/python-project-bootstrap | src/ppb/cli/main.py | 1 | 1483 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ppb.cli import sub_cmd
from ppb.cli import version
import argparse
import sys
class Main(object):
'''
This command line tool ...
'''
def main(self):
# Global command-line arg... | bsd-3-clause |
TimBuckley/effective_django | django/contrib/sessions/backends/db.py | 113 | 2930 | import logging
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.core.exceptions import SuspiciousOperation
from django.db import IntegrityError, transaction, router
from django.utils import timezone
from django.utils.encoding import force_text
class SessionStore(SessionBase):
... | bsd-3-clause |
plast-lab/cclyzer | src/main/cclyzer/cli/load_module.py | 2 | 1818 | import logging
from os import path
from .commands import CliCommand
from .. import Analysis
from ..project import ProjectManager
from ..runtime import Environment as env
# Initialize logger and project manager for this module
_logger = logging.getLogger(__name__)
_projects = ProjectManager()
class LoadModuleComman... | mit |
lukauskas/means | src/means/inference/hypercube.py | 2 | 2158 | import random
import numpy as np
def hypercube(number_of_samples, variables):
"""
This implements Latin Hypercube Sampling.
See https://mathieu.fenniak.net/latin-hypercube-sampling/ for intuitive explanation of what it is
:param number_of_samples: number of segments/samples
:param variables: initi... | mit |
trappn/crosshair | include/patterns.py | 1 | 5162 | import cv2
import numpy as np
# number of available patterns:
maxpat = 10
# defining functions for all possible patterns follow,
# activated by patternswitch function
# pattern1: Bruker style crosshair with circles and ticks
def pattern1( arr, width, height, x, y, rad, col ):
cv2.line(arr,(0,y),(width,y),col,1)... | mit |
javierTerry/odoo | addons/pos_discount/__openerp__.py | 312 | 1615 | # -*- 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 |
thnee/ansible | lib/ansible/modules/network/fortios/fortios_report_chart.py | 12 | 32190 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | gpl-3.0 |
anryko/ansible | lib/ansible/module_utils/network/common/config.py | 9 | 14281 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 |
nirmeshk/oh-mainline | vendor/packages/Django/tests/regressiontests/views/tests/defaults.py | 50 | 4469 | from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from django.test.utils import setup_test_template_loader, restore_template_loaders
from ..models import Author, Article, UrlArticle
class DefaultsTests(TestCase):
... | agpl-3.0 |
iAmMrinal0/plexpy | lib/unidecode/x089.py | 252 | 4628 | data = (
'Ji ', # 0x00
'Zhi ', # 0x01
'Gua ', # 0x02
'Ken ', # 0x03
'Che ', # 0x04
'Ti ', # 0x05
'Ti ', # 0x06
'Fu ', # 0x07
'Chong ', # 0x08
'Xie ', # 0x09
'Bian ', # 0x0a
'Die ', # 0x0b
'Kun ', # 0x0c
'Duan ', # 0x0d
'Xiu ', # 0x0e
'Xiu ', # 0x0f
'He ', # 0x10
'Yuan ... | gpl-3.0 |
npinto/pytest | testing/test_helpconfig.py | 1 | 2191 | import py, pytest,os
from _pytest.helpconfig import collectattr
def test_version(testdir, pytestconfig):
result = testdir.runpytest("--version")
assert result.ret == 0
#p = py.path.local(py.__file__).dirpath()
result.stderr.fnmatch_lines([
'*py.test*%s*imported from*' % (pytest.__version__, )
... | mit |
xguse/ete | test/test_phylotree.py | 1 | 14583 | import unittest
from ete_dev import *
from datasets import *
class Test_phylo_module(unittest.TestCase):
# ALL TESTS USE THIS EXAMPLE TREE
#
# /-Dme_001
# /--------|
# | \-Dme_002
# |
# | /-Cfa_001
... | gpl-3.0 |
Jorge-Rodriguez/ansible | lib/ansible/modules/cloud/openstack/os_keypair.py | 42 | 4603 | #!/usr/bin/python
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
# Copyright (c) 2013, John Dewey <john@dewey.ws>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, div... | gpl-3.0 |
saradbowman/osf.io | osf/management/commands/create_fake_preprint_actions.py | 5 | 1885 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import random
import logging
from faker import Faker
from django.core.management.base import BaseCommand
from osf.models import ReviewAction, Preprint, OSFUser
from osf.utils.workflows import DefaultStates, DefaultTriggers
logger ... | apache-2.0 |
kasbah/slim_looper | src/gui/carla_widgets/ui_inputdialog_value.py | 1 | 2493 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/ui/inputdialog_value.ui'
#
# Created: Thu Jan 2 17:50:40 2014
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.... | gpl-3.0 |
fmarier/letsencrypt | letsencrypt/interfaces.py | 13 | 14967 | """Let's Encrypt client interfaces."""
import abc
import zope.interface
# pylint: disable=no-self-argument,no-method-argument,no-init,inherit-non-class
# pylint: disable=too-few-public-methods
class AccountStorage(object):
"""Accounts storage interface."""
__metaclass__ = abc.ABCMeta
@abc.abstractmetho... | apache-2.0 |
halfflat/rdmini | gtest-1.7.0/test/gtest_break_on_failure_unittest.py | 2140 | 7339 | #!/usr/bin/env python
#
# Copyright 2006, 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... | gpl-2.0 |
rosudrag/Freemium-winner | VirtualEnvironment/Lib/site-packages/openid/server/trustroot.py | 12 | 14391 | # -*- test-case-name: openid.test.test_rpverify -*-
"""
This module contains the C{L{TrustRoot}} class, which helps handle
trust root checking. This module is used by the
C{L{openid.server.server}} module, but it is also available to server
implementers who wish to use it for additional trust root checking.
It also i... | mit |
cmouse/buildbot | master/buildbot/test/unit/process/test_remotecommand.py | 5 | 7462 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 |
cgstudiomap/cgstudiomap | main/eggs/xlwt-1.0.0-py2.7.egg/xlwt/Cell.py | 8 | 8563 | # -*- coding: windows-1252 -*-
from struct import unpack, pack
from . import BIFFRecords
from .compat import xrange
class StrCell(object):
__slots__ = ["rowx", "colx", "xf_idx", "sst_idx"]
def __init__(self, rowx, colx, xf_idx, sst_idx):
self.rowx = rowx
self.colx = colx
self.xf_idx =... | agpl-3.0 |
srio/oasys-comsyl | orangecontrib/comsyl/widgets/applications/comsyl_propagate_beamline.py | 1 | 10084 | import os, sys
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtGui import QPalette, QColor, QFont
from PyQt5.QtWidgets import QApplication, QFileDialog
from PyQt5.QtGui import QIntValidator, QDoubleValidator
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasys... | mit |
skevy/django | django/contrib/sitemaps/__init__.py | 291 | 4010 | from django.contrib.sites.models import Site, get_current_site
from django.core import urlresolvers, paginator
from django.core.exceptions import ImproperlyConfigured
import urllib
PING_URL = "http://www.google.com/webmasters/tools/ping"
class SitemapNotFound(Exception):
pass
def ping_google(sitemap_url=None, pi... | bsd-3-clause |
scality/cinder | cinder/wsgi/eventlet_server.py | 3 | 10380 | # 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
# d... | apache-2.0 |
repotvsupertuga/tvsupertuga.repository | instal/script.module.universalscrapers/lib/universalscrapers/modules/js2py/pyjs.py | 38 | 1836 | from .base import *
from .constructors.jsmath import Math
from .constructors.jsdate import Date
from .constructors.jsobject import Object
from .constructors.jsfunction import Function
from .constructors.jsstring import String
from .constructors.jsnumber import Number
from .constructors.jsboolean import Boolean
from .co... | gpl-2.0 |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/django_extensions/management/commands/sqldiff.py | 24 | 48057 | """
sqldiff.py - Prints the (approximated) difference between models and database
TODO:
- better support for relations
- better support for constraints (mainly postgresql?)
- support for table spaces with postgresql
- when a table is not managed (meta.managed==False) then only do a one-way
sqldiff ? show differ... | agpl-3.0 |
PriyaShitole/MedViger-lib | webnotes/model/doctype.py | 34 | 13356 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
"""
Get metadata (main doctype with fields and permissions with all table doctypes)
- if exists in cache, get it from cache
- add custom fields
- override properties from PropertySetter
- sort based on prev_field
- ... | mit |
jnovinger/django | tests/indexes/tests.py | 321 | 3037 | from unittest import skipUnless
from django.db import connection
from django.test import TestCase
from .models import Article, ArticleTranslation, IndexTogetherSingleList
class SchemaIndexesTests(TestCase):
"""
Test index handling by the db.backends.schema infrastructure.
"""
def test_index_name_ha... | bsd-3-clause |
liosha2007/temporary-groupdocs-python-sdk | examples/api-samples/inc_samples/sample07.py | 1 | 2600 | ####<i>This sample will show how to use <b>MoveFile</b> method from Storage Api to copy/move a file in GroupDocs Storage </i>
#Import of classes from libraries
import base64
import os
from pyramid.renderers import render_to_response
from groupdocs.ApiClient import ApiClient
from groupdocs.StorageApi import StorageAp... | apache-2.0 |
cherylyli/stress-aid | env/lib/python3.5/site-packages/pymongo/periodic_executor.py | 15 | 5444 | # Copyright 2014-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | mit |
llooker/python_sdk | test/test_credentials_google.py | 1 | 2394 | # coding: utf-8
"""
Looker API 3.0 Reference
### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token.... | mit |
paulscherrerinstitute/pcaspy | example/pysh.py | 1 | 2155 | #!/usr/bin/env python
import time
import sys
import threading
import subprocess
import shlex
from pcaspy import Driver, SimpleServer
prefix = 'MTEST:'
pvdb = {
'COMMAND' : {
'type' : 'char',
'count': 128,
'asyn' : True
},
'OUTPUT' : {
'type' : 'char',
'count': 500... | bsd-3-clause |
nataddrho/DigiCue-USB | Python3/src/venv/Lib/site-packages/serial/urlhandler/protocol_alt.py | 2 | 2033 | #! python
#
# This module implements a special URL handler that allows selecting an
# alternate implementation provided by some backends.
#
# This file is part of pySerial. https://github.com/pyserial/pyserial
# (C) 2015 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# URL format: al... | mit |
mr-niels-christensen/environment-scotland-dot-rural | src/main/rdflib/namespace.py | 7 | 15465 | from rdflib.py3compat import format_doctest_out
__doc__ = format_doctest_out("""
===================
Namespace Utilities
===================
RDFLib provides mechanisms for managing Namespaces.
In particular, there is a :class:`~rdflib.namespace.Namespace` class
that takes as its argument the base URI of the namespac... | apache-2.0 |
Dhivyap/ansible | lib/ansible/modules/network/aci/mso_schema_template_vrf.py | 26 | 5576 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
# 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_ve... | gpl-3.0 |
mdworks2016/work_development | Python/20_Third_Certification/venv/lib/python3.7/site-packages/billiard/einfo.py | 5 | 3671 | from __future__ import absolute_import
import sys
import traceback
__all__ = ['ExceptionInfo', 'Traceback']
DEFAULT_MAX_FRAMES = sys.getrecursionlimit() // 8
class _Code(object):
def __init__(self, code):
self.co_filename = code.co_filename
self.co_name = code.co_name
self.co_argcount ... | apache-2.0 |
Linaro/squad | squad/core/management/commands/migrate_test_runs.py | 2 | 4214 | import sys
from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import BaseCommand
from django.db import transaction
from squad.core.models import Project, Build, Environment, Status, Test, Metric
from squad.core.tasks import UpdateProjectStatus
class Command(BaseCommand):
help... | agpl-3.0 |
odoo-turkiye/odoo | addons/purchase_double_validation/__init__.py | 441 | 1090 | # -*- 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 |
ncoghlan/pip | pip/_vendor/requests/packages/chardet/gb2312prober.py | 2994 | 1681 | ######################## 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... | mit |
spmjc/plugin.video.freplay | resources/lib/channels/pluzz2.py | 1 | 6003 | # -*- coding: utf-8 -*-
import json
import resources.lib.utils as utils
from resources.lib import globalvar
title = ['La 1ère', 'France 2', 'France 3', 'France 4', 'France 5', 'France Ô']
img = ['la_1ere', 'france2', 'france3', 'france4', 'france5', 'franceo']
readyForUse = True
channelCatalog = 'http://pluzz.webserv... | gpl-2.0 |
jmesteve/saas3 | openerp/addons_extra/ibeacon/pexpect-2.3/build/lib/fdpexpect.py | 264 | 2488 | """This is like pexpect, but will work on any file descriptor that you pass it.
So you are reponsible for opening and close the file descriptor.
$Id: fdpexpect.py 505 2007-12-26 21:33:50Z noah $
"""
from pexpect import *
import os
__all__ = ['fdspawn']
class fdspawn (spawn):
"""This is like pexpect.spawn but a... | agpl-3.0 |
mjfarmer/scada_py | env/lib/python2.7/site-packages/IPython/utils/_tokenize_py2.py | 29 | 17153 | """Patched version of standard library tokenize, to deal with various bugs.
Patches
- Relevant parts of Gareth Rees' patch for Python issue #12691 (untokenizing),
manually applied.
- Newlines in comments and blank lines should be either NL or NEWLINE, depending
on whether they are in a multi-line statement. Filed... | gpl-3.0 |
memkeytm/p2pool | wstools/c14n.py | 290 | 16401 | #! /usr/bin/env python
'''XML Canonicalization
Patches Applied to xml.dom.ext.c14n:
http://sourceforge.net/projects/pyxml/
[ 1444526 ] c14n.py: http://www.w3.org/TR/xml-exc-c14n/ fix
-- includes [ 829905 ] c14n.py fix for bug #825115,
Date Submitted: 2003-10-24 23:43
-- include dep... | gpl-3.0 |
thusoy/grunt-pylint | postinstall.py | 1 | 1377 | #!/usr/bin/env python
import os
import subprocess
import sys
# Versions here must match what is bundled with the package (see package.json)
packages = [
'astroid-2.2.5.tar.gz',
'isort-4.3.17.tar.gz',
'lazy-object-proxy-1.3.1.tar.gz',
'mccabe-0.6.1.tar.gz',
'pylint-2.3.1.tar.gz',
'six-1.12.0.ta... | mit |
os-cloud-storage/openstack-workload-disaster-recovery | dragon/engine/service.py | 1 | 12170 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 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 c... | apache-2.0 |
openstack/senlin | senlin/common/policy.py | 1 | 2008 | # 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 unde... | apache-2.0 |
TomMinor/MayaPerforce | Perforce/DepotClientTreeView.py | 1 | 16413 | import sys
import os
from PySide import QtCore, QtGui
from P4 import P4, P4Exception
# http://stackoverflow.com/questions/32229314/pyqt-how-can-i-set-row-heights-of-qtreeview
class TreeItem(object):
def __init__(self, data, parent=None):
self.parentItem = parent
self.data = data
self.ch... | mit |
bestvibes/neo4j-social-network | env/lib/python2.7/site-packages/jinja2/runtime.py | 606 | 19558 | # -*- coding: utf-8 -*-
"""
jinja2.runtime
~~~~~~~~~~~~~~
Runtime helpers.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD.
"""
from itertools import chain
from jinja2.nodes import EvalContext, _context_function_types
from jinja2.utils import Markup, soft_unicode, escape, missing, concat, \
... | mit |
vizual54/MissionPlanner | Lib/encodings/hp_roman8.py | 96 | 7543 | """ Python Character Mapping Codec generated from 'hp_roman8.txt' with gencodec.py.
Based on data from ftp://dkuug.dk/i18n/charmaps/HP-ROMAN8 (Keld Simonsen)
Original source: LaserJet IIP Printer User's Manual HP part no
33471-90901, Hewlet-Packard, June 1989.
"""#"
import codecs
### Codec A... | gpl-3.0 |
xdevelsistemas/taiga-back-community | taiga/export_import/management/commands/dump_project.py | 2 | 3190 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... | agpl-3.0 |
krytarowski/coreclr | src/scripts/Utilities.py | 68 | 1635 | from filecmp import dircmp
import shutil
import os
def walk_recursively_and_update(dcmp):
#for different Files Copy from right to left
for name in dcmp.diff_files:
srcpath = dcmp.right + "/" + name
destpath = dcmp.left + "/" + name
print("Updating %s" % (destpath))
if os.path.i... | mit |
ewandor/home-assistant | homeassistant/components/twilio.py | 24 | 1574 | """
Support for Twilio.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/twilio/
"""
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.core import callback
from homeassistant.components.http import HomeAssis... | apache-2.0 |
ellio167/lammps | tools/fep/bar.py | 7 | 2275 | #!/usr/bin/env python
# bar.py - Bennet's acceptance ratio method for free energy calculation
import sys
import math
if len(sys.argv) < 4:
print("Bennet acceptance ratio method")
print("usage: bar.py temperature datafile01 datafile10 [delf_lo delf_hi]")
print(" datafile01 contains (U_1 - U_0)_0 in 2nd co... | gpl-2.0 |
r39132/airflow | tests/utils/test_cli_util.py | 4 | 3137 | # -*- 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 |
goodwinnk/intellij-community | python/lib/Lib/csv.py | 87 | 15210 |
"""
csv.py - read/write/investigate CSV files
"""
import re
from _csv import Error, __version__, writer, reader, register_dialect, \
unregister_dialect, get_dialect, list_dialects, \
field_size_limit, \
QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \
... | apache-2.0 |
mjudsp/Tsallis | sklearn/manifold/tests/test_locally_linear.py | 27 | 5247 | from itertools import product
from nose.tools import assert_true
import numpy as np
from numpy.testing import assert_almost_equal, assert_array_almost_equal
from scipy import linalg
from sklearn import neighbors, manifold
from sklearn.manifold.locally_linear import barycenter_kneighbors_graph
from sklearn.utils.testi... | bsd-3-clause |
rdeheele/odoo | addons/hr_attendance/res_config.py | 434 | 1406 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
fnouama/intellij-community | python/helpers/pydev/third_party/pep8/pep8.py | 43 | 75838 | #!/usr/bin/env python
# pep8.py - Check Python source code formatting, according to PEP 8
# Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net>
# Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this soft... | apache-2.0 |
biswajitsahu/kuma | vendor/packages/translate/convert/poreplace.py | 29 | 2227 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2004-2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2... | mpl-2.0 |
felixma/nova | nova/objects/block_device.py | 11 | 13367 | # 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/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 |
remodoy/reauth-python | reauth/reauth.py | 1 | 2556 | import json
import ssl
import time
import urllib.request
from datetime import timedelta
import logging
import Crypto.PublicKey.RSA
import python_jwt as jwt
_accepted_sign_algs = ["PS512"]
_pubkey_cache_living_time = 60*10 # 10min
_pubkey_cache_exp_time = 0
_pubkey_cache = ""
_iat_skew = timedelta(minutes=5)
logger... | mit |
dpwrussell/openmicroscopy | components/tools/OmeroPy/src/omero/plugins/chgrp.py | 1 | 4086 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2015 Glencoe Software, Inc. All Rights Reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
"""
chgrp plugin
Plugin read by omero.cli.Cli during initialization. The method(s)
defined here will be added to the Cli class for... | gpl-2.0 |
Jaccorot/python | renzongxian/0014/0014.py | 40 | 1050 | # Source:https://github.com/Show-Me-the-Code/show-me-the-code
# Author:renzongxian
# Date:2014-12-22
# Python 3.4
"""
第 0014 题: 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
{
"1":["张三",150,120,100],
"2":["李四",90,99,95],
"3":["王五",60,66,68]
}
请将上述内容写到 student.xls 文件中。
"""
import xlwt3
import json
# 该部分参考了... | mit |
wan-qy/electron | script/create-node-headers.py | 4 | 3364 | #!/usr/bin/env python
import argparse
import os
import shutil
import sys
import tarfile
from lib.util import safe_mkdir, scoped_cwd
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
NODE_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'node')
OUT_... | mit |
has2k1/numpy | numpy/lib/_datasource.py | 148 | 21266 | """A file interface for handling local and remote data files.
The goal of datasource is to abstract some of the file system operations
when dealing with data files so the researcher doesn't have to know all the
low-level details. Through datasource, a researcher can obtain and use a
file with one function call, regar... | bsd-3-clause |
Daniex/horizon | openstack_dashboard/dashboards/project/access_and_security/floating_ips/tests.py | 29 | 15039 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business unit of eBay Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.