repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
wackou/bts_tools | bts_tools/feed_providers/fixer.py | 1 | 1631 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# bts_tools - Tools to easily manage the bitshares client
# Copyright (c) 2017 Nicolas Wack <wackou@gmail.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 Softwa... | gpl-3.0 |
blueboxgroup/cinder | cinder/openstack/common/gettextutils.py | 36 | 18036 | # Copyright 2012 Red Hat, Inc.
# Copyright 2013 IBM Corp.
# 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.... | apache-2.0 |
gameduell/duell | bin/mac/python2.7.9/lib/python2.7/Queue.py | 82 | 8577 | """A multi-producer, multi-consumer queue."""
from time import time as _time
try:
import threading as _threading
except ImportError:
import dummy_threading as _threading
from collections import deque
import heapq
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
class Empty(Exception):
"... | bsd-2-clause |
noelbk/neutron-juniper | neutron/db/migration/alembic_migrations/versions/63afba73813_ovs_tunnelendpoints_id_unique.py | 16 | 1714 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 OpenStack Foundation
#
# 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... | apache-2.0 |
mancoast/CPythonPyc_test | fail/334_test__locale.py | 112 | 7055 | from _locale import (setlocale, LC_ALL, LC_CTYPE, LC_NUMERIC, localeconv, Error)
try:
from _locale import (RADIXCHAR, THOUSEP, nl_langinfo)
except ImportError:
nl_langinfo = None
import codecs
import locale
import sys
import unittest
from platform import uname
from test.support import run_unittest
if uname().... | gpl-3.0 |
JVenberg/PokemonGo-Bot-Desktop | pywin/Lib/pipes.py | 179 | 9582 | """Conversion pipeline templates.
The problem:
------------
Suppose you have some data that you want to convert to another format,
such as from GIF image format to PPM image format. Maybe the
conversion involves several steps (e.g. piping it through compress or
uuencode). Some of the conversion steps may require th... | mit |
javierTerry/odoo | addons/account_chart/__init__.py | 526 | 1055 | # -*- 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... | agpl-3.0 |
jskew/gnuradio | gr-trellis/examples/python/test_cpm.py | 21 | 5544 | #!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: CPM test
# Author: Achilleas Anastasopoulos
# Description: gnuradio flow graph
# Generated: Thu Feb 19 23:16:23 2009
##################################################
from gnuradio import gr
from gnuradio im... | gpl-3.0 |
scs/uclinux | user/python/python-2.4.4/Lib/sgmllib.py | 5 | 16498 | """A parser for SGML, using the derived class as a static DTD."""
# XXX This only supports those SGML features used by HTML.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are ... | gpl-2.0 |
sergiusens/snapcraft | tests/integration/store/test_store_registered.py | 3 | 1309 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016-2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | gpl-3.0 |
romain-dartigues/ansible | lib/ansible/module_utils/network/f5/icontrol.py | 21 | 17577 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017, F5 Networks Inc.
# 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
import os
try:
from StringIO import StringIO
except ImportError:
... | gpl-3.0 |
ArcherSys/ArcherSys | Lib/idlelib/EditorWindow.py | 1 | 201104 | <<<<<<< HEAD
<<<<<<< HEAD
import importlib
import importlib.abc
import importlib.util
import os
import platform
import re
import string
import sys
from tkinter import *
import tkinter.simpledialog as tkSimpleDialog
import tkinter.messagebox as tkMessageBox
import traceback
import webbrowser
from idlelib.MultiCall impo... | mit |
Just-D/panda3d | contrib/src/sceneeditor/controllerWindow.py | 8 | 37135 | #################################################################
# controllerWindow.py
# Written by Yi-Hong Lin, yihhongl@andrew.cmu.edu, 2004
#################################################################
from direct.tkwidgets.AppShell import AppShell
from Tkinter import Frame, Label, Button
import string, Pmw, T... | bsd-3-clause |
ccpgames/eve-metrics | web2py/scripts/cpdb.py | 1 | 25636 | import os
import sys
from collections import deque
import string
import argparse
import cStringIO
import operator
import cPickle as pickle
from collections import deque
import math
import re
import cmd
import readline
try:
from gluon import DAL
except ImportError as err:
print('gluon path not fo... | mit |
ProfessionalIT/maxigenios-website | sdk/google_appengine/lib/django-1.5/django/contrib/comments/admin.py | 96 | 3680 | from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.comments.models import Comment
from django.utils.translation import ugettext_lazy as _, ungettext
from django.contrib.comments import get_model
from django.contrib.comments.views.... | mit |
koery/win-sublime | Data/Packages/Default/send2trash/plat_other.py | 2 | 5273 | # Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
# This is a reimplementation of plat_othe... | mit |
lightcn/odoo | addons/website_twitter/controllers/main.py | 355 | 1936 | from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.tools.translate import _
import json
class Twitter(http.Controller):
@http.route(['/twitter_reload'], type='json', auth="user", website=True)
def twitter_reload(self):
return request.website.fetch_favorite_twe... | agpl-3.0 |
antillie/generic-rpg | gamedata/characters/npc.py | 1 | 7178 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pygame
import colors
import utils
import pyganim
# This class represents a random NPC.
class npc(pygame.sprite.Sprite):
# Init builds everything.
def __init__(self, cache, direction, width=32, height=48):
# Call the parent class constructor.
... | gpl-3.0 |
DarkStarSword/linux | tools/perf/scripts/python/syscall-counts.py | 1996 | 1700 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... | gpl-2.0 |
dvliman/filesync-server | src/backends/db/schemas/fsync_shard/patch_3.py | 6 | 1065 | # Copyright 2008-2015 Canonical
#
# 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
# License, or (at your option) any later version.
#
# This program is distributed... | agpl-3.0 |
shuangsong/pattern | examples/04-search/07-exclude.py | 21 | 1844 | import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
from pattern.search import match
from pattern.en import Sentence, parse
# This example demonstrates how to exclude certain words or tags from a constraint.
# It also demonstrates the use of "^",
# for a constraint that can on... | bsd-3-clause |
masayukig/tempest | tempest/api/compute/servers/test_instance_actions_negative.py | 3 | 2008 | # Copyright 2013 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 ... | apache-2.0 |
ostravaTokyo/hfls | python/test.py | 1 | 1473 | import numpy as np
from scipy import sparse
import scipy.sparse.linalg as spla
import pylab as plt
from scipy.linalg import block_diag
#
#
nSub = 2
def load_matrix_basic(pathToFile,makeSparse,makeSymmetric, offset):
f0 = open(pathToFile).readlines()
firstLine = f0.pop(0) #removes the first line
tmp = np.z... | unlicense |
rockneurotiko/django | tests/model_meta/tests.py | 169 | 11727 | from django.apps import apps
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.core.exceptions import FieldDoesNotExist
from django.db.models.fields import CharField, Field, related
from django.db.models.options import EMPTY_RELATION_TREE, IMMUTABLE_WARNING
from djan... | bsd-3-clause |
magyarm/periphondemand-code | src/bin/core/hdl_file.py | 1 | 3658 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Name: Hdl_file.py
# Purpose:
# Author: Fabien Marteau <fabien.marteau@armadeus.com>
# Created: 30/05/2008
#-----------------------------------------------------------------------------
# C... | lgpl-2.1 |
TimJay/platformio | tests/commands/test_lib.py | 9 | 2036 | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
from os import listdir
from os.path import isdir, isfile, join
import re
from platformio.commands.lib import cli
from platformio import util
def validate_libfolder():
libs_path = util.get_lib_dir()
installed_libs = listdir(libs_path)... | mit |
TylerKirby/cltk | cltk/semantics/latin/lookup.py | 1 | 5652 | """This module is designed around looking up synonyms for Latin and Greek words.
The synonym and translation dictionaries used by this module were originally
developed by Chris Forstall and James Gawley of the Tesserae Project (http://github.com/tesserae).
In addition to looking up alternate words, this module is desi... | mit |
apache/libcloud | libcloud/utils/loggingconnection.py | 4 | 5472 | # 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 use ... | apache-2.0 |
onceuponatimeforever/oh-mainline | vendor/packages/celery/celery/utils/mail.py | 18 | 4826 | # -*- coding: utf-8 -*-
"""
celery.utils.mail
~~~~~~~~~~~~~~~~~
How task error emails are formatted and sent.
:copyright: (c) 2009 - 2011 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import sys
import smtplib
try:
from email.mime.text... | agpl-3.0 |
Pluto-tv/chromium-crosswalk | third_party/cython/src/Cython/Build/BuildExecutable.py | 98 | 4286 | """
Compile a Python script into an executable that embeds CPython and run it.
Requires CPython to be built as a shared library ('libpythonX.Y').
Basic usage:
python cythonrun somefile.py [ARGS]
"""
DEBUG = True
import sys
import os
from distutils import sysconfig
def get_config_var(name, default=''):
retu... | bsd-3-clause |
chaosblog/pyload | module/InitHomeDir.py | 40 | 2675 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
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.
This prog... | gpl-3.0 |
xombiemp/CouchPotatoServer | couchpotato/core/notifications/telegrambot.py | 7 | 2412 | from couchpotato.core.helpers.variable import splitString
from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification
import requests
import six
log = CPLog(__name__)
autoload = 'TelegramBot'
class TelegramBot(Notification):
TELEGRAM_API = "https://api.telegram.org/bot... | gpl-3.0 |
rayleyva/python-oauth2 | oauth2/__init__.py | 458 | 29044 | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | mit |
chriskiehl/python-stix | stix/coa/objective.py | 1 | 6238 | # Copyright (c) 2015, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import stix
from stix.common import StructuredTextList, Confidence
import stix.bindings.course_of_action as coa_binding
class Objective(stix.Entity):
_binding = coa_binding
_binding_class = coa_binding.Obj... | bsd-3-clause |
berrange/nova | nova/openstack/common/strutils.py | 7 | 10867 | # Copyright 2011 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 |
jcpowermac/ansible | lib/ansible/module_utils/redhat.py | 141 | 10351 | # 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 |
jarrodmcc/OpenFermion | src/openfermion/utils/_commutators.py | 1 | 12601 | # 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
# distribu... | apache-2.0 |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/effective_network_security_group.py | 1 | 2037 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
sometallgit/AutoUploader | Python27/Lib/test/test_gl.py | 45 | 6730 | """Very simple test script for the SGI gl library extension module
taken mostly from the documentation.
Roger E. Masse
"""
import unittest
from test.test_support import verbose, import_module
import time
gl = import_module('gl')
GL = import_module('GL')
glattrs = ['RGBcolor', 'RGBcursor', 'RGBmode', 'RGBrange'... | mit |
LEDS/gde | wsgi/gde/gde/urls.py | 2 | 2388 | """gde URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | gpl-3.0 |
tensorflow/models | research/object_detection/exporter_lib_tf2_test.py | 1 | 16219 | # Lint as: python2, python3
# Copyright 2020 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 |
haruwo/thrift-with-java-annotation-support | lib/py/src/Thrift.py | 253 | 4543 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 |
SurfasJones/icecream-info | icecream/lib/python2.7/site-packages/django/contrib/comments/admin.py | 178 | 3736 | from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.comments.models import Comment
from django.utils.translation import ugettext_lazy as _, ungettext_lazy
from django.contrib.comments import get_model
from django.contrib.comments.v... | mit |
riklaunim/django-custom-multisite | django/utils/safestring.py | 57 | 3954 | """
Functions for working with "safe strings": strings that can be displayed safely
without further escaping in HTML. Marking something as a "safe string" means
that the producer of the string has already turned characters that should not
be interpreted by the HTML engine (e.g. '<') into the appropriate entities.
"""
f... | bsd-3-clause |
un33k/django-material | tests/integration/tests/test_radioselect.py | 10 | 4721 | import json
from django import forms
from django_webtest import WebTest
from . import build_test_urls
class RadioSelectForm(forms.Form):
test_field = forms.ChoiceField(
choices=(('V', 'Visa'), ('M', 'MasterCard'), ('P', 'Paypal')),
widget=forms.RadioSelect(attrs={'data-test': 'Test Attr'}))
d... | bsd-3-clause |
miltonruelas/cursotecnico | branch/account_bank_voucher_transfer/__init__.py | 8 | 1466 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2013 Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be used by professional
# programmers who take t... | agpl-3.0 |
AgostonSzepessy/servo | components/script/dom/bindings/codegen/parser/tests/test_method.py | 83 | 7795 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
interface TestMethods {
void basic();
static void basicStatic();
void basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
boolean basicBoolean();
static boolean basicStaticBoolean... | mpl-2.0 |
ZerpaTechnology/AsenZor | static/js/brython/Lib/collections/__init__.py | 9 | 35828 | #__all__ = ['deque', 'defaultdict', 'Counter']
from _collections import deque, defaultdict
#from itertools import repeat as _repeat, chain as _chain, starmap as _starmap
__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList',
'UserString', 'Counter', 'OrderedDict']
# For bootstra... | lgpl-3.0 |
Kri-7-q/glimpse_client-1 | 3rdparty/breakpad/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest.py | 2826 | 21261 | #!/usr/bin/env python
#
# Copyright 2005 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... | bsd-3-clause |
harwee/electrum-xvg-tor | lib/websockets.py | 9 | 4728 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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 y... | gpl-3.0 |
aperigault/ansible | test/units/playbook/test_attribute.py | 78 | 1815 | # (c) 2015, Marius Gedminas <marius@gedmin.as>
#
# 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 vers... | gpl-3.0 |
Icenowy/linux-kernel-u8800-aosc-oses | Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# 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 i... | gpl-2.0 |
redhat-openstack/horizon | horizon/test/tests/babel_extract_angular.py | 22 | 5875 | # Copyright 2015, Rackspace, US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
tunneln/CarnotKE | jyhton/lib-python/2.7/test/test_symtable.py | 116 | 6311 | """
Test the API of the symtable module.
"""
import symtable
import unittest
from test import test_support
TEST_CODE = """
import sys
glob = 42
class Mine:
instance_var = 24
def a_method(p1, p2):
pass
def spam(a, b, *var, **kw):
global bar
bar = 47
x = 23
glob
def internal():
... | apache-2.0 |
toontownfunserver/Panda3D-1.9.0 | python/Lib/site-packages/pip/util.py | 343 | 24172 | import sys
import shutil
import os
import stat
import re
import posixpath
import zipfile
import tarfile
import subprocess
import textwrap
from pip.exceptions import InstallationError, BadCommand, PipError
from pip.backwardcompat import(WindowsError, string_types, raw_input,
console_to_s... | bsd-3-clause |
huntxu/neutron | neutron/services/externaldns/drivers/designate/driver.py | 2 | 7248 | # Copyright (c) 2016 IBM
# 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 appli... | apache-2.0 |
krintoxi/NoobSec-Toolkit | NoobSecToolkit - MAC OSX/tools/inject/lib/core/threads.py | 5 | 6237 | #!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import difflib
import threading
import time
import traceback
from thread import error as ThreadError
from lib.core.data import conf
from lib.core.data import kb
from lib.cor... | gpl-2.0 |
idea4bsd/idea4bsd | python/lib/Lib/site-packages/django/core/validators.py | 158 | 6583 | import re
import urlparse
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode
# These values, if given to validate(), will trigger the self.required check.
EMPTY_VALUES = (None, '', [], (), {})
try:
from django... | apache-2.0 |
dmitry-sobolev/ansible | lib/ansible/modules/packaging/os/pkg5.py | 42 | 5050 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2014 Peter Oliver <ansible@mavit.org.uk>
#
# 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 o... | gpl-3.0 |
alfredodeza/boto | boto/rds2/layer1.py | 72 | 159622 | # Copyright (c) 2014 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 |
MediaKraken/MediaKraken_Deployment | source/common/common_network_twitchv5.py | 1 | 3966 | """
Copyright (C) 2018 Quinn D Granfor <spootdev@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
... | gpl-3.0 |
hanw/p4-hlir | p4_hlir/frontend/semantic_check.py | 1 | 54821 | # Copyright 2013-present Barefoot Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 |
kjc88/sl4a | python/src/Lib/encodings/big5hkscs.py | 816 | 1039 | #
# big5hkscs.py: Python Unicode Codec for BIG5HKSCS
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_hk, codecs
import _multibytecodec as mbc
codec = _codecs_hk.getcodec('big5hkscs')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.Multib... | apache-2.0 |
agileblaze/OpenStackTwoFactorAuthentication | openstack_dashboard/dashboards/admin/overview/panel.py | 70 | 1058 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
alexsavio/scikit-learn | sklearn/datasets/svmlight_format.py | 41 | 16768 | """This module implements a loader and dumper for the svmlight format
This format is a text-based format, with one sample per line. It does
not store zero valued features hence is suitable for sparse dataset.
The first element of each line can be used to store a target variable to
predict.
This format is used as the... | bsd-3-clause |
Cloudzero/cloudzero-reactor-aws | test/integration/metrics/test_events.py | 1 | 5246 | # Copyright (c) 2016-present, CloudZero, Inc. All rights reserved.
# Licensed under the BSD-style license. See LICENSE file in the project root for full license information.
from datetime import datetime, timezone
from unittest.mock import patch
import pytest
from botocore.exceptions import ClientError
from dateutil ... | bsd-3-clause |
jspargo/AneMo | thermo/flask/lib/python2.7/site-packages/werkzeug/debug/__init__.py | 280 | 7800 | # -*- coding: utf-8 -*-
"""
werkzeug.debug
~~~~~~~~~~~~~~
WSGI application traceback debugger.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import json
import mimetypes
from os.path import join, dirname, basename, isfile
... | gpl-2.0 |
hachreak/invenio-oaiharvester | tests/test_harvesting.py | 3 | 2782 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... | gpl-2.0 |
will-moore/openmicroscopy | components/tools/OmeroWeb/omeroweb/webclient/webclient_gateway.py | 4 | 93914 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# webclient_gateway
#
# Copyright (c) 2008-2015 University of Dundee.
#
# 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... | gpl-2.0 |
dkubiak789/OpenUpgrade | addons/pad/pad.py | 64 | 4189 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
import random
import re
import string
import urllib2
import logging
from openerp.tools.translate import _
from openerp.tools import html2plaintext
from py_etherpad import EtherpadLiteClient
_logger = logging.getLogger(__name__)
class pad_common(osv.osv_memor... | agpl-3.0 |
skycucumber/Messaging-Gateway | webapp/venv/lib/python2.7/site-packages/twisted/words/test/test_xpath.py | 40 | 9460 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.trial import unittest
import sys, os
from twisted.words.xish.domish import Element
from twisted.words.xish.xpath import XPathQuery
from twisted.words.xish import xpath
class XPathTest(unittest.TestCase):
def setUp(self):
... | gpl-2.0 |
jdugge/QGIS | python/plugins/db_manager/layer_preview.py | 30 | 5070 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : DB Manager
Description : Database manager plugin for QGIS
Date : May 23, 2011
copyright : (C) 2011 by Giuseppe Sucameli
email : brush.tyler@... | gpl-2.0 |
ganeshkoilada/libforensics | docs/lib/source/conf.py | 13 | 6577 | # -*- coding: utf-8 -*-
#
# LibForensics documentation build configuration file, created by
# sphinx-quickstart on Sat Jan 2 04:59:34 2010.
#
# 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.
#
... | gpl-3.0 |
w1ll1am23/home-assistant | tests/components/roku/test_init.py | 6 | 1464 | """Tests for the Roku integration."""
from unittest.mock import patch
from homeassistant.components.roku.const import DOMAIN
from homeassistant.config_entries import (
ENTRY_STATE_LOADED,
ENTRY_STATE_NOT_LOADED,
ENTRY_STATE_SETUP_RETRY,
)
from homeassistant.helpers.typing import HomeAssistantType
from tes... | apache-2.0 |
hmen89/odoo | openerp/addons/base/tests/test_api.py | 59 | 17630 |
from openerp import models
from openerp.tools import mute_logger
from openerp.osv.orm import except_orm
from openerp.tests import common
class TestAPI(common.TransactionCase):
""" test the new API of the ORM """
def assertIsRecordset(self, value, model):
self.assertIsInstance(value, models.BaseModel... | agpl-3.0 |
hoosteeno/mozillians | vendor-local/lib/python/tablib/packages/odf/namespaces.py | 62 | 4016 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2010 Søren Roug, European Environment Agency
#
# 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... | bsd-3-clause |
byakuinss/spark | python/pyspark/profiler.py | 77 | 5678 | #
# 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 |
yandex/opensourcestand | midi_emitter.py | 1 | 1651 | import sys
import midi
import midi.sequencer as sequencer
import threading
import logging
import events
drums_mapping = {
48: 'tom1',
45: 'tom2',
43: 'floor_tom',
38: 'snare',
40: 'snare_rim',
46: 'hat',
26: 'hat_edge',
42: 'hat_closed',
22: 'hat_closed_edge',
54: 'crash',
5... | gpl-3.0 |
mikeboers/Nitrogen | nitrogen/view/app.py | 1 | 4682 | """nitrogen.view.environ"""
from __future__ import absolute_import
import os
import threading
import logging
import haml
from . import mako
from . import markdown
log = logging.getLogger(__name__)
class ViewAppMixin(object):
"""Environment for working with views/templates.
Attributes:
log -- ... | bsd-3-clause |
nhippenmeyer/django | tests/select_related_regress/tests.py | 206 | 9404 | from __future__ import unicode_literals
from django.test import TestCase
from django.utils import six
from .models import (
A, B, C, Building, Chick, Child, Class, Client, ClientStatus, Connection,
Country, Device, Enrollment, Hen, Item, Organizer, Person, Port,
SpecialClient, State, Student, TUser,
)
c... | bsd-3-clause |
flyingk/mavlink | pymavlink/DFReader.py | 13 | 23900 | #!/usr/bin/env python
'''
APM DataFlash log file reader
Copyright Andrew Tridgell 2011
Released under GNU GPL version 3 or later
Partly based on SDLog2Parser by Anton Babushkin
'''
import struct, time, os
from . import mavutil
FORMAT_TO_STRUCT = {
"b": ("b", None, int),
"B": ("B", None, int),
"h": ("h",... | lgpl-3.0 |
Jonnymcc/ansible | lib/ansible/playbook/role/definition.py | 22 | 8278 | # (c) 2014 Michael DeHaan, <michael@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 ve... | gpl-3.0 |
UQ-UQx/edx-platform_lti | common/test/acceptance/performance/test_lms_performance.py | 62 | 4375 | """
Single page performance tests for LMS.
"""
from bok_choy.web_app_test import WebAppTest, with_cache
from ..pages.lms.auto_auth import AutoAuthPage
from ..pages.lms.courseware import CoursewarePage
from ..pages.lms.dashboard import DashboardPage
from ..pages.lms.course_info import CourseInfoPage
from ..pages.lms.log... | agpl-3.0 |
amifsud/sot-stabilizer | src/dynamic_graph/sot/application/stabilizer/scripts/appli_ds_linear_stabilizer_hrp.py | 2 | 2444 | ###
import sys
import numpy as np
from dynamic_graph import plug
import dynamic_graph.signal_base as dgsb
from dynamic_graph.sot.core import Stack_of_vector, OpPointModifier, MatrixHomoToPose, Multiply_matrixHomo_vector
from dynamic_graph.sot.application.state_observation.initializations.hrp2_model_base_flex_estimator ... | lgpl-3.0 |
Esri/solutions-geoevent-java | data/packages/geoprocessing/visibility/Toolshare/scripts/Shared/CompressionUtility.py | 6 | 4576 | '''
Created on Aug 4, 2010
@author: andr5624
'''
import zipfile
import arcpy
import os
from os.path import isdir, join, normpath, split
class CompressionUtility(object):
'''
This is a class that references common utilities to zip a workspace and unzip a zip file
'''
def __init__(self, fileName, Ac... | apache-2.0 |
zding5/Microblog-Flask | flask/lib/python2.7/site-packages/setuptools/command/install_lib.py | 396 | 3771 | import os
import imp
from itertools import product, starmap
import distutils.command.install_lib as orig
class install_lib(orig.install_lib):
"""Don't add compiled flags to filenames of non-Python files"""
def run(self):
self.build()
outfiles = self.install()
if outfiles is not None:
... | mit |
RedHatQE/pulp-automation | tests/general_tests/test_17_iso_repo_orphans_and_copy.py | 2 | 6538 | import json, pulp_auto, unittest
from tests import pulp_test
from pulp_auto import (Request, )
from pulp_auto.repo import Repo, Importer, Distributor, Association
from pulp_auto.task import Task, TaskFailure
from pulp_auto.units import IsoOrphan, Orphans
from tests.conf.roles import ROLES
from tests.conf.facade.iso imp... | gpl-2.0 |
rledisez/shinken | libexec/link_libvirt_host_vm.py | 22 | 3860 | #!/usr/bin/env python
# Copyright (C) 2012:
# Thibault Cohen, thibault.cohen@savoirfairelinux.com
#
# This file is part of Shinken.
#
# Shinken 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 ... | agpl-3.0 |
AltSchool/django | django/forms/fields.py | 9 | 46316 | """
Field classes.
"""
from __future__ import unicode_literals
import copy
import datetime
import os
import re
import sys
import uuid
from decimal import Decimal, DecimalException
from io import BytesIO
from django.core import validators
from django.core.exceptions import ValidationError
# Provide this import for ba... | bsd-3-clause |
tmerrick1/spack | var/spack/repos/builtin/packages/sparsehash/package.py | 5 | 1556 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
chandler14362/panda3d | tests/bullet/test_bullet_bam.py | 8 | 3969 | import pytest
# Skip these tests if we can't import bullet.
bullet = pytest.importorskip("panda3d.bullet")
from panda3d import core
def reconstruct(object):
# Create a temporary buffer, which we first write the object into, and
# subsequently read it from again.
buffer = core.DatagramBuffer()
writer... | bsd-3-clause |
steveklabnik/servo | tests/wpt/css-tests/tools/html5lib/utils/spider.py | 436 | 4157 | #!/usr/bin/env python
"""Spider to try and find bugs in the parser. Requires httplib2 and elementtree
usage:
import spider
s = spider.Spider()
s.spider("http://www.google.com", maxURLs=100)
"""
import urllib.request, urllib.error, urllib.parse
import urllib.robotparser
import md5
import httplib2
import html5lib
fro... | mpl-2.0 |
simontakite/sysadmin | pythonscripts/learningPython/Tools/visitor_cpall.py | 2 | 1524 | """
Use: "python ...\Tools\visitor_cpall.py fromDir toDir trace?"
Like System\Filetools\cpall.py, but with the visitor classes and os.walk;
does string replacement of fromDir with toDir at the front of all the names
that the walker passes in; assumes that the toDir does not exist initially;
"""
import os
fro... | gpl-2.0 |
noelbk/neutron-juniper | neutron/plugins/midonet/common/config.py | 18 | 1812 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Midokura Japan K.K.
# Copyright (C) 2013 Midokura PTE LTD
# 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 th... | apache-2.0 |
moijes12/oh-mainline | mysite/customs/migrations/0012_add_bugzilla_tracker_models.py | 17 | 6393 | # This file is part of OpenHatch.
# Copyright (C) 2010 Jack Grigg
#
# 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 License, or
# (at your option) any later versio... | agpl-3.0 |
leggitta/mne-python | mne/minimum_norm/inverse.py | 5 | 57964 | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import warnings
from copy import deepcopy
from math import sqrt
import numpy as np
from scipy import linalg
from ..io... | bsd-3-clause |
Ryusoru/DMA-3DPSP | distributed/workerprocess.py | 1 | 23437 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import copy
import random
import datetime
import subprocess
import cPickle as pickle
from multiprocessing import Process, Manager, Condition, Lock, Event, Queue, Value
from multiprocessing.managers import SyncManager
from agent import *
class WorkerProcess(Pr... | gpl-3.0 |
sjyk/activedetect | benchmarks/Benchmark.py | 1 | 5095 | #!/usr/bin/env python
from activedetect.loaders.csv_loader import CSVLoader
from activedetect.error_detectors.ErrorDetector import ErrorDetector
from activedetect.loaders.type_inference import LoLTypeInference
from activedetect.model_based.preprocessing_utils import *
from activedetect.error_detectors.QuantitativeEr... | mit |
ederfmartins/spojrec | crawler/spiders/spojCrawler.py | 1 | 3878 | # -*- coding: utf-8 -*-
import scrapy
from scrapy.http import HtmlResponse, Request
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors import LinkExtractor
from scrapy import log
from scrapy.log import ScrapyFileLogObserver
import re
from crawler.dataExtractor.extractor import *
... | apache-2.0 |
SimplicityGuy/snmpy | tests/test_apc_pdu.py | 1 | 1524 | from os import getcwd
import snmpy
device = '10.100.184.62'
public = 'public'
private = 'private'
client = snmpy.Snmpy(device, public, private)
client.add_mib_path(getcwd())
# NOTE: In order to use this, download the APC PowerNet-MIB from:
# ftp://ftp.apc.com/apc/public/software/pnetmib/mib
# and run:
# ... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.