repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
tashaxe/Red-DiscordBot | refs/heads/develop | lib/requests/__init__.py | 71 | # -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
Requests HTTP library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> ... |
dnxbjyj/python-basic | refs/heads/master | useful-func/map/test_map.py | 1 | # coding:utf-8
# 测试map函数的用法
'''
Docstring:
map(function, sequence[, sequence, ...]) -> list
Return a list of the results of applying the function to the items of
the argument sequence(s). If more than one sequence is given, the
function is called with an argument list consisting of the corresponding
item of ... |
kamyu104/django | refs/heads/master | tests/inline_formsets/tests.py | 326 | from __future__ import unicode_literals
from django.forms.models import inlineformset_factory
from django.test import TestCase, skipUnlessDBFeature
from django.utils import six
from .models import Child, Parent, Poem, Poet, School
class DeletionTests(TestCase):
def test_deletion(self):
PoemFormSet = in... |
dash-dash/pyzmq | refs/heads/master | zmq/auth/base.py | 7 | """Base implementation of 0MQ authentication."""
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import logging
import zmq
from zmq.utils import z85
from zmq.utils.strtypes import bytes, unicode, b, u
from zmq.error import _check_version
from .certs import load_certificat... |
40223247/2015test2-1 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/test/re_tests.py | 879 | #!/usr/bin/env python3
# -*- mode: python -*-
# Re test suite and benchmark suite v1.5
# The 3 possible outcomes for each pattern
[SUCCEED, FAIL, SYNTAX_ERROR] = range(3)
# Benchmark suite (needs expansion)
#
# The benchmark suite does not test correctness, just speed. The
# first element of each tuple is the regex... |
jaggu303619/asylum | refs/heads/master | openerp/report/render/odt2odt/__init__.py | 77 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
heeraj123/oh-mainline | refs/heads/master | vendor/packages/celery/funtests/setup.py | 19 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
from setuptools.command.install import install
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
from setuptools.command.install import install
import os
import s... |
hsfzxjy/wisecitymbc | refs/heads/master | site_packages/bs4/diagnose.py | 431 | """Diagnostic functions, mainly for use when doing tech support."""
import cProfile
from StringIO import StringIO
from HTMLParser import HTMLParser
import bs4
from bs4 import BeautifulSoup, __version__
from bs4.builder import builder_registry
import os
import pstats
import random
import tempfile
import time
import tra... |
kbdick/RecycleTracker | refs/heads/gh-pages | recyclecollector/scrap/gdata-2.0.18/build/lib.linux-x86_64-2.7/gdata/tlslite/integration/TLSTwistedProtocolWrapper.py | 237 | """TLS Lite + Twisted."""
from twisted.protocols.policies import ProtocolWrapper, WrappingFactory
from twisted.python.failure import Failure
from AsyncStateMachine import AsyncStateMachine
from gdata.tlslite.TLSConnection import TLSConnection
from gdata.tlslite.errors import *
import socket
import errno
... |
40223232/2015cd_midterm2 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/keyword.py | 761 | #! /usr/bin/env python3
"""Keywords (from "graminit.c")
This file is automatically generated; please don't muck it up!
To update the symbols in this file, 'cd' to the top directory of
the python source tree after building the interpreter and run:
./python Lib/keyword.py
"""
__all__ = ["iskeyword", "kwlist"]
k... |
kidaa/aurora | refs/heads/master | src/main/python/apache/aurora/client/api/scheduler_client.py | 4 | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under ... |
ej2/pixelpuncher | refs/heads/master | pixelpuncher/player/migrations/0007_auto_20151230_2157.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-30 21:57
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('player', '0006_auto_20151228_0324'),
]
operations = [
migrations.RemoveField(
... |
illicitonion/givabit | refs/heads/master | lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_2/django/conf/locale/hi/__init__.py | 12133432 | |
arrabito/DIRAC | refs/heads/integration | Workflow/__init__.py | 12133432 | |
maelnor/nova | refs/heads/master | nova/tests/virt/disk/__init__.py | 12133432 | |
elieux/pacman | refs/heads/master | test/pacman/tests/remove001.py | 12 | self.description = "Remove a package listed 5 times"
p = pmpkg("foo")
self.addpkg2db("local", p)
self.args = "-R " + "foo "*5
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=foo")
|
maxive/erp | refs/heads/master | addons/auth_signup/models/res_partner.py | 2 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import random
import werkzeug.urls
from collections import defaultdict
from datetime import datetime, timedelta
from odoo import api, exceptions, fields, models, _
class SignupError(Exception):
pass
def random_to... |
michaelgallacher/intellij-community | refs/heads/master | python/testData/optimizeImports/disableAlphabeticalOrder.after.py | 5 | from __future__ import unicode_literals
from __future__ import absolute_import
import sys
from datetime import timedelta
import z
import b
import a
from a import C1
from alphabet import D
from b import func
from
import foo # broken
import # broken
from alphabet import *
from alphabet import C
from alphabet import B, ... |
colede/qtcreator | refs/heads/master | tests/system/suite_APTW/tst_APTW01/test.py | 3 | #############################################################################
##
## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
## Contact: http://www.qt-project.org/legal
##
## This file is part of Qt Creator.
##
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this f... |
Juanlu001/PyFME | refs/heads/master | examples/example_002_stationary_descent.py | 1 | # -*- coding: utf-8 -*-
"""
Python Flight Mechanics Engine (PyFME).
Copyright (c) AeroPython Development Team.
Distributed under the terms of the MIT License.
Example
-------
Cessna 172, ISA1976 integrated with Flat Earth (Euler angles).
Example with trimmed aircraft: stationary descent, symmetric, wings level
fligh... |
bikong2/scikit-learn | refs/heads/master | sklearn/utils/fixes.py | 13 | """Compatibility fixes for older version of python, numpy and scipy
If you add content to this file, please give the version of the package
at which the fixe is no longer needed.
"""
# Authors: Emmanuelle Gouillart <[email protected]>
# Gael Varoquaux <[email protected]>
# ... |
madtypist/madtypist.github.io | refs/heads/master | .bundle/gems/pygments.rb-0.6.0/vendor/simplejson/simplejson/tests/test_bigint_as_string.py | 64 | from unittest import TestCase
import simplejson as json
class TestBigintAsString(TestCase):
values = [(200, 200),
((2 ** 53) - 1, 9007199254740991),
((2 ** 53), '9007199254740992'),
((2 ** 53) + 1, '9007199254740993'),
(-100, -100),
((-2 ** 53)... |
google/llvm-propeller | refs/heads/bb-clusters | lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py | 7 | """
Test basic std::unique_ptr functionality.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestUniquePtr(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))... |
gangadhar-kadam/sms-wnframework | refs/heads/master | core/doctype/workflow_transition/workflow_transition.py | 126 | # Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
#
# MIT License (MIT)
#
# 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 lim... |
xiaonanln/myleetcode-python | refs/heads/master | src/132. Palindrome Partitioning II.py | 1 | """
Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
For example, given s = "aab",
Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut.
"""
class Solution(object):
def minC... |
JulesMichael/DASS | refs/heads/master | DASS_parser/exemple.py | 1 | from __init__ import compileProject
compileProject("exemple_datas")
|
mixman/djangodev | refs/heads/master | tests/regressiontests/admin_changelist/tests.py | 1 | from __future__ import with_statement, absolute_import
from django.contrib import admin
from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.admin.views.main import ChangeList, SEARCH_VAR, ALL_VAR
from django.contrib.auth.models import User
from django.template import Context, Templat... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py | 1 | # 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 ... |
djkonro/client-python | refs/heads/master | kubernetes/test/test_v1_token_review_spec.py | 2 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... |
siskin/bluetooth-next | refs/heads/feature-rpl | tools/perf/scripts/python/check-perf-trace.py | 1997 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <[email protected]>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... |
billyhunt/osf.io | refs/heads/develop | scripts/consistency/impute_log_date.py | 64 | """Due to an unknown bug, a handful of logs were saved without dates. This
script identifies logs without dates and imputes dates using ObjectIds.
Dry run: python -m scripts/consistency/impute_log_date
Real: python -m scripts/consistency/impute_log_date false
"""
from bson import ObjectId
from website.app import in... |
javierder/dogestart.me | refs/heads/master | django/bin/daily_cleanup.py | 113 | #!/usr/bin/env python
"""
Daily cleanup job.
Can be run as a cronjob to clean out old data from the database (only expired
sessions at the moment).
"""
import warnings
from django.core import management
if __name__ == "__main__":
warnings.warn(
"The `daily_cleanup` script has been deprecated "
... |
siasoft/hokkeist | refs/heads/master | backend/web/coloradmin/plugins/jquery-file-upload/server/gae-python/main.py | 242 | # -*- coding: utf-8 -*-
#
# jQuery File Upload Plugin GAE Python Example 2.1.1
# https://github.com/blueimp/jQuery-File-Upload
#
# Copyright 2011, Sebastian Tschan
# https://blueimp.net
#
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT
#
from __future__ import with_statement
from google.appe... |
simplyguru-dot/ansible | refs/heads/devel | lib/ansible/playbook/conditional.py | 48 | # (c) 2012-2014, Michael DeHaan <[email protected]>
#
# 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) an... |
phe-bioinformatics/snapperdb | refs/heads/master | setup.py | 1 | #!/usr/bin/env python
from distutils.core import setup
import os
import sys
import pip
from pip.req import parse_requirements
def get_version():
version_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), "VERSION")
version = "N/A"
if os.path.exists(version_file):
try:
wit... |
CloudWareChile/OpenChile | refs/heads/master | openerp/addons/audittrail/__init__.py | 65 | # -*- 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... |
kennedyshead/home-assistant | refs/heads/dev | homeassistant/components/demo/sensor.py | 2 | """Demo platform that has a couple of fake sensors."""
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorEntity
from homeassistant.const import (
ATTR_BATTERY_LEVEL,
CONCENTRATION_PARTS_PER_MILLION,
DEVICE_CLASS_CO,
DEVICE_CLASS_CO2,
DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_T... |
samuelhavron/heroku-buildpack-python | refs/heads/master | Python-3.4.3/Lib/mailbox.py | 72 | """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
# Notes for authors of new mailbox subclasses:
#
# Remember to fsync() changes to disk before closing a modified file
# or returning from a flush() method. See functions _sync_flush() and
# _sync_close().
import os
import time
import calendar... |
MiLk/ansible | refs/heads/devel | lib/ansible/modules/monitoring/monit.py | 28 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Darryl Stoflet <[email protected]>
#
# 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 Li... |
diagramsoftware/odoo | refs/heads/8.0 | addons/sale_layout/models/sale_layout.py | 58 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
jml/flocker | refs/heads/master | flocker/control/test/__init__.py | 15 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.control``.
"""
|
yfried/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_gtm_monitor_tcp.py | 1 | #!/usr/bin/python
# -*- 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
mr-c/tools-iuc | refs/heads/master | tools/htseq/htseqsams2mx.py | 1 | # May 2013
# Change to htseq as the counting engine - wrap so arbitrary number of columns created
# borged Simon Anders' "count.py" since we need a vector of counts rather than a new sam file as output
# note attribution for htseq and count.py :
## Written by Simon Anders ([email protected]), European Molecular Biolo... |
akarambir/twython | refs/heads/master | examples/get_user_timeline.py | 9 | from twython import Twython, TwythonError
# Requires Authentication as of Twitter API v1.1
twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
try:
user_timeline = twitter.get_user_timeline(screen_name='ryanmcgrath')
except TwythonError as e:
print e
print user_timeline
|
bobcyw/django | refs/heads/master | tests/apps/default_config_app/apps.py | 553 | from django.apps import AppConfig
class CustomConfig(AppConfig):
name = 'apps.default_config_app'
|
YoshikawaMasashi/magenta | refs/heads/master | magenta/models/rl_tuner/rl_tuner.py | 2 | # Copyright 2016 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 required by applicable law or ag... |
auferack08/edx-platform | refs/heads/master | lms/djangoapps/instructor/features/bulk_email.py | 23 | """
Define steps for bulk email acceptance test.
"""
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import mail
from nose.tools import assert_in, assert_true, assert_equal # pylint: disable=E0611
from django.core.management import call_command
from django.conf imp... |
tequa/ammisoft | refs/heads/master | ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/site-packages/numpy/doc/constants.py | 55 | """
=========
Constants
=========
NumPy includes several constants:
%(constant_list)s
"""
#
# Note: the docstring is autogenerated.
#
from __future__ import division, absolute_import, print_function
import textwrap, re
# Maintain same format as in numpy.add_newdocs
constants = []
def add_newdoc(module, name, doc):
... |
manassolanki/erpnext | refs/heads/develop | erpnext/patches/v7_0/make_guardian.py | 23 | from __future__ import unicode_literals
import frappe
def execute():
if frappe.db.exists("DocType", "Student"):
student_table_cols = frappe.db.get_table_columns("Student")
if "father_name" in student_table_cols:
# 'Schools' module changed to the 'Education'
# frappe.reload_doc("schools", "doctype", "studen... |
BT-ojossen/odoo | refs/heads/8.0 | addons/l10n_fr_hr_payroll/report/__init__.py | 424 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# This program is free software: you can redistribute it and/or modify
# it... |
xiaoshuai09/Recurrent-Point-Process | refs/heads/master | RNNPP.py | 1 | import numpy as np
import matplotlib,sys
matplotlib.use('agg')
import tensorflow as tf
from BatchIterator import PaddedDataIterator
from generation import *
##############################################################################
# parameters
BATCH_SIZE = 256 # Batch size
MAX_STEPS = 300 # maximum le... |
nave91/teak-nbtree | refs/heads/master | graph_tools/csver.py | 1 | #!/usr/env python
from sys import *
def line(file):
l = file.readline()
if l != '':
l = l.replace('\n','')
l = l.split(' ')
l = [i for i in l if i != '' ]
return l
file = open(argv[1],'r')
s=''
j=0
while True:
lst = line(file)
if not lst:
break
j+=1
s+=str(... |
raviflipsyde/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pytest/_pytest/assertion/__init__.py | 176 | """
support for presenting detailed information in failing assertions.
"""
import py
import os
import sys
from _pytest.monkeypatch import monkeypatch
from _pytest.assertion import util
def pytest_addoption(parser):
group = parser.getgroup("debugconfig")
group.addoption('--assert',
action="... |
hroncok/freeipa | refs/heads/master | ipatests/test_integration/env_config.py | 2 | # Authors:
# Petr Viktorin <[email protected]>
# Tomas Babej <[email protected]>
#
# Copyright (C) 2013 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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
# t... |
catapult-project/catapult-csm | refs/heads/master | third_party/gsutil/third_party/pyasn1/pyasn1/type/namedtype.py | 200 | # NamedType specification for constructed types
import sys
from pyasn1.type import tagmap
from pyasn1 import error
class NamedType:
isOptional = 0
isDefaulted = 0
def __init__(self, name, t):
self.__name = name; self.__type = t
def __repr__(self): return '%s(%s, %s)' % (
self.__class__.... |
FireBladeNooT/Medusa_1_6 | refs/heads/master | lib/unidecode/x05c.py | 252 | data = (
'Po ', # 0x00
'Feng ', # 0x01
'Zhuan ', # 0x02
'Fu ', # 0x03
'She ', # 0x04
'Ke ', # 0x05
'Jiang ', # 0x06
'Jiang ', # 0x07
'Zhuan ', # 0x08
'Wei ', # 0x09
'Zun ', # 0x0a
'Xun ', # 0x0b
'Shu ', # 0x0c
'Dui ', # 0x0d
'Dao ', # 0x0e
'Xiao ', # 0x0f
'Ji ', # 0x10... |
asa1253/portia | refs/heads/master | slybot/slybot/linkextractor/ecsv.py | 9 | import csv
from cStringIO import StringIO
from scrapy.link import Link
from .base import BaseLinkExtractor
# see http://docs.python.org/2/library/csv.html#csv-fmt-params
_FORMAT_PARAMETERS = (
('delimiter', ','),
('quotechar', '"'),
('doublequote', True),
('escapechar', None),
('lineterminator', ... |
niaquinto/AdvisorTool | refs/heads/master | server.py | 1 | #!/usr/bin/python3
import cherrypy
import app
def run_prod_server(app):
# Mount the WSGI callable object (app) on the root directory
cherrypy.tree.graft(app, '/')
# Set the configuration of the web server
cherrypy.config.update({
'engine.autoreload_on': True,
'server.socket_port': 808... |
Fulla/django-nestedgroupedlists | refs/heads/master | example/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
nanolearningllc/edx-platform-cypress-2 | refs/heads/master | lms/djangoapps/instructor_task/migrations/0001_initial.py | 114 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'InstructorTask'
db.create_table('instructor_task_instructortask', (
('id', self.... |
dogecoin/dogecoin | refs/heads/master | qa/rpc-tests/p2p-segwit.py | 20 | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test... |
nwalters512/the-blue-alliance | refs/heads/master | helpers/notification_helper.py | 4 | import datetime
import json
from consts.client_type import ClientType
from consts.notification_type import NotificationType
from controllers.api.api_status_controller import ApiStatusController
from helpers.push_helper import PushHelper
from models.event import Event
from models.sitevar import Sitevar
from notifica... |
invenia/iterparse | refs/heads/master | setup.py | 1 | #!/usr/bin/env python
from setuptools import setup, find_packages
import re
package_name = 'iterparse'
version = ''
with open('{}/__init__.py'.format(package_name), 'r') as f:
version = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*?)[\'"]',
f.read(), re.MULTILINE,
).group(1)
if not version:
... |
vrv/tensorflow | refs/heads/master | tensorflow/python/tools/strip_unused.py | 180 | # 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... |
mfalkiewicz/pySTATIS | refs/heads/master | pySTATIS/wine_data.py | 1 | import numpy as np
from pySTATIS.statis import STATISData
X1_name = 'Sub-01'
X1 = np.array([[8, 6, 7, 4, 1, 6],
[7, 5, 8, 1, 2, 8],
[6, 5, 6, 5, 3, 4],
[9, 6, 8, 4, 3, 5],
[2, 2, 2, 8, 7, 3],
[3, 4, 4, 9, 6, 1],
[5, 3, 5, 4, 8, 3... |
bguillot/OpenUpgrade | refs/heads/master | openerp/addons/test_convert/__openerp__.py | 437 | {
'name': 'test_convert',
'description': "Data for xml conversion tests",
'version': '0.0.1',
}
|
1upon0/rfid-auth-system | refs/heads/master | GUI/printer/Pillow-2.7.0/build/lib.linux-x86_64-2.7/PIL/JpegImagePlugin.py | 13 | #
# The Python Imaging Library.
# $Id$
#
# JPEG (JFIF) file handling
#
# See "Digital Compression and Coding of Continous-Tone Still Images,
# Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1)
#
# History:
# 1995-09-09 fl Created
# 1995-09-13 fl Added full parser
# 1996-03-25 fl Added hack to use th... |
bgris/ODL_bgris | refs/heads/master | lib/python3.5/site-packages/scipy/optimize/minpack.py | 11 | from __future__ import division, print_function, absolute_import
import warnings
from . import _minpack
import numpy as np
from numpy import (atleast_1d, dot, take, triu, shape, eye,
transpose, zeros, product, greater, array,
all, where, isscalar, asarray, inf, abs,
... |
ypu/tp-qemu | refs/heads/master | qemu/tests/ksm_overcommit.py | 3 | import logging
import time
import random
import math
import os
from autotest.client.shared import error
from virttest import utils_misc, utils_test, aexpect, env_process, data_dir
from autotest.client.shared import utils
try:
from virttest.staging import utils_memory
except ImportError:
from autotest.client.s... |
agogear/python-1 | refs/heads/master | JiYouMCC/0023/guestbook/guestbook/commits/models.py | 26 | from django.db import models
class Message(models.Model):
name = models.CharField(max_length=30)
message = models.TextField(max_length=65535)
date = models.DateTimeField()
def __unicode__(self):
return self.name + ':' + self.message[:25]
|
stutivarshney/Bal-Aveksha | refs/heads/master | WebServer/BalAvekshaEnv/lib/python3.5/site-packages/pip/_vendor/progress/__init__.py | 916 | # Copyright (c) 2012 Giorgos Verigakis <[email protected]>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE A... |
dhavalmanjaria/dma-student-information-system | refs/heads/master | assignments/models.py | 1 | from django.db import models
from curriculum.models import Subject
from django.urls import reverse
class Assignment(models.Model):
"""
Represents an assignment given to a class (semester)
"""
title = models.CharField(max_length=255)
subject = models.ForeignKey(Subject)
due_date = models.DateF... |
PhilSk/zulip | refs/heads/master | contrib_bots/bots/github_issues/github_issues.py | 16 | from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from . import github
import json
import os
import requests
import six.moves.configparser
import urllib.error
import urllib.parse
import urllib.request
class IssueHandler(object):
'''
This plugin facili... |
KohlsTechnology/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/aws_ses_identity.py | 18 | #!/usr/bin/python
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCUMENTATION = '''
---
module: aws_ses_identity
short_de... |
zalando/lizzy-client | refs/heads/master | tests/test_token.py | 1 | from requests import Response
from tokens import InvalidCredentialsError
import json
import pytest
from lizzy_client.token import get_token
class FakeResponse(Response):
def __init__(self, status_code, text):
"""
:type status_code: int
:type text: ste
"""
self.status_code =... |
laboiteproject/laboite-backend | refs/heads/master | boites/migrations/0014_auto_20180527_2112.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-05-27 19:12
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('boites', '0013_auto_20171211_1135'),
]
operations = [
... |
SUSE/azure-sdk-for-python | refs/heads/master | azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/probe.py | 2 | # 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 ... |
luiseduardohdbackup/odoo | refs/heads/8.0 | addons/stock/report/report_stock.py | 376 | # -*- 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... |
madewokherd/urk | refs/heads/master | scripts/theme.py | 1 | import time
import windows
import widgets
import chaninfo
import events
from conf import conf
textareas = {}
if 'font' in conf:
textareas['font'] = conf['font']
if 'bg_color' in conf:
textareas['bg'] = conf['bg_color']
if 'fg_color' in conf:
textareas['fg'] = conf['fg_color']
widgets.set_style("view", te... |
vipul-sharma20/oh-mainline | refs/heads/master | vendor/packages/Django/django/conf/locale/da/formats.py | 106 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. F Y H:i'
YEAR_MONTH_FOR... |
zeeman/cyder | refs/heads/master | vendor-local/src/django-tastypie/tests/gis/api/resources.py | 58 | from django.contrib.auth.models import User
from tastypie import fields
from tastypie.resources import ALL
from tastypie.contrib.gis.resources import ModelResource
from tastypie.authorization import Authorization
from gis.models import GeoNote
class UserResource(ModelResource):
class Meta:
resource_name =... |
AndrewGrossman/django | refs/heads/master | django/db/migrations/operations/base.py | 356 | from __future__ import unicode_literals
from django.db import router
class Operation(object):
"""
Base class for migration operations.
It's responsible for both mutating the in-memory model state
(see db/migrations/state.py) to represent what it performs, as well
as actually performing it agains... |
RafaelTorrealba/odoo | refs/heads/8.0 | addons/crm/crm_lead.py | 77 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
seaotterman/tensorflow | refs/heads/master | tensorflow/contrib/keras/python/keras/layers/local.py | 27 | # 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... |
tempbottle/kazoo | refs/heads/master | kazoo/tests/test_counter.py | 50 | import uuid
from nose.tools import eq_
from kazoo.testing import KazooTestCase
class KazooCounterTests(KazooTestCase):
def _makeOne(self, **kw):
path = "/" + uuid.uuid4().hex
return self.client.Counter(path, **kw)
def test_int_counter(self):
counter = self._makeOne()
eq_(co... |
takis/odoo | refs/heads/8.0 | addons/gamification_sale_crm/__init__.py | 396 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
jeasoft/odoo | refs/heads/marcos-8.0 | comunity_modules/hr_payroll_cancel/__init__.py | 4 | # -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
#
# Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
# All Rights Reserved.
# info Vauxoo ([email protected])
####################################... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display.py | 2 | # 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 ... |
viswimmer1/PythonGenerator | refs/heads/master | data/python_files/30423090/log.py | 152 | import logging
import sys
from django.core import mail
# Make sure a NullHandler is available
# This was added in Python 2.7/3.2
try:
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
# Make sure that dictConfig is availabl... |
rscnt/django-cms | refs/heads/develop | cms/plugin_rendering.py | 29 | # -*- coding: utf-8 -*-
from django.template import Template, Context
from django.template.loader import render_to_string
from django.utils import six
from django.utils.safestring import mark_safe
from cms.cache.placeholder import get_placeholder_cache, set_placeholder_cache
from cms.models.placeholdermodel import Pla... |
Manishearth/servo | refs/heads/master | tests/wpt/web-platform-tests/mixed-content/generic/tools/generate.py | 96 | #!/usr/bin/env python
import os, sys, json
from common_paths import *
import spec_validator
import argparse
def expand_pattern(expansion_pattern, test_expansion_schema):
expansion = {}
for artifact_key in expansion_pattern:
artifact_value = expansion_pattern[artifact_key]
if artifact_value ==... |
kaapstorm/i_support | refs/heads/master | src/i_support/pic/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
TheTypoMaster/chromium-crosswalk | refs/heads/master | tools/telemetry/telemetry/value/__init__.py | 23 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
The Value hierarchy provides a way of representing the values measurements
produce such that they can be merged across runs, grouped by page, and output
t... |
jiangjinjinyxt/vnpy | refs/heads/master | vnpy/api/femas/pyscript/generate_md_functions.py | 24 | # encoding: UTF-8
__author__ = 'CHENXY'
from string import join
from femas_struct import structDict
def processCallBack(line):
orignalLine = line
line = line.replace('\tvirtual void ', '') # 删除行首的无效内容
line = line.replace('{};\n', '') # 删除行尾的无效内容
content = line.split('(')
cb... |
longde123/MultiversePlatform | refs/heads/master | server/src/multiverse/simpleclient/testclientgroups/group14.py | 1 | #
# The Multiverse Platform is made available under the MIT License.
#
# Copyright (c) 2012 The Multiverse Foundation
#
# 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 restrict... |
basicthinker/Sexain-MemController | refs/heads/master | gem5-stable/configs/splash2/cluster.py | 11 | # Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this ... |
rubenvereecken/pokemongo-api | refs/heads/master | POGOProtos/Settings/Master/Item/ReviveAttributes_pb2.py | 16 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Settings/Master/Item/ReviveAttributes.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 go... |
lunafeng/django | refs/heads/master | tests/template_tests/filter_tests/test_truncatewords.py | 215 | from django.template.defaultfilters import truncatewords
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class TruncatewordsTests(SimpleTestCase):
@setup({'truncatewords01':
'{% autoescape off %}{{ a|truncatewords:"2" }} {{ b|truncatewords:"... |
stephaneAG/PengPod700 | refs/heads/master | QtEsrc/backup_qt/qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir2/make-file.py | 973 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
contents = "Hello from make-file.py\n"
open(sys.argv[1], 'wb').write(contents)
|
yceruto/django | refs/heads/master | django/contrib/auth/models.py | 15 | from __future__ import unicode_literals
from django.core.mail import send_mail
from django.core import validators
from django.db import models
from django.db.models.manager import EmptyManager
from django.utils.crypto import get_random_string
from django.utils import six
from django.utils.translation import ugettext_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.