repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
biocore/qiime
refs/heads/master
scripts/split_libraries_fastq.py
11
#!/usr/bin/env python # File created on 07 Jun 2011 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Greg Caporaso", "Emily TerAvest", "Yoshiki Vazquez Baeza", "Rob Knight"] __license__ = "GPL" __version__ = "1.9.1-dev" __ma...
mariusbaumann/pyload
refs/heads/stable
module/plugins/hoster/DdlstorageCom.py
5
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class DdlstorageCom(DeadHoster): __name__ = "DdlstorageCom" __type__ = "hoster" __version__ = "1.02" __pattern__ = r'https?://(?:www\.)?ddlstorage\.com/\w+' __description__ = """DDLStorage.co...
zhaogaolong/oneFinger
refs/heads/master
openstack/test/log.py
1
#!/usr/bin/env python # coding:utf8 import logging # logging.basicConfig(level=logging.DEBUG, # format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s', # datefmt='%a, %d %b %Y %H:%M:%S', # filename='myapp.log', # filemo...
goldsborough/.emacs
refs/heads/master
.emacs.d/.python-environments/default/lib/python3.5/site-packages/setuptools/ssl_support.py
100
import os import socket import atexit import re from setuptools.extern.six.moves import urllib, http_client, map import pkg_resources from pkg_resources import ResolutionError, ExtractionError try: import ssl except ImportError: ssl = None __all__ = [ 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_avail...
drwyrm/Flexget
refs/heads/develop
flexget/plugins/sites/rarbg.py
1
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.config_schema import one_or_more from flexget.utils....
mckerrj/ansible
refs/heads/devel
contrib/inventory/spacewalk.py
16
#!/usr/bin/env python """ Spacewalk external inventory script ================================= Ansible has a feature where instead of reading from /etc/ansible/hosts as a text file, it can query external programs to obtain the list of hosts, groups the hosts are in, and even variables to assign to each host. To use...
amith01994/intellij-community
refs/heads/master
python/helpers/pydev/_pydev_getopt.py
108
#======================================================================================================================= # getopt code copied since gnu_getopt is not available on jython 2.1 #======================================================================================================================= class Ge...
coolsee/node-gyp
refs/heads/master
gyp/pylib/gyp/MSVSToolFile.py
2736
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
RuudBurger/CouchPotatoV1
refs/heads/master
cherrypy/_cptree.py
82
"""CherryPy Application and Tree objects.""" import os import sys import cherrypy from cherrypy._cpcompat import ntou, py3k from cherrypy import _cpconfig, _cplogging, _cprequest, _cpwsgi, tools from cherrypy.lib import httputil class Application(object): """A CherryPy Application. Servers and gateways...
egeriicw/Django_Tutorials
refs/heads/master
A_Complete_Beginners_Guide_to_Django/myproject/myproject/urls.py
1
"""myproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
JoeMighty/shouldly
refs/heads/master
docs/conf.py
5
# -*- coding: utf-8 -*- # # Shouldly documentation build configuration file, created by # sphinx-quickstart on Thu Oct 01 06:42:41 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
Suninus/NewsBlur
refs/heads/master
vendor/oauth2client/appengine.py
20
# Copyright (C) 2010 Google 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 writ...
PeteW/luigi
refs/heads/master
luigi/contrib/sqla.py
5
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Gouthaman Balaraman # # 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 applic...
zooba/PTVS
refs/heads/master
Python/Tests/GlassTests/PythonTests/Python/StepOverBreakpoint/py_mod.py
4
def global_func(): def inner_func(): pass inner_func() print('ok') global_func()
okolisny/integration_tests
refs/heads/master
scripts/latest_template_tester_report.py
7
#!/usr/bin/env python2 import argparse import datetime import re import sys from contextlib import closing from jinja2 import Environment, FileSystemLoader from urllib2 import urlopen, HTTPError from cfme.utils import trackerbot from cfme.utils.conf import cfme_data from cfme.utils.path import template_path, log_path...
WQuanfeng/wagtail
refs/heads/master
wagtail/wagtailimages/formats.py
31
from django.utils.html import escape from wagtail.utils.apps import get_app_submodules from wagtail.wagtailimages.models import SourceImageIOError class Format(object): def __init__(self, name, label, classnames, filter_spec): self.name = name self.label = label self.classnames = classnam...
JeyZeta/Dangerous
refs/heads/master
Dangerous/Golismero/tools/sqlmap/waf/jiasule.py
8
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.enums import HTTP_HEADER from lib.core.settings import WAF_ATTACK_VECTORS __product__ = "Jiasule Web Application Firewall (Jiasule)" def detect(get_...
hkawasaki/kawasaki-aio8-1
refs/heads/gacco2/master
cms/djangoapps/contentstore/views/__init__.py
46
# pylint: disable=W0401, W0511 "All view functions for contentstore, broken out into submodules" # Disable warnings about import from wildcard # All files below declare exports with __all__ from .assets import * from .checklist import * from .component import * from .course import * from .error import * from .helpers...
marcoantoniooliveira/labweb
refs/heads/master
oscar/lib/python2.7/site-packages/sphinx/util/texescape.py
11
# -*- coding: utf-8 -*- """ sphinx.util.texescape ~~~~~~~~~~~~~~~~~~~~~ TeX escaping helper. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ tex_replacements = [ # map TeX special chars (u'$', ur'\$'), (u'%', ur'\%'), (u...
n1889/gitinspector
refs/heads/master
setup.py
50
# coding: utf-8 # # Copyright © 2013 Ejwa Software. All rights reserved. # # This file is part of gitinspector. # # gitinspector 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,...
jackjennings/Mechanic
refs/heads/master
Mechanic.roboFontExt/lib/site-packages/requests/packages/chardet/jisfreq.py
3130
######################## 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...
virus-warnning/HelloDjango
refs/heads/master
HelloDjango/settings.py
1
""" Django settings for HelloDjango project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ......
araseyuta/Newsstand-analytics
refs/heads/master
gdata/tlslite/integration/AsyncStateMachine.py
238
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readabl...
Juniper/neutron
refs/heads/master
neutron/plugins/hyperv/agent_notifier_api.py
21
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions SRL # 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...
okadate/romspy
refs/heads/master
romspy/reshape_wind.py
1
# coding: utf-8 # (c) 2015-11-18 Teruhisa Okada import pandas as pd import numpy as np import math from pykrige.ok import OrdinaryKriging from scipy.interpolate import Rbf import matplotlib.pyplot as plt import matplotlib as mpl import netCDF4 import datetime import romspy mpl.rc('image', cmap='jet') ...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/celery/docs/slidesource/slide-example1.py
23
from celery.task import Task class MyTask(Task): def run(self, x, y): return x * y
hbrunn/OCB
refs/heads/8.0
addons/website_crm_partner_assign/controllers/main.py
271
# -*- coding: utf-8 -*- import werkzeug from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import slug, unslug from openerp.tools.translate import _ class WebsiteCrmPartnerAssign(http.Controller): _references_...
MER-GROUP/intellij-community
refs/heads/master
python/testData/override/singleStar_after.py
83
class A: def f1(self, *, a = 1): pass class B(A): def f1(self, *, a=1): <selection>super().f1(a=a)</selection>
Samael500/pelican-plugins
refs/heads/master
gzip_cache/gzip_cache.py
40
''' Copyright (c) 2012 Matt Layman Gzip cache ---------- A plugin to create .gz cache files for optimization. ''' import logging import os import zlib from pelican import signals logger = logging.getLogger(__name__) # A list of file types to exclude from possible compression EXCLUDE_TYPES = [ # Compressed typ...
juhnowski/ph_motors
refs/heads/master
test.py
1
from multiprocessing import Process, Pipe #Basic imports from ctypes import * import sys #Phidget specific imports from Phidgets.Phidget import Phidget from Phidgets.PhidgetException import PhidgetErrorCodes, PhidgetException from Phidgets.Events.Events import AccelerationChangeEventArgs, AttachEventArgs, DetachEventAr...
AlessandroCorsi/fibermodes
refs/heads/master
tests/fiber/solver/test_tlsif.py
2
# This file is part of FiberModes. # # FiberModes 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. # # FiberModes is distributed in the ...
Einsteinish/PyTune3
refs/heads/master
vendor/feedvalidator/demo/src/tests/config.py
19
from os import environ # This is a test config, used by the runtests script, to ensure check.cgi # runs without requiring a web server. HOMEURL = 'http://localhost/check' PYDIR = '/usr/lib/python/' WEBDIR = environ['FEEDVALIDATOR_HOME'] SRCDIR = WEBDIR + '/src' DOCSURL = 'docs' CSSURL = 'css'
leiferikb/bitpop
refs/heads/master
src/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
1
# 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. from telemetry.web_perf.metrics import timeline_based_metric from telemetry.web_perf.metrics import rendering_stats from telemetry.page.perf_tests_helper imp...
cchamberlain/npm-msys2
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
2736
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
mdole/wustl_rts_benchmarks
refs/heads/master
benchmarks/rayCast/common/runTests.py
98
import subprocess import sys import random import os def onPprocessors(command,p) : if os.environ.has_key("OPENMP"): os.putenv("OMP_NUM_THREADS", "%d" %p) return command elif os.environ.has_key("CILK"): return command + " -cilk_set_worker_count " + `p` elif os.environ.has_key("MKLROOT"): return...
spaceone/pyjs
refs/heads/master
pyjswidgets/pyjamas/ui/MenuBarPopupPanel.py
9
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # # 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/...
jzoldak/edx-platform
refs/heads/master
openedx/core/djangoapps/ccxcon/migrations/0001_initial_ccxcon_model.py
65
""" Initial migration """ from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): """ Initial migration for CCXCon model """ dependencies = [ ] operations = [ migrations.CreateModel( name='CCXCon', ...
pedro2d10/SickRage-FR
refs/heads/develop
sickbeard/providers/transmitthenet.py
1
# coding=utf-8 # # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage 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 lat...
zimmermant/dlvo_lammps
refs/heads/master
examples/dlvo/plot_dlvo.py
1
# Plotting DLVO force from pair_dlvo.cpp file with real constants import numpy as np import matplotlib.pyplot as plt x_max=5e-6 points=10000 espr = 80 epso =8.85E-12 radius = 3e-6 psi = 7e-2 psisqrd=psi**2 debyeinv = 104022291 hamaker =1.3e-20 X=np.linspace(0,x_max,points) h=X-radius f_dlvo = espr*epso*radiu...
petemounce/ansible
refs/heads/devel
lib/ansible/parsing/yaml/loader.py
74
# (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...
mgedmin/ansible-modules-core
refs/heads/devel
files/replace.py
103
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Evan Kaufman <evan@digitalflophouse.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 t...
mm1ke/portage
refs/heads/master
pym/portage/dep/dep_check.py
1
# Copyright 2010-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import unicode_literals __all__ = ['dep_check', 'dep_eval', 'dep_wordreduce', 'dep_zapdeps'] import collections import logging import operator import portage from portage.dep import Atom, match...
kosugi/plurk4ji
refs/heads/master
config.py
1
# -*- coding: utf-8 -*- import os import yaml import logging.config def load(filename): with open(os.path.expanduser(filename), 'r') as f: config = yaml.load(f.read()) # SMTPHandler requires tuple logging.config.dictConfig(config.get('logging', dict(version=1))) return config
mi1980/projecthadoop3
refs/heads/master
udacity/cs101-intro-cs/code/lesson3/problem-set-3/matrix.py
4
# By Ashwath from forums # Given a list of lists representing a n * n matrix as input, # define a procedure that returns True if the input is an identity matrix # and False otherwise. # An IDENTITY matrix is a square matrix in which all the elements # on the principal/main diagonal are 1 and all the elements outsi...
olivierverdier/sfepy
refs/heads/master
tests/test_input_poisson.py
1
input_name = '../examples/diffusion/poisson.py' output_name = 'test_poisson.vtk' from testsBasic import TestInput class Test( TestInput ): pass
JGrippo/YACS
refs/heads/master
events/tests.py
24123
from django.test import TestCase # Create your tests here.
hyperwd/hwcram
refs/heads/master
rds/tests.py
24123
from django.test import TestCase # Create your tests here.
drayanaindra/inasafe
refs/heads/develop
realtime/test/test_shake_data.py
2
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Tests Shake Data functionality related to shakemaps.** Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public...
KinKir/jaikuengine
refs/heads/master
common/views.py
32
# Copyright 2009 Google 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 writing, ...
MattCCS/PyVault
refs/heads/master
pyvault/old_decorator.py
1
def requires_file_loaded(func): @functools.wraps(func) def _decorator(self, *args, **kwargs): if not self.table: raise errors.PasswordFileNotLoaded() func(self, *args, **kwargs) return _decorator
michel-slm/0install
refs/heads/master
zeroinstall/0launch-gui/main.py
6
# Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. from __future__ import print_function import os, sys import logging import warnings from optparse import OptionParser from zeroinstall import _, SafeException from zeroinstall.injector import requirements from zero...
trashkalmar/omim
refs/heads/master
tools/python/transit/transit_color_palette.py
3
import math def to_rgb(color_str): if len(color_str) != 6: return (0, 0, 0) r = int(color_str[0:2], 16) g = int(color_str[2:4], 16) b = int(color_str[4:], 16) return (r, g, b) def blend_colors(rgb_array1, rgb_array2, k): return (rgb_array1[0] * (1.0 - k) + rgb_array2[0] * k, ...
molobrakos/home-assistant
refs/heads/master
homeassistant/components/zha/core/gateway.py
2
""" Virtual gateway for Zigbee Home Automation. For more details about this component, please refer to the documentation at https://home-assistant.io/components/zha/ """ import asyncio import collections import itertools import logging import os import traceback from homeassistant.components.system_log import LogEnt...
frankk00/django-avatar
refs/heads/master
avatar/util.py
43
from django.conf import settings from django.core.cache import cache from django.contrib.auth.models import User from avatar.settings import (AVATAR_DEFAULT_URL, AVATAR_CACHE_TIMEOUT, AUTO_GENERATE_AVATAR_SIZES, AVATAR_DEFAULT_SIZE) cached_funcs = set() def get_cache_key(user_or_usernam...
susansalkeld/discsongs
refs/heads/master
discsongs/lib/python2.7/site-packages/pip/_vendor/re-vendor.py
1240
import os import sys import pip import glob import shutil here = os.path.abspath(os.path.dirname(__file__)) def usage(): print("Usage: re-vendor.py [clean|vendor]") sys.exit(1) def clean(): for fn in os.listdir(here): dirname = os.path.join(here, fn) if os.path.isdir(dirname): ...
diogolundberg/dojo-secex
refs/heads/master
app/models/__init__.py
12133432
gangadhar-kadam/verve_erp
refs/heads/v5.0
erpnext/stock/report/batch_wise_balance_history/__init__.py
12133432
yawnosnorous/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/crashers/loosing_mro_ref.py
61
""" There is a way to put keys of any type in a type's dictionary. I think this allows various kinds of crashes, but so far I have only found a convoluted attack of _PyType_Lookup(), which uses the mro of the type without holding a strong reference to it. Probably works with super.__getattribute__() too, which uses th...
mitar/django-dirtyfields
refs/heads/master
src/dirtyfields/dirtyfields.py
1
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
artmusic0/theano-learning.part02
refs/heads/master
fixed_official_convolutional_v3(pickle_out_best_W&B)/code/SdA.py
30
""" This tutorial introduces stacked denoising auto-encoders (SdA) using Theano. Denoising autoencoders are the building blocks for SdA. They are based on auto-encoders as the ones used in Bengio et al. 2007. An autoencoder takes an input x and first maps it to a hidden representation y = f_{\theta}(x) = s(Wx+b),...
Pablo126/SSBW
refs/heads/master
Entrega1/lib/python3.5/site-packages/bson/raw_bson.py
17
# Copyright 2015 MongoDB, 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 writing, so...
TechRunner2/i3-gaps-rice
refs/heads/master
.config/Scripts/shortcuts.py
1
import csv qute = "" rang = "" bash = "" with open(".config/qutebrowser/keys.conf.base") as qb: qute+=qb.read() with open(".config/ranger/rc.conf.base") as rg: rang+=rg.read() with open(".config/Scripts/bashrc") as bsh: bash+=bsh.read() #First we open the list of folder shortcuts and go down each line ad...
blackmiaool/rt-thread
refs/heads/master
bsp/simulator/rtconfig.py
23
import os # toolchains options ARCH='sim' #CROSS_TOOL='msvc' or 'gcc' or 'mingw' #'msvc' and 'mingw' are both for windows # 'gcc' is for linux CROSS_TOOL='msvc' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path if CROSS_TOOL ...
juranki/robotframework-selenium2library
refs/heads/master
test/run_tests.py
42
#!/usr/bin/env python import env import os import sys from subprocess import Popen, call from tempfile import TemporaryFile from run_unit_tests import run_unit_tests ROBOT_ARGS = [ '--doc', 'SeleniumSPacceptanceSPtestsSPwithSP%(browser)s', '--outputdir', '%(outdir)s', '--variable', 'browser:%(browser)s',...
yangzilong1986/python
refs/heads/master
JiYouMCC/0024/todoList/todoList/views.py
26
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django.http import HttpResponseRedirect from django.shortcuts import render_to_response, RequestContext from todoList.list.models import List, Status from todoList.list.views import get_first_status, get_last_status,...
openstack/tacker
refs/heads/master
tacker/db/nfvo/ns_db.py
2
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
dantebarba/docker-media-server
refs/heads/master
plex/Sub-Zero.bundle/Contents/Libraries/Shared/guessit/rules/properties/episode_title.py
11
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Episode title """ from collections import defaultdict from rebulk import Rebulk, Rule, AppendMatch, RemoveMatch, RenameMatch, POST_PROCESS from ..common import seps, title_seps from ..common.formatters import cleanup from ..properties.title import TitleFromPosition, T...
GoogleCloudPlatform/hellodashboard
refs/heads/master
simplejson/tests/test_dump.py
38
from unittest import TestCase from simplejson.compat import StringIO, long_type, b, binary_type, PY3 import simplejson as json def as_text_type(s): if PY3 and isinstance(s, binary_type): return s.decode('ascii') return s class TestDump(TestCase): def test_dump(self): sio = StringIO() ...
grupozeety/CDerpnext
refs/heads/bk_master
erpnext/patches/v6_4/fix_journal_entries_due_to_reconciliation.py
25
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): je_rows = frappe.db.sql(""" select name, parent, reference_type, reference_name, debit, credit from `tabJournal En...
christianurich/VIBe2UrbanSim
refs/heads/master
3rdparty/opus/src/urbansim/configurations/development_event_transition_model_configuration_creator.py
2
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from numpy import array from opus_core.configuration import Configuration class DevelopmentEventTransitionModelConfigurationCreator(object): _model_name = 'development_event_transitio...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/mobile/shared_salt_mynock.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 = Creature() result.template = "object/mobile/shared_salt_mynock.iff" result.attribute_template_id = 9 result.stfN...
bwsblake/lettercounter
refs/heads/master
django-norel-env/lib/python2.7/site-packages/django/conf/locale/en/__init__.py
12133432
gohin/django
refs/heads/master
django/conf/locale/ka/__init__.py
12133432
georgemarshall/django
refs/heads/master
tests/queryset_pickle/__init__.py
12133432
peterlauri/django
refs/heads/master
django/contrib/sitemaps/management/__init__.py
12133432
PatrickChrist/scikit-learn
refs/heads/master
sklearn/cluster/setup.py
263
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause import os from os.path import join import numpy from sklearn._build_utils import get_blas_info def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration cblas_libs, blas_info = ...
xuxiao19910803/edx
refs/heads/master
common/test/acceptance/tests/lms/test_library.py
92
# -*- coding: utf-8 -*- """ End-to-end tests for LibraryContent block in LMS """ import ddt import textwrap from nose.plugins.attrib import attr from ..helpers import UniqueCourseTest, TestWithSearchIndexMixin from ...pages.studio.auto_auth import AutoAuthPage from ...pages.studio.overview import CourseOutlinePage fro...
40223211/cadpbtest-0420
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_random.py
518
from browser import window def _randint(a, b): return int(window.Math.random()*(b-a+1)+a) def _urandom(n): """urandom(n) -> str Return n random bytes suitable for cryptographic use.""" randbytes= [_randint(0,255) for i in range(n)] return bytes(randbytes) class Random: """Random n...
cycotech/WAR-app
refs/heads/master
env/lib/python3.5/site-packages/setuptools/py27compat.py
189
""" Compatibility Support for Python 2.7 and earlier """ import platform from setuptools.extern import six def get_all_headers(message, key): """ Given an HTTPMessage, return all headers matching a given key. """ return message.get_all(key) if six.PY2: def get_all_headers(message, key): ...
Anonymous-X6/django
refs/heads/master
tests/template_tests/templatetags/__init__.py
12133432
cydenix/OpenGLCffi
refs/heads/master
OpenGLCffi/GL/EXT/GREMEDY/__init__.py
12133432
entomb/CouchPotatoServer
refs/heads/master
libs/migrate/versioning/templates/__init__.py
12133432
annacorobco/django-tastypie
refs/heads/master
tests/alphanumeric/api/__init__.py
12133432
nicholasbs/zulip
refs/heads/master
confirmation/management/commands/__init__.py
12133432
adafruit/Adafruit_Python_GPIO
refs/heads/master
Adafruit_GPIO/PCF8574.py
1
''' Adafruit compatible using BaseGPIO class to represent a PCF8574/A IO expander Copyright (C) 2015 Sylvan Butler 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 wi...
nkgilley/home-assistant
refs/heads/dev
homeassistant/components/influxdb/sensor.py
2
"""InfluxDB component which allows you to get data from an Influx database.""" import logging from typing import Dict import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA as SENSOR_PLATFORM_SCHEMA from homeassistant.const import ( CONF_API_VERSION, CONF_NAME, CONF_UNIT_OF_M...
mesonbuild/meson
refs/heads/master
mesonbuild/__init__.py
12133432
fengxuangit/blog-api-view
refs/heads/master
src/accounts/migrations/__init__.py
12133432
sdcooke/django
refs/heads/master
tests/unmanaged_models/__init__.py
12133432
hyperized/ansible
refs/heads/devel
lib/ansible/modules/cloud/centurylink/__init__.py
12133432
iAMr00t/opencog
refs/heads/master
opencog/python/pln_old/rules/inheritance_rules.py
31
from opencog.atomspace import types, TruthValue, get_type_name import formulas from pln.rule import Rule ''' Some Rules evaluate various kinds of logical links based explicitly on set membership. A set = a ConceptNode. Other Rules calculate them heuristically, based on set probabilities and logical links. ''' # Todo:...
cntnboys/410Lab6
refs/heads/master
build/django/tests/utils_tests/test_os_utils.py
52
import os import unittest from django.utils._os import safe_join class SafeJoinTests(unittest.TestCase): def test_base_path_ends_with_sep(self): drive, path = os.path.splitdrive(safe_join("/abc/", "abc")) self.assertEqual( path, "{0}abc{0}abc".format(os.path.sep) )...
drawks/ansible
refs/heads/devel
lib/ansible/plugins/terminal/enos.py
101
# (C) 2017 Red Hat Inc. # Copyright (C) 2017 Lenovo. # # GNU General Public License v3.0+ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for ...
chhao91/pysal
refs/heads/master
pysal/test_NameSpace.py
15
import os import unittest import pysal class TestNameSpace(unittest.TestCase): """ This test makes sure we don't remove anything from the pysal NameSpace that 1.0 users might expect to be there. 1.0 Namespace was taken from the 1.1 Code sprint wave, with special names removes (__all__, et...
EntityFXCode/arsenalsuite
refs/heads/master
cpp/lib/PyQt4/pyuic/uic/Loader/__init__.py
32
############################################################################# ## ## Copyright (c) 2012 Riverbank Computing Limited <info@riverbankcomputing.com> ## ## This file is part of PyQt. ## ## This file may be used under the terms of the GNU General Public ## License versions 2.0 or 3.0 as published by the Fre...
philanthropy-u/edx-platform
refs/heads/master
common/djangoapps/track/management/commands/tracked_dummy_command.py
16
""" Command used for testing TrackedCommands """ import json from eventtracking import tracker as eventtracker from track.management.tracked_command import TrackedCommand class Command(TrackedCommand): """A locally-defined command, for testing, that returns the current context as a JSON string.""" def add_a...
darcamo/python-crash-course
refs/heads/gh-pages
node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
193
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
manasapte/pants
refs/heads/master
tests/python/pants_test/ivy/test_bootstrapper.py
18
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import uni...
jzoldak/edx-platform
refs/heads/master
pavelib/paver_tests/test_prereqs.py
9
""" Tests covering the Open edX Paver prequisites installation workflow """ import os import unittest from mock import call, patch from paver.easy import BuildFailure from pavelib.prereqs import no_prereq_install, node_prereqs_installation from pavelib.paver_tests.utils import ( PaverTestCase, unexpected_fail_on_n...
hyperized/ansible
refs/heads/devel
lib/ansible/modules/storage/vexata/vexata_eg.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Sandeep Kasargod (sandeep@vexata.com) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_vers...