repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
eddiel/Play | refs/heads/master | gluon/main.py | 9 | #!/bin/env python
# -*- coding: utf-8 -*-
"""
| This file is part of the web2py Web Framework
| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
The gluon wsgi application
---------------------------
"""
if False: import import_all # DO NOT REMOVE P... |
jairideout/qiime2 | refs/heads/master | qiime2/core/__init__.py | 43 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2017, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... |
mrquim/repository.mrquim | refs/heads/master | repo/script.module.youtube.dl/lib/youtube_dl/extractor/jamendo.py | 43 | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_urlparse
from .common import InfoExtractor
from ..utils import parse_duration
class JamendoBaseIE(InfoExtractor):
def _extract_meta(self, webpage, fatal=True):
title = self._og_search_title(
webpage... |
xsank/SVNchecker | refs/heads/master | structure/transaction.py | 1 | '''
Created on 2013-10-8
@author: xsank
'''
import os
import shutil
import tempfile
import process
from checker import jsonvalid
from checker import xmlvalid
from checker import logvalid
class Transaction:
def __init__(self,repos,txn):
self.repos=repos
self.txn=str(txn)
try:
... |
lbernail/demotiad | refs/heads/master | app/vote/app.py | 1 | from flask import Flask, render_template, request, make_response, g
from redis import Redis
import os
import socket
import random
import json
import consul
option_a = os.getenv('OPTION_A', "vim")
option_b = os.getenv('OPTION_B', "emacs")
color = os.getenv('COLOR', "white")
consul_host = os.getenv('CONSUL_HOST', None)
... |
valexandersaulys/airbnb_kaggle_contest | refs/heads/master | venv/lib/python3.4/site-packages/Theano-0.7.0-py3.4.egg/theano/tensor/slinalg.py | 6 | import logging
import warnings
from six.moves import xrange
import numpy
try:
import scipy.linalg
imported_scipy = True
except ImportError:
# some ops (e.g. Cholesky, Solve, A_Xinv_b) won't work
imported_scipy = False
from theano import tensor
import theano.tensor
from theano.tensor import as_tensor_... |
GreenLunar/Bookie | refs/heads/develop | combo.py | 9 | """WSGI file to serve the combo JS out of convoy"""
import os
from convoy.combo import combo_app
root_dir = os.path.dirname(__file__)
JS_FILES = root_dir + '/bookie/static/js/build'
application = combo_app(JS_FILES)
|
yrizk/django-blog | refs/heads/master | blogvenv/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py | 202 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import base64
import codecs
import datetime
import distutils.util
from email import message_from... |
bcallaars/trello-python | refs/heads/master | list/add.py | 1 | #!/usr/bin/python
import urllib, urllib2, json, sys
data = urllib.urlencode({
'name': sys.argv[3],
'idBoard': sys.argv[4]
})
url = "https://trello.com/1/lists?key=" + sys.argv[1] + "&token=" + sys.argv[2]
request = urllib2.Request(url, data)
response = urllib2.urlopen(request)
data = json.loads(response.read(... |
sestrella/ansible | refs/heads/devel | test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py | 13 | # (c) 2017 Red Hat 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 pytest
import os
from units.utils.amazon_placebo_fixtures import placeboify, maybe_sleep
from ansible.modu... |
jantoniomartin/condottieri_events | refs/heads/master | __init__.py | 12133432 | |
guangquanwang/cuda-convnet2 | refs/heads/master | cudaconvnet/__init__.py | 12133432 | |
mhils/readthedocs.org | refs/heads/master | readthedocs/oauth/migrations/__init__.py | 12133432 | |
lauria/Samba4 | refs/heads/master | source3/stf/stf.py | 137 | #!/usr/bin/python
#
# Samba Testing Framework for Unit-testing
#
import os, string, re
import osver
def get_server_list_from_string(s):
server_list = []
# Format is a list of server:domain\username%password separated
# by commas.
for entry in string.split(s, ","):
# Parse entry
... |
rjschof/gem5 | refs/heads/master | ext/ply/example/yply/ylex.py | 165 | # lexer for yacc-grammars
#
# Author: David Beazley (dave@dabeaz.com)
# Date : October 2, 2006
import sys
sys.path.append("../..")
from ply import *
tokens = (
'LITERAL','SECTION','TOKEN','LEFT','RIGHT','PREC','START','TYPE','NONASSOC','UNION','CODE',
'ID','QLITERAL','NUMBER',
)
states = (('code','exclusiv... |
RockySteveJobs/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/zipfile.py | 45 | """
Read and write ZIP files.
XXX references to utf-8 need further investigation.
"""
import io
import os
import re
import imp
import sys
import time
import stat
import shutil
import struct
import binascii
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
except ImportError:
zlib =... |
girving/tensorflow | refs/heads/master | tensorflow/contrib/boosted_trees/python/ops/prediction_ops.py | 38 | # 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... |
zerothi/sids | refs/heads/master | sisl/physics/tests/test_spin.py | 1 | import pytest
pytestmark = pytest.mark.spin
import math as m
import numpy as np
from sisl import Spin
def test_spin1():
for val in ['unpolarized', '', Spin.UNPOLARIZED,
'polarized', 'p', Spin.POLARIZED,
'non-collinear', 'nc', Spin.NONCOLINEAR,
'spin-orbit', 'so',... |
nippoo/phy | refs/heads/master | phy/io/kwik/mock.py | 2 | # -*- coding: utf-8 -*-
"""Mock Kwik files."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os.path as op
import numpy as np
from ...electrode.mea import staggered_positions
from ..mo... |
exceptionhandle/ImageProcessor.activity | refs/heads/master | Imaging/doctest.py | 8 | # Module doctest version 0.9.6
# Released to the public domain 16-Jan-2001,
# by Tim Peters (tim.one@home.com).
# local modifications:
# 2001-02-13 fl: minor tweaks to make it run under both 1.5.2 and 2.0
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
"""Module doctest -- a framework for ru... |
mitreaadrian/Soccersim | refs/heads/master | boost/boost_1_59_0/libs/python/pyste/tests/inheritUT.py | 54 | # Copyright Bruno da Silva de Oliveira 2003. Use, modification and
# distribution is subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import unittest
from _inherit import *
class InheritExampleTest(unittest.TestCase):
... |
dvspirito/pymeasure | refs/heads/master | pymeasure/adapters/visa.py | 1 | #
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2017 PyMeasure Developers
#
# 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 limit... |
zenodo/zenodo | refs/heads/master | zenodo/modules/jsonschemas/utils.py | 2 | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 v... |
savoirfairelinux/account-financial-tools | refs/heads/7.0 | account_credit_control_dunning_fees/__openerp__.py | 1 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2014 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publi... |
T3CHNOLOG1C/Kurisu | refs/heads/master | addons/kickban.py | 3 | import datetime
import discord
import json
import re
import time
from discord.ext import commands
from sys import argv
class KickBan:
"""
Kicking and banning users.
"""
def __init__(self, bot):
self.bot = bot
print('Addon "{}" loaded'.format(self.__class__.__name__))
@commands.has_... |
cadop/pyCGM | refs/heads/master | setup.py | 1 | import sys
sys.path.append('./pyCGM_Single') # TODO update to pycgm when fixed
from _about import __version__
from io import open
import setuptools
with open("README.md", "r",encoding="utf8") as fh:
long_description = fh.read()
setuptools.setup(
name="pycgm",
version= __version__,
author="", # Many
... |
upliftaero/MAVProxy | refs/heads/uplift | MAVProxy/modules/lib/mp_util.py | 5 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''common mavproxy utility functions'''
import math
import os
import platform
# Some platforms (CYGWIN and others) many not have the wx library
# use imp to see if wx is on the path
has_wxpython = False
if platform.system() == 'Windows':
# auto-detection is failing o... |
marckuz/django | refs/heads/master | tests/template_tests/test_logging.py | 117 | from __future__ import unicode_literals
import logging
from django.template import Context, Engine, Variable, VariableDoesNotExist
from django.test import SimpleTestCase
class TestHandler(logging.Handler):
def __init__(self):
super(TestHandler, self).__init__()
self.log_record = None
def em... |
gylian/Sick-Beard | refs/heads/master | lib/unidecode/x00c.py | 252 | data = (
'[?]', # 0x00
'N', # 0x01
'N', # 0x02
'H', # 0x03
'[?]', # 0x04
'a', # 0x05
'aa', # 0x06
'i', # 0x07
'ii', # 0x08
'u', # 0x09
'uu', # 0x0a
'R', # 0x0b
'L', # 0x0c
'[?]', # 0x0d
'e', # 0x0e
'ee', # 0x0f
'ai', # 0x10
'[?]', # 0x11
'o', # 0x12
'oo', # 0x... |
alanswanson/webserver | refs/heads/master | qa/292-HSTS1.py | 5 | from base import *
NICK = "test-2920"
MAX_AGE = 123456
CONF = """
vserver!2920!nick = %(NICK)s
vserver!2920!document_root = %(droot)s
vserver!2920!hsts = 1
vserver!2920!hsts!max_age = %(MAX_AGE)s
vserver!2920!rule!1!match = default
vserver!2920!rule!1!handler = dirlist
"""
# 6.2. HTTP Request Type
#
# If a HST... |
dhuang/incubator-airflow | refs/heads/master | tests/contrib/operators/test_file_to_wasb.py | 38 | # -*- coding: utf-8 -*-
#
# 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
... |
nkgilley/home-assistant | refs/heads/dev | tests/util/test_async.py | 5 | """Tests for async util methods from Python source."""
import asyncio
from unittest import TestCase
import pytest
from homeassistant.util import async_ as hasync
from tests.async_mock import MagicMock, Mock, patch
@patch("asyncio.coroutines.iscoroutine")
@patch("concurrent.futures.Future")
@patch("threading.get_id... |
IvannaBesarab/cit-continue | refs/heads/master | config.py | 2 | import os
def database_uri(host, username, password, db_name):
return 'postgresql+psycopg2://{username}:{password}@{host}/{db_name}'. \
format(**{'db_name': db_name, 'host': host,
'username': username,
'password': password})
class Config(object):
# Statement for e... |
chenyyx/scikit-learn-doc-zh | refs/heads/0.19.X | examples/en/cluster/plot_kmeans_digits.py | 46 | """
===========================================================
A demo of K-Means clustering on the handwritten digits data
===========================================================
In this example we compare the various initialization strategies for
K-means in terms of runtime and quality of the results.
As the gr... |
levigross/pyscanner | refs/heads/master | mytests/django/contrib/formtools/tests/wizard/namedwizardtests/forms.py | 318 | import os
import tempfile
from django import forms
from django.core.files.storage import FileSystemStorage
from django.forms.formsets import formset_factory
from django.http import HttpResponse
from django.template import Template, Context
from django.contrib.auth.models import User
from django.contrib.formtools.wiz... |
praxigento/teq_test_db_schema_attrs | refs/heads/master | prxgt/repo/generator.py | 1 | __author__ = 'Alex Gusev <alex@flancer64.com>'
import random
import string
import prxgt.const as const
TYPE_DEC = const.ATTR_TYPE_DEC
TYPE_INT = const.ATTR_TYPE_INT
TYPE_STR = const.ATTR_TYPE_STR
TYPE_TXT = const.ATTR_TYPE_TXT
class Generator(object):
"""
Values generator for various types data.
Прос... |
Ernesto99/odoo | refs/heads/8.0 | addons/crm_helpdesk/report/__init__.py | 442 | # -*- 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... |
apixandru/intellij-community | refs/heads/master | python/testData/completion/matMul.py | 79 | class C:
def __matmul<caret>
|
apache/airflow | refs/heads/main | airflow/contrib/operators/snowflake_operator.py | 2 | #
# 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... |
robinchenyu/imagepaste | refs/heads/master | lib/PIL/FontFile.py | 51 | #
# The Python Imaging Library
# $Id$
#
# base class for raster font file parsers
#
# history:
# 1997-06-05 fl created
# 1997-08-19 fl restrict image width
#
# Copyright (c) 1997-1998 by Secret Labs AB
# Copyright (c) 1997-1998 by Fredrik Lundh
#
# See the README file for information on usage and redistribution.
#
... |
Kungbib/SOUhack | refs/heads/master | sousearch/webapp/sousearch/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
isyippee/nova | refs/heads/master | nova/api/openstack/compute/server_password.py | 33 | # Copyright (c) 2012 Nebula, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... |
shenzebang/scikit-learn | refs/heads/master | sklearn/preprocessing/label.py | 137 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Joel Nothman <joel.nothman@gmail.com>
# Hamzeh Alsalhi <ha258@cornell.edu>
# Licens... |
rickshawman/twitter | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.py | 915 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
import re
from . import _base
from .. import ihatexml
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory
tag_regexp = re.compile("{([^}]*)}(.*)")
def getETreeBu... |
x2Ident/x2Ident_test | refs/heads/master | mitmproxy/mitmproxy/protocol/base.py | 2 | from __future__ import absolute_import, print_function, division
import sys
import six
import netlib.exceptions
from mitmproxy import exceptions
from mitmproxy import models
class _LayerCodeCompletion(object):
"""
Dummy class that provides type hinting in PyCharm, which simplifies developmen... |
CredoReference/edx-platform | refs/heads/integration-hawthorn-qa | common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py | 18 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import re
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('course_modes', '0009_suggested_prices_to_charfield'),
]
operations = [
migrations.Al... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Scrapy-1.0.1/scrapy/contrib/throttle.py | 144 | import warnings
from scrapy.exceptions import ScrapyDeprecationWarning
warnings.warn("Module `scrapy.contrib.throttle` is deprecated, "
"use `scrapy.extensions.throttle` instead",
ScrapyDeprecationWarning, stacklevel=2)
from scrapy.extensions.throttle import *
|
Kent-Liang/django-polls | refs/heads/master | polls/migrations/0003_auto_20151108_1453.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0002_auto_20151108_1437'),
]
operations = [
migrations.CreateModel(
name='Option',
fields=[... |
asajeffrey/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/process.py | 10 | import sys
import six
def cast_env(env):
"""Encode all the environment values as the appropriate type for each Python version
This assumes that all the data is or can be represented as UTF8"""
env_type = six.ensure_binary if sys.version_info[0] < 3 else six.ensure_str
return {env_type(key): env_type... |
paulsmith/geodjango | refs/heads/master | django/core/management/commands/flush.py | 14 | from django.core.management.base import NoArgsCommand, CommandError
from django.core.management.color import no_style
from optparse import make_option
class Command(NoArgsCommand):
option_list = NoArgsCommand.option_list + (
make_option('--verbosity', action='store', dest='verbosity', default='1',
... |
bikash/h2o-dev | refs/heads/master | h2o-py/tests/testdir_algos/glm/pyunit_NOFEATURE_getLambdaModel_mediumGLM.py | 2 | import sys
sys.path.insert(1, "../../../")
import h2o
import random
def getLambdaModel(ip,port):
# Connect to h2o
h2o.init(ip,port)
print("Read data")
prostate = h2o.import_frame(path=h2o.locate("smalldata/logreg/prostate.csv"))
myX = ["AGE","RACE","DPROS","DCAPS","PSA","VOL","GLEASON"]
myY = "CAPSULE"
family... |
52ai/django-ccsds | refs/heads/master | scripts/manage_translations.py | 277 | #!/usr/bin/env python
#
# This python file contains utility scripts to manage Django translations.
# It has to be run inside the django git root directory.
#
# The following commands are available:
#
# * update_catalogs: check for new strings in core and contrib catalogs, and
# output how much string... |
alextruberg/custom_django | refs/heads/master | tests/fixtures/tests.py | 50 | from __future__ import absolute_import
import warnings
from django.contrib.sites.models import Site
from django.core import management
from django.db import connection, IntegrityError
from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature
from django.utils import six
from .models import Article, ... |
xflows/rdm | refs/heads/master | rdm/wrappers/migration.py | 2 |
for w in AbstractWidget.objects.filter(package='ilp'):
w.package = 'rdm.wrappers'
w.save()
|
40223110/2015cda_0512 | refs/heads/master | static/Brython3.1.0-20150301-090019/Lib/formatter.py | 751 | """Generic output formatting.
Formatter objects transform an abstract flow of formatting events into
specific output events on writer objects. Formatters manage several stack
structures to allow various properties of a writer object to be changed and
restored; writers need not be able to handle relative changes nor an... |
engagespark/mulungwishi-webhook | refs/heads/master | app/__init__.py | 4 | from flask import Flask
mulungwishi_app = Flask(__name__)
|
fabric8-analytics/fabric8-analytics-jobs | refs/heads/master | f8a_jobs/handlers/flow.py | 1 | """Schedule multiple flows of a type."""
from .base import BaseHandler
class FlowScheduling(BaseHandler):
"""Schedule multiple flows of a type."""
def execute(self, flow_name, flow_arguments):
"""Schedule multiple flows of a type, do filter expansion if needed.
:param flow_name: flow name t... |
pforret/python-for-android | refs/heads/master | python3-alpha/python-libs/atom/http.py | 46 | #!/usr/bin/python
#
# Copyright (C) 2008 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 applicable law ... |
BorgERP/borg-erp-6of3 | refs/heads/master | server/openerp/pychart/afm/Helvetica_Narrow_Oblique.py | 15 | # -*- coding: utf-8 -*-
# AFM font Helvetica-Narrow-Oblique (path: /usr/share/fonts/afms/adobe/phvro8an.afm).
# Derived from Ghostscript distribution.
# Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code.
import dir
dir.afm["Helvetica-Narrow-Oblique"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500... |
spyder-ide/spyder.line-profiler | refs/heads/master | spyder_line_profiler/__init__.py | 2 | # -*- coding: utf-8 -*-
#
# Copyright © 2013 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
__version__ = '0.3.0.dev0'
# =============================================================================
# The following statements are required to register this 3rd... |
nunogt/tempest | refs/heads/master | tempest/api/compute/limits/__init__.py | 12133432 | |
ThiagoGarciaAlves/intellij-community | refs/heads/master | python/testData/types/NotImportedModuleInDunderAll/pkg/aaa.py | 12133432 | |
torchingloom/edx-platform | refs/heads/select/release | lms/lib/xblock/test/__init__.py | 12133432 | |
SophiZweig3/Sophie | refs/heads/master | py/openage/testing/__init__.py | 12133432 | |
qliu/globe_nocturne | refs/heads/master | globenocturne/smart_selects/__init__.py | 12133432 | |
Ernest0x/django-gpgauth | refs/heads/master | gpgauth/views.py | 1 | from django.shortcuts import render_to_response, redirect
from django.http import HttpResponseRedirect
from django.template import RequestContext
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.validators import validate_email
from django.contrib.auth.models impor... |
bitmovin/bitmovin-python | refs/heads/master | bitmovin/services/encodings/sprite_service.py | 1 | from bitmovin.errors import MissingArgumentError
from bitmovin.resources.models import Sprite as SpriteResource
from bitmovin.services.rest_service import RestService
class SpriteService(RestService):
BASE_ENDPOINT_URL = 'encoding/encodings/{encoding_id}/streams/{stream_id}/sprites'
def __init__(self, http_c... |
alanljj/oca_hr | refs/heads/8.0 | hr_family/__init__.py | 22 | # -*- coding:utf-8 -*-
#
#
# Copyright (C) 2011 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# 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, eit... |
virantha/verifytree | refs/heads/master | verifytree/dir_checksum.py | 1 | # Copyright 2015 Virantha Ekanayake 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... |
wongma7/kubernetes | refs/heads/master | vendor/github.com/ugorji/go/codec/test.py | 1516 | #!/usr/bin/env python
# This will create golden files in a directory passed to it.
# A Test calls this internally to create the golden files
# So it can process them (so we don't have to checkin the files).
# Ensure msgpack-python and cbor are installed first, using:
# sudo apt-get install python-dev
# sudo apt-g... |
ThomasFeher/audacity | refs/heads/master | lib-src/lv2/lilv/waflib/Tools/intltool.py | 330 | #! /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 os,re
from waflib import Configure,TaskGen,Task,Utils,Runner,Options,Build,Logs
import waflib.Tools.ccroot
from waflib.TaskGen import feature,before_method
from waflib.... |
nagyistoce/odoo-dev-odoo | refs/heads/8.0 | addons/mass_mailing/models/res_config.py | 385 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class MassMailingConfiguration(osv.TransientModel):
_name = 'marketing.config.settings'
_inherit = 'marketing.config.settings'
_columns = {
'group_mass_mailing_campaign': fields.boolean(
'Manage Mass Mailing using Campaign',... |
ghm1/ardupilotIRLock | refs/heads/Copter-3.3 | Tools/autotest/param_metadata/xmlemit.py | 238 | #!/usr/bin/env python
from xml.sax.saxutils import escape, quoteattr
from param import *
from emit import Emit
# Emit APM documentation in an machine readable XML format
class XmlEmit(Emit):
def __init__(self):
wiki_fname = 'apm.pdef.xml'
self.f = open(wiki_fname, mode='w')
preamble ... |
linjoahow/2015cdaa-w11 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/browser/timer.py | 610 | from browser import window
def wrap(func):
# Transforms a function f into another function that prints a
# traceback in case of exception
def f(*args, **kw):
try:
return func(*args, **kw)
except Exception as exc:
sys.stderr.write(exc)
return f
clear_interval = w... |
gwpy/gwpy.github.io | refs/heads/master | docs/latest/examples/miscellaneous/range-timeseries-4.py | 3 | plot = h1range.plot(label='LIGO-Hanford', color='gwpy:ligo-hanford',
figsize=(12, 5))
ax = plot.gca()
ax.plot(l1range, label='LIGO-Livingston', color='gwpy:ligo-livingston')
ax.set_ylabel('Angle-averaged sensitive distance [Mpc]')
ax.set_title('LIGO sensitivity to BNS around GW150914')
ax.set_epoch(... |
Honzin/ccs | refs/heads/master | tests/testResponse/testPoloniex/testTicker.py | 1 | import unittest
import ccs
import datetime
####################################################################################################################
# POLONIEX #
###########################################... |
aaxx/thumbor | refs/heads/master | tests/test_meta_transform.py | 14 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
from os.path import abspath, dirname, join
import json
from tornado... |
DarthMaulware/EquationGroupLeaks | refs/heads/master | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/uuid.py | 1 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: uuid.py
r"""UUID objects (universally unique identifiers) according to RFC 4122.
This module provides immutable UUID objects (class UUID) and the fu... |
pingf/PyModulesLearning | refs/heads/master | logging/context.py | 1 | import logging
import traceback
logging.basicConfig(format='%(asctime)s %(levelname)s:%(message)s', level=logging.DEBUG, datefmt='%m/%d/%Y %I:%M:%S %p')
logging.debug('This message should appear on the console')
class A(object):
def test(self):
try:
raise Exception('WTF!')
except Exce... |
nagyistoce/OpenBird | refs/heads/master | cocos2d/tools/cpp-best-practise-formatter/cpp-best-practise-formatter.py | 16 | #!/usr/bin/env python
import os
import re
import sys
# list of extensions to replace
replace_extensions = [".cpp", ".h", ".hpp", ".cc", ".mm"]
files_to_skip = None
replace_type = None
skip_contents = ["CCPointMake", "CCSizeMake", "CCRectMake", "CCLOG", \
"CCLog", "CCAssert", "CCSkeleton"]
def try_to... |
nuobit/odoo-addons | refs/heads/11.0 | contract_line_tax/__manifest__.py | 1 | # Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
# Eric Antones <eantones@nuobit.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
'name': 'Contract line tax',
'summary': 'This module adds taxes to lines and propagates it to invoice',
'version': '11.0.1.0.0',
'category'... |
barbuza/django | refs/heads/master | tests/delete/__init__.py | 12133432 | |
rcherrueau/sqlalchemy-migrate | refs/heads/cockroachdb/pike | migrate/tests/changeset/__init__.py | 12133432 | |
freezmeinster/avagata-site | refs/heads/dev | django/conf/locale/hi/__init__.py | 12133432 | |
cloudera/hue | refs/heads/master | desktop/core/ext-py/SQLAlchemy-1.3.17/lib/sqlalchemy/testing/plugin/__init__.py | 12133432 | |
ericmjl/bokeh | refs/heads/master | examples/app/stocks/download_sample_data.py | 1 | import os
import zipfile
from urllib.request import urlretrieve
def extract_hosted_zip(data_url, save_dir, exclude_term=None):
"""Downloads, then extracts a zip file."""
zip_name = os.path.join(save_dir, 'temp.zip')
# get the zip file
try:
print('Downloading %r to %r' % (data_url, zip_name))... |
ARamsey118/Reverse-Javadoc | refs/heads/master | bs4/element.py | 15 | import collections
import re
import sys
import warnings
from bs4.dammit import EntitySubstitution
DEFAULT_OUTPUT_ENCODING = "utf-8"
PY3K = (sys.version_info[0] > 2)
whitespace_re = re.compile("\s+")
def _alias(attr):
"""Alias one attribute name to another for backward compatibility"""
@property
def alias... |
chand3040/sree_odoo | refs/heads/master | openerp/modules/graph.py | 260 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... |
miguelgrinberg/slam | refs/heads/master | slam/cli.py | 1 | from __future__ import print_function
from datetime import datetime
import inspect
import json
import logging
import os
try:
import pkg_resources
except ImportError: # pragma: no cover
pkg_resources = None
import random
import re
import subprocess
import shutil
import string
import sys
import time
import bot... |
gopal1cloud/neutron | refs/heads/master | neutron/plugins/ml2/config.py | 27 | # Copyright (c) 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 ... |
codepantry/django | refs/heads/master | tests/postgres_tests/test_ranges.py | 161 | import datetime
import json
import unittest
from django import forms
from django.core import exceptions, serializers
from django.db import connection
from django.db.models import F
from django.test import TestCase, override_settings
from django.utils import timezone
from . import PostgreSQLTestCase
from .models impor... |
40223231/2015-cdb-g4-final-test-by-6-22 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/logging/__init__.py | 733 | # Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... |
Thor77/youtube-dl | refs/heads/master | youtube_dl/extractor/ooyala.py | 11 | from __future__ import unicode_literals
import re
import base64
from .common import InfoExtractor
from ..utils import (
int_or_none,
float_or_none,
ExtractorError,
unsmuggle_url,
determine_ext,
)
from ..compat import compat_urllib_parse_urlencode
class OoyalaBaseIE(InfoExtractor):
_PLAYER_BAS... |
TheMrNomis/mavlink | refs/heads/master | pymavlink/tools/mavflightmodes.py | 45 | #!/usr/bin/env python
'''
show changes in flight modes
'''
import sys, time, datetime, os
from argparse import ArgumentParser
parser = ArgumentParser(description=__doc__)
parser.add_argument("logs", metavar="LOG", nargs="+")
args = parser.parse_args()
from pymavlink import mavutil
def flight_modes(logfile):
... |
caot/intellij-community | refs/heads/master | python/lib/Lib/colorsys.py | 92 | """Conversion functions between RGB and other color systems.
This modules provides two functions for each color system ABC:
rgb_to_abc(r, g, b) --> a, b, c
abc_to_rgb(a, b, c) --> r, g, b
All inputs and outputs are triples of floats in the range [0.0...1.0]
(with the exception of I and Q, which covers a slightly... |
synergeticsedx/deployment-wipro | refs/heads/oxa/master.fic | common/djangoapps/util/memcache.py | 251 | """
This module provides a KEY_FUNCTION suitable for use with a memcache backend
so that we can cache any keys, not just ones that memcache would ordinarily accept
"""
from django.utils.encoding import smart_str
import hashlib
import urllib
def fasthash(string):
"""
Hashes `string` into a string representatio... |
pferreir/indico | refs/heads/master | indico/util/mdx_latex.py | 3 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
"""Extension to python-markdown to support LaTeX (rather than html) output.
Authored by Rufus Pollock: <h... |
florentx/OpenUpgrade | refs/heads/8.0 | addons/event/wizard/__init__.py | 435 | # -*- 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... |
Epirex/android_external_chromium_org | refs/heads/cm-11.0 | tools/perf/page_sets/PRESUBMIT.py | 23 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import re
import sys
def LoadSupport(input_api):
if 'cloud_storage' not in globals():
# Avoid leaking changes to global sys.path.
_... |
mattmccarthy11/vidly-development | refs/heads/master | bk/mediacore/controllers/admin/index.py | 14 | from mediadrop.controllers.admin.index import *
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.