repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
tradebyte/paci
refs/heads/master
tests/__init__.py
12133432
MicroPyramid/docker-box
refs/heads/master
dockit/management/commands/__init__.py
12133432
GunoH/intellij-community
refs/heads/master
python/testData/completion/className/orderingSymbolBeforeModule/a/foo.py
12133432
wuzheng-sjtu/FastFPN
refs/heads/master
unit_test/__init__.py
12133432
bratsche/Neutron-Drive
refs/heads/master
google_appengine/lib/django_1_2/django/bin/__init__.py
12133432
bratsche/Neutron-Drive
refs/heads/master
google_appengine/lib/django_1_3/tests/modeltests/aggregation/__init__.py
12133432
JianyuWang/neutron
refs/heads/master
neutron/tests/unit/tests/__init__.py
12133432
ryankynor/Calculate-Pi
refs/heads/master
calculatepi.py
1
""" calculatepi.py Author: Ryan Kynor Credit: Mr. Dennison Assignment: Write and submit a Python program that computes an approximate value of π by calculating the following sum: (see: https://github.com/HHS-IntroProgramming/Calculate-Pi/blob/master/README.m...
pniedzielski/fb-hackathon-2013-11-21
refs/heads/master
src/repl.it/jsrepl/extern/python/unclosured/lib/python2.7/lib2to3/fixes/fix_future.py
529
"""Remove __future__ imports from __future__ import foo is replaced with an empty line. """ # Author: Christian Heimes # Local imports from .. import fixer_base from ..fixer_util import BlankLine class FixFuture(fixer_base.BaseFix): BM_compatible = True PATTERN = """import_from< 'from' module_name="__future...
rrrene/django
refs/heads/master
django/contrib/auth/hashers.py
66
from __future__ import unicode_literals import base64 import binascii import hashlib import importlib from collections import OrderedDict from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.signals import setting_changed from django.dispatch import receiver from d...
WillieMaddox/numpy
refs/heads/master
benchmarks/benchmarks/common.py
29
import numpy import random # Various pre-crafted datasets/variables for testing # !!! Must not be changed -- only appended !!! # while testing numpy we better not rely on numpy to produce random # sequences random.seed(1) # but will seed it nevertheless numpy.random.seed(1) nx, ny = 1000, 1000 # reduced squares based...
krzysztof-magosa/ansible-modules-extras
refs/heads/devel
cloud/webfaction/webfaction_domain.py
153
#!/usr/bin/python # # Create Webfaction domains and subdomains using Ansible and the Webfaction API # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015 # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
jalavik/invenio
refs/heads/master
invenio/testsuite/test_restful.py
12
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/tangible/ship/attachment/weapon/shared_aggressor_weapon_s02.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/attachment/weapon/shared_aggressor_weapon_s02.iff" result.attr...
miragshin/ZeroNet
refs/heads/master
plugins/Sidebar/maxminddb/__init__.py
22
# pylint:disable=C0111 import os import maxminddb.reader try: import maxminddb.extension except ImportError: maxminddb.extension = None from maxminddb.const import (MODE_AUTO, MODE_MMAP, MODE_MMAP_EXT, MODE_FILE, MODE_MEMORY) from maxminddb.decoder import InvalidDatabaseError d...
perojonsson/pyxtuml
refs/heads/master
tests/utils.py
1
# encoding: utf-8 # Copyright (C) 2014-2015 John Törnblom def expect_exception(exception): ''' Decorator for expecting exceptions to be thrown from a test case ''' def test_decorator(fn): def test_decorated(self, *args, **kwargs): self.assertRaises(exception, fn, self, *args, **kwar...
lbeltrame/letsencrypt
refs/heads/master
letsencrypt-nginx/letsencrypt_nginx/tests/tls_sni_01_test.py
17
"""Tests for letsencrypt_nginx.tls_sni_01""" import unittest import shutil import mock from acme import challenges from letsencrypt import achallenges from letsencrypt import errors from letsencrypt.plugins import common_test from letsencrypt.tests import acme_util from letsencrypt_nginx import obj from letsencryp...
jiumem/cgt
refs/heads/master
examples/broken/mnist_torchstyle.py
22
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import fetch_mldata mnist = fetch_mldata('MNIST original', data_home='~/cgt/data') # XXX print(mnist.data.shape) print(mnist.target.shape) np.unique(mnist.target) #plt.imshow(mnist.data[1, :].reshape(28, 28)) #plt.show() # do some preprocess...
alphagov/performanceplatform-collector
refs/heads/master
tests/performanceplatform/collector/ga/__init__.py
1
from datetime import datetime import pytz def dt(year, month, day, hours, minutes, seconds, tz): _dt = datetime(year, month, day, hours, minutes, seconds) return pytz.timezone(tz).localize(_dt)
boonchu/pykickstart
refs/heads/master
pykickstart/commands/selinux.py
9
# # Chris Lumens <clumens@redhat.com> # # Copyright 2005, 2006, 2007 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # ...
rbdedu/runway
refs/heads/master
singleFileApp/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/Doc/tools/roman.py
91
"""Convert to and from Roman numerals""" __author__ = "Mark Pilgrim (f8dy@diveintopython.org)" __version__ = "1.4" __date__ = "8 August 2001" __copyright__ = """Copyright (c) 2001 Mark Pilgrim This program is part of "Dive Into Python", a free Python tutorial for experienced programmers. Visit http://diveintopython....
SEMAFORInformatik/femagtools
refs/heads/master
femagtools/ntib.py
1
""" femagtools.ntib ~~~~~~~~~~~~~~~ NTIB / LOS files handling """ import logging import math logger = logging.getLogger(__name__) def create(speed, current, beta, r1=0, m=3): """return Ntib info""" return ['Speed[1/min], Current[A], beta[Degr], R_STATOR[Ohm], n-p', 'Number of valu...
astropy/astropy
refs/heads/main
astropy/io/ascii/tests/test_html.py
7
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module tests some of the methods related to the ``HTML`` reader/writer and aims to document its functionality. Requires `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>`_ to be installed. """ from io impor...
wkrzemien/DIRAC
refs/heads/integration
Core/Utilities/ClassAd/__init__.py
5
""" DIRAC.Core.ClassAd package """ __RCSID__ = "$Id$"
yangming85/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/modeltests/custom_pk/fields.py
39
import random import string from django.db import models class MyWrapper(object): def __init__(self, value): self.value = value def __repr__(self): return "<%s: %s>" % (self.__class__.__name__, self.value) def __unicode__(self): return self.value def __eq__(self, other): ...
holmes-app/holmes-api
refs/heads/master
holmes/validators/base.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- from holmes.facters import Baser class Validator(Baser): def __init__(self, reviewer): self.reviewer = reviewer self.url_buffer = set() @classmethod def get_violation_definitions(cls): raise NotImplementedError @classmethod def ...
xuxiaoxing/flasky
refs/heads/master
app/main/views.py
1
from flask import render_template, session, redirect, url_for, current_app from . import main from .forms import NameForm from .. import db from ..models import User from ..email import send_email @main.route('/', methods=['GET', 'POST']) def index(): form = NameForm() if form.validate_on_submit(): us...
yousafsyed/casperjs
refs/heads/master
bin/Lib/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py
2800
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
JuliusKunze/thalnet
refs/heads/master
util.py
1
import functools from time import strftime import tensorflow as tf # lazy_property: no need for if $ not None logic def lazy_property(function): attribute = '_cache_' + function.__name__ @property @functools.wraps(function) def decorator(self): if not hasattr(self, attribute): set...
cheesechoi/KISS
refs/heads/master
shellcode/nc.py
2
#!python from socket import * from pwn import * context('i386', 'linux', 'ipv4') HOST = '' PORT = 31337 s = socket(AF_INET, SOCK_STREAM) s.bind( (HOST, PORT) ) s.listen(10) log.info('Ready to accept a client') while 1: conn, addr = s.accept() print 'Connected with ' + addr[0] + ':' + str(addr[1]) #conn....
tjsavage/rototutor_djangononrel
refs/heads/master
djangotoolbox/sites/__init__.py
12133432
frankvdp/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex_multi_apps/__init__.py
12133432
jerryge/zulip
refs/heads/master
zerver/__init__.py
12133432
havard024/prego
refs/heads/master
venv/lib/python2.7/site-packages/django/conf/locale/ru/__init__.py
12133432
maxsocl/django
refs/heads/master
tests/admin_filters/__init__.py
12133432
fabaff/ansible
refs/heads/devel
test/units/playbook/test_play.py
61
# (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...
rvmoura96/projeto-almoxarifado
refs/heads/master
myvenv/Lib/site-packages/pylint/test/functional/syntax_error.py
30
def toto # [syntax-error]
MoamerEncsConcordiaCa/tensorflow
refs/heads/master
tensorflow/python/training/ftrl.py
10
# 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...
Instagram/django
refs/heads/master
tests/regressiontests/staticfiles_tests/tests.py
48
# -*- encoding: utf-8 -*- import codecs import os import posixpath import shutil import sys import tempfile from StringIO import StringIO from django.conf import settings from django.contrib.staticfiles import finders, storage from django.core.exceptions import ImproperlyConfigured from django.core.files.storage impor...
DaveBerkeley/android
refs/heads/master
MqttControls/mqtt.py
1
#!/usr/bin/python import json class Control: def __init__(self, klass, *args, **kwargs): self.d = [ klass, kwargs, ] def json(self): return self.d # # def GridView(elements, *args, **kwargs): cols = 0 for col in elements: cols = max(cols, len(col)) rows = len(elements) ...
twschum/mix-mind
refs/heads/master
mixmind/util.py
1
""" Miscallanious util funcitons for the mix-mind project """ from functools import wraps from fractions import Fraction from collections import OrderedDict, namedtuple import operator import json import csv import inspect import uuid import pendulum from .logger import get_logger log = get_logger(__name__) # make pas...
pk400/catering
refs/heads/master
myvenv/lib/python3.4/site-packages/django/db/models/query.py
33
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import sys import warnings from collections import OrderedDict, deque from django.conf import settings from django.core import exceptions from django.db import ( DJANGO_VERSION_PICKLE_KEY, IntegrityError, connections, ...
alexei-matveev/ase-local
refs/heads/master
doc/tutorials/constraints/diffusion.py
7
# creates: diffusion-path.png import os from ase.io import read, write if 1: execfile('diffusion4.py') images = [read('mep%d.traj' % i) for i in range(5)] a = images[0] + images[1] + images[2] + images[3] + images[4] del a.constraints a *= (2, 1, 1) a.set_cell(images[0].get_cell()) write('diffusion-path.pov', a, s...
kashif/chainer
refs/heads/master
chainer/links/model/classifier.py
1
from chainer.functions.evaluation import accuracy from chainer.functions.loss import softmax_cross_entropy from chainer import link from chainer import reporter class Classifier(link.Chain): """A simple classifier model. This is an example of chain that wraps another chain. It computes the loss and accu...
t794104/ansible
refs/heads/devel
test/units/modules/storage/netapp/test_na_ontap_security_key_manager.py
43
# (c) 2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ans...
lthurlow/Network-Grapher
refs/heads/master
proj/external/matplotlib-1.2.1/lib/mpl_examples/animation/old_animation/animation_blit_fltk.py
3
from __future__ import print_function import sys import fltk import matplotlib matplotlib.use('FltkAgg') import pylab as p import numpy as npy import time # save the clean slate background -- everything but the animated line # is drawn and saved in the pixel buffer background class animator: def __init__(self,ax)...
daanwierstra/pybrain
refs/heads/master
docs/tutorials/fnn.py
1
############################################################################ # PyBrain Tutorial "Classification with Feed-Forward Neural Networks" # # Author: Martin Felder, felder@in.tum.de ############################################################################ """ This tutorial walks you through the process of...
DMLoy/ECommerceBasic
refs/heads/master
lib/python2.7/site-packages/django/utils/http.py
27
from __future__ import unicode_literals import calendar import datetime import re import sys try: from urllib import parse as urllib_parse except ImportError: # Python 2 import urllib as urllib_parse import urlparse urllib_parse.urlparse = urlparse.urlparse from email.utils import formatdate fro...
jumpstarter-io/neutron
refs/heads/master
neutron/tests/unit/cisco/l3/__init__.py
12133432
adam-iris/mailman
refs/heads/master
src/mailman/archiving/docs/__init__.py
12133432
rdelhommer/BlocklyPrototypeEB
refs/heads/master
i18n/dedup_json.py
204
#!/usr/bin/python # Consolidates duplicate key-value pairs in a JSON file. # If the same key is used with different values, no warning is given, # and there is no guarantee about which key-value pair will be output. # There is also no guarantee as to the order of the key-value pairs # output. # # Copyright 2013 Google...
UManPychron/pychron
refs/heads/develop
pychron/entry/irradiated_position.py
2
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
163gal/Time-Line
refs/heads/master
libs/wx/tools/Editra/src/syntax/_groovy.py
3
############################################################################### # Name: groovy.py # # Purpose: Define Groovy syntax for highlighting and other features # # Author: Omar Gomez <omar.gomez@gmail.com> # ...
plotly/plotly.py
refs/heads/master
packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_family.py
1
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="parcoords.line.colorbar.tickfont", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=...
bjoshua/ansible
refs/heads/devel
samples/lookup_pipe.py
255
- hosts: localhost gather_facts: no tasks: - debug: msg="the date is {{ lookup('pipe', 'date') }}"
ga7g08/sympy
refs/heads/master
sympy/series/tests/test_limitseq.py
62
from sympy import symbols, oo, Sum, harmonic, Add, S, binomial, factorial from sympy.series.limitseq import limit_seq from sympy.series.limitseq import difference_delta as dd from sympy.utilities.pytest import raises, XFAIL n, m, k = symbols('n m k', integer=True) def test_difference_delta(): e = n*(n + 1) e...
jriguera/csv2xmlgen
refs/heads/master
lib/toolbox/__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __init__.py: defines this directory as the 'toolbox' package. # # 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...
basicthinker/ThyNVM
refs/heads/master
src/mem/cache/tags/Tags.py
39
# Copyright (c) 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
pbanaszkiewicz/amy
refs/heads/develop
amy/workshops/apps.py
1
from django.apps import AppConfig from django.db.models.signals import m2m_changed def trainingrequest_m2m_changed(sender, **kwargs): """Signal receiver for TrainingRequest m2m_changed signal. The purpose of this receiver is to react on `TrainingRequest.domains` and `TrainingRequest.previous_involvement`...
sylvestre/treeherder
refs/heads/master
treeherder/etl/management/commands/ingest_push.py
3
from cProfile import Profile from optparse import make_option from django.conf import settings from django.core.management.base import (BaseCommand, CommandError) from treeherder.etl.buildapi import (Builds4hJobsProcess, PendingJobsProcess,...
alrifqi/django
refs/heads/master
tests/app_loading/not_installed/models.py
161
from django.db import models class NotInstalledModel(models.Model): class Meta: app_label = 'not_installed' class RelatedModel(models.Model): class Meta: app_label = 'not_installed' not_installed = models.ForeignKey(NotInstalledModel) class M2MRelatedModel(models.Model): class ...
mjudsp/Tsallis
refs/heads/master
sklearn/metrics/tests/__init__.py
12133432
prarthitm/edxplatform
refs/heads/master
openedx/core/djangoapps/crawlers/tests.py
12133432
arturtamborski/arturtamborskipl
refs/heads/master
blog/templatetags/__init__.py
12133432
mbauskar/omnitech-erpnext
refs/heads/master
erpnext/accounts/print_format/pos_invoice/__init__.py
12133432
gangadhar-kadam/sms-erpnext
refs/heads/master
setup/doctype/currency/test_currency.py
6
# pre loaded test_records = []
wang16/swtoolkit
refs/heads/master
site_scons/site_tools/component_bits.py
27
#!/usr/bin/python2.4 # Copyright 2009, 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...
homeworkprod/byceps
refs/heads/master
byceps/services/ticketing/event_service.py
1
""" byceps.services.ticketing.event_service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import datetime from typing import List from ...database import db from .models.ticket_event import TicketEvent, TicketEve...
karimbahgat/Pipy
refs/heads/master
pipy/pip/commands/search.py
343
from __future__ import absolute_import import logging import sys import textwrap from pip.basecommand import Command, SUCCESS from pip.compat import OrderedDict from pip.download import PipXmlrpcTransport from pip.models import PyPI from pip.utils import get_terminal_size from pip.utils.logging import indent_log from...
mxOBS/deb-pkg_trusty_chromium-browser
refs/heads/master
tools/grit/grit/node/custom/filename.py
62
#!/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. '''A CustomType for filenames.''' from grit import clique from grit import lazy_re class WindowsFilename(clique.CustomType): '...
shams169/pythonProject
refs/heads/master
ContactsDir/env/lib/python3.6/site-packages/setuptools/site-patch.py
356
def __boot(): import sys import os PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform == 'win32' and not PYTHONPATH): PYTHONPATH = [] else: PYTHONPATH = PYTHONPATH.split(os.pathsep) pic = getattr(sys, 'path_importer_cache', {}) stdpath = sys.pat...
axaxs/PackageKit-0.8.17
refs/heads/master
lib/python/packagekit/progress.py
5
# Licensed under the GNU General Public License Version 2 # # 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 # (at your option) any later version. # # This pro...
enolfc/oauthenticator
refs/heads/master
oauthenticator/tests/test_google.py
1
from unittest.mock import Mock from pytest import fixture, mark, raises from tornado.web import Application, HTTPError from ..google import GoogleOAuthenticator, GoogleOAuthHandler from .mocks import setup_oauth_mock def user_model(email): """Return a user model""" return { 'email': email, '...
SeanCameronConklin/aima-python
refs/heads/master
submissions/Porter/vaccuum.py
18
import agents as ag import envgui as gui import random # ______________________________________________________________________________ loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world def RandomVacuumAgent(): "Randomly choose one of the actions from the vacuum environment." p = ag.Ra...
weimingtom/python-for-android
refs/heads/master
python-build/python-libs/gdata/src/gdata/tlslite/X509CertChain.py
238
"""Class representing an X.509 certificate chain.""" from utils import cryptomath class X509CertChain: """This class represents a chain of X.509 certificates. @type x509List: list @ivar x509List: A list of L{tlslite.X509.X509} instances, starting with the end-entity certificate and with ever...
jonhadfield/linkchecker
refs/heads/master
linkcheck/plugins/viruscheck.py
9
# -*- coding: iso-8859-1 -*- # Copyright (C) 2000-2014 Bastian Kleineidam # # 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 # (at your option) any later versi...
JenSte/pyqtgraph
refs/heads/develop
examples/parallelize.py
22
# -*- coding: utf-8 -*- import initExample ## Add path to library (just for examples; you do not need this) import time import numpy as np import pyqtgraph.multiprocess as mp import pyqtgraph as pg from pyqtgraph.python2_3 import xrange print( "\n=================\nParallelize") ## Do a simple task: ## for x in r...
matrixise/odoo
refs/heads/8.0
addons/delivery/delivery.py
72
# -*- 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...
alshedivat/tensorflow
refs/heads/master
tensorflow/contrib/factorization/python/ops/gmm_ops.py
13
# 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...
xavierwu/scikit-learn
refs/heads/master
sklearn/cluster/tests/test_birch.py
342
""" Tests for the birch clustering algorithm. """ from scipy import sparse import numpy as np from sklearn.cluster.tests.common import generate_clustered_data from sklearn.cluster.birch import Birch from sklearn.cluster.hierarchical import AgglomerativeClustering from sklearn.datasets import make_blobs from sklearn.l...
rest-of/the-deck
refs/heads/master
lambda/lib/python2.7/site-packages/docutils/transforms/parts.py
187
# $Id: parts.py 6073 2009-08-06 12:21:10Z milde $ # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer; Dmitry Jemerov # Copyright: This module has been placed in the public domain. """ Transforms related to document parts. """ __docformat__ = 'reStructuredText' import re import sys from docutils import n...
amolkahat/pandas
refs/heads/master
pandas/tests/generic/test_series.py
4
# -*- coding: utf-8 -*- # pylint: disable-msg=E1101,W0612 from operator import methodcaller import pytest import numpy as np import pandas as pd from distutils.version import LooseVersion from pandas import Series, date_range, MultiIndex from pandas.compat import range from pandas.util.testing import (assert_series...
LLNL/spack
refs/heads/develop
var/spack/repos/builtin/packages/py-chardet/package.py
3
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyChardet(PythonPackage): """Universal encoding detector for Python 2 and 3""" homepa...
eHealthAfrica/ureport
refs/heads/develop
ureport/news/migrations/0001_initial.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('categories', '0002_auto_20140820_1415'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
neilLasrado/frappe
refs/heads/develop
frappe/core/report/permitted_documents_for_user/__init__.py
12133432
yuewko/neutron
refs/heads/master
neutron/plugins/cisco/service_plugins/__init__.py
12133432
openstack-ja/horizon
refs/heads/master
openstack_dashboard/dashboards/project/images_and_snapshots/volume_snapshots/tables.py
3
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
jchuahtacc/WikiNetworking
refs/heads/master
wikinetworking/clickinfo.py
1
import matplotlib import mpld3 ## An mpld3 plugin that allows nodes to be clicked to open a URL # Source: @link <http://stackoverflow.com/a/28838652/814354> class ClickInfo(mpld3.plugins.PluginBase): """mpld3 Plugin for getting info on click Comes from: http://stackoverflow.com/a/28838652/814354 "...
f95johansson/marvin-transfer
refs/heads/master
marvin/appdirs.py
1
# -*- coding: utf-8 -*- """Utilities for determining platform-specific config dirs. This is a modified version of the original appdirs 1.4.0 module, focusing only on the config directory. It retains a lot of the original code. See original repository <http://github.com/ActiveState/appdirs> for details and usage. """...
Back2Basics/validictory
refs/heads/master
setup.py
9
#!/usr/bin/env python from setuptools import setup, find_packages from validictory import __version__ DESCRIPTION = "general purpose python data validator" LONG_DESCRIPTION = open('README.rst').read() setup(name='validictory', version=__version__, description=DESCRIPTION, long_description=LONG_DESC...
igorg1312/googlepythonsskeleton
refs/heads/master
lib/markupsafe/_constants.py
1535
# -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ Highlevel implementation of the Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ HTML_ENTITIES = { 'AElig': 198, 'Aacute': 193, 'Acirc': 194, 'Agrave': 1...
akosyakov/intellij-community
refs/heads/master
python/testData/intentions/beforeReturnTypeInPy3Annotation1.py
83
def my_func(p1=1): return p1 d = my<caret>_func(1)
popazerty/dvbapp-gui2
refs/heads/master
lib/python/Plugins/SystemPlugins/AtemioDeviceManager/HddSetup.py
1
from enigma import * from Plugins.Plugin import PluginDescriptor from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.MenuList import MenuList from Components.GUIComponent import GUIComponent from Components.HTMLComponent import HTMLComponent from Tools.Directories import fileExi...
fenginx/django
refs/heads/master
tests/postgres_tests/test_citext.py
89
""" The citext PostgreSQL extension supports indexing of case-insensitive text strings and thus eliminates the need for operations such as iexact and other modifiers to enforce use of an index. """ from django.db import IntegrityError from django.test.utils import modify_settings from . import PostgreSQLTestCase from ...
markflorisson/datashape
refs/heads/master
datashape/coretypes.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import """ This defines the DataShape type system, with unified shape and data type. """ import ctypes import datetime import operator import numpy as np from .py2help import _inttypes, _strtypes, unicode # Classes of unit types. DIMENSION = 1 MEASURE = 2 ...
planaspa/Data-Mining
refs/heads/master
tests/test_lengthPlot.py
1
from src.lengthPlot import * db = 'db/test.db' def test_text_format(): assert text_format("asdkjhaeih") == "asdkjhaeih" assert text_format("as&amp;dkj&gt;hae&lt;ih") == "as&dkj>hae<ih" assert text_format("") == "" def test_loadData(): conn = sqlite3.connect(db) c = conn.cursor() tweetInfo ...
Nick-OpusVL/odoo
refs/heads/8.0
addons/l10n_si/account_wizard.py
255
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus.at # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/sympy/simplify/tests/test_sqrtdenest.py
98
from sympy import sqrt, root, S, Symbol, sqrtdenest, Integral, cos from sympy.simplify.sqrtdenest import _subsets as subsets r2, r3, r5, r6, r7, r10, r15, r29 = [sqrt(x) for x in [2, 3, 5, 6, 7, 10, 15, 29]] def test_sqrtdenest(): d = {sqrt(5 + 2 * r6): r2 + r3, ...
Shaps/ansible
refs/heads/devel
lib/ansible/modules/utilities/logic/set_stats.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Ansible RedHat, 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', ...
Teagan42/home-assistant
refs/heads/dev
homeassistant/components/plugwise/climate.py
2
"""Plugwise Climate component for Home Assistant.""" import logging import haanna import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, HVAC_MOD...