repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
taoenator/robber.py
refs/heads/master
robber/matchers/__init__.py
1
__all__ = [ 'equal', 'identical', 'boolean', 'instanceof', 'regexp', 'respond_to', 'truthy', 'length', 'types', 'numbers', 'contain' ] # from robber.matchers.base import * from robber.matchers.equal import * from robber.matchers.identical import * from robber.matchers.boolean import * from robber.matchers.i...
popazerty/EG-2
refs/heads/master
lib/python/Components/Task.py
55
# A Job consists of many "Tasks". # A task is the run of an external tool, with proper methods for failure handling from Tools.CList import CList class Job(object): NOT_STARTED, IN_PROGRESS, FINISHED, FAILED = range(4) def __init__(self, name): self.tasks = [ ] self.resident_tasks = [ ] self.workspace = "/tmp...
mhbu50/frappe
refs/heads/develop
frappe/email/inbox.py
8
import frappe import json def get_email_accounts(user=None): if not user: user = frappe.session.user email_accounts = [] accounts = frappe.get_all("User Email", filters={ "parent": user }, fields=["email_account", "email_id", "enable_outgoing"], distinct=True, order_by="idx") if not accounts: return { ...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/lxml-3.4.4/ez_setup.py
202
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
illfelder/libcloud
refs/heads/trunk
libcloud/common/dimensiondata.py
11
# 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 ...
PennyQ/astro-vispy
refs/heads/master
glue_vispy_viewers/isosurface/viewer_state.py
6
from glue_vispy_viewers.volume.viewer_state import Vispy3DVolumeViewerState class Vispy3DIsosurfaceViewerState(Vispy3DVolumeViewerState): pass
bryx-inc/boto
refs/heads/develop
tests/unit/vpc/test_vpngateway.py
114
# -*- coding: UTF-8 -*- from tests.compat import OrderedDict from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, VpnGateway, Attachment class TestDescribeVpnGateways(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self...
MyGb/PythonApplication
refs/heads/master
webApp/webApp/settings.py
1
""" Django settings for webApp project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os ...
parkouss/treeherder
refs/heads/master
treeherder/etl/tasks/cleanup_tasks.py
9
import logging import urllib from celery import task from treeherder.etl.pushlog import MissingHgPushlogProcess from treeherder.model.derived import RefDataManager logger = logging.getLogger(__name__) @task(name='fetch-missing-push-logs') def fetch_missing_push_logs(missing_pushlogs): """ Run several fetch...
automl/HPOlibConfigSpace
refs/heads/master
HPOlibConfigSpace/nx/algorithms/components/__init__.py
2
from HPOlibConfigSpace.nx.algorithms.components.strongly_connected import *
aganezov/gos-asm
refs/heads/master
gos_asm/algo/executable_containers/__init__.py
1349
# -*- coding: utf-8 -*-
spartonia/saleor
refs/heads/master
saleor/product/migrations/0005_auto_20150825_1433.py
17
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_prices.models import saleor.product.models.fields class Migration(migrations.Migration): dependencies = [ ('product', '0004_merge'), ] operations = [ migrations.AlterFi...
indeedops/dd-agent
refs/heads/master
tests/core/test_transaction.py
8
# stdlib from datetime import datetime, timedelta import threading import time import unittest # 3rd party from nose.plugins.attrib import attr import requests import simplejson as json from tornado.web import Application # project from config import get_version from ddagent import ( APIMetricTransaction, API...
ordinary-developer/book_python_cookbook_3_ed_d_beazley_b_k_jones
refs/heads/master
code/ch_1-DATA_STRUCTURES_AND_ALGORITHMS/11-naming_a_slice/main.py
3
def example_1(): ###### 0123456789012345678901234567890123456789012345678901234567890 record = ' 100 513.25 ' cost = int(record[20:32]) * float(record[40:48]) print(cost) SHARES = slice(20, 32) PRICE = slice(40, 48) cost = int(record[SHARE...
ales-erjavec/orange
refs/heads/master
install-scripts/orngServer/orngServerFilesServer.py
6
import sys sys.path.insert(0,"../CherryPy-3.1.0") import cherrypy print "Loaded CherryPy version", cherrypy.__version__ import os import shutil import re import hashlib import threading import cgi pj = os.path.join import datetime basedir = pj(os.getcwd(), "..", "orngServerData") userfilename = '../orngServerFilesU...
harmy/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/distutils/tests/test_extension.py
6
"""Tests for distutils.extension.""" import unittest import os import warnings from test.support import check_warnings, run_unittest from distutils.extension import read_setup_file, Extension class ExtensionTestCase(unittest.TestCase): def test_read_setup_file(self): # trying to read a Setup f...
dbcls/dbcls-galaxy
refs/heads/master
tools/maf/interval_maf_to_merged_fasta.py
1
#!/usr/bin/env python """ Reads an interval or gene BED and a MAF Source. Produces a FASTA file containing the aligned intervals/gene sequences, based upon the provided coordinates Alignment blocks are layered ontop of each other based upon score. usage: %prog maf_file [options] -d, --dbkey=d: Database key, ie hg...
dahlstrom-g/intellij-community
refs/heads/master
python/helpers/tests/generator3_tests/data/SkeletonGeneration/origin_stamp_in_skeleton_header_is_updated_on_copying/after/cache/e3b0c44298/mod.py
24
# encoding: utf-8 # module mod # from some/existing/binary.py # by generator 1000.0 # no doc # no imports # no functions # no classes
baishancloud/pykit
refs/heads/master
mathtoy/test/test_mathtoy.py
2
#!/usr/bin/env python # coding: utf-8 import unittest from pykit import ututil from pykit.mathtoy import Matrix from pykit.mathtoy import Polynomial from pykit.mathtoy import Vector dd = ututil.dd class TestVector(unittest.TestCase): def test_vector(self): a = Vector([1, 2, 3]) b = a + [2, 3,...
emedvedev/st2
refs/heads/master
st2actions/st2actions/notifier/notifier.py
1
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
shahbaz17/zamboni
refs/heads/master
mkt/account/urls.py
2
from django.conf.urls import include, patterns, url from mkt.account.views import (AccountView, FeedbackView, FxALoginView, GroupsViewSet, InstalledViewSet, LoginView, LogoutView, NewsletterView, PermissionsView) from mkt.feed.views import FeedShelfViewSet ...
RyanChinSang/ECNG3020-ORSS4SCVI
refs/heads/master
BETA/TestCode/Tensorflow/Test/object_detection/protos/input_reader_pb2.py
7
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/input_reader.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobu...
ambitioninc/django-query-builder
refs/heads/develop
querybuilder/tests/utils.py
2
def get_postgres_version(): """We get the version as an integer. Last two digits are patch version, two before that are minor version, start is the major version. Return the version as a 3-tuple. Eg: 90311 -> 9.3.11 -> (9, 3, 11) """ # Import this here so we can import this method before we h...
muntasirsyed/intellij-community
refs/heads/master
python/testData/refactoring/extractmethod/CommentIncluded.before.py
79
<selection>tmp = "!" #try to extract this assignment, either with or without this comment</selection> def bar(self): pass
40223136/w17test1
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/threading.py
730
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys import _thread from time import sleep as _sleep try: from time import monotonic as _time except ImportError: from time import time as _time from traceback import format_exc as _format_exc from _weakrefset import WeakSet # No...
kingvuplus/xx-v
refs/heads/master
lib/python/Tools/__init__.py
12133432
Endika/partner-contact
refs/heads/8.0
partner_external_maps/partner_external_maps.py
22
# -*- coding: utf-8 -*- ############################################################################## # # Partner External Maps module for Odoo # Copyright (C) 2015 Akretion (http://www.akretion.com/) # @author: Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can redi...
clouddocx/boto
refs/heads/master
boto/ec2containerservice/layer1.py
135
# Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
markvl/acrylamid
refs/heads/master
acrylamid/filters/replace.py
2
# -*- encoding: utf-8 -*- # # Copyright 2014 Christian Koepp <ckoepp@gmail.com>. All rights reserved. # License: BSD Style, 2 clauses -- see LICENSE. from acrylamid import log from acrylamid.filters import Filter class Replace(Filter): match = ['replace'] version = 1 priority = 0.0 def init(self, con...
ad2476/fb-toy-langmod
refs/heads/master
corpus.py
1
#!/usr/bin/env python2 import sys import argparse from os import path import numpy as np def parseProgramArgs(): parser = argparse.ArgumentParser(description="Split a corpus into test/train documents.") parser.add_argument("corpus", help="Path to corpus") parser.add_argument("output_dir", help="Directory into w...
aryeh/py-authorize
refs/heads/master
authorize/customer.py
3
from authorize import Configuration class Customer(object): @staticmethod def create(params={}): return Configuration.api.customer.create(params) @staticmethod def details(customer_id): return Configuration.api.customer.details(customer_id) @staticmethod def update(customer_...
ljnutal6/media-recommend
refs/heads/master
app/virtualenvs/recommedia/lib/python2.7/site-packages/werkzeug/datastructures.py
314
# -*- coding: utf-8 -*- """ werkzeug.datastructures ~~~~~~~~~~~~~~~~~~~~~~~ This module provides mixins and classes with an immutable interface. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import sys import cod...
dparlevliet/zelenka-report-storage
refs/heads/master
server-db/twisted/python/test/test_release.py
5
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.release} and L{twisted.python._release}. All of these tests are skipped on platforms other than Linux, as the release is only ever performed on Linux. """ import glob import warnings import operator import os impo...
vertcoin/electrum-vtc
refs/heads/master
gui/vtc/history_list.py
4
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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...
mpoindexter/kafka
refs/heads/trunk
tests/kafkatest/services/verifiable_producer.py
21
# 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 ...
ARamsey118/Reverse-Javadoc
refs/heads/master
ClassFinder.py
1
#!/usr/bin/python3 import ReverseDoc import os from bs4 import BeautifulSoup from urllib.request import urlopen import urllib.error class Java(): """ Holds a java class with its location. """ def __init__(self): self.name = "" self.location = "" def __str__(self): return s...
phvu/DDF
refs/heads/master
python/setup.py
3
from setuptools import setup, find_packages from setuptools.command.install import install def __read_version(file_path): import json from collections import defaultdict return defaultdict(str, json.loads(open(file_path).read())) _version = __read_version('./ddf/version.json')['version'] setup( cmdc...
terryjbates/cookiecutter
refs/heads/master
tests/test_read_user_choice.py
27
# -*- coding: utf-8 -*- import click import pytest from cookiecutter.prompt import read_user_choice OPTIONS = ['hello', 'world', 'foo', 'bar'] EXPECTED_PROMPT = """Select varname: 1 - hello 2 - world 3 - foo 4 - bar Choose from 1, 2, 3, 4""" @pytest.mark.parametrize('user_choice, expected_value', enumerate(OPTIO...
vmarkovtsev/django
refs/heads/master
django/contrib/contenttypes/admin.py
191
from __future__ import unicode_literals from functools import partial from django.contrib.admin.checks import InlineModelAdminChecks from django.contrib.admin.options import InlineModelAdmin, flatten_fieldsets from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.forms impo...
arborh/tensorflow
refs/heads/master
tensorflow/python/debug/lib/source_remote.py
6
# 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...
google/layered-scene-inference
refs/heads/master
lsi/geometry/homography.py
1
#!/usr/bin/python # # Copyright 2018 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 required by applicable law or ag...
vincepandolfo/django
refs/heads/master
django/views/generic/detail.py
65
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import ContextMixin, TemplateResponseMixin, View class SingleObjectMixin(Conte...
fuhongliang/erpnext
refs/heads/develop
erpnext/patches/v4_0/update_tax_amount_after_discount.py
120
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("accounts", "doctype", "sales_taxes_and_charges") docs_with_discount_amount = frappe._dict() for dt i...
klebercode/canaa
refs/heads/master
canaa/current_path.py
1
from django.conf.global_settings import LANGUAGES class CurrentPathMiddleware: def process_request(self, request): l_path = request.path.split('/') request.session['no_lang_path'] = request.path codes = [] for code, name in LANGUAGES: codes.append(code) if l_pat...
0x90sled/catapult
refs/heads/master
third_party/gsutil/gslib/project_id.py
38
# -*- coding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
OscarPDR/projects_morelab
refs/heads/master
projects/urls.py
1
from django.conf.urls import patterns, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns = patterns('', url(r'^$', 'projects.views.project_index', name='project_index'), url(r'^add/$', 'projects.views.add_project', name='add_project'), url(r'^info/(\S+)$', 'projects.views....
ujvl/ray-ng
refs/heads/master
doc/examples/lbfgs/driver.py
2
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import os import scipy.optimize import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import ray import ray.experimental.tf_utils class LinearModel(object): ...
zqzhang/crosswalk-test-suite
refs/heads/master
misc/webdriver-w3c-tests/modal/alerts_test.py
12
# -*- mode: python; fill-column: 100; comment-column: 100; -*- import os import sys import unittest sys.path.append( os.path.abspath( os.path.join( os.path.dirname(__file__), os.path.pardir))) import base_test from client.exceptions import ElementNotVisibleException, NoSuchAlertEx...
karanisverma/feature_langpop
refs/heads/master
librarian/migrations/main/04_add_content_license_and_source_columns.py
2
SQL = """ alter table zipballs add column keep_formatting boolean not null default 0; alter table zipballs add column is_core boolean not null default 0; alter table zipballs add column is_partner boolean not null default 0; alter table zipballs add column is_sponsored boolean not null default 0; alter table zipballs a...
SHDShim/pytheos
refs/heads/master
examples/6_p_scale_test_Yokoo_Pt.py
1
# coding: utf-8 # In[1]: get_ipython().run_line_magic('cat', '0Source_Citation.txt') # In[2]: get_ipython().run_line_magic('matplotlib', 'inline') # %matplotlib notebook # for interactive # For high dpi displays. # In[3]: get_ipython().run_line_magic('config', "InlineBackend.figure_format = 'retina'") # ...
boyombo/django-stations
refs/heads/master
stations/drugshare/__init__.py
12133432
erdavila/M-Tree
refs/heads/master
py/mtree/tests/__init__.py
12133432
dotKom/onlineweb4
refs/heads/develop
apps/splash/migrations/0008_auto_20160812_2053.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-08-12 18:53 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('splash', '0007_auto_20160812_2053'), ] operations = [ migrations.RemoveField( ...
seanwestfall/django
refs/heads/master
tests/urlpatterns_reverse/erroneous_views_module.py
319
import non_existent # NOQA def erroneous_view(request): pass
ElricleNecro/LibThese
refs/heads/master
LibThese/Pretty/W0_py.py
1
import abc import numpy as np from matplotlib import pyplot as plt from matplotlib import widgets as w from astropy import constants as const from LibThese.Models.King import DimKing as King def CalcMtot(w0, rc, sig_v): test = King(w0, rc, sig_v, G=const.G.value) test.DimSolve2() test.DimXAxis() test.Cal...
inn1983/xbmca10-empatzero
refs/heads/master
tools/EventClients/examples/python/example_notification.py
228
#!/usr/bin/python # This is a simple example showing how you can show a notification # window with a custom icon inside XBMC. It could be used by mail # monitoring apps, calendar apps, etc. import sys sys.path.append("../../lib/python") from xbmcclient import * from socket import * def main(): import time i...
awacha/cct
refs/heads/master
cct/processing/mainwindow/exporttool/__init__.py
1
from .exporttool import ExportTool
anant-dev/django
refs/heads/master
django/contrib/admin/options.py
92
import copy import operator from collections import OrderedDict from functools import partial, reduce, update_wrapper from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from django.contrib.admin.checks import ( BaseModelAd...
makerbot/s3g
refs/heads/master
tests/pi_test_S3g.py
2
import os import sys lib_path = os.path.abspath('./') sys.path.insert(0, lib_path) import uuid import unittest import io import struct import mock import threading import serial from makerbot_driver import Writer, constants, s3g, errors, Encoder class TestS3gPrintToFileType(unittest.TestCase): def test_print_to...
laperry1/android_external_chromium_org
refs/heads/cm-12.1
tools/cr/cr/actions/__init__.py
112
# Copyright 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. """A package to hold all the actions for the cr tool. This package holds the standard actions used by the commands in the cr tool. These actions are the thi...
houssemFat/MeeM-Dev
refs/heads/master
core/apps/decorators/authorization.py
12133432
harmattan/qt-components-graphics-bb10
refs/heads/master
scripts/verify.py
1
#!/usr/bin/python from itertools import ifilter from os import walk, path from md5 import new as md5 def traversedir(where): for root, dirs, candidates in walk(where): for filename in ifilter(lambda x: '.' in x, candidates): yield(path.join(root, filename)) def parse_tree(where, theme={}): ...
jeffzheng1/tensorflow
refs/heads/master
tensorflow/contrib/layers/python/layers/feature_column_ops_test.py
1
# 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...
koobonil/Boss2D
refs/heads/master
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/python/lib/io/file_io_test.py
31
# 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...
ktan2020/legacy-automation
refs/heads/master
win/Lib/site-packages/selenium/webdriver/support/events.py
55
#!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # 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 ap...
xuxiandi/gensim
refs/heads/develop
gensim/test/__init__.py
97
""" This package contains automated code tests for all other gensim packages. """
achang97/YouTunes
refs/heads/master
lib/python2.7/site-packages/youtube_dl/extractor/beeg.py
2
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_chr, compat_ord, compat_urllib_parse_unquote, ) from ..utils import ( int_or_none, parse_iso8601, urljoin, ) class BeegIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?beeg\.com/(?P...
MichaelMraka/dnf
refs/heads/master
dnf/i18n.py
6
# i18n.py # # Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope ...
quozl/sugar
refs/heads/master
tests/views/journal_detailstoolbox.py
2
# Copyright (C) 2013, Walter Bender # # 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 in...
neumerance/cloudloon2
refs/heads/master
.venv/lib/python2.7/site-packages/django/middleware/csrf.py
32
""" Cross Site Request Forgery Middleware. This module provides a middleware that implements protection against request forgeries from other sites. """ from __future__ import unicode_literals import hashlib import logging import re import random from django.conf import settings from django.core.urlresolvers import g...
kartikluke/yotube
refs/heads/master
oauth2client/service_account.py
1
# Copyright (C) 2014 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 or agreed to in writ...
Dandandan/wikiprogramming
refs/heads/master
jsrepl/extern/python/unclosured/lib/python2.7/encodings/utf_16_le.py
860
""" Python 'utf-16-le' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_16_le_encode def decode(input, errors='strict'): return codecs.utf_16_le_decode(input, errors, True) class IncrementalEncod...
a0c/odoo
refs/heads/master
openerp/addons/base/res/res_users.py
1
# -*- 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...
nsoranzo/tools-iuc
refs/heads/master
tools/query_tabular/filters.py
11
#!/usr/binsenv python from __future__ import print_function import re import sys class LineFilter(object): def __init__(self, source, filter_dict): self.source = source self.filter_dict = filter_dict self.func = lambda i, l: l.rstrip('\r\n') if l else None self.src_lines = [] ...
yfried/ansible
refs/heads/devel
lib/ansible/module_utils/network/aruba/aruba.py
84
# 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...
patrickm/chromium.src
refs/heads/nw
third_party/tlslite/tlslite/HandshakeSettings.py
359
"""Class for setting handshake parameters.""" from constants import CertificateType from utils import cryptomath from utils import cipherfactory class HandshakeSettings: """This class encapsulates various parameters that can be used with a TLS handshake. @sort: minKeySize, maxKeySize, cipherNames, certifi...
robobrobro/ballin-octo-shame
refs/heads/master
lib/Python-3.4.3/Lib/email/headerregistry.py
14
"""Representing and manipulating email headers via custom objects. This module provides an implementation of the HeaderRegistry API. The implementation is designed to flexibly follow RFC5322 rules. Eventually HeaderRegistry will be a public API, but it isn't yet, and will probably change some before that happens. ""...
abhishek-ch/hue
refs/heads/master
desktop/core/ext-py/Paste-2.0.1/paste/fixture.py
33
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Routines for testing WSGI applications. Most interesting is the `TestApp <class-paste.fixture.TestApp.html>`_ for testing WSGI applications, and t...
ptdtan/Ragout
refs/heads/master
lib/networkx/algorithms/traversal/depth_first_search.py
22
""" ================== Depth-first search ================== Basic algorithms for depth-first searching. Based on http://www.ics.uci.edu/~eppstein/PADS/DFS.py by D. Eppstein, July 2004. """ __author__ = """\n""".join(['Aric Hagberg <hagberg@lanl.gov>']) __all__ = ['dfs_edges', 'dfs_tree', 'dfs_predecessor...
jkonecny12/pykickstart
refs/heads/master
pykickstart/commands/multipath.py
8
# # Chris Lumens <clumens@redhat.com> # Peter Jones <pjones@redhat.com> # # Copyright 2006, 2007 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distri...
proevo/pythondotorg
refs/heads/master
jobs/feeds.py
3
from django.contrib.syndication.views import Feed from django.urls import reverse_lazy from .models import Job class JobFeed(Feed): """ Python.org Jobs RSS Feed """ title = "Python.org Jobs Feed" description = "Python jobs from Python.org" link = reverse_lazy('jobs:job_list') def items(self): ...
mohammed-alfatih/servo
refs/heads/master
tests/wpt/harness/docs/conf.py
207
# -*- coding: utf-8 -*- # # wptrunner documentation build configuration file, created by # sphinx-quickstart on Mon May 19 18:14:20 2014. # # 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. # #...
HERA-Team/pyuvdata
refs/heads/multi_source
scripts/readwrite_uvfits.py
1
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Read in a uvfits file and write a new one out.""" import argparse import os.path as op from pyuvdata import UVData parser = argparse.ArgumentParser() parser.add...
Serag8/Bachelor
refs/heads/master
google_appengine/lib/webob-1.1.1/webob/__init__.py
21
from webob.datetime_utils import * from webob.request import * from webob.response import * from webob.util import html_escape __all__ = [ 'Request', 'Response', 'UTC', 'day', 'week', 'hour', 'minute', 'second', 'month', 'year', 'html_escape' ] BaseRequest.ResponseClass = Response Response.RequestClass = ...
bejmy/backend
refs/heads/master
bejmy/transactions/admin.py
1
from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.db.models import DecimalField, Sum from django.db.models.functions import Coalesce from django.utils.translation import ugettext as _ from mptt.admin import TreeRelatedFieldListFilter from rangefilter.filter import Date...
mjrulesamrat/django-rest-auth
refs/heads/master
test_settings.py
22
import django import os import sys PROJECT_ROOT = os.path.abspath(os.path.split(os.path.split(__file__)[0])[0]) ROOT_URLCONF = 'urls' STATIC_URL = '/static/' STATIC_ROOT = '%s/staticserve' % PROJECT_ROOT STATICFILES_DIRS = ( ('global', '%s/static' % PROJECT_ROOT), ) UPLOADS_DIR_NAME = 'uploads' MEDIA_URL = '/%s/' ...
ampax/edx-platform-backup
refs/heads/live
lms/djangoapps/instructor_task/tests/factories.py
124
import json import factory from factory.django import DjangoModelFactory from student.tests.factories import UserFactory as StudentUserFactory from instructor_task.models import InstructorTask from celery.states import PENDING from opaque_keys.edx.locations import SlashSeparatedCourseKey class InstructorTaskFactory(...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/scipy/special/tests/test_pcf.py
53
"""Tests for parabolic cylinder functions. """ import numpy as np from numpy.testing import assert_allclose, assert_equal import scipy.special as sc def test_pbwa_segfault(): # Regression test for https://github.com/scipy/scipy/issues/6208. # # Data generated by mpmath. # w = 1.022765672113168671...
popazerty/openblackhole-SH4
refs/heads/master
lib/python/Components/Converter/EcmCryptoInfo.py
15
# # EcmCryptoInfo Converter by mcbain // v0.1 // 20111109 # from Components.Converter.Converter import Converter from Components.Element import cached from Components.config import config from Poll import Poll import os ECM_INFO = '/tmp/ecm.info' old_ecm_mtime = None data = None class EcmCryptoInfo(Poll, Converter,...
Decker108/MangaFeedr
refs/heads/master
src/model/Feed.py
1
''' Created on Mar 24, 2013 @author: Admin ''' class Feed(object): def __init__(self, channelTitle=None, channelLink=None, latestUpdateDate=None, markedReadDate=None): '''Constructor''' self.id = None self.markedReadDate = markedReadDate self.latestUpdateDate = latestUpdateDate ...
Work4Labs/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/regressiontests/model_inheritance_regress/models.py
75
import datetime from django.db import models class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) class Meta: ordering = ('name',) def __unicode__(self): return u"%s the place" % self.name class Restaurant(Place): serves_hot...
EliotBerriot/django
refs/heads/master
django/views/generic/detail.py
306
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import ContextMixin, TemplateResponseMixin, View class SingleObjectMixin(Conte...
smaato/django-ses
refs/heads/master
example/views.py
6
from django.http import HttpResponse from django.core.urlresolvers import reverse from django.core.mail import send_mail, EmailMessage from django.shortcuts import render_to_response def index(request): return render_to_response('index.html') def send_email(request): if request.method == 'POST': try: ...
ares/robottelo
refs/heads/master
robottelo/ui/products.py
3
"""Implements Products UI""" from robottelo.ui.base import Base from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class Products(Base): """Manipulates Products from UI""" is_katello = True def navigate_to_entity(self): """Navig...
codester2/devide
refs/heads/master
modules/vtk_basic/vtkXMLPImageDataWriter.py
7
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkXMLPImageDataWriter(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, ...
DevBrush/latchbox
refs/heads/master
vendor/src/github.com/nsf/termbox-go/collect_terminfo.py
184
#!/usr/bin/env python import sys, os, subprocess def escaped(s): return repr(s)[1:-1] def tput(term, name): try: return subprocess.check_output(['tput', '-T%s' % term, name]).decode() except subprocess.CalledProcessError as e: return e.output.decode() def w(s): if s == None: return sys.stdout.write(s) ...
Zeken/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-sampler.lv2/waflib/Tools/bison.py
332
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib import Task from waflib.TaskGen import extension class bison(Task.Task): color='BLUE' run_str='${BISON} ${BISONFLAGS} ${SRC[0].abspath()} -o ${TGT[0].name}' ext...
leggitta/mne-python
refs/heads/master
mne/stats/parametric.py
3
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # # License: Simplified BSD import numpy as np from functools import reduce from string import ascii_uppercase from ..externals.six import strin...
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/views/app3/__init__.py
9480
#
mhahn/troposphere
refs/heads/master
tests/test_rds.py
7
import unittest import troposphere.rds as rds from troposphere import If, Parameter, Ref class TestRDS(unittest.TestCase): def test_it_allows_an_rds_instance_created_from_a_snapshot(self): rds_instance = rds.DBInstance( 'SomeTitle', AllocatedStorage=100, DBInstanceClas...