repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
zasdfgbnm/tensorflow | refs/heads/master | tensorflow/contrib/training/python/training/resample_test.py | 107 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
CARocha/django-import-export | refs/heads/master | tests/settings.py | 1 | import os
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'import_export',
'core',
]
SITE_ID = 1
ROOT_URLCONF = "urls"
DEBUG = True
STATIC_URL = '/static/'
if os.environ.get('IMPORT_EX... |
vpstudios/Codecademy-Exercise-Answers | refs/heads/master | Language Skills/Python/Unit 7/1-Lists and Functions/Using Lists of Lists in Functions/17-Using two lists as two arguments in a function.py | 2 | m = [1, 2, 3]
n = [4, 5, 6]
n = [3, 5, 7]
# Add your code here!
def join_lists(x, y):
return x + y
print join_lists(m, n)
# You want this to print [1, 2, 3, 4, 5, 6]
|
alshedivat/tensorflow | refs/heads/master | tensorflow/contrib/data/python/kernel_tests/assert_element_shape_test.py | 8 | # 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... |
zero-db/zerodb | refs/heads/master | setup.py | 2 | import sys
import os
import platform
import subprocess
import errno
import tempfile
from distutils import ccompiler, log
from setuptools import setup, find_packages
version = '0.99.0b1'
INSTALL_REQUIRES = [
'BTrees',
'zope.component>=4.0.0',
'zodbpickle',
'ZODB>=5.0.0a6',
'ZEO>=5.0.0a2',
'zop... |
elipavlov/transport-nov-parser | refs/heads/master | src/tn_parser/transport/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
apavlo/h-store | refs/heads/master | third_party/python/boto/manage/propget.py | 115 | # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
#
# 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 to use, copy, modi... |
miracle2k/stgit | refs/heads/master | stgit/commands/rebase.py | 1 | __copyright__ = """
Copyright (C) 2005, Catalin Marinas <catalin.marinas@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be ... |
40223211/logo-toys | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/unittest/__init__.py | 900 | """
Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
Smalltalk testing framework.
This module contains the core framework classes that form the basis of
specific test cases and suites (TestCase, TestSuite etc.), and also a
text-based utility class for running the tests and reporting the resu... |
unclehook/py3amulecmd | refs/heads/master | tests/packet_tests.py | 1 | from ec.packet import *
import types
def test_ECPacketData():
assert ECPacketData((0x02,[(0x02, 3000),(0x01, 5)])) == '\x02\x02\x04\x03\x02\x0b\xb8\x02\x02\x01\x05'
def test_ECPacket():
assert ECPacket((0x02, [(0x02, 'test')])) == '\x00\x00\x00\x22\x00\x00\x00\x0A\x02\x01\x04\x06\x05test\x00'
def test_ECLogi... |
CEG-FYP-OpenStack/scheduler | refs/heads/master | nova/api/openstack/compute/legacy_v2/contrib/extended_rescue_with_image.py | 100 | # Copyright 2014 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
peterm-itr/edx-platform | refs/heads/master | 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(... |
sbi-aau/beeng-py | refs/heads/master | beeng/engine.py | 1 | # -*- coding: utf-8 -*-
"""
This module handles the calls to the calculation engine
"""
# ---------------------------------------------------------------------------- #
# Include
# ---------------------------------------------------------------------------- #
import sys
import os
import ctypes
import logging
import pl... |
quchunguang/test | refs/heads/master | testpy3/testdbm.py | 1 | import dbm
# Open database, creating it if necessary.
with dbm.open('foo.db', 'c') as db:
# Record some values
db[b'hello'] = b'there'
db['www.python.org'] = 'Python Website'
db['www.cnn.com'] = 'Cable News Network'
# Note that the keys are considered bytes now.
assert db[b'www.python.org'] =... |
da1z/intellij-community | refs/heads/master | python/testData/resolve/PercentKeyWordArgs.py | 38 | "This is my favourite number%(<ref>kwg)d!" % {'kwg': 4181}
|
da1z/intellij-community | refs/heads/master | python/testData/refactoring/unwrap/whileUnwrap_after.py | 273 | x = 1
|
bohlian/erpnext | refs/heads/develop | erpnext/setup/doctype/company/company_dashboard.py | 13 | from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Company. See timeline below for details'),
'graph': True,
'graph_method': "frappe.utils.goal.get_monthly_goal_graph_data",
'graph_method_args': {
'title': _('Sales'),
'goal_... |
hpfem/agros2d | refs/heads/master | resources/python/pylint/checkers/exceptions.py | 4 | # Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or ... |
proversity-org/edx-platform | refs/heads/master | common/djangoapps/rocket_chat/urls.py | 1 |
from django.conf.urls import include, url
from rocket_chat import views
urlpatterns = [
url(r'', views.rocket_chat_discussion, name='rocket_chat_discussion'),
]
|
dex4er/django | refs/heads/1.6.x | django/contrib/formtools/wizard/storage/base.py | 216 | from django.core.files.uploadedfile import UploadedFile
from django.utils.datastructures import MultiValueDict
from django.utils.functional import lazy_property
from django.utils import six
from django.contrib.formtools.wizard.storage.exceptions import NoFileStorageConfigured
class BaseStorage(object):
step_key ... |
alandmoore/django_auth_ldap3 | refs/heads/master | setup.py | 1 | from setuptools import find_packages, setup
from django_auth_ldap3 import __version__ as version
setup(
name='django_auth_ldap3',
version=version,
license='BSD',
author='Sam Kingston',
author_email='sam@sjkwi.com.au',
description='A library for connecting Django\'s authentication system to an ... |
freecoder-zrw/leetcode | refs/heads/master | partition_list.py | 1 | #coding:utf8
from data_struct import ListNode
class Solution:
# @param {ListNode} head
# @param {integer} x
# @return {ListNode}
def partition(self, head, x):
less_head, less_tail = None, None
gt_head, gt_tail = None, None
node = head
while node:
if node.val... |
atbaker/docker-django | refs/heads/master | django-example/config/production.py | 4 | # -*- coding: utf-8 -*-
'''
Production Configurations
- Use djangosecure
- Use Amazon's S3 for storing static files and uploaded media
- Use sendgird to sendemails
- Use MEMCACHIER on Heroku
'''
from configurations import values
# See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
... |
miguelparaiso/PracticaOdoo | refs/heads/master | openerp/addons/test_impex/__init__.py | 2148 | import models
|
amitkaps/full-stack-data-science | refs/heads/master | credit-risk-deploy/webapp/forms.py | 1 | from flask_wtf import FlaskForm
from wtforms import StringField, SelectField, IntegerField
from wtforms.validators import Required, Email
class LoanForm(FlaskForm):
amount = IntegerField(
'Loan Amount',
validators=[Required()])
duration = IntegerField(
'Loan Duration in Years',
... |
odoousers2014/odoo | refs/heads/master | addons/mail/wizard/email_template_preview.py | 7 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it ... |
NeuralEnsemble/neuroConstruct | refs/heads/master | lib/jython/Lib/plistlib.py | 141 | r"""plistlib.py -- a tool to generate and parse MacOSX .plist files.
The PropertyList (.plist) file format is a simple XML pickle supporting
basic object types, like dictionaries, lists, numbers and strings.
Usually the top level object is a dictionary.
To write out a plist file, use the writePlist(rootObject, pathOr... |
HackLinux/goblin-core | refs/heads/master | llvm/3.4.2/llvm-3.4.2.src/bindings/python/llvm/tests/test_disassembler.py | 9 | from .base import TestBase
from ..disassembler import Disassembler, Option_UseMarkup
class TestDisassembler(TestBase):
def test_instantiate(self):
Disassembler('i686-apple-darwin9')
def test_basic(self):
sequence = '\x67\xe3\x81' # jcxz -127
triple = 'i686-apple-darwin9'
dis... |
adsznzhang/learntosolveit | refs/heads/version1 | languages/python/networking_twisted_parallel1.py | 7 | from twisted.internet import defer, task
from twisted.python import log
from twisted.internet import reactor
from twisted.web import client
from twisted.internet.utils import getProcessValue
def parallel(iterable, count, callable, *args, **named):
print args, named
coop = task.Cooperator()
work = (callable... |
ThreatCentral/blackberries | refs/heads/master | configure.py | 1 | #!/usr/bin/env python
# (c) Copyright [2016] Hewlett Packard Enterprise Development LP 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 Unless required by applicable
# law or agreed to in writ... |
miltonruelas/cursotecnico | refs/heads/7.0 | branch/base_workflow/__init__.py | 8 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2013 Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be used by professional
# programmers who take t... |
kajgan/e2 | refs/heads/master | lib/python/Plugins/SystemPlugins/SoftwareManager/PluginBackup.py | 4 | from enigma import *
from Screens.Screen import Screen
from Components.Button import Button
from Components.Label import Label
from Components.ActionMap import ActionMap
from Screens.Console import Console
class PluginBackup(Screen):
skin = """
<screen position="center,center" size="560,400" title="Plugin B... |
interDist/pasportaservo | refs/heads/_master | pasportaservo/wsgi.py | 4 | """
WSGI config for pasportaservo project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICAT... |
testmana2/test | refs/heads/master | Utilities/__init__.py | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2003 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Package implementing various functions/classes needed everywhere within eric6.
"""
from __future__ import unicode_literals
try:
str = unicode
import locale
import urllib
def quote(url):
"""
... |
proxysh/Safejumper-for-Desktop | refs/heads/master | buildlinux/env64/lib/python2.7/site-packages/twisted/test/process_twisted.py | 13 | """A process that reads from stdin and out using Twisted."""
from __future__ import division, absolute_import, print_function
### Twisted Preamble
# This makes sure that users don't have to set up their environment
# specially in order to run these programs from bin/.
import sys, os
pos = os.path.abspath(sys.argv[0])... |
amenonsen/ansible | refs/heads/devel | lib/ansible/module_utils/network/ios/config/lldp_global/__init__.py | 12133432 | |
coderabhishek/scrapy | refs/heads/master | scrapy/utils/__init__.py | 12133432 | |
andela-bojengwa/talk | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/gis/db/__init__.py | 12133432 | |
Meemaw/Eulers-Project | refs/heads/master | Problem_97.py | 1 | __author__ = 'Meemaw'
stevilo = 28433 * (2**7830457) + 1
print(str(stevilo)[-10:]) |
kyleabeauchamp/fah-projects | refs/heads/master | old/fix_pdbs.py | 2 | import simtk.openmm.app as app
import pdbfixer
mutation_string = "GLY-112-ALA"
fixer = pdbfixer.PDBFixer(pdbid='2LCB')
fixer.applyMutations([mutation_string])
fixer.findMissingResidues()
fixer.findNonstandardResidues()
fixer.replaceNonstandardResidues()
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.removeHete... |
btrent/knave | refs/heads/master | pychess/Utils/lutils/PolyglotHash.py | 23 | # -*- coding: UTF-8 -*-
# Polyglot opening books are indexed by 64-bit Zobrist hash keys.
# The standard specifies the following Zobrist seed values.
# The numbers in this file come from PolyGlot by Fabien Letouzey.
# PolyGlot is available under the GNU GPL from http://wbec-ridderkerk.nl
pieceHashes = [
[
[ 0x0... |
xzYue/odoo | refs/heads/8.0 | addons/base_iban/__init__.py | 447 | # -*- 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... |
victorywang80/Maintenance | refs/heads/master | saltstack/src/salt/scripts.py | 1 | # -*- coding: utf-8 -*-
'''
This module contains the function calls to execute command line scipts
'''
# Import python libs
import os
import sys
# Import salt libs
import salt
import salt.cli
def salt_master():
'''
Start the salt-master.
'''
master = salt.Master()
master.start()
def salt_minio... |
brython-dev/brython | refs/heads/master | www/src/Lib/genericpath.py | 25 | """
Path operations common to more than one OS
Do not use directly. The OS specific modules import the appropriate
functions from this module themselves.
"""
import os
import stat
__all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime',
'getsize', 'isdir', 'isfile', 'samefile', 'sameopenfil... |
MPogson/Python_Koans | refs/heads/master | python2/runner/runner_tests/__init__.py | 276 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Namespace: helpers_tests
|
golismero/golismero | refs/heads/master | thirdparty_libs/netaddr/ip/nmap.py | 9 | #-----------------------------------------------------------------------------
# Copyright (c) 2008-2013, David P. D. Moss. All rights reserved.
#
# Released under the BSD license. See the LICENSE file for details.
#-----------------------------------------------------------------------------
"""
Routines for deali... |
proyectosdeley/proyectos_de_ley | refs/heads/master | proyectos_de_ley/pdl_scraper/spiders/proyecto_spider_2001.py | 1 | # -*- coding: utf-8 -*-
import re
import short_url
import scrapy
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from pdl_scraper.items import PdlScraperItem
LEGISLATURA = 2001
class ProyectoSpider2001(CrawlSpider):
name = "proyecto_2001"
allowed_domains = ["ww... |
bzennn/blog_flask | refs/heads/master | python/lib/python3.5/site-packages/pip/commands/completion.py | 343 | from __future__ import absolute_import
import sys
from pip.basecommand import Command
BASE_COMPLETION = """
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
"""
COMPLETION_SCRIPTS = {
'bash': """
_pip_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
CO... |
FNST-OpenStack/horizon | refs/heads/master | horizon/test/test_dashboards/cats/kittens/views.py | 121 | from horizon import views
class IndexView(views.APIView):
# A very simple class-based view...
template_name = 'cats/kittens/index.html'
def get_data(self, request, context, *args, **kwargs):
# Add data to the context here...
return context
|
ianmabie/uberpy | refs/heads/master | venv/lib/python2.7/site-packages/setuptools/__init__.py | 136 | """Extensions to the 'distutils' for large or complex distributions"""
import os
import distutils.core
import distutils.filelist
from distutils.core import Command as _Command
from distutils.util import convert_path
from fnmatch import fnmatchcase
import setuptools.version
from setuptools.extension import Extension
f... |
XiaochenCui/algorithm_submit | refs/heads/cuixiaochen | migrations/versions/7725bf413d_add_file_column.py | 1 | """add file column
Revision ID: 7725bf413d
Revises: 29ba7ffdd86
Create Date: 2016-06-15 15:28:57.442712
"""
# revision identifiers, used by Alembic.
revision = '7725bf413d'
down_revision = '29ba7ffdd86'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... |
barbagroup/PetIBM | refs/heads/master | examples/ibpm/cylinder2dRe550_GPU/scripts/plotVorticity.py | 6 | """
Computes, plots, and saves the 2D vorticity field from a PetIBM simulation
after 1200 time steps (3 non-dimensional time-units).
"""
import pathlib
import h5py
import numpy
from matplotlib import pyplot
simu_dir = pathlib.Path(__file__).absolute().parents[1]
data_dir = simu_dir / 'output'
# Read vorticity field... |
canglade/NLP | refs/heads/master | endpoints/bookstore-grpc/status.py | 8 | # 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 a... |
arnavd96/Cinemiezer | refs/heads/master | myvenv/lib/python3.4/site-packages/oauth2/__init__.py | 12 | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... |
catapult-project/catapult-csm | refs/heads/master | third_party/gsutil/third_party/oauth2client/tests/test_file.py | 17 | #!/usr/bin/python2.4
#
# Copyright 2014 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... |
lasalesi/erpnext | refs/heads/develop | erpnext/patches/v6_24/set_recurring_id.py | 48 | import frappe
def execute():
for doctype in ('Sales Order', 'Purchase Order', 'Sales Invoice',
'Purchase Invoice'):
frappe.reload_doctype(doctype)
frappe.db.sql('''update `tab{0}` set submit_on_creation=1, notify_by_email=1
where is_recurring=1'''.format(doctype))
frappe.db.sql('''update `tab{0}` set notif... |
fyfcauc/android_external_chromium-org | refs/heads/du44 | tools/telemetry/telemetry/page/actions/interact.py | 23 | # 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.
from telemetry.page.actions import page_action
class InteractAction(page_action.PageAction):
def __init__(self, attributes=None):
super(InteractAction... |
JioCloud/horizon | refs/heads/master | openstack_dashboard/dashboards/project/routers/__init__.py | 12133432 | |
mailhexu/pyDFTutils | refs/heads/master | pyDFTutils/perovskite/__init__.py | 12133432 | |
valentin-krasontovitsch/ansible | refs/heads/devel | lib/ansible/modules/remote_management/ucs/__init__.py | 12133432 | |
moonboots/tensorflow | refs/heads/master | tensorflow/g3doc/how_tos/__init__.py | 12133432 | |
saurabh6790/medsyn-lib1 | refs/heads/master | __init__.py | 12133432 | |
xhqu1981/pymatgen | refs/heads/master | pymatgen/analysis/elasticity/elastic.py | 2 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, print_function, unicode_literals
from __future__ import absolute_import
from pymatgen.analysis.elasticity.tensors import Tensor, \
voigt_map as vmap, TensorCollection
f... |
darkleons/odoo | refs/heads/master | addons/survey/wizard/survey_email_compose_message.py | 106 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
fidomason/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/test/subprocessdata/qgrep.py | 241 | """When called with a single argument, simulated fgrep with a single
argument and no options."""
import sys
if __name__ == "__main__":
pattern = sys.argv[1]
for line in sys.stdin:
if pattern in line:
sys.stdout.write(line)
|
admetricks/phantomjs | refs/heads/master | src/breakpad/src/tools/gyp/test/variables/gyptest-commands.py | 138 | #!/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.
"""
Test variable expansion of '<!()' syntax commands.
"""
import os
import TestGyp
test = TestGyp.TestGyp(format='gypd')
expect = test.... |
elisabeth7777/Kebab-CafeCompta | refs/heads/master | web/global/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... |
DarthMaulware/EquationGroupLeaks | refs/heads/master | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/status/cmd/uptime/tasking_dsz.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: tasking_dsz.py
import mcl.framework
import mcl.tasking
class dsz:
INTERFACE = 16842801
PFAM = 4204
PROVIDER_ANY = 4204
PROVIDER = 16... |
vimagick/youtube-dl | refs/heads/master | youtube_dl/extractor/lifenews.py | 109 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_urlparse
from ..utils import (
determine_ext,
int_or_none,
remove_end,
unified_strdate,
ExtractorError,
)
class LifeNewsIE(InfoExtractor):
IE_NAME = 'lifenews'
... |
davidvon/pipa-pay-server | refs/heads/master | site-packages/whoosh/matching/combo.py | 92 | # Copyright 2010 Matt Chaput. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the... |
stegua/dotlib | refs/heads/master | python/view_matrix.py | 1 | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 13 18:24:13 2017
@author: gualandi
"""
import matplotlib.pyplot as plt
import numpy as np
def DrawMatrix(M, name):
# Crea una figura, disegna l'immagine data dalla matrice, aggiungi la colorbar sulla destra
plt.figure(figsize=(6,6))
# Uso la colormap 'gray'... |
ZLLab-Mooc/edx-platform | refs/heads/named-release/dogwood.rc | cms/djangoapps/contentstore/features/course-outline.py | 19 | # pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from common import *
from nose.tools import assert_true, assert_false
from logging import getLogger
logger = getLogger(__name__)
@step(u'I have a course with no sections$')
def have_a_course(step):
world.c... |
BertrandBordage/django-tree | refs/heads/master | tests/settings.py | 1 | DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'tree',
'USER': 'tree',
},
}
INSTALLED_APPS = (
'tree',
'tests',
)
SECRET_KEY = 'not important here'
|
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_packet_captures_operations.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 ... |
ansible/ansible-modules-extras | refs/heads/devel | web_infrastructure/apache2_mod_proxy.py | 23 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Olivier Boukili <boukili.olivier@gmail.com>
#
# This file is part of Ansible.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3... |
musically-ut/numpy | refs/heads/master | numpy/f2py/capi_maps.py | 17 | #!/usr/bin/env python
"""
Copyright 1999,2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Date: 2005/05/06 10:57:33 $
Pearu Peterson... |
TakayukiSakai/tensorflow | refs/heads/master | tensorflow/contrib/tensor_forest/python/kernel_tests/best_splits_op_test.py | 3 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
vmindru/ansible | refs/heads/devel | lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py | 33 | #!/usr/bin/python
#
# Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
SerendpityZOEY/Fixr-RelevantCodeSearch | refs/heads/master | PythonScripts/test.py | 2 | from git import Repo
import os, json, pysolr
join = os.path.join
# rorepo is a Repo instance pointing to the git-python repository.
# For all you know, the first argument to Repo is a path to the repository
# you want to work with
repo = Repo("../../book")
assert not repo.bare
repo.config_reader()
cw = repo.config_w... |
nsalomonis/AltAnalyze | refs/heads/master | stats_scripts/mpmath/tests/test_str.py | 10 | from mpmath import nstr, matrix, inf
def test_nstr():
m = matrix([[0.75, 0.190940654, -0.0299195971],
[0.190940654, 0.65625, 0.205663228],
[-0.0299195971, 0.205663228, 0.64453125e-20]])
assert nstr(m, 4, min_fixed=-inf) == \
'''[ 0.75 0.1909 -0.02992]
... |
kurtisharms/ubcexamcram | refs/heads/master | gaepytz-2011h/pytz/__init__.py | 52 | '''
datetime.tzinfo timezone definitions generated from the
Olson timezone database:
ftp://elsie.nci.nih.gov/pub/tz*.tar.gz
See the datetime section of the Python Library Reference for information
on how to use these modules.
'''
# The Olson database is updated several times a year.
OLSON_VERSION = '2010h'
VERSI... |
Micronaet/micronaet-product | refs/heads/master | price_rule_and_force/rule.py | 1 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... |
CAAD-RWTH/ClockworkForDynamo | refs/heads/master | nodes/1.x/python/TextElement.SetText.py | 4 | import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManage... |
AmberJBlue/aima-python | refs/heads/master | submissions/Porter/myCSPs.py | 38 | import csp
rgb = ['R', 'G', 'B']
domains = {
'AM': rgb,
'ES': rgb,
'LK': rgb,
'RB': rgb,
'FL': rgb,
'G': rgb,
'S': rgb,
'M': rgb,
'BL': rgb,
'C': rgb,
'H': rgb
}
variables = domains.keys()
neighbors = {
'AM': ['LK', 'ES'],
'ES': ['BL', 'M'],
'LK': ['RB', 'FL',... |
alangwansui/mtl_ordercenter | refs/heads/master | openerp/addons/point_of_sale/wizard/pos_return.py | 55 | # -*- 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... |
deKupini/erp | refs/heads/master | openerp/cli/__init__.py | 58 | import logging
import sys
import os
import openerp
from command import Command, main
import deploy
import scaffold
import server
import shell
import start
|
PhilReinhold/pyqt_utils | refs/heads/master | settings_window.py | 1 | from PyQt4.QtCore import QObject, pyqtSignal, QThread, Qt
from PyQt4.QtGui import QApplication, QMainWindow
import sys
def run(widget_class, settings=None, ui_version=1, **kwargs):
app = QApplication.instance()
if app is None:
app = QApplication([])
if settings is not None:
window = Setti... |
EmadMokhtar/Django | refs/heads/master | tests/admin_scripts/custom_templates/app_template/api.py | 581 | # your API code
|
XenGi/meckbd | refs/heads/master | firmware/tools/arm/arm-none-eabi/share/gdb/python/gdb/prompt.py | 137 | # Extended prompt utilities.
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
# 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 ... |
1haodian/spark | refs/heads/master | python/pyspark/mllib/feature.py | 52 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
kirillzhuravlev/numpy | refs/heads/master | numpy/f2py/setup.py | 158 | #!/usr/bin/env python
"""
setup.py for installing F2PY
Usage:
python setup.py install
Copyright 2001-2005 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRANTY IS EXPRESSED OR IMPLIE... |
fingeronthebutton/robotframework | refs/heads/master | atest/testdata/test_libraries/PrintLib.py | 16 | import sys
def print_one_html_line():
print '*HTML* <a href="http://www.google.com">Google</a>'
def print_many_html_lines():
print '*HTML* <table border=1>\n<tr><td>0,0</td><td>0,1</td></tr>'
print '<tr><td>1,0</td><td>1,1</td></tr>\n</table>'
print '*HTML*This is html <hr>'
print '*INFO*This is... |
anistark/mozillians | refs/heads/master | vendor-local/lib/python/celery/apps/worker.py | 10 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import atexit
import logging
try:
import multiprocessing
except ImportError:
multiprocessing = None # noqa
import os
import socket
import sys
import warnings
from .. import __version__, platforms, signals
from ..app import app_or_default
from ..a... |
tmxdyf/CouchPotatoServer | refs/heads/master | libs/apscheduler/triggers/__init__.py | 134 | from apscheduler.triggers.cron import CronTrigger
from apscheduler.triggers.interval import IntervalTrigger
from apscheduler.triggers.simple import SimpleTrigger
|
yeming233/rally | refs/heads/master | rally/plugins/openstack/context/neutron/__init__.py | 12133432 | |
browncoat-ninjas/nimoy | refs/heads/develop | specs/nimoy/assertions/__init__.py | 12133432 | |
valentin-krasontovitsch/ansible | refs/heads/devel | lib/ansible/modules/network/netvisor/pn_access_list_ip.py | 14 | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# 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',
'status': ['... |
Entropy512/libsigrokdecode | refs/heads/master | decoders/parallel/__init__.py | 5 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Li... |
weimingtom/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/distutils/tests/test_msvc9compiler.py | 47 | """Tests for distutils.msvc9compiler."""
import sys
import unittest
import os
from distutils.errors import DistutilsPlatformError
from distutils.tests import support
from test.support import run_unittest
_MANIFEST = """\
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-co... |
opennode/nodeconductor-assembly-waldur | refs/heads/develop | src/waldur_mastermind/marketplace_openstack/management/commands/import_tenant_invoices.py | 1 | from django.contrib.contenttypes.models import ContentType
from waldur_core.core.utils import DryRunCommand
from waldur_mastermind.invoices.models import InvoiceItem
from waldur_mastermind.marketplace.models import Resource
from waldur_mastermind.packages.models import OpenStackPackage
class Command(DryRunCommand):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.