repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
juhnowski/FishingRod | refs/heads/master | production/pygsl-0.9.5/pygsl/testing/complex.py | 2 | import _ufuncs
_token = "complex_"
_tokl = len(_token)
for _name in dir(_ufuncs):
if _name[:_tokl] == _token:
_shortname = _name[_tokl:]
_cmd = "%s = _ufuncs.%s" % (_shortname, _name)
#printy cmd
exec(_cmd)
del _token
del _tokl
del _shortname
del _name
del _cmd
|
ericholscher/django | refs/heads/master | django/contrib/staticfiles/utils.py | 322 | import os
import fnmatch
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def matches_patterns(path, patterns=None):
"""
Return True or False depending on whether the ``path`` should be
ignored (if it matches any pattern in ``ignore_patterns``).
"""
if patter... |
meduz/openRetina | refs/heads/master | openRetina/__main__.py | 3 | print('hello world, retina')
|
tralamazza/micropython | refs/heads/master | tests/basics/python36.py | 21 | # tests for things that only Python 3.6 supports
# underscores in numeric literals
print(100_000)
print(0b1010_0101)
print(0xff_ff)
# underscore supported by int constructor
print(int('1_2_3'))
print(int('0o1_2_3', 8))
|
poojavade/Genomics_Docker | refs/heads/master | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/AlignIO/ClustalIO.py | 1 | # Copyright 2006-2013 by Peter Cock. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Bio.AlignIO support for "clustal" output from CLUSTAL W and other tools.
You are expect... |
shail2810/nova | refs/heads/master | nova/api/openstack/compute/versionsV21.py | 40 | # Copyright 2013 IBM Corp.
# 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 app... |
cudadog/django-allauth | refs/heads/master | allauth/socialaccount/providers/openid/migrations/0001_initial.py | 73 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='OpenIDNonce',
fields=[
('id', models.AutoField(... |
petersrinivasan/neopeng | refs/heads/master | memory.py | 1 | # 1. Something that actually "writes" an integer to memory and can "read" an integer from a memory address
# 2. Value - something allowing us to get several integers from memory and interpret them as a thing, or
# write a thing out as several integers into memory
# 3. A specific type of value: "pointer". Interpretat... |
samba-team/samba | refs/heads/master | source4/dsdb/tests/python/ad_dc_search_performance.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import optparse
import sys
sys.path.insert(0, 'bin/python')
import os
import samba
import samba.getopt as options
import random
import tempfile
import shutil
import time
import itertools
from samba.netcmd.main import cmd_sambatool
# We try to use the test infrastructur... |
nwiizo/workspace_2017 | refs/heads/master | ansible-modules-extras/cloud/amazon/execute_lambda.py | 33 | #!/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 distributed... |
tswast/google-cloud-python | refs/heads/master | bigtable/google/cloud/bigtable_admin_v2/types.py | 2 | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
derekjchow/models | refs/heads/master | research/minigo/dualnet_test.py | 2 | # Copyright 2018 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... |
dsanders11/django-autocomplete-light | refs/heads/master | autocomplete_light/autocomplete/choice_list.py | 2 | from __future__ import unicode_literals
from django.utils.encoding import force_text
from .list import AutocompleteList
__all__ = ('AutocompleteChoiceList',)
class AutocompleteChoiceList(AutocompleteList):
"""
Simple :py:class:`~.list.AutocompleteList` implementation which expects
:py:attr:`choices` to... |
WiredProgrammers/hacking-tools | refs/heads/master | pyhashcat/pyhashcat/Hasher.py | 3 | __author__ = 'girish'
from abc import ABCMeta, abstractmethod
import hashlib
class AbstractHasher(metaclass=ABCMeta):
@abstractmethod
def getHash(self,data,asHex=False):
raise NotImplementedError
class MD5Hasher(AbstractHasher):
def getHash(self,data,asHex=False):
md5 = hashlib.md5(... |
eeshangarg/oh-mainline | refs/heads/master | vendor/packages/beautifulsoup4/bs4/__init__.py | 417 | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup uses a pluggable XML or HTML parser to parse a
(possibly invalid) document into a tree representation. Beautiful Soup
provides provides methods and Pythonic idioms that make it easy to
navigate... |
Huyuwei/tvm | refs/heads/master | topi/tests/python/test_topi_deformable_conv2d.py | 2 | # 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 u... |
hajjboy95/crazyflie-clients-python | refs/heads/develop | lib/cfclient/ui/tabs/PlotTab.py | 28 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... |
sadmansk/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/pytest/src/_pytest/config/argparsing.py | 32 | import six
import warnings
import argparse
FILE_OR_DIR = "file_or_dir"
class Parser(object):
""" Parser for command line arguments and ini-file values.
:ivar extra_info: dict of generic param -> value to display in case
there's an error processing the command line arguments.
"""
def __init_... |
elena/django | refs/heads/master | django/test/client.py | 4 | import json
import mimetypes
import os
import sys
from copy import copy
from functools import partial
from http import HTTPStatus
from importlib import import_module
from io import BytesIO
from urllib.parse import unquote_to_bytes, urljoin, urlparse, urlsplit
from asgiref.sync import sync_to_async
from django.conf im... |
casimp/pyxe | refs/heads/master | pyxe/fitting_tools.py | 2 | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 15 08:34:51 2015
@author: Chris
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import sys
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize impo... |
guorendong/iridium-browser-ubuntu | refs/heads/ubuntu/precise | third_party/mojo/src/mojo/public/tools/bindings/mojom_bindings_generator_unittest.py | 107 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from mojom_bindings_generator import MakeImportStackMessage
class MojoBindingsGeneratorTest(unittest.TestCase):
"""Tests mojo_bindings_g... |
showa-yojyo/notebook | refs/heads/develop | source/_sample/ptt/trends-closest.py | 2 | #!/usr/bin/env python
# Demonstration GET trends/closest
# See https://dev.twitter.com/rest/reference/get/trends/closest
from secret import twitter_instance
from json import dump
import sys
tw = twitter_instance()
# [1]
response = tw.trends.closest(long=139.773828, lat=35.696805)
# [2]
dump(response, sys.stdout, e... |
chauhanhardik/populo_2 | refs/heads/master | common/djangoapps/track/backends/tests/test_mongodb.py | 172 | from __future__ import absolute_import
from mock import patch
from django.test import TestCase
from track.backends.mongodb import MongoBackend
class TestMongoBackend(TestCase):
def setUp(self):
super(TestMongoBackend, self).setUp()
self.mongo_patcher = patch('track.backends.mongodb.MongoClient'... |
michaelgugino/loggerfall | refs/heads/master | loggerfall.py | 1 | #!/usr/bin/env python
# Modified work by Michael Gugino
# Original work Copyright 2009 Facebook
#
# 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-... |
nRFMesh/mbed-os | refs/heads/master | tools/host_tests/tcpecho_client.py | 73 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... |
takeshineshiro/nova | refs/heads/master | nova/tests/unit/compute/test_compute_mgr.py | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
markeTIC/OCB | refs/heads/8.0 | addons/point_of_sale/wizard/__init__.py | 382 | # -*- 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... |
odeke-em/restAssured | refs/heads/master | thebear/models.py | 1 | # Author: Emmanuel Odeke <odeke@ualberta.ca>
# Copyright (c) 2014
from django.db import models
# Local module
import theBearConstants
class Artist(models.Model):
name = models.CharField(max_length=theBearConstants.MAX_MISC_STR_LENGTH)
uri = models.CharField(max_length=theBearConstants.MAX_MISC_STR_LENGTH, b... |
surajssd/kuma | refs/heads/master | vendor/packages/logilab/common/configuration.py | 85 | # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... |
d3trax/asuswrt-merlin | refs/heads/master | release/src/router/asusnatnl/pjproject-1.12/tests/pjsua/scripts-sendto/157_err_sdp_bad_addr_type.py | 59 | # $Id: 157_err_sdp_bad_addr_type.py 2066 2008-06-26 19:51:01Z bennylp $
import inc_sip as sip
import inc_sdp as sdp
sdp = \
"""
v=0
o=- 0 0 IN IP4 127.0.0.1
s=pjmedia
c=IN IP7 127.0.0.1
t=0 0
m=audio 4000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
"""
pjsua_args = ... |
ddzialak/boto | refs/heads/develop | boto/cloudtrail/exceptions.py | 21 | """
Exceptions that are specific to the cloudtrail module.
"""
from boto.exception import BotoServerError
class InvalidSnsTopicNameException(BotoServerError):
"""
Raised when an invalid SNS topic name is passed to Cloudtrail.
"""
pass
class InvalidS3BucketNameException(BotoServerError):
"""
... |
akeym/cyder | refs/heads/master | cyder/api/v1/endpoints/dns/api.py | 5 | from django.core.exceptions import ValidationError
from rest_framework import serializers
from cyder.api.v1.endpoints import api
from cyder.cydns.utils import ensure_label_domain
NestedKeyValueFields = api.NestedAVFields
class FQDNMixin(object):
def restore_object(self, attrs):
if self.fqdn:
... |
poo12138/gem5-stable | refs/heads/master | src/arch/x86/isa/insts/general_purpose/data_conversion/__init__.py | 91 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# 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 implemen... |
tmpgit/intellij-community | refs/heads/master | python/testData/copyPaste/multiLine/IndentMulti33.after.py | 996 | class C:
def foo(self):
x = 1
y = 2
y = 2
|
Aplia/tfk-ansatte | refs/heads/master | backend/backend/urls.py | 1 | """backend URL Configuration """
from django.conf import settings
from django.conf.urls import url, include
from backend.api import router
from django.contrib import admin
urlpatterns = [
url(r'^backend/api/', include(router.urls)),
url(r'^backend/admin/', admin.site.urls),
]
if settings.DEBUG:
import deb... |
SidSachdev/SFrame | refs/heads/master | oss_src/unity/python/sframe/meta/asttools/visitors/pysourcegen.py | 15 | '''
Created on Jul 15, 2011
@author: sean
'''
from __future__ import print_function
import _ast
from ...asttools import Visitor
from string import Formatter
import sys
from ...utils import py3op, py2op
if sys.version_info.major < 3:
from StringIO import StringIO
else:
from io import StringIO
class ASTFormat... |
vv1133/home_web | refs/heads/master | django/contrib/sites/managers.py | 118 | from django.conf import settings
from django.db import models
from django.db.models.fields import FieldDoesNotExist
class CurrentSiteManager(models.Manager):
"Use this to limit objects to those associated with the current site."
def __init__(self, field_name=None):
super(CurrentSiteManager, self).__ini... |
DiptoDas8/Biponi | refs/heads/master | lib/python2.7/site-packages/django/core/checks/__init__.py | 36 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .messages import (CheckMessage,
Debug, Info, Warning, Error, Critical,
DEBUG, INFO, WARNING, ERROR, CRITICAL)
from .registry import register, run_checks, tag_exists, Tags
# Import these to force registration of checks
import django.c... |
west-tandon/ReSearch | refs/heads/master | test/index/test_forward_index.py | 1 | import shutil
import tempfile
import unittest
from os import path
from research.coding.varbyte import Encoder
from research.index.common import IndexFactory
class ForwardIndexReadTest(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
self.meta_path = path.join(self.test_dir... |
mrrrgn/olympia | refs/heads/master | apps/bandwagon/models.py | 9 | import collections
import hashlib
import os
import re
import time
import uuid
from datetime import datetime
from django.conf import settings
from django.core.cache import cache
from django.db import connection, models, transaction
import caching.base as caching
import amo
import amo.models
import sharing.utils as sh... |
southpawtech/TACTIC-DEV | refs/heads/master | src/pyasm/web/cherrypy30_adapter.py | 1 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... |
alexmandujano/django | refs/heads/master | django/contrib/formtools/tests/wizard/wizardtests/forms.py | 313 | import os
import tempfile
from django import forms
from django.contrib.auth.models import User
from django.core.files.storage import FileSystemStorage
from django.forms.formsets import formset_factory
from django.forms.models import modelformset_factory
from django.http import HttpResponse
from django.template import ... |
WarrenWeckesser/numpngw | refs/heads/master | tests/test_write_png.py | 1 | from __future__ import division, print_function
import unittest
import io
import struct
import zlib
import numpy as np
from numpy.testing import (assert_, assert_equal, assert_array_equal,
assert_raises)
import numpngw
def next_chunk(s):
chunk_len = struct.unpack("!I", s[:4])[0]
ch... |
Alwnikrotikz/huhamhire-hosts | refs/heads/master | tui/curses_d.py | 24 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# curses_d.py: Operations for TUI window.
#
# Copyleft (C) 2014 - huhamhire <me@huhamhire.com>
# =====================================================================
# Licensed under the GNU General Public License, version 3. You should
# have received a copy of the GNU... |
starcraftman/pakit | refs/heads/master | pakit/shell.py | 2 | # pylint: disable=too-many-lines
"""
All code related to running system commands.
Command: Class to run arbitrary system commands.
Archive: Used to fetch a source archive.
Git: Used to fetch a git repository.
Hg: Used to fetch a mercurial repository.
"""
from __future__ import absolute_import
from abc import ABCMeta, ... |
olivierb2/openchange | refs/heads/master | mapiproxy/services/utils/genpass.py | 9 | #!/usr/bin/python
import os
import sys
import hashlib
from base64 import urlsafe_b64encode as encode
def main():
if len(sys.argv) != 2:
print '%s password' % (sys.argv[0])
salt = os.urandom(4)
h = hashlib.sha1(sys.argv[1])
h.update(salt)
print "{SSHA}" + encode(h.digest() + salt)
sys.exit()
if __name__ == "... |
zhjunlang/kbengine | refs/heads/master | kbe/src/lib/python/Doc/includes/sqlite3/ctx_manager.py | 51 | import sqlite3
con = sqlite3.connect(":memory:")
con.execute("create table person (id integer primary key, firstname varchar unique)")
# Successful, con.commit() is called automatically afterwards
with con:
con.execute("insert into person(firstname) values (?)", ("Joe",))
# con.rollback() is called after the wit... |
ArchiFleKs/magnum | refs/heads/master | magnum/tests/unit/objects/test_fields.py | 2 | # Copyright 2015 IBM Corp.
#
# 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 t... |
jbzdak/edx-platform | refs/heads/master | common/test/acceptance/tests/lms/test_lms_course_discovery.py | 69 | """
Test course discovery.
"""
import datetime
import json
from bok_choy.web_app_test import WebAppTest
from ..helpers import remove_file
from ...pages.common.logout import LogoutPage
from ...pages.studio.auto_auth import AutoAuthPage
from ...pages.lms.discovery import CourseDiscoveryPage
from ...fixtures.course impor... |
timakaryo/antrean | refs/heads/master | backend/api/tests.py | 873 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
# Create your tests here.
|
xiaoyang2022/V2EX | refs/heads/master | money.py | 16 | #!/usr/bin/env python
# coding=utf-8
import os
import re
import time
import datetime
import hashlib
import string
import random
from google.appengine.ext import webapp
from google.appengine.api import memcache
from google.appengine.ext import db
from google.appengine.ext.webapp import util
from google.appengine.ext.w... |
PaddlePaddle/models | refs/heads/develop | PaddleCV/video/metrics/bsn_metrics/bsn_pem_metrics.py | 1 | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#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... |
DiptoDas8/Biponi | refs/heads/master | lib/python2.7/site-packages/django/core/files/uploadhandler.py | 102 | """
Base file upload handler classes, and the built-in concrete subclasses
"""
from __future__ import unicode_literals
from io import BytesIO
from django.conf import settings
from django.core.files.uploadedfile import (
InMemoryUploadedFile, TemporaryUploadedFile,
)
from django.utils.encoding import python_2_uni... |
Akylas/CouchPotatoServer | refs/heads/master | libs/sqlalchemy/dialects/mysql/mysqlconnector.py | 17 | # mysql/mysqlconnector.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
"""Support for the MySQL database via the MySQL Connector/Python adapter.
MyS... |
mephizzle/wagtail | refs/heads/master | wagtail/wagtailcore/migrations/0012_extend_page_slug_field.py | 27 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0011_page_first_published_at'),
]
operations = [
migrations.AlterField(
model_name='page',
... |
lucasoldaini/simple_caching | refs/heads/master | simple_caching.py | 1 | """Caching decorator for dictionary/tuples."""
import json
import os
from functools import wraps
import gzip
import sys
from string import punctuation
import codecs
from hashlib import md5
_OK_JSON = set((dict, list, str, int, float))
class _DumpAdapter(object):
""" Flexible interlace to blindly use codecs modu... |
zrhans/pythonanywhere | refs/heads/master | .virtualenvs/django19/lib/python3.4/site-packages/numpy/doc/misc.py | 124 | """
=============
Miscellaneous
=============
IEEE 754 Floating Point Special Values
--------------------------------------
Special values defined in numpy: nan, inf,
NaNs can be used as a poor-man's mask (if you don't care what the
original value was)
Note: cannot use equality to test NaNs. E.g.: ::
>>> myarr = ... |
jamesblunt/sympy | refs/heads/master | sympy/physics/quantum/commutator.py | 24 | """The commutator: [A,B] = A*B - B*A."""
from __future__ import print_function, division
from sympy import S, Expr, Mul, Add
from sympy.core.compatibility import u
from sympy.printing.pretty.stringpict import prettyForm
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.operator import Operat... |
vadimtk/chrome4sdp | refs/heads/master | tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/dynamodb/test_layer2.py | 114 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... |
florianholzapfel/home-assistant | refs/heads/dev | homeassistant/components/climate/netatmo.py | 12 | """
Support for Netatmo Smart Thermostat.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.netatmo/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.const import TEMP_CELSIUS, ATTR_TEMPERATURE
from home... |
TejasM/picasso | refs/heads/master | picasso/picasso/index/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
pneerincx/easybuild-framework | refs/heads/master | easybuild/toolchains/intel-para.py | 5 | ##
# Copyright 2012-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (htt... |
djangocali/blog-api | refs/heads/master | blog-api/config/__init__.py | 78 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .local import Local # noqa
from .production import Production # noqa
|
atosorigin/ansible | refs/heads/devel | lib/ansible/utils/vars.py | 24 | # (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... |
tvidas/a5 | refs/heads/master | scripts/bin/printalljobs.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# printalljobs.py
import beanstalkc
from pprint import pprint
#Read and execute global config
sys.path.append('../config')
from config import *
beanstalk = beanstalkc.Connection(host=BSHOST, port=BSPORT)
pprint(beanstalk.stats())
print "tubes: "
print beansta... |
popazerty/enigma2-4.3 | refs/heads/master | lib/python/Components/Converter/EcmCryptoInfo.py | 15 | #
# EcmCryptoInfo Converter by mcbain // v0.1 // 20111109
#
from Components.Converter.Converter import Converter
from Components.Element import cached
from Components.config import config
from Poll import Poll
import os
ECM_INFO = '/tmp/ecm.info'
old_ecm_mtime = None
data = None
class EcmCryptoInfo(Poll, Converter,... |
michaelgallacher/intellij-community | refs/heads/master | python/testData/editing/sectionIndentInsideGoogleDocStringCustomIndent.after.py | 48 | def f(param):
"""
Args:
param<caret>
""" |
mpld3/mpld3_rewrite | refs/heads/master | mpld3_rewrite/__init__.py | 1 | """
Interactive D3 rendering of matplotlib images
=============================================
Functions: General Use
----------------------
- :func:`fig_to_html` : convert a figure to an html string
- :func:`fig_to_dict` : convert a figure to a dictionary representation
- :func:`save_html` : save a figure to an ht... |
IKholopov/HackUPC2017 | refs/heads/master | hackupc/static/js/bootstrap/Respond-master/test/test.html.py | 1 | XXXXXXXXX XXXXX
XXXXXX
XXXXXX
XXXXX XXXXXXXXXXXXXXX XX
XXXXXXXXXXXXXX XX XXXX XXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXX XXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXXXXXXX XXXX XXXXXX X XXXXX X XXXX XXX
XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXX
XXXXXX
XXXXXXX ... |
sailthru/stolos | refs/heads/master | stolos/__init__.py | 1 | import logging as _logging
log = _logging.getLogger('stolos')
import os.path as _p
import pkg_resources as _pkg_resources
__version__ = _pkg_resources.get_distribution(
_p.basename(_p.dirname(_p.abspath(__file__)))).version
class Uninitialized(Exception):
msg = (
"Before you use Stolos, please initia... |
wartman4404/servo | refs/heads/master | tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_serializer.py | 451 | from __future__ import absolute_import, division, unicode_literals
import json
import unittest
from .support import get_data_files
try:
unittest.TestCase.assertEqual
except AttributeError:
unittest.TestCase.assertEqual = unittest.TestCase.assertEquals
import html5lib
from html5lib import constants
from html... |
espadrine/opera | refs/heads/master | chromium/src/tools/site_compare/scrapers/chrome/__init__.py | 179 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Selects the appropriate scraper for Chrome."""
def GetScraper(version):
"""Returns the scraper module for the given version.... |
zhuwenping/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_reprlib.py | 56 | """
Test cases for the repr module
Nick Mathewson
"""
import sys
import os
import shutil
import unittest
from test.support import run_unittest
from reprlib import repr as r # Don't shadow builtin repr
from reprlib import Repr
from reprlib import recursive_repr
def nestedTuple(nesting):
t = ()
for i in r... |
Avicennasis/AvicBot | refs/heads/master | misc/mysandboxes.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This bot resets a (user) sandbox with predefined text.
This script understands the following command-line arguments:
¶ms;
Furthermore, the following command line parameters are supported:
-hours:# Use this parameter if to make the script repeat itself
... |
Bitergia/allura | refs/heads/master | ForgeDiscussion/forgediscussion/tests/functional/test_import.py | 3 | import os
import json
from datetime import datetime, timedelta
from nose.tools import assert_equal
import ming
import pylons
pylons.c = pylons.tmpl_context
pylons.g = pylons.app_globals
from pylons import g, c
from allura import model as M
from alluratest.controller import TestController, TestRestApiBase
class Test... |
DavidTingley/ephys-processing-pipeline | refs/heads/master | installation/klustaviewa-0.3.0/klustaviewa/control/tests/test_stack.py | 2 | """Unit tests for stack module."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
from klustaviewa.control.stack import Stack
# --------------------------------------------------------... |
gtest-org/test12 | refs/heads/master | tests/wrappers/test_wrappers.py | 37 | # Joint copyright:
# - Copyright 2012,2013 Wikimedia Foundation
# - Copyright 2012,2013 Antoine "hashar" Musso
# - Copyright 2013 Arnaud Fabre
#
# 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 ... |
hernad/frappe | refs/heads/develop | frappe/email/smtp.py | 6 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import smtplib
import _socket
from frappe.utils import cint
from frappe import _
def send(email, append_to=None):
"""send the message or add it to Outbox Email"""... |
msebire/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/hgext/purge.py | 90 | # Copyright (C) 2006 - Marco Barisione <marco@barisione.org>
#
# This is a small extension for Mercurial (http://mercurial.selenic.com/)
# that removes files not known to mercurial
#
# This program was inspired by the "cvspurge" script contained in CVS
# utilities (http://www.red-bean.com/cvsutils/).
#
# For help on th... |
legaultmarc/grstools | refs/heads/master | grstools/tests/test_grs_compute.py | 1 | """
Test the GRS computation algorithm
"""
import unittest
from pkg_resources import resource_filename
import geneparse
import geneparse.testing
import numpy as np
from ..scripts import build_grs
class TestCompute(unittest.TestCase):
def test_weight_unambiguous(self):
# _weight_ambiguous(g, info, qual... |
oinopion/django | refs/heads/master | django/views/decorators/gzip.py | 720 | from django.middleware.gzip import GZipMiddleware
from django.utils.decorators import decorator_from_middleware
gzip_page = decorator_from_middleware(GZipMiddleware)
gzip_page.__doc__ = "Decorator for views that gzips pages if the client supports it."
|
mmoya/ansible | refs/heads/devel | v2/ansible/utils/boolean.py | 256 | # (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... |
chandlercr/aima-python | refs/heads/master | submissions/Porter/puzzles.py | 18 | import search
from math import(cos, pi)
sumner_map = search.UndirectedGraph(dict(
# Portland=dict(Mitchellville=7, Fairfield=17, Cottontown=18),
# Cottontown=dict(Portland=18),
# Fairfield=dict(Mitchellville=21, Portland=17),
# Mitchellville=dict(Portland=7, Fairfield=21),
Dallas=dict(Austin=50, Ho... |
GMadorell/coursera-machine-learning | refs/heads/master | theory/08.02 - Dimensionality Reduction/scripts/initialize.py | 5 | import requests
import encoding
LATEX_TEMPLATE_URL = "https://raw.githubusercontent.com/Skabed/cookiecutter-latex-markdown/master/%7B%7Bcookiecutter.name%7D%7D/templates/latex.template"
def main():
# Reload latex template because cookiecutter removes tags from it.
print("Reloading latex template.")
reloa... |
LouKingGood/LouKingGood | refs/heads/master | plugin.program.super.favourites/default.py | 2 | #
# Copyright (C) 2014-
# Sean Poyser (seanpoyser@gmail.com)
#
# 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, or (at your option)
# any later version.
... |
jeroendecroos/pronunciation_master | refs/heads/master | pronunciation_master/tests/unittests/src/test_get_frequent_words.py | 1 | import mock
import os
import StringIO
import tempfile
import unittest
from pronunciation_master.tests.testlib import testcase
from pronunciation_master.src import get_frequent_words
class GetFrequencyListFromFile(testcase.BaseTestCase):
def setUp(self):
_, self.temp_filepath = tempfile.mkstemp()
... |
fujicoin/electrum-fjc | refs/heads/master | electrum/plugins/coldcard/cmdline.py | 2 | from electrum.plugin import hook
from electrum.util import print_msg, raw_input, print_stderr
from electrum.logging import get_logger
from .coldcard import ColdcardPlugin
_logger = get_logger(__name__)
class ColdcardCmdLineHandler:
def get_passphrase(self, msg, confirm):
raise NotImplementedError
... |
timopulkkinen/BubbleFish | refs/heads/master | build/android/pylib/instrumentation/dispatch.py | 1 | # Copyright (c) 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.
"""Dispatches the instrumentation tests."""
import logging
import os
from pylib import android_commands
from pylib.base import shard
from pylib.base im... |
Drapegnik/bsu | refs/heads/master | statistical-modeling/lab4/lab4.py | 1 | #!/usr/bin/env python
# coding: utf-8
# # lab4
# Метод Монте-Карло
#
# ## tasks
# 1. По методу Монте-Карло вычислить приближенное значения интегралов.
# 2. Сравнить полученное значение либо с точным значением (если его получится вычислить), либо с приближенным, полученным в каком-либо математическом пакете (например,... |
MSusik/invenio | refs/heads/master | invenio/legacy/bibauthorid/string_utils.py | 25 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2011 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) a... |
ManageIQ/integration_tests | refs/heads/master | cfme/tests/physical_infrastructure/test_redfish_physical_server_details.py | 3 | import pytest
from cfme.physical.provider.redfish import RedfishProvider
from cfme.utils.appliance.implementations.ui import navigate_to
pytestmark = [pytest.mark.provider([RedfishProvider], scope="function")]
@pytest.fixture(scope="function")
def physical_server(appliance, provider, setup_provider_funcscope):
... |
kuiwei/edx-platform | refs/heads/master | common/djangoapps/student/tests/test_microsite.py | 6 | """
Test for User Creation from Micro-Sites
"""
from django.test import TestCase
from student.models import UserSignupSource
import mock
import json
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
FAKE_MICROSITE = {
"SITE_NAME": "openedx.localhost",
"university": "fakeu... |
nareshganatra/apiai | refs/heads/master | lib/jinja2/asyncsupport.py | 117 | # -*- coding: utf-8 -*-
"""
jinja2.asyncsupport
~~~~~~~~~~~~~~~~~~~
Has all the code for async support which is implemented as a patch
for supported Python versions.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import sys
import asyncio
import inspec... |
google/or-tools | refs/heads/stable | ortools/constraint_solver/doc/routing_svg.py | 1 | # Copyright 2010-2021 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
liangazhou/django-rdp | refs/heads/master | packages/Django-1.8.6/django/contrib/gis/db/backends/mysql/operations.py | 101 | from django.contrib.gis.db.backends.base.adapter import WKTAdapter
from django.contrib.gis.db.backends.base.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import aggregates
from django.db.backends.mysql.operations import D... |
clickbaron/userinfuser | refs/heads/master | serverside/fantasm/exceptions.py | 28 | """ Fantasm: A taskqueue-based Finite State Machine for App Engine Python
Docs and examples: http://code.google.com/p/fantasm/
Copyright 2010 VendAsta Technologies 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 ob... |
lsaffre/lino-welfare | refs/heads/master | lino_welfare/projects/gerd/tests/dumps/18.8.0/dashboard_widget.py | 4 | # -*- coding: UTF-8 -*-
logger.info("Loading 0 objects to table dashboard_widget...")
# fields: id, seqno, user, item_name, visible
loader.flush_deferred_objects()
|
ManoSeimas/manoseimas.lt | refs/heads/master | manoseimas/flatpages/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
atomic83/youtube-dl | refs/heads/master | youtube_dl/extractor/__init__.py | 1 | from __future__ import unicode_literals
from .abc import ABCIE
from .abc7news import Abc7NewsIE
from .academicearth import AcademicEarthCourseIE
from .acast import (
ACastIE,
ACastChannelIE,
)
from .addanime import AddAnimeIE
from .adobetv import (
AdobeTVIE,
AdobeTVShowIE,
AdobeTVChannelIE,
Ad... |
MarkRunWu/buck | refs/heads/master | scripts/verify-javadoc.py | 24 | #!/usr/bin/env python
#
# Examines the output from running Javadoc via Ant and checks to see if any
# warnings were emitted. If so, fail the build unless the warning is in the
# whitelist. When run in a CI build, Ant may not be able to reach external
# URLs, so warnings about errors fetching expected URLs should be ign... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.