repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
Zearin/git-bup | cmd/daemon-cmd.py | 8 | 1953 | #!/usr/bin/env python
import sys, getopt, socket, subprocess, fcntl
from bup import options, path
from bup.helpers import *
optspec = """
bup daemon [options...] -- [bup-server options...]
--
l,listen ip address to listen on, defaults to *
p,port port to listen on, defaults to 1982
"""
o = options.Options(optspec,... | lgpl-2.1 |
pgleeson/TempRepo3 | pythonnC/Ex4_SaveNetworkML.py | 5 | 2358 | #
#
# A file which opens a neuroConstruct project, adds some cells and network connections
# and then saves a NetworkML file with the net structure
#
# Author: Padraig Gleeson
#
# This file has been developed as part of the neuroConstruct project
# This work has been funded by the Medical Research Cou... | gpl-2.0 |
PatKayongo/patkayongo.github.io | node_modules/pygmentize-bundled/vendor/pygments/scripts/find_error.py | 117 | 5927 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Lexing error finder
~~~~~~~~~~~~~~~~~~~
For the source files given on the command line, display
the text where Error tokens are being generated, along
with some context.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:licens... | mit |
cjh1/VTK | Examples/VisualizationAlgorithms/Python/warpComb.py | 27 | 3277 | #!/usr/bin/env python
# This example demonstrates how to extract "computational planes" from
# a structured dataset. Structured data has a natural, logical
# coordinate system based on i-j-k indices. Specifying imin,imax,
# jmin,jmax, kmin,kmax pairs can indicate a point, line, plane, or
# volume of data.
#
# In this ... | bsd-3-clause |
oroulet/python-urx | make_deb.py | 4 | 1478 | #!/usr/bin/python3
"""
hackish file to crreate deb from setup.py
"""
import subprocess
from email.utils import formatdate
import urx
DEBVERSION = urx.__version__
branch = subprocess.check_output("git rev-parse --abbrev-ref HEAD", shell=True)
branch = branch.decode()
branch = branch.strip()
branch = str(branch).repl... | gpl-3.0 |
SphinxKnight/kuma | kuma/wiki/management/commands/repair_translation_breadcrumbs.py | 33 | 1426 | """
Repair breadcrumb relations for translations that are missing parent topics.
"""
import logging
from django.core.management.base import (BaseCommand)
from kuma.wiki.models import Document
class Command(BaseCommand):
help = "Repair breadcrumb trails for translations"
def handle(self, *args, **options):... | mpl-2.0 |
nowls/gnuradio | grc/core/Param.py | 4 | 28068 | """
Copyright 2008-2015 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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 l... | gpl-3.0 |
saumishr/django | django/contrib/admin/actions.py | 98 | 3205 | """
Built-in, globally-available admin actions.
"""
from django.core.exceptions import PermissionDenied
from django.contrib.admin import helpers
from django.contrib.admin.util import get_deleted_objects, model_ngettext
from django.db import router
from django.template.response import TemplateResponse
from django.utils... | bsd-3-clause |
codilime/contrail-controller | src/config/utils/provision.py | 2 | 6932 | #!/usr/bin/python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import argparse
import ConfigParser
import json
import copy
from netaddr import IPNetwork
from vnc_api.vnc_api import *
def get_ip(ip_w_pfx):
return str(IPNetwork(ip_w_pfx).ip)
# end get_ip
class VncProvisioner(object):
... | apache-2.0 |
yanheven/keystone | keystone/openstack/common/systemd.py | 101 | 3022 | # Copyright 2012-2014 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... | apache-2.0 |
heyavery/lopenr | venv/lib/python2.7/site-packages/gunicorn/workers/ggevent.py | 14 | 7088 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import errno
import os
import sys
from datetime import datetime
from functools import partial
import time
_socket = __import__("socket")
# workaround on osx, disable kqueue
if sys.platform =... | mit |
igemsoftware/SYSU-Software2013 | project/Python27/Lib/test/test_multifile.py | 138 | 1702 | from test import test_support
mimetools = test_support.import_module('mimetools', deprecated=True)
multifile = test_support.import_module('multifile', deprecated=True)
import cStringIO
msg = """Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="=====================_590453667==_"
X-OriginalArrivalTime:... | mit |
mbayon/TFG-MachineLearning | vbig/lib/python2.7/site-packages/numpy/core/_methods.py | 35 | 4704 | """
Array methods which are called by both the C-code for the method
and the Python code for the NumPy-namespace function
"""
from __future__ import division, absolute_import, print_function
import warnings
from numpy.core import multiarray as mu
from numpy.core import umath as um
from numpy.core.numeric import asan... | mit |
ngoix/OCRF | benchmarks/bench_isolation_forest.py | 1 | 4472 | """
==========================================
IsolationForest benchmark
==========================================
A test of IsolationForest on classical anomaly detection datasets.
"""
print(__doc__)
from time import time
import numpy as np
# import matplotlib.pyplot as plt
# for the cluster to save the fig:
impo... | bsd-3-clause |
viralpandey/kivy | kivy/core/spelling/__init__.py | 52 | 4637 | '''
Spelling
========
Provides abstracted access to a range of spellchecking backends as well as
word suggestions. The API is inspired by enchant but other backends can be
added that implement the same API.
Spelling currently requires `python-enchant` for all platforms except
OSX, where a native implementation exists... | mit |
SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/script.module.urlresolver/lib/urlresolver/plugins/vidpe.py | 3 | 4109 | """
urlresolver XBMC Addon
Copyright (C) 2011 anilkuj
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-2.0 |
roadmapper/ansible | lib/ansible/modules/cloud/lxd/lxd_profile.py | 3 | 12898 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Hiroaki Nakamura <hnakamur@gmail.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_vers... | gpl-3.0 |
bzhou26/NRA-Crawler | requests/structures.py | 1160 | 2977 | # -*- coding: utf-8 -*-
"""
requests.structures
~~~~~~~~~~~~~~~~~~~
Data structures that power Requests.
"""
import collections
class CaseInsensitiveDict(collections.MutableMapping):
"""
A case-insensitive ``dict``-like object.
Implements all methods and operations of
``collections.MutableMapping... | mit |
wolverineav/horizon | horizon/test/settings.py | 1 | 5082 | # 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 |
daviwesley/Empire | lib/modules/situational_awareness/network/portscan.py | 19 | 4951 | from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-Portscan',
'Author': ['Rich Lundeen'],
'Description': ('Does a simple port scan using regular sockets, based '
'(pretty) lo... | bsd-3-clause |
achilleas-k/gnome15 | src/pylibg19/g19/runnable.py | 8 | 2916 | # Gnome15 - Suite of tools for the Logitech G series keyboards and headsets
# Copyright (C) 2010 Brett Smith <tanktarta@blueyonder.co.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, e... | gpl-3.0 |
scwuaptx/CTF | 2018-writeup/twctf/swap.py | 1 | 1264 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwn import *
host = "10.211.55.13"
port = 4869
host = "swap.chal.ctf.westerns.tokyo"
port = 37567
r = remote(host,port)
def setaddr(a,b):
r.recvuntil(":")
r.sendline("1")
r.recvuntil(":")
r.sendline(str(a))
r.recvuntil(":")
r.sendline(str(b))... | gpl-2.0 |
sidro/excodpy | python-exemple/deck-of-cards.py | 1 | 1544 | from random import shuffle
class Card:
def __init__(self, value, suit):
self.value = value
self.suit = suit
def __repr__(self):
# return "{} of {}".format(self.value, self.suit)
return f"{self.value} of {self.suit}"
class Deck:
def __init__(self):
suits = ["Hea... | bsd-2-clause |
Azulinho/ansible | lib/ansible/utils/module_docs_fragments/constructed.py | 25 | 1396 | #
# (c) 2016, Sumit Kumar <sumit4@netapp.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 versi... | gpl-3.0 |
taknevski/tensorflow-xsmm | tensorflow/contrib/keras/python/keras/testing_utils.py | 10 | 6147 | # 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 |
neumerance/deploy | .venv/lib/python2.7/site-packages/novaclient/tests/v1_1/test_shell.py | 2 | 75033 | # Copyright 2010 Jacob Kaplan-Moss
# Copyright 2011 OpenStack Foundation
# Copyright 2012 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
#
# ... | apache-2.0 |
angeliaz/bootstrap | test-infra/s3_cache.py | 2166 | 5734 | #!/usr/bin/env python2.7
# pylint: disable=C0301
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, chdir, remove as _delete_file
from os.path import dirname, basename, abspath, realpath, expandvars
from hashlib import sha256
from subpr... | mit |
ahmadio/edx-platform | common/djangoapps/django_comment_common/tests.py | 148 | 2266 | from django.test import TestCase
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from django_comment_common.models import Role
from student.models import CourseEnrollment, User
class RoleAssignmentTest(TestCase):
"""
Basic checks to make sure our Roles get assigned and unassigned as students
... | agpl-3.0 |
mkieszek/odoo | addons/report_webkit/wizard/report_webkit_actions.py | 47 | 5276 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# Author : Vincent Renaville
from openerp.tools.translate import _
from openerp.osv import fields, osv
class report_webkit_actions(osv.osv_memory):
_na... | agpl-3.0 |
Azure/azure-sdk-for-python | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_07_01_preview/aio/_configuration.py | 1 | 3182 | # 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 may ... | mit |
tensorflow/tensorflow | tensorflow/python/keras/tests/saver_test.py | 6 | 6156 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
cuongnv23/ansible | lib/ansible/modules/network/cloudengine/ce_bfd_session.py | 27 | 21039 | #!/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 |
normanmaurer/autobahntestsuite-maven-plugin | src/main/resources/twisted/scripts/test/test_scripts.py | 35 | 6654 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for the command-line scripts in the top-level I{bin/} directory.
Tests for actual functionality belong elsewhere, written in a way that doesn't
involve launching child processes.
"""
from os import devnull, getcwd, chdir
from sys impor... | apache-2.0 |
privateip/ansible-modules-core | system/hostname.py | 14 | 21317 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Hiroaki Nakamura <hnakamur@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the... | gpl-3.0 |
remitamine/youtube-dl | youtube_dl/extractor/limelight.py | 11 | 14889 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
determine_ext,
float_or_none,
int_or_none,
smuggle_url,
try_get,
unsmuggle_url,
ExtractorError,
)
class LimelightBaseIE(InfoExtr... | unlicense |
timkrentz/SunTracker | IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/application/reactors.py | 2 | 2207 | # -*- test-case-name: twisted.test.test_application -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Plugin-based system for enumerating available reactors and installing one of
them.
"""
from zope.interface import Interface, Attribute, implements
from twisted.plugin import ... | mit |
shoyer/numpy | numpy/lib/format.py | 1 | 31038 | """
Binary serialization
NPY format
==========
A simple format for saving numpy arrays to disk with the full
information about them.
The ``.npy`` format is the standard binary file format in NumPy for
persisting a *single* arbitrary NumPy array on disk. The format stores all
of the shape and dtype information necess... | bsd-3-clause |
maru-sama/pyblosxom | Pyblosxom/tests/test_blosxom_renderer.py | 3 | 1697 | #######################################################################
# This file is part of Pyblosxom.
#
# Copyright (C) 2011 by the Pyblosxom team. See AUTHORS.
#
# Pyblosxom is distributed under the MIT license. See the file
# LICENSE for distribution details.
####################################################... | mit |
RPGOne/Skynet | scikit-learn-0.18.1/sklearn/utils/optimize.py | 31 | 5739 | """
Our own implementation of the Newton algorithm
Unlike the scipy.optimize version, this version of the Newton conjugate
gradient solver uses only one function call to retrieve the
func value, the gradient value and a callable for the Hessian matvec
product. If the function call is very expensive (e.g. for logistic
... | bsd-3-clause |
frouty/odoo_oph | addons/account/wizard/account_journal_select.py | 56 | 2093 | # -*- 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 |
shipci/sympy | sympy/combinatorics/tensor_can.py | 20 | 40918 | from __future__ import print_function, division
from sympy.combinatorics.permutations import Permutation, _af_rmul, _af_rmuln,\
_af_invert, _af_new
from sympy.combinatorics.perm_groups import PermutationGroup, _orbit, \
_orbit_transversal
from sympy.combinatorics.util import _distribute_gens_by_base, \
_or... | bsd-3-clause |
shawnsschen/shadowsocks | shadowsocks/server.py | 652 | 4836 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 |
liberorbis/libernext | apps/erpnext/erpnext/hr/doctype/employee/employee.py | 17 | 7370 | # 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
from frappe.utils import getdate, validate_email_add, cint
from frappe.model.naming import make_autoname
from frappe import throw, _, ... | gpl-2.0 |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/exploits/ZIBE/pyreadline/clipboard/__init__.py | 1 | 2117 | # uncompyle6 version 2.9.10
# Python bytecode 2.6 (62161)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: c:\Temp\build\ZIBE\pyreadline\clipboard\__init__.py
# Compiled at: 2011-06-23 17:25:54
import sys
success = True
in_ironpython = 'IronPython' in sys.... | unlicense |
csdev/ns3-ftca | src/point-to-point-layout/bindings/modulegen__gcc_LP64.py | 30 | 419896 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 |
40223221/0622w17 | static/Brython3.1.1-20150328-091302/Lib/_abcoll.py | 688 | 5155 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
DON'T USE THIS MODULE DIRECTLY! The classes here should be imported
via collections; they are defined here only to alleviate certain
bootstrappin... | gpl-3.0 |
mfriedenhagen/Diamond | test.py | 6 | 10775 | #!/usr/bin/env python
# coding=utf-8
###############################################################################
import os
import sys
import inspect
import traceback
import optparse
import logging
import configobj
try:
# python 2.6
import unittest2 as unittest
except ImportError:
import unittest
try:... | mit |
rds0751/colinkers | env/Lib/site-packages/django/core/management/commands/sendtestemail.py | 126 | 1518 | import socket
from django.core.mail import mail_admins, mail_managers, send_mail
from django.core.management.base import BaseCommand
from django.utils import timezone
class Command(BaseCommand):
help = "Sends a test email to the email addresses specified as arguments."
missing_args_message = "You must specif... | agpl-3.0 |
altairpearl/scikit-learn | examples/bicluster/bicluster_newsgroups.py | 142 | 7183 | """
================================================================
Biclustering documents with the Spectral Co-clustering algorithm
================================================================
This example demonstrates the Spectral Co-clustering algorithm on the
twenty newsgroups dataset. The 'comp.os.ms-windows... | bsd-3-clause |
nitzmahone/ansible | test/units/modules/network/f5/test_bigip_qkview.py | 21 | 5550 | # -*- 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
import json
import pytest
import sys
if sys.version_info < (2, ... | gpl-3.0 |
Erethon/synnefo | snf-cyclades-app/synnefo/userdata/rest.py | 9 | 8289 | #
# Copyright (C) 2010-2014 GRNET S.A.
#
# 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 program is distributed... | gpl-3.0 |
sammerry/ansible | lib/ansible/inventory/dir.py | 73 | 10727 | # (c) 2013, Daniel Hokka Zakrisson <daniel@hozac.com>
# (c) 2014, Serge van Ginderachter <serge@vanginderachter.be>
#
# 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, ... | gpl-3.0 |
project-spinoza-dev/tsakpy | src/getEntities.py | 1 | 1826 | from __future__ import unicode_literals
import spacy
from spacy.en import English
from pattern.en import tag
from textblob import TextBlob
import sys
import re
import json
import os
import os.path
from flask import json
def getEntity(parser,tweets,outputFile):
filteredTweets = []
xEntities = {}
targetFile = open... | apache-2.0 |
MichaelQQ/linux-2.6.35-vpls | arch/ia64/scripts/unwcheck.py | 13143 | 1714 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... | gpl-2.0 |
veger/ansible | lib/ansible/modules/monitoring/spectrum_device.py | 101 | 10638 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Renato Orgito <orgito@gmail.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_version': '1.1',
... | gpl-3.0 |
kezabelle/django-rest-framework | rest_framework/pagination.py | 13 | 27736 | # coding: utf-8
"""
Pagination serializers determine the structure of the output that should
be used for paginated responses.
"""
from __future__ import unicode_literals
import warnings
from base64 import b64decode, b64encode
from collections import namedtuple
from django.core.paginator import Paginator as DjangoPagi... | bsd-2-clause |
Hiestaa/cognitive-racer | game.py | 1 | 6136 | # -*- coding: utf8 -*-
# from __future__ import unicode_literals
import time
import sys
import logging
import pygame
from conf import conf
from GameEngine.GameStates.stateManager import StateManager
from Graphx import graphx
from EventsManager import eventsManager
DONE = False
#cl: Game: Manage the game loop
class ... | lgpl-3.0 |
bobisme/odoo | addons/account/wizard/account_vat.py | 378 | 2896 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
miniconfig/home-assistant | docs/source/conf.py | 36 | 12044 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Home-Assistant documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 28 13:13:10 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in th... | mit |
mengxn/tensorflow | tensorflow/contrib/keras/python/keras/datasets/mnist.py | 58 | 1475 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
js850/pele | examples/amber/tetraAla/extractedmin2pdb.py | 2 | 2337 | #!/usr/bin/env python
import sys
import string
###############################################################
## #
## Edyta Malolepsza #
## David Wales' group, University of Cambridge #
## in case of p... | gpl-3.0 |
MadsJensen/CAA | hilbert_preprocessing.py | 1 | 3552 | import mne
from my_settings import *
import pandas as pd
import numpy as np
import matplotlib
matplotlib.use('Agg')
n_jobs = 3
for subject in [subjects_select[-1]]:
raw = mne.io.Raw(save_folder + "%s_filtered_ica_mc_raw_tsss.fif" % subject,
preload=True)
raw.resample(250, n_jobs=n_jobs, v... | bsd-3-clause |
codenote/chromium-test | chrome/common/extensions/docs/server2/reference_resolver.py | 2 | 7356 | # 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 file_system import FileNotFoundError
import logging
import re
import string
def _ClassifySchemaNode(node_name, api):
"""Attempt to classify |node... | bsd-3-clause |
davidyezsetz/kuma | vendor/packages/ipython/IPython/Extensions/ipy_autoreload.py | 7 | 10774 | """
IPython extension: autoreload modules before executing the next line
Try::
%autoreload?
for documentation.
"""
# Pauli Virtanen <pav@iki.fi>, 2008.
# Thomas Heller, 2000.
#
# This IPython module is written by Pauli Virtanen, based on the autoreload
# code by Thomas Heller.
#--------------------------------... | mpl-2.0 |
crwilcox/PyGithub | github/tests/Framework.py | 13 | 11893 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 |
crobby/sahara | sahara/tests/tempest/scenario/data_processing/config.py | 10 | 2777 | # Copyright (c) 2014 Mirantis 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 |
praekelt/molo-gem | gem/management/commands/add_images_to_articles.py | 1 | 3232 | from __future__ import absolute_import, unicode_literals
import csv
from django.core.management.base import BaseCommand
from wagtail.images.tests.utils import Image
from molo.core.models import Languages, ArticlePage, Main, SectionIndexPage
class Command(BaseCommand):
def add_arguments(self, parser):
par... | bsd-2-clause |
Pinafore/qb | qanta/pipeline/all.py | 2 | 1696 | import luigi
from luigi import LocalTarget, Task, WrapperTask
from qanta.util import constants as c
from qanta.util.io import call, shell, make_dirs
from qanta.reporting import performance
# All the code below needs to be integrated with new buzzer pipeline/rewritten
class Summary(Task):
fold = luigi.Parameter()
... | mit |
ppries/tensorflow | tensorflow/python/ops/sets.py | 3 | 9381 | # 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 |
googleapis/googleapis-gen | google/cloud/workflows/executions/v1/workflows-executions-v1-py/scripts/fixup_executions_v1_keywords.py | 2 | 6134 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 requi... | apache-2.0 |
paulzhousz/shadowsocks | shadowsocks/shell.py | 652 | 12736 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 |
hwjworld/xiaodun-platform | common/djangoapps/student/tests/factories.py | 25 | 3819 | """Provides factories for student models."""
from student.models import (User, UserProfile, Registration,
CourseEnrollmentAllowed, CourseEnrollment,
PendingEmailChange, UserStanding,
)
from course_modes.models import CourseMode
from dja... | agpl-3.0 |
prodigeni/pafy | setup.py | 1 | 1301 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='Pafy',
py_modules=['pafy'],
version='0.3.35',
description="Python API for YouTube, query and download YouTube content",
keywords=["Pafy", "API", "YouTube", "youtube", "download", "video"],
author="nagev... | gpl-3.0 |
cajone/pychess | announcements.py | 22 | 5364 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from getpass import getpass
from smtplib import SMTP, SMTPConnectError, SMTPAuthenticationError, SMTPRecipientsRefused
from email.mime.text import MIMEText
mail = 'pychess@gmail.com'
passw = getpass('password: ')
smtp = 'smtp.gmail.co... | gpl-3.0 |
atplanet/ansible-modules-extras | system/getent.py | 116 | 4192 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Brian Coca <brian.coca+dev@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the... | gpl-3.0 |
PeteAndersen/swarfarm | herders/profile_schema.py | 1 | 9441 | from jsonschema import Draft4Validator
HubUserLoginSchema = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'id': 'http://swarfarm.com/schemas/hubuserlogin.json',
"title": 'HubUserLogin',
'description': 'Schema for entire HubUserLogin json data',
'definitions': {
'rune': {
... | apache-2.0 |
alexandrucoman/vbox-neutron-agent | neutron/tests/functional/__init__.py | 43 | 1147 | # Copyright 2015 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 agre... | apache-2.0 |
mese79/three.js | utils/exporters/blender/addons/io_three/exporter/api/material.py | 26 | 8268 | from bpy import data, types
from .. import constants, logger
from .constants import MULTIPLY, WIRE, IMAGE
def _material(func):
"""
:param func:
"""
def inner(name, *args, **kwargs):
"""
:param name:
:param *args:
:param **kwargs:
"""
material = Non... | mit |
eBay/restcommander | play-1.2.4/python/Lib/sgmllib.py | 9 | 17884 | """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 ... | apache-2.0 |
40223113/0623-w17 | static/Brython3.1.1-20150328-091302/Lib/_thread.py | 740 | 4879 | """Drop-in replacement for the thread module.
Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.
Suggested usage is::
try:
import _thread
except ImportError:
import _dummy_thread as _thread
"""
# Exports ... | gpl-3.0 |
Rogero0o/muzei | web/lib/cloudstorage/errors.py | 31 | 2994 | # Copyright 2012 Google Inc. All Rights Reserved.
"""Google Cloud Storage specific Files API calls."""
__all__ = ['AuthorizationError',
'check_status',
'Error',
'FatalError',
'ForbiddenError',
'NotFoundError',
'ServerError',
'TimeoutErro... | apache-2.0 |
mattclark/osf.io | api_tests/nodes/views/test_node_bibliographic_contributors_list.py | 10 | 3308 | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
ProjectFactory,
AuthUserFactory,
)
from osf.utils.permissions import READ, WRITE, ADMIN
@pytest.mark.django_db
@pytest.mark.enable_quickfiles_creation
class TestNodeBibliographicContributors:
@pytest.fixture()... | apache-2.0 |
zubair-arbi/edx-platform | cms/envs/yaml_config.py | 7 | 8031 | """
This is the default template for our main set of AWS servers.
Before importing this settings file the following MUST be
defined in the environment:
* SERVICE_VARIANT - can be either "lms" or "cms"
* CONFIG_ROOT - the directory where the application
yaml config files are located
"""
#... | agpl-3.0 |
ahmednuaman/gdrive-cms-py-gae | bs4/builder/_html5lib.py | 119 | 7746 | __all__ = [
'HTML5TreeBuilder',
]
import warnings
from bs4.builder import (
PERMISSIVE,
HTML,
HTML_5,
HTMLTreeBuilder,
)
from bs4.element import NamespacedAttribute
import html5lib
from html5lib.constants import namespaces
from bs4.element import (
Comment,
Doctype,
NavigableStr... | mit |
tszym/ansible | lib/ansible/modules/windows/win_reboot.py | 78 | 2860 | #!/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 |
purplewall1206/shadowsocks | shadowsocks/shell.py | 652 | 12736 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 |
gandarez/wakatime | wakatime/packages/pygments_py2/pygments/lexers/prolog.py | 72 | 12044 | # -*- coding: utf-8 -*-
"""
pygments.lexers.prolog
~~~~~~~~~~~~~~~~~~~~~~
Lexers for Prolog and Prolog-like languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups
from pyg... | bsd-3-clause |
pyokagan/gyp | pylib/gyp/MSVSVersion.py | 1 | 17133 | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Handle version information related to Visual Stuio."""
import errno
import os
import re
import subprocess
import sys
import gyp
import glob
class VisualStudi... | bsd-3-clause |
toonst/RIOT | dist/tools/mcuboot/imgtool/keys.py | 50 | 4386 | """
Cryptographic key management for imgtool.
"""
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5, PKCS1_PSS
from ecdsa import SigningKey, NIST256p, util
import hashlib
from pyasn1.type import namedtype, univ
from pyasn1.codec.der.encoder import encode
# By defa... | lgpl-2.1 |
planeonline/presentation-layer | public/bootstrap-3.2.0/test-infra/s3_cache.py | 2166 | 5734 | #!/usr/bin/env python2.7
# pylint: disable=C0301
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, chdir, remove as _delete_file
from os.path import dirname, basename, abspath, realpath, expandvars
from hashlib import sha256
from subpr... | apache-2.0 |
tmxdyf/CouchPotatoServer | libs/pyasn1/codec/ber/decoder.py | 185 | 36629 | # BER decoder
from pyasn1.type import tag, base, univ, char, useful, tagmap
from pyasn1.codec.ber import eoo
from pyasn1.compat.octets import oct2int, octs2ints, isOctetsType
from pyasn1 import debug, error
class AbstractDecoder:
protoComponent = None
def valueDecoder(self, fullSubstrate, substrate, asn1Spec, ... | gpl-3.0 |
melphi/algobox | python/algobox/src/algobox/client/generated/api/models/trade.py | 1 | 10240 | # 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 |
simbacoin/simbacoin | contrib/bitrpc/bitrpc.py | 1 | 7840 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:9332")
else:
access = Ser... | mit |
dycodedev/taiga-back | taiga/userstorage/models.py | 20 | 1857 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# 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 F... | agpl-3.0 |
Antiun/yelizariev-addons | base_replace_ref/models.py | 16 | 3169 | from openerp import api, models, fields, SUPERUSER_ID, exceptions
class replace_rule(models.Model):
_name = 'base_replace_ref.rule'
name = fields.Char('Name', required=True)
draft = fields.Boolean('Draft', default=True)
model_id = fields.Many2one('ir.model', 'Model', required=True)
value_line_ids... | lgpl-3.0 |
MQQiang/kbengine | kbe/src/lib/python/Lib/encodings/cp860.py | 272 | 34681 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP860.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | lgpl-3.0 |
yg257/Pangea | lib/boto-2.34.0/boto/logs/layer1.py | 146 | 22588 | # 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 ... | apache-2.0 |
zhjunlang/kbengine | kbe/src/lib/python/Lib/idlelib/ClassBrowser.py | 61 | 6784 | """Class browser.
XXX TO DO:
- reparse when source changed (maybe just a button would be OK?)
(or recheck on window popup)
- add popup menu with more options (e.g. doc strings, base classes, imports)
- show function argument list? (have to do pattern matching on source)
- should the classes and methods lists also... | lgpl-3.0 |
kpkhxlgy0/SublimeText3 | Packages/ConvertToUTF8/chardet/euckrfreq.py | 3121 | 45978 | ######################## 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... | mit |
Reflexe/doc_to_pdf | Windows/program/python-core-3.5.0/lib/distutils/command/bdist_rpm.py | 116 | 21670 | """distutils.command.bdist_rpm
Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions)."""
import subprocess, sys, os
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.util import get_platform
from distutils.file_util import write_file
from distutils... | mpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.