repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
fentas/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/port/server_process_mock.py | 129 | # Copyright (C) 2012 Google Inc. 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 list of conditions and the f... |
michelts/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/tests/regressiontests/forms/localflavor/za.py | 89 | from django.contrib.localflavor.za.forms import ZAIDField, ZAPostCodeField
from utils import LocalFlavorTestCase
class ZALocalFlavorTests(LocalFlavorTestCase):
def test_ZAIDField(self):
error_invalid = [u'Enter a valid South African ID number']
valid = {
'0002290001003': '000229000100... |
murrown/cyder | refs/heads/master | cyder/cydhcp/mixins.py | 5 | from cyder.settings import DHCP_PROD_DIR, DHCP_STAGE_DIR
class DHCPBuildableObject(object):
PROD_DIR = DHCP_PROD_DIR
STAGE_DIR = DHCP_STAGE_DIR
|
3dfxmadscientist/odoo_vi | refs/heads/master | addons/account_followup/wizard/account_followup_print.py | 40 | # -*- 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... |
HIGHWAY99/plugin.devtool.keytool | refs/heads/master | vEmptyFolderThumbnails.py | 1 | #############################################################################
#############################################################################
import common
from common import *
from common import (addon_id,addon_name,addon_path)
#############################################################################... |
satish-avninetworks/murano | refs/heads/master | murano/tests/unit/packages/versions/__init__.py | 12133432 | |
akhilari7/pa-dude | refs/heads/master | lib/python2.7/site-packages/django/contrib/sessions/backends/__init__.py | 12133432 | |
imply/chuu | refs/heads/master | chrome/common/extensions/docs/server2/patched_file_system_test.py | 31 | #!/usr/bin/env python
# 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 copy import deepcopy
import unittest
from file_system import FileSystem, FileNotFoundError, StatInfo
from future import Future
fr... |
aleh-arol/tcollector | refs/heads/master | eos/tcollector_agent.py | 4 | # Copyright (C) 2014 The tcollector Authors.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser 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 ... |
shams169/pythonProject | refs/heads/master | env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py | 359 | from __future__ import absolute_import
import collections
import functools
import logging
try: # Python 3
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ... |
SushiTee/teerace | refs/heads/master | teerace/race/tasks.py | 1 | from datetime import date, datetime, time, timedelta
from zlib import crc32
from django.contrib.auth.models import User
from django.core.cache import cache
from django.db.models import Sum
from accounts.models import UserProfile
from race.models import Map, MapType, Run, BestRun, Server
from lib.chunks import chunks
fr... |
arch1tect0r/root | refs/heads/master | interpreter/llvm/src/tools/clang/tools/clang-format/clang-format-diff.py | 31 | #!/usr/bin/env python
#
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===--------------------------------------... |
BeyondTheClouds/nova | refs/heads/disco/mitaka | nova/scheduler/driver.py | 7 | # Copyright (c) 2010 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complianc... |
darjeeling/django | refs/heads/master | tests/utils_tests/test_safestring.py | 58 | from django.template import Context, Template
from django.test import SimpleTestCase
from django.utils import html, text
from django.utils.functional import lazy, lazystr
from django.utils.safestring import SafeData, mark_safe
class customescape(str):
def __html__(self):
# implement specific and obviously... |
yinquan529/platform-external-chromium_org | refs/heads/master | tools/telemetry/telemetry/page/actions/wait_unittest.py | 23 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import time
from telemetry.core import util
from telemetry.page.actions import wait
from telemetry.unittest import tab_test_case
class WaitActionTest(t... |
linuxipho/mycroft-core | refs/heads/dev | mycroft/configuration/config.py | 1 |
# Copyright 2017 Mycroft AI 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 writi... |
odoomrp/odoomrp-wip | refs/heads/8.0 | stock_picking_wave_management/models/stock_pack.py | 27 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class StockPackOperati... |
nacl-webkit/chrome_deps | refs/heads/master | chrome/test/functional/test_pyauto.py | 68 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import time
import unittest
import pyauto_functional # Must be imported before pyauto
import pyauto
import pyauto_errors
class ... |
CodeYellowBV/django-binder | refs/heads/master | tests/testapp/models/zoo.py | 1 | import os
import datetime
from django.core.exceptions import ValidationError
from django.db import models
from django.db.models.signals import post_delete
from binder.models import BinderModel, BinderImageField
def delete_files(sender, instance=None, **kwargs):
for field in sender._meta.fields:
if isinstance(field,... |
BenKeyFSI/poedit | refs/heads/master | deps/boost/libs/python/pyste/tests/GCCXMLParserUT.py | 54 | # Copyright Bruno da Silva de Oliveira 2003. Use, modification and
# distribution is subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import sys
sys.path.append('../src')
import unittest
import tempfile
import os.path
fro... |
rossburton/yocto-autobuilder | refs/heads/ross | lib/python2.7/site-packages/SQLAlchemy-0.8.0b2-py2.7-linux-x86_64.egg/sqlalchemy/dialects/postgresql/base.py | 6 | # postgresql/base.py
# Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: postgresql
:name: PostgreSQL
Sequences/SERIAL
--------------... |
cyclecomputing/boto | refs/heads/2.27.x | tests/integration/sns/test_cert_verification.py | 126 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 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 withou... |
taylorschimek/WhatAChore | refs/heads/master | wac/migrations/0016_remove_person_phone_number.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-08-09 03:40
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wac', '0015_auto_20170803_1533'),
]
operations = [
migrations.RemoveField(
... |
mihaip/NewsBlur | refs/heads/master | apps/recommendations/urls.py | 19 | from django.conf.urls import *
from apps.recommendations import views
urlpatterns = patterns('',
url(r'^load_recommended_feed', views.load_recommended_feed, name='load-recommended-feed'),
url(r'^save_recommended_feed', views.save_recommended_feed, name='save-recommended-feed'),
url(r'^approve_feed', views.... |
Effi-01/Testing | refs/heads/master | script.video.F4mProxy/lib/f4mUtils/cipherfactory.py | 151 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Factory functions for symmetric cryptography."""
import os
from tlslite.utils import python_aes
from tlslite.utils import python_rc4
from tlslite.utils import cryptomath
tripleDESPresent = False
if cryptomath.m2cry... |
bbuckingham/katello | refs/heads/master | cli/src/katello/client/core/base.py | 2 | # -*- coding: utf-8 -*-
# Copyright © 2010 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should ha... |
Philmod/mongo-connector | refs/heads/master | tests/test_rollbacks.py | 10 | """Test Mongo Connector's behavior when its source MongoDB system is
experiencing a rollback.
"""
import os
import sys
if sys.version_info[:2] == (2, 6):
import unittest2 as unittest
else:
import unittest
import time
from pymongo.read_preferences import ReadPreference
from pymongo import MongoClient
from mo... |
SpockBotMC/SpockBot | refs/heads/master | spockbot/mcdata/__init__.py | 3 | from spockbot.mcdata import blocks
from spockbot.mcdata import items
from spockbot.mcdata.utils import find_by
def get_item_or_block(find, meta=0, init=True):
ret = None
if isinstance(find, int): # by id
ret = find_by(find, items.items, blocks.blocks)
else: # by name
ret = find_by(find, ... |
methane/minefield | refs/heads/master | example/django_chat/chat/__init__.py | 12133432 | |
bunnyitvn/webptn | refs/heads/master | build/lib.linux-i686-2.7/django/template/loaders/__init__.py | 12133432 | |
dmpiergiacomo/scion | refs/heads/master | python/lib/crypto/__init__.py | 12133432 | |
abgworrall/kubernetes | refs/heads/master | cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py | 23 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# 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 appli... |
Beirdo/havokmud | refs/heads/master | libs/protobuf/python/google/protobuf/internal/message_test.py | 42 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... |
shlyakpavel/s720-w832-KK-kernel | refs/heads/master | mediatek/build/tools/mtkPythonPkg/featureConfig.py | 29 | #! /usr/bin/python
import os
import sys
import re
def getFeatureConfig(path):
"""
give the ProjectConfig.mk's path, return
the dictionary of all featrue option!
"""
configPath = os.path.normpath(path)
if not os.path.exists(configPath):
print >> sys.stderr,"the given path %s does not exi... |
zbraniecki/translate | refs/heads/master | translate/storage/test_dtd.py | 25 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 t... |
OSGConnect/modulefiles | refs/heads/master | list_modules/extract_module_information.py | 1 | #!/usr/bin/python
#title :extract_module_information.py
#author :Bala
#date :May-9-2017
#version :1.0
#usage :python program.py
#notes :Extracts module information from OSG Connect submit host and combine with the module description.
#python_version :2.7
im... |
akretion/account-financial-tools | refs/heads/8.0 | __unported__/account_check_deposit/account_deposit.py | 5 | # -*- coding: utf-8 -*-
###############################################################################
#
# account_check_deposit for Odoo/OpenERP
# Copyright (C) 2012-2014 Akretion (http://www.akretion.com/)
# @author: Benoît GUILLOT <benoit.guillot@akretion.com>
# @author: Chafique DELLI <chafique.delli@akret... |
nathaliaspatricio/febracev | refs/heads/master | tagging/models.py | 1 | """
Models and managers for generic tagging.
"""
# Python 2.3 compatibility
try:
set
except NameError:
from sets import Set as set
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import connection, models
from django.db.models.query impo... |
jkburges/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/applywatchlist.py | 132 | # Copyright (C) 2011 Google Inc. 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 list of conditions and the ... |
ericdill/asv | refs/heads/master | test/benchmark.invalid/foo/bar.py | 12133432 | |
blockstack/packaging | refs/heads/master | imported/future/src/libfuturize/fixes/fix_future_standard_library.py | 62 | """
For the ``future`` package.
Changes any imports needed to reflect the standard library reorganization. Also
Also adds these import lines:
from future import standard_library
standard_library.install_aliases()
after any __future__ imports but before any other imports.
"""
from lib2to3.fixes.fix_imports i... |
coala-analyzer/coala-bears | refs/heads/master | bears/gherkin/__init__.py | 12133432 | |
takeflight/django | refs/heads/master | tests/requests/__init__.py | 12133432 | |
JetBrains/intellij-community | refs/heads/master | python/testData/inspections/PyProtectedMemberInspection/ProtectedModuleInPackageAbove/my_package/my_subpackage/__init__.py | 12133432 | |
bharathelangovan/chipy.org | refs/heads/master | chipy_org/apps/main/__init__.py | 12133432 | |
srikantbmandal/ansible | refs/heads/devel | test/units/modules/network/nxos/__init__.py | 12133432 | |
iguilhermeluis/exercicio | refs/heads/master | funcao.py | 1 | def calcMedia(a,b):
n1 = a
n2 = b
m = (n1 + n2) / 2
return m
print(calcMedia(10,10))
|
larsks/docker-py | refs/heads/master | docker/ssladapter/__init__.py | 87 | from .ssladapter import SSLAdapter # flake8: noqa
|
alvarolopez/nova | refs/heads/master | nova/scheduler/__init__.py | 116 | # Copyright (c) 2010 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 ... |
benoitsteiner/tensorflow-xsmm | refs/heads/master | tensorflow/contrib/keras/api/keras/regularizers/__init__.py | 39 | # 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... |
apprentice3d/Wox | refs/heads/master | PythonHome/Lib/site-packages/setuptools/dist.py | 20 | __all__ = ['Distribution']
import re
import os
import sys
import warnings
import numbers
import distutils.log
import distutils.core
import distutils.cmd
import distutils.dist
from distutils.core import Distribution as _Distribution
from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
Distuti... |
datmellow/League.py | refs/heads/master | setup.py | 1 | from setuptools import setup, find_packages
import re, os
try:
import pypandoc
description = pypandoc.convert("README.md", "rst")
except (IOError, ImportError):
description = "An Asyncio friendly wrapper for Riot's League API"
on_rtd = os.getenv('READTHEDOCS') == 'True'
requirements = ["aiohttp>=2.2.3"]... |
wikimedia/operations-debs-txstatsd | refs/heads/master | txstatsd/server/loggingprocessor.py | 3 | # Copyright (C) 2011-2012 Canonical Services Ltd
#
# 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, modify, merge, ... |
3nids/QGIS | refs/heads/master | python/testing/mocked.py | 45 | # -*- coding: utf-8 -*-
"""
***************************************************************************
mocked
---------------------
Date : January 2016
Copyright : (C) 2016 by Matthias Kuhn
Email : matthias@opengis.ch
**************************************... |
rajsadho/django | refs/heads/master | tests/model_package/tests.py | 380 | from __future__ import unicode_literals
from django.db import connection, models
from django.db.backends.utils import truncate_name
from django.test import TestCase
from .models.article import Article, Site
from .models.publication import Publication
class Advertisement(models.Model):
customer = models.CharFiel... |
colezlaw/DependencyCheck | refs/heads/master | dependency-check-core/src/test/resources/python/eggtest/__init__.py | 28 | from eggtest import main
|
mandx/pyrax | refs/heads/master | samples/images/import_task.py | 13 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c)2014 Rackspace US, 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.ap... |
ChenJunor/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/test_client/urls.py | 53 | from __future__ import absolute_import
from django.conf.urls import patterns
from django.views.generic import RedirectView
from . import views
urlpatterns = patterns('',
(r'^get_view/$', views.get_view),
(r'^post_view/$', views.post_view),
(r'^header_view/$', views.view_with_header),
(r'^raw_post_vi... |
oledm/shopomania_ck | refs/heads/master | shopomania_ck/core/api.py | 1 | from django.conf.urls import url, include
from rest_framework import routers
from shopomania_ck.orders import views as order_views
router = routers.DefaultRouter()
router.register(r'orders', order_views.OrderViewset, base_name='orders')
router.register(r'items', order_views.ItemViewset, base_name='items')
router.regis... |
sachabest/cis599 | refs/heads/master | web/dashboard/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
sasukeh/acos-client | refs/heads/master | acos_client/v30/slb/service_group.py | 3 | # Copyright 2014, Jeff Buttars, A10 Networks.
#
# 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 appli... |
shawnferry/ansible | refs/heads/devel | test/units/vars/test_variable_manager.py | 12 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
lonecow/FantasyFootballData | refs/heads/master | Source/LeagueInfo/CurrentRosterParser.py | 1 | '''
Created on Aug 23, 2015
@author: robertbitel
'''
from bs4 import BeautifulSoup
def ConvertTeam(team):
return team
class CurrentRosterStatHeader(object):
def __init__(self, soup):
#for item in soup.find_all('td', {'class': 'playertableData'}):
# print(item)
#for item in soup.fi... |
hellsgate1001/bookit | refs/heads/master | docs/env/Lib/site-packages/django/db/backends/mysql/base.py | 28 | """
MySQL database backend for Django.
Requires MySQLdb: http://sourceforge.net/projects/mysql-python
"""
from __future__ import unicode_literals
import datetime
import re
import sys
import warnings
try:
import MySQLdb as Database
except ImportError as e:
from django.core.exceptions import ImproperlyConfigur... |
ncopa/uwsgi | refs/heads/master | plugins/router_uwsgi/uwsgiplugin.py | 21 | NAME = 'router_uwsgi'
CFLAGS = []
LDFLAGS = []
LIBS = []
GCC_LIST = ['router_uwsgi']
|
dbertha/odoo | refs/heads/8.0 | addons/stock_account/wizard/__init__.py | 351 | # -*- 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... |
wfxiang08/django185 | refs/heads/master | django/core/exceptions.py | 486 | """
Global Django exception and warning classes.
"""
from django.utils import six
from django.utils.encoding import force_text
class FieldDoesNotExist(Exception):
"""The requested model field does not exist"""
pass
class DjangoRuntimeWarning(RuntimeWarning):
pass
class AppRegistryNotReady(Exception):
... |
sserrot/champion_relationships | refs/heads/master | venv/Lib/site-packages/networkx/readwrite/leda.py | 1 | """
Read graphs in LEDA format.
LEDA is a C++ class library for efficient data types and algorithms.
Format
------
See http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html
"""
# Original author: D. Eppstein, UC Irvine, August 12, 2003.
# The original code at http://www.ics.uci.ed... |
fajoy/nova | refs/heads/grizzly-2 | nova/virt/xenapi/vmops.py | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2010 OpenStack 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
#
# htt... |
antiface/mne-python | refs/heads/master | mne/io/egi/tests/__init__.py | 12133432 | |
tanmaythakur/django | refs/heads/master | tests/migrations/test_migrations_fake_split_initial/__init__.py | 12133432 | |
thedod/django-registration-hg-mirror | refs/heads/master | registration/backends/default/__init__.py | 71 | from django.conf import settings
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from registration import signals
from registration.forms import RegistrationForm
from registration.models import RegistrationProfile
class DefaultBackend(object):
"""
A registrati... |
hargup/sympy | refs/heads/master | sympy/physics/quantum/tests/test_innerproduct.py | 102 | from sympy import I, Integer
from sympy.physics.quantum.innerproduct import InnerProduct
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.state import Bra, Ket, StateBase
def test_innerproduct():
k = Ket('k')
b = Bra('b')
ip = InnerProduct(b, k)
assert isinstance(ip, InnerPr... |
ekarulf/django-annoying | refs/heads/master | annoying/exceptions.py | 7 | class Redirect(Exception):
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
|
Prediction-Machines/Trading-Gym | refs/heads/master | tgym/gens/__init__.py | 1 | from csvstream import *
from deterministic import *
from random import *
|
chudaol/edx-platform | refs/heads/master | common/djangoapps/embargo/forms.py | 55 | """
Defines forms for providing validation of embargo admin details.
"""
from django import forms
from django.utils.translation import ugettext as _
import ipaddr
from xmodule.modulestore.django import modulestore
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from embargo.models... |
moonbury/pythonanywhere | refs/heads/master | MasteringMLWithScikit-learn/8365OS_07_Codes/adult-data-plot.py | 3 | import matplotlib
matplotlib.use('Qt4Agg')
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn import datasets
import pandas as pd
from sklearn.feature_extraction import DictVectorizer
df = pd.read_csv('data/adult.data', header=None)
y = df[14]
X = df[range(0, 14)]
d... |
JeyZeta/Dangerous | refs/heads/master | Dangerous/sqlmap/plugins/dbms/postgresql/filesystem.py | 9 | #!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import os
from lib.core.common import randomInt
from lib.core.data import logger
from lib.core.exception import SqlmapUnsupportedFeatureException
from lib.core.settings impor... |
pselle/calibre | refs/heads/master | src/calibre/devices/binatone/driver.py | 24 | # -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = '2009, John Schember <john at nachtimwald.com>'
__docformat__ = 'restructuredtext en'
'''
Device driver for Bookeen's Cybook Gen 3
'''
from calibre.devices.usbms.driver import USBMS
class README(USBMS):
name = 'Binatone Readme Device In... |
asidev/aybu-themes | refs/heads/master | aybu/themes/music_violet/__init__.py | 71 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright 2010 Asidev s.r.l.
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 app... |
kvar/ansible | refs/heads/seas_master_2.9.5 | lib/ansible/module_utils/univention_umc.py | 118 | # -*- coding: UTF-8 -*-
# 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 lic... |
hcs/mailman | refs/heads/master | src/mailman/commands/cli_control.py | 3 | # Copyright (C) 2009-2012 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... |
nens/rabbitmqlib | refs/heads/master | rabbitmqlib/__init__.py | 837 | # package
|
AltSchool/django | refs/heads/master | tests/aggregation_regress/__init__.py | 12133432 | |
akosyakov/intellij-community | refs/heads/master | python/testData/refactoring/move/moveReferencedFunctionToUnimportableModule/before/src/dst-unimportable.py | 12133432 | |
praekelt/jmbo-chart | refs/heads/develop | chart/__init__.py | 12133432 | |
fpeyre/shinken | refs/heads/master | test/test_reactionner_tag_get_notif.py | 18 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the F... |
onceuponatimeforever/oh-mainline | refs/heads/master | vendor/packages/scrapy/scrapyd/tests/__init__.py | 12133432 | |
zjsxzy/datahub | refs/heads/master | src/core/db/backend/__init__.py | 12133432 | |
jbaiter/spreads | refs/heads/master | spreads/vendor/__init__.py | 12133432 | |
UTSA-ICS/keystone-kerberos | refs/heads/master | keystone/server/__init__.py | 12133432 | |
xodus7/tensorflow | refs/heads/master | tensorflow/examples/learn/hdf5_classification.py | 75 | # 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 appl... |
iMakedonsky/drf-autodocs | refs/heads/master | demo/proj/proj/wsgi.py | 5 | """
WSGI config for proj project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTING... |
HuaweiSwitch/CloudEngine-Ansible | refs/heads/master | library/ce_vlan.py | 46 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
molobrakos/home-assistant | refs/heads/master | homeassistant/components/tts/__init__.py | 5 | """Provide functionality to TTS."""
import asyncio
import ctypes
import functools as ft
import hashlib
import io
import logging
import mimetypes
import os
import re
from aiohttp import web
import voluptuous as vol
from homeassistant.components.http import HomeAssistantView
from homeassistant.components.media_player.c... |
redhat-openstack/nova | refs/heads/f22-patches | nova/virt/netutils.py | 2 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use th... |
anru/babel | refs/heads/master | babel/plural.py | 136 | # -*- coding: utf-8 -*-
"""
babel.numbers
~~~~~~~~~~~~~
CLDR Plural support. See UTS #35.
:copyright: (c) 2013 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
import re
_plural_tags = ('zero', 'one', 'two', 'few', 'many', 'other')
_fallback_tag = 'other'
class PluralRule(... |
ritashugisha/MoonMovie | refs/heads/master | requests/packages/chardet/big5prober.py | 2930 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
jscn/django | refs/heads/master | django/contrib/gis/admin/options.py | 52 | from django.contrib.admin import ModelAdmin
from django.contrib.gis.admin.widgets import OpenLayersWidget
from django.contrib.gis.db import models
from django.contrib.gis.gdal import HAS_GDAL, OGRGeomType
from django.core.exceptions import ImproperlyConfigured
spherical_mercator_srid = 3857
class GeoModelAdmin(Model... |
TangXT/edx-platform | refs/heads/master | lms/envs/aws.py | 1 | """
This is the default template for our main set of AWS servers. This does NOT
cover the content machines, which use content.py
Common traits:
* Use memcached, and cache-backed sessions
* Use a MySQL 5.1 database
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.