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 |
|---|---|---|---|---|---|
FRBs/FRB | frb/surveys/decals.py | 2 | 5419 | """DECaLS"""
import numpy as np
from astropy import units, io, utils
from astropy.table import Table
from frb.surveys import dlsurvey
from frb.surveys import catalog_utils
# Dependencies
try:
from pyvo.dal import sia
except ImportError:
print("Warning: You need to install pyvo to retrieve DECaL images")
... | bsd-3-clause |
faust64/ansible | lib/ansible/modules/cloud/univention/udm_user.py | 21 | 21738 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# Copyright (c) 2016, Adfinis SyGroup AG
# Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch>
#
# 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 Fr... | gpl-3.0 |
mgit-at/ansible | lib/ansible/modules/cloud/amazon/iam_mfa_device_facts.py | 44 | 3359 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
weblabdeusto/weblabdeusto | server/src/test/unit/weblab/core/coordinator/sql/test_priority_queue_scheduler_model.py | 3 | 2019 | #!/usr/bin/env python
#-*-*- encoding: utf-8 -*-*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individual... | bsd-2-clause |
10clouds/edx-platform | openedx/core/djangoapps/credentials/utils.py | 1 | 3508 | """Helper functions for working with Credentials."""
from __future__ import unicode_literals
import logging
from openedx.core.djangoapps.credentials.models import CredentialsApiConfig
from openedx.core.djangoapps.programs.utils import get_programs_for_credentials
from openedx.core.lib.edx_api_utils import get_edx_api_... | agpl-3.0 |
whitepages/nova | nova/tests/unit/api/openstack/compute/test_hide_server_addresses.py | 63 | 5382 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
DivineHime/seishirou | lib/youtube_dl/extractor/cwtv.py | 38 | 4914 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
parse_iso8601,
)
class CWTVIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?cw(?:tv(?:pr)?|seed)\.com/(?:shows/)?(?:[^/]+/)+[^?]*\?.*\b(?:play|watch)=(?P<id>[a-z0-9]{8}-[a-z0-9... | gpl-3.0 |
programadorjc/django | django/contrib/auth/__init__.py | 387 | 7508 | import inspect
import re
from django.apps import apps as django_apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.middleware.csrf import rotate_token
from django.utils.crypto import constant_time_compare
from django.utils.module_loading import i... | bsd-3-clause |
TwinkleChawla/nova | nova/tests/unit/api/openstack/compute/test_floating_ips_bulk.py | 35 | 8763 | # Copyright 2012 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 |
andre-senna/opencog | opencog/python/learning/bayesian_learning/structure.py | 34 | 4084 | from learning.bayesian_learning.network import *
from random import randrange, random as rand
from learning.bayesian_learning.util import dim
from sample_data.uci_adult_dataset.main import uci_adult
from utility.evolutionary import *
from utility.numeric.information_theory import mutual_information
from math import log... | agpl-3.0 |
lmprice/ansible | lib/ansible/modules/network/iosxr/iosxr_command.py | 23 | 6980 | #!/usr/bin/python
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],... | gpl-3.0 |
amenonsen/ansible | lib/ansible/modules/network/cloudengine/ce_ip_interface.py | 37 | 24036 | #!/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 |
kernel64/AutobahnPython | examples/wamp/rpc/profile/client.py | 26 | 2975 | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## 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-2.0 |
LUTAN/tensorflow | tensorflow/contrib/slim/python/slim/data/tfexample_decoder_test.py | 11 | 29282 | # 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 |
sileht/deb-openstack-nova | nova/auth/signer.py | 5 | 6609 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 |
Universal-Model-Converter/UMC3.0a | data/Python/x86/Lib/test/test_urllib2.py | 45 | 54239 | import unittest
from test import test_support
import os
import socket
import StringIO
import urllib2
from urllib2 import Request, OpenerDirector
# XXX
# Request
# CacheFTPHandler (hard to write)
# parse_keqv_list, parse_http_list, HTTPDigestAuthHandler
class TrivialTests(unittest.TestCase):
def test_trivial(sel... | mit |
Lab603/PicEncyclopedias | jni-build/jni/include/tensorflow/python/kernel_tests/embedding_ops_test.py | 9 | 23960 | # 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 |
clonly/pywinauto | pywinauto/clipboard.py | 15 | 4134 | # GUI Application automation and testing library
# Copyright (C) 2006 Mark Mc Mahon
#
# This library 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, or (at you... | lgpl-2.1 |
soumyanishan/azure-linux-extensions | VMEncryption/main/oscrypto/rhel_72_lvm/encryptstates/PrereqState.py | 3 | 2854 | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2015 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | apache-2.0 |
weiawe/django | tests/auth_tests/test_signals.py | 312 | 4005 | import datetime
from django.contrib.auth import signals
from django.contrib.auth.models import User
from django.test import TestCase, override_settings
from django.test.client import RequestFactory
@override_settings(USE_TZ=False,
PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLC... | bsd-3-clause |
ModdedPA/android_external_chromium_org | native_client_sdk/src/build_tools/build_version.py | 65 | 1797 | # 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.
"""Small utility library of python functions used during SDK building.
"""
import os
import sys
# pylint: disable=E0602
# Reuse last change utility co... | bsd-3-clause |
gracecox/MagPySV | magpysv/tests/test_tools.py | 2 | 1568 | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 2 16:45:42 2017
Testing functions for tools.py.
@author: Grace Cox and Will Brown
"""
import unittest
import os
from .. import tools
import pandas as pd
import datetime as dt
class DataResamplingTestCase(unittest.TestCase):
"""Set up test case for data resampling"... | mit |
gcd0318/django | django/contrib/flatpages/migrations/0001_initial.py | 134 | 1604 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sites', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='FlatPage',
fields=[
... | bsd-3-clause |
2013Commons/HUE-SHARK | build/env/lib/python2.7/site-packages/Paste-1.7.2-py2.7.egg/paste/debug/debugapp.py | 28 | 2826 | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# (c) 2005 Clark C. Evans
# This module is part of the Python Paste Project and is released under
# the MIT License: http://www.opensource.org/licenses... | apache-2.0 |
naojsoft/qplan | scripts/qexec.py | 1 | 4295 | #!/usr/bin/env python
#
# qexec.py -- Subaru Telescope Queue Execution Tool
#
"""
Usage:
qexec.py --help
qexec.py [options]
"""
import sys, os
from ginga.misc.Bunch import Bunch
from qplan import main, version
defaultServiceName = 'qexecute'
plugins = [
Bunch(name='slewchart', module='SlewChart', klass=... | bsd-3-clause |
shivam1111/odoo | addons/website_mail_group/controllers/main.py | 306 | 7883 | # -*- coding: utf-8 -*-
import datetime
from dateutil import relativedelta
from openerp import tools, SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.website.models.website import slug
from openerp.addons.web.http import request
class MailGroup(http.Controller):
_thread_per_page = 20
_r... | agpl-3.0 |
n3wb13/OpenNfrGui-5.0-1 | lib/python/Plugins/Extensions/MediaPortal/additions/porn/adultbay.py | 1 | 12372 | # -*- coding: utf-8 -*-
###############################################################################################
#
# MediaPortal for Dreambox OS
#
# Coded by MediaPortal Team (c) 2013-2015
#
# This plugin is open source but it is NOT free software.
#
# This plugin may only be distributed to and executed... | gpl-2.0 |
kll334477/NewsScrapy | thepaper/thepaper/spiders/wshang_spider.py | 1 | 5240 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'yinzishao'
"""
手机版没有cookie,更方便
但是pc版的首页是所有分类混在一起的
手机版则是新闻在各个分类,所以爬取的时候需要爬各个分类。
"""
import re
import scrapy
from bs4 import BeautifulSoup
import logging
from thepaper.items import NewsItem
import json
logger = logging.getLogger("WshangSpider")
from thepaper.set... | lgpl-3.0 |
landryb/QGIS | python/ext-libs/pygments/lexers/foxpro.py | 29 | 26220 | # -*- coding: utf-8 -*-
"""
pygments.lexers.foxpro
~~~~~~~~~~~~~~~~~~~~~~
Simple lexer for Microsoft Visual FoxPro source code.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer
from pygm... | gpl-2.0 |
openstack/tempest | tempest/tests/lib/services/identity/v2/test_users_client.py | 7 | 8416 | # Copyright 2016 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 |
tchernomax/ansible | lib/ansible/modules/network/onyx/onyx_igmp.py | 59 | 7850 | #!/usr/bin/python
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
Big-B702/python-for-android | python3-alpha/python3-src/Lib/_pyio.py | 45 | 69934 | """
Python implementation of the io module.
"""
import os
import abc
import codecs
import warnings
# Import _thread instead of threading to reduce startup cost
try:
from _thread import allocate_lock as Lock
except ImportError:
from _dummy_thread import allocate_lock as Lock
import io
from io import (__all__, ... | apache-2.0 |
avadacatavra/servo | tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py | 11 | 1998 | from os import path;
SETUP_FILE_TEMPLATE = "{}-test"
EXPECTATION_FILE_TEMPLATE = "{}-expected"
EXPECTATION_HTML_SCAFFOLD = "iframe-expectation-doc.html.py-str"
DEBUGGING_HTML_SCAFFOLD = "debugging-single-test.html.py-str"
DEFAULT_RESOURCE_DIR = path.join("cookies", "http-state", "resources")
DEFAULT_TEST_DIR = "test-... | mpl-2.0 |
betoesquivel/PLYpractice | env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py | 2936 | 3291 | ######################## 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 |
archesproject/arches | arches/management/commands/card_component.py | 1 | 3937 | """
ARCHES - a program developed to inventory and manage immovable cultural heritage.
Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund
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 Founda... | agpl-3.0 |
wroersma/volatility | volatility/plugins/overlays/windows/win10.py | 1 | 21936 | # Volatility
# Copyright (c) 2008-2015 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
# published by the Free Software Foundation. You may not use, modify or
# distribu... | gpl-2.0 |
titom1986/CouchPotatoServer | libs/caper/helpers.py | 81 | 2210 | # Copyright 2013 Dean Gardiner <gardiner91@gmail.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/LICENSE-2.0
#
# Unless required by applicable law or a... | gpl-3.0 |
sephii/django | django/contrib/gis/tests/distapp/models.py | 36 | 1383 | from django.contrib.gis.db import models
from django.contrib.gis.tests.utils import gisfield_may_be_null
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class NamedModel(models.Model):
name = models.CharField(max_length=30)
objects = models.GeoManager()
class M... | bsd-3-clause |
Karosuo/Linux_tools | xls_handlers/xls_sum_venv/lib/python3.6/site-packages/setuptools/extension.py | 299 | 1729 | import re
import functools
import distutils.core
import distutils.errors
import distutils.extension
from setuptools.extern.six.moves import map
from .monkey import get_unpatched
def _have_cython():
"""
Return True if Cython can be imported.
"""
cython_impl = 'Cython.Distutils.build_ext'
try:
... | gpl-3.0 |
aYukiSekiguchi/ACCESS-Chromium | chrome/test/chromeos/autotest/files/client/site_tests/network_PyAutoConnectivityTests/network_PyAutoConnectivityTests.py | 1 | 3025 | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import dbus
import os
import pwd
import shutil
import subprocess
from autotest_lib.client.bin import utils
from autotest_lib.client.cros import constant... | bsd-3-clause |
cchurch/ansible | lib/ansible/modules/cloud/misc/proxmox_template.py | 77 | 8250 | #!/usr/bin/python
#
# Copyright: Ansible Project
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'... | gpl-3.0 |
gregdek/ansible | lib/ansible/modules/remote_management/ucs/ucs_timezone.py | 46 | 4938 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
StefanWinterfeldt/Buildicator | messageSinks/consoleMessageSink.py | 1 | 2127 | # Copyright 2014 Stefan Winterfeldt <stefan.winterfeldt@bitz.it>
# <stefan.winterfeldt@outlook.de
# BITZ GmbH <info@bitz.it>
#
#This file is part of Buildicator.
#
#Buildicator is free software: you can redistribute it and/or modify
#it under the terms of the GN... | gpl-3.0 |
IMIO/django-fixmystreet | django_fixmystreet/api/reports/serializers.py | 1 | 1936 | # -*- coding: utf-8 -*-
from rest_framework import serializers
from . import models
class ReportAssignmentAcceptSerializer(serializers.Serializer):
reference_id = serializers.CharField()
comment = serializers.CharField(required=False)
created_at = serializers.DateTimeField()
def restore_object(self... | agpl-3.0 |
xiejianying/pjsip_trunk | pjsip-apps/src/pygui/chatgui.py | 26 | 12278 | # $Id$
#
# pjsua Python GUI Demo
#
# Copyright (C)2013 Teluu Inc. (http://www.teluu.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) ... | gpl-2.0 |
dyoung418/tensorflow | tensorflow/contrib/gan/python/features/python/conditioning_utils_impl.py | 32 | 3816 | # 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 |
CapeDrew/DITK | Wrapping/WrapITK/Languages/Python/Tests/GeodesicActiveContourImageFilter.py | 13 | 6169 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | apache-2.0 |
cuboxi/android_external_chromium_org | tools/telemetry/telemetry/page/actions/click_element_unittest.py | 23 | 3183 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.core import util
from telemetry.page.actions import click_element
from telemetry.page.actions import wait
from telemetry.unittest import t... | bsd-3-clause |
daltenty/kernel-ubuntu.trusty-vgt | Documentation/target/tcm_mod_builder.py | 868 | 40692 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... | gpl-2.0 |
40223137/2015cbaa | static/Brython3.1.0-20150301-090019/Lib/unittest/runner.py | 637 | 7485 | """Running tests"""
import sys
import time
import warnings
from . import result
from .signals import registerResult
__unittest = True
class _WritelnDecorator(object):
"""Used to decorate file-like objects with a handy 'writeln' method"""
def __init__(self,stream):
self.stream = stream
def __ge... | gpl-3.0 |
sertac/django | django/utils/dates.py | 590 | 2296 | "Commonly-used date structures"
from django.utils.translation import pgettext_lazy, ugettext_lazy as _
WEEKDAYS = {
0: _('Monday'), 1: _('Tuesday'), 2: _('Wednesday'), 3: _('Thursday'), 4: _('Friday'),
5: _('Saturday'), 6: _('Sunday')
}
WEEKDAYS_ABBR = {
0: _('Mon'), 1: _('Tue'), 2: _('Wed'), 3: _('Thu'),... | bsd-3-clause |
isyippee/nova | nova/rdp/__init__.py | 71 | 1075 | # Copyright 2014 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 |
nickaugust/pychatkit | clients.py | 1 | 1973 | #!/usr/bin/env python
import asyncio
import logging
logger = logging.getLogger("chatkit:" + __name__)
class WSClientManager:
def __init__(self):
self._clients = []
def all(self):
return self._clients
def add(self, client):
logging.info("+ WSClient {}".format(client))
self... | mit |
cernops/python-neutronclient | neutronclient/common/serializer.py | 2 | 14984 | # Copyright 2013 OpenStack Foundation.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
kfox1111/horizon | openstack_dashboard/dashboards/project/data_processing/data_sources/urls.py | 39 | 1311 | # 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 the... | apache-2.0 |
ayumilong/rethinkdb | external/v8_3.30.33.16/build/gyp/pylib/gyp/generator/xcode.py | 526 | 54812 | # 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.
import filecmp
import gyp.common
import gyp.xcodeproj_file
import errno
import os
import sys
import posixpath
import re
import shutil
import subprocess
import temp... | agpl-3.0 |
repotvsupertuga/repo | script.module.urlresolver/lib/urlresolver/plugins/realdebrid.py | 2 | 10336 | """
URLResolver Addon for Kodi
Copyright (C) 2016 t0mm0, tknorris
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 late... | gpl-2.0 |
rajalokan/nova | nova/tests/unit/scheduler/test_client.py | 2 | 4676 | # Copyright (c) 2014 Red Hat, 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... | apache-2.0 |
cc-archive/svn-liblicense | po/polib.py | 2 | 37764 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# License: MIT (see LICENSE file provided)
### Description {{{
"""
A library to manipulate gettext catalogs files (aka .po and .mo files).
polib allows you to manipulate, create, modify gettext .pot/.po/.mo
files. You can load existing files, iterate through it's ent... | lgpl-2.1 |
ghedsouza/django | tests/custom_managers/tests.py | 8 | 24196 | from django.db import models
from django.test import TestCase
from .models import (
Book, Car, CustomManager, CustomQuerySet, DeconstructibleCustomManager,
FastCarAsBase, FastCarAsDefault, FunPerson, OneToOneRestrictedModel,
Person, PersonFromAbstract, PersonManager, PublishedBookManager,
RelatedModel,... | bsd-3-clause |
terabit-software/dynamic-stream-server | dss/tools/noxml.py | 2 | 1318 | """"
Transform XML in usable stuff
"""
from __future__ import absolute_import
from xml.etree import ElementTree
import itertools
import operator
__all__ = 'load', 'load_node'
def _sorted_groupby(thing, key=None):
return itertools.groupby(sorted(thing, key=key), key=key)
def load(file, list... | bsd-3-clause |
UTNkar/moore | src/home/migrations/0050_auto_20210401_1343.py | 1 | 94384 | # Generated by Django 3.1.7 on 2021-04-01 11:43
import blocks.models
from django.db import migrations
import google.models
import involvement.blocks.contact_card_block
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
... | agpl-3.0 |
likit/BioUtils | fetch_entrez_from_geneid.py | 1 | 1631 | '''Selects protein sequences from NCBI that are in a list
from Geisha text file.
Output is written to standard output.
'''
import os
import sys
import time
from Bio import SeqIO, Entrez
def parse(infile):
'''Return a set of gene IDs from an input file.'''
for line in open(infile):
geneid = line.spl... | bsd-2-clause |
shupelneker/gae_new_structure | boilerplate/external/linkedin/models.py | 28 | 2000 | import collections
AccessToken = collections.namedtuple('AccessToken', ['access_token', 'expires_in'])
class LinkedInRecipient(object):
def __init__(self, member_id, email, first_name, last_name):
assert member_id or email, 'Either member ID or email must be given'
if member_id:
self.... | lgpl-3.0 |
forseti-security/forseti-security | tests/services/scanner/scanner_base_db.py | 1 | 4263 | """Helper base class for testing scanners."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import datetime
from datetime import timedelta
import os
import unittest.mock as mock
from sqlalchemy.orm import sessionmaker
from google.cloud.fors... | apache-2.0 |
pramasoul/micropython | tests/basics/bytes.py | 23 | 1172 | # literals
print(b'123')
print(br'123')
print(rb'123')
print(b'\u1234')
# construction
print(bytes())
print(bytes(b'abc'))
# make sure empty bytes is converted correctly
print(str(bytes(), 'utf-8'))
a = b"123"
print(a)
print(str(a))
print(repr(a))
print(a[0], a[2])
print(a[-1])
print(str(a, "utf-8"))
print(str(a, "u... | mit |
vatlab/SOS | src/sos/tasks.py | 1 | 77822 | #!/usr/bin/env python3
#
# Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center
# Distributed under the terms of the 3-clause BSD License.
import copy
import os
import fasteners
import pickle
import time
import lzma
import math
import struct
from enum import Enum
from collections import namedtupl... | gpl-3.0 |
jasondunsmore/heat | contrib/rackspace/heat_keystoneclient_v2/client.py | 2 | 10520 | #
# 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 |
okfn/bibserver | bibserver/importer.py | 3 | 3360 | # the data import manager
# gets an uploaded file or retrieves a file from a URL
# indexes the records found in the file by upserting via the DAO
import urllib2
import re
from cStringIO import StringIO
import unicodedata
import uuid
import json
import bibserver.dao
import bibserver.util as util
from bibserver.config i... | mit |
h4ck3rm1k3/pip | pip/_vendor/html5lib/treebuilders/__init__.py | 1730 | 3405 | """A collection of modules for building different kinds of tree from
HTML documents.
To create a treebuilder for a new type of tree, you need to do
implement several things:
1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders... | mit |
crosswalk-project/chromium-crosswalk-efl | chrome/tools/build/win/sln_deps.py | 170 | 3936 | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import optparse
__version__ = "1.0"
# Constants used by Visual Studio.
UNKNOWN_GUID = "{00000000-0000-0000-0000-00000... | bsd-3-clause |
bjodah/PyLaTeX | pylatex/base_classes/command.py | 1 | 10139 | # -*- coding: utf-8 -*-
"""
This module implements a class that implements a latex command.
This can be used directly or it can be inherited to make an easier interface
to it.
.. :copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .latex_object import LatexObject
from ..... | mit |
sapientsalamander/Pi_Packet_Project | sender_files/python_files/lcd_packet_generation.py | 1 | 6475 | """Configures a scapy packet with user input from the lcd screen.
Uses the LCD_Input_Wrapper class to interact with the user. All functions
that use the screen directly require a lock object so that only one function
can write to the screen at a time; otherwise garbage may result.
configure_delay: gets the delay betw... | mit |
c0defreak/python-for-android | python-build/python-libs/gdata/src/gdata/Crypto/PublicKey/pubkey.py | 228 | 6269 | #
# pubkey.py : Internal functions for public key operations
#
# Part of the Python Cryptography Toolkit
#
# Distribute and use freely; there are no restrictions on further
# dissemination and usage except those imposed by the laws of your
# country of residence. This software is provided "as is" without
# warranty... | apache-2.0 |
ARMP/bproj-black | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | 2058 | # failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | gpl-2.0 |
robynbergeron/ansible-modules-extras | cloud/cloudstack/cs_template.py | 19 | 20197 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# 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 Lice... | gpl-3.0 |
vanpire110/rsyslog | plugins/impstats/statslog_regex.py | 23 | 1285 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# * Copyright (C) 2013 Adiscon GmbH.
# * This file is part of RSyslog
# *
# * Helper script which includes REGEX definitions
# *
import sys
import re
# Create regex for loglines
loglineregexes = []
loglineindexes = []
# Traditional Format
# Sample Line: Jun 26 14:21:... | gpl-3.0 |
manipopopo/tensorflow | tensorflow/contrib/linear_optimizer/python/sdca_optimizer.py | 13 | 13095 | """Linear Estimators."""
# 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
#
#... | apache-2.0 |
marcwebbie/youtube-dl | youtube_dl/extractor/cliprs.py | 81 | 1030 | # coding: utf-8
from __future__ import unicode_literals
from .onet import OnetBaseIE
class ClipRsIE(OnetBaseIE):
_VALID_URL = r'https?://(?:www\.)?clip\.rs/(?P<id>[^/]+)/\d+'
_TEST = {
'url': 'http://www.clip.rs/premijera-frajle-predstavljaju-novi-spot-za-pesmu-moli-me-moli/3732',
'md5': 'c41... | unlicense |
davislidaqing/Mcoderadius | toughradius/console/admin/issues.py | 5 | 6695 | #!/usr/bin/env python
#coding:utf-8
from bottle import Bottle
from bottle import request
from bottle import response
from bottle import redirect
from bottle import static_file
from bottle import mako_template as render
from tablib import Dataset
from sqlalchemy import func
from toughradius.console import models
from t... | agpl-3.0 |
csnake-org/CSnake | src/csnCompile.py | 2 | 8882 | ## @package csnCompile
# General compilation options related classes.
import csnUtility
import os
class CompileAndLinkSettings:
"""
Helper class containing the settings that must be passed to the compiler and linker to build a target.
"""
def __init__(self):
self.definitions = list()
... | bsd-3-clause |
arunkgupta/gramps | gramps/gen/filters/rules/person/_ischildoffiltermatch.py | 1 | 2492 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
#
# 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 you... | gpl-2.0 |
Asana/boto | boto/cloudsearch/sourceattribute.py | 153 | 3156 | # Copyright (c) 202 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 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 ... | mit |
kangxu/crosswalk-test-suite | webapi/tct-sse-w3c-tests/sse-py/support/sse.py | 25 | 1775 | # Copyright (c) 2012 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this list
# of conditions and the following disclaimer.... | bsd-3-clause |
gavoski/audacity | lib-src/lv2/lv2/waflib/Tools/d_scan.py | 292 | 3029 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import re
from waflib import Utils,Logs
def filter_comments(filename):
txt=Utils.readf(filename)
i=0
buf=[]
max=len(txt)
begin=0
while i<max:
c=txt[i]
if c=='"'or c=... | gpl-2.0 |
simonpatrick/bite-project | deps/gdata-python-client/tests/all_tests_coverage.py | 39 | 1721 | #!/usr/bin/env python
#
# Copyright (C) 2009 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... | apache-2.0 |
DCSaunders/tensorflow | tensorflow/python/framework/subscribe.py | 24 | 6635 | # 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 |
kaiserroll14/301finalproject | main/pandas/tseries/timedeltas.py | 9 | 3765 | """
timedelta support tools
"""
import re
import numpy as np
import pandas.tslib as tslib
from pandas import compat
from pandas.core.common import (ABCSeries, is_integer_dtype,
is_timedelta64_dtype, is_list_like,
isnull, _ensure_object, ABCIndexClass)
fro... | gpl-3.0 |
jimsimon/sky_engine | tools/clang/scripts/generate_win_compdb.py | 93 | 2890 | #!/usr/bin/env python
# Copyright 2014 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.
"""
Clang tools on Windows are still a bit busted. The tooling can't handle
backslashes in paths, doesn't understand how to read .rsp f... | bsd-3-clause |
chubbymaggie/claripy | claripy/frontend_mixins/constraint_expansion_mixin.py | 2 | 1754 | #!/usr/bin/env python
import logging
l = logging.getLogger("claripy.frontends.cache_mixin")
class ConstraintExpansionMixin(object):
def eval(self, e, n, extra_constraints=(), exact=None, **kwargs):
results = super(ConstraintExpansionMixin, self).eval(
e, n,
extra_constraints=extra_... | bsd-2-clause |
jerpat/csmake | csmake-providers/CsmakeProviders/__init__.py | 3 | 1456 | # <copyright>
# (c) Copyright 2017 Hewlett Packard Enterprise Development LP
#
# 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 ve... | gpl-3.0 |
nicholasserra/sentry | src/sentry/plugins/base/configuration.py | 7 | 3452 | from __future__ import absolute_import
import logging
from sentry import options
from sentry.models import ProjectOption
from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from django.core.urlresolvers import reverse
fr... | bsd-3-clause |
mfazliazran/raft | widgets/RequestResponseDetailWidget.py | 11 | 3588 | #
# Author: Gregory Fleischer (gfleischer@gmail.com)
#
# Copyright (c) 2011 RAFT Team
#
# This file is part of RAFT.
#
# RAFT 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... | gpl-3.0 |
cheery/spirthon | annotator.py | 1 | 5192 | # Annotator needs to find the least generic type for everything.
# To do that, it needs to hold a model of our types.
class Annotator(object):
def __init__(self, unit):
self.unit = unit
self.stack = []
def update(self, func):
for block in func:
for op in block.ops:
... | mit |
Maspear/odoo | openerp/exceptions.py | 312 | 3157 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | agpl-3.0 |
picoCTF/picoCTF-Platform-1 | api/autogenerators/trythemall.py | 2 | 1957 | __author__ = "Collin Petty"
__copyright__ = "Carnegie Mellon University"
__license__ = "MIT"
__maintainer__ = ["Collin Petty", "Peter Chapman"]
__credits__ = ["David Brumely", "Collin Petty", "Peter Chapman"]
__email__ = ["collin@cmu.edu", "peter@cmu.edu"]
__status__ = "Production"
import os
import random
import hashli... | mit |
hramrach/linux-sunxi | Documentation/target/tcm_mod_builder.py | 337 | 24391 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... | gpl-2.0 |
marcoserafini/h-store | scripts/markov/markov-experiments.py | 9 | 18013 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
# Copyright (C) 2011 by H-Store Project
# Brown University
# Massachusetts Institute of Technology
# Yale University
#
# http://hstore.cs.brown.edu/
#
# Permission is hereby granted, free of charge,... | gpl-3.0 |
tibor95/phatch-python2.7 | build/lib.linux-i686-2.7/phatch/core/pil.py | 1 | 26512 | # Phatch - Photo Batch Processor
# Copyright (C) 2007-2009 www.stani.be
#
# 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-3.0 |
ansible/ansible | test/units/executor/test_interpreter_discovery.py | 38 | 4130 | # -*- coding: utf-8 -*-
# (c) 2019, Jordan Borean <jborean@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat.mock import Magic... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.