repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
vmahuli/tempest
refs/heads/master
tempest/api/image/v2/test_images_member.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 # d...
Phonemetra/TurboCoin
refs/heads/master
test/functional/wallet_importprunedfunds.py
1
#!/usr/bin/env python3 # Copyright (c) 2014-2018 TurboCoin # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importprunedfunds and removeprunedfunds RPCs.""" from decimal import Decimal from test_framework.test_framework...
Orav/kbengine
refs/heads/master
kbe/src/lib/python/Doc/includes/email-read-alternative-new-api.py
1
import os import sys import tempfile import mimetypes import webbrowser # Import the email modules we'll need from email import policy from email.parser import BytesParser # An imaginary module that would make this work and be safe. from imaginary import magic_html_parser # In a real program you'd get t...
kevin8909/xjerp
refs/heads/master
openerp/addons/web_shortcuts/__init__.py
54
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public...
Opentopic/falcon-api
refs/heads/master
falcon_dbapi/resources/index.py
1
from urllib.parse import urljoin import falcon class IndexResource(object): """ Lists routes registered in current app. """ def __init__(self, routes): """ :param routes: list of routes registered in current API :type routes: list """ self.routes = routes ...
thaumos/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_devtestlabcustomimage.py
11
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # 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', ...
bilalliberty/android_kernel_htc_liberty-villec2
refs/heads/cm-11.0
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
eBay/restcommander
refs/heads/master
play-1.2.4/python/Lib/curses/__init__.py
61
"""curses The main package for curses support for Python. Normally used by importing the package, and perhaps a particular module inside it. import curses from curses import textpad curses.initwin() ... """ __revision__ = "$Id: __init__.py 61064 2008-02-25 16:29:58Z andrew.kuchling $" from _curses imp...
ITOO-UrFU/open-programs
refs/heads/dev
open_programs/apps/courses/serializers.py
1
from .models import Course, Session from rest_framework import serializers class CourseSerializer(serializers.HyperlinkedModelSerializer): # authors = serializers.HyperlinkedRelatedField( # many=True, # read_only=True, # view_name='person-detail' # ) # # staff = serializers.Hyp...
richardcs/ansible
refs/heads/devel
lib/ansible/module_utils/facts/other/facter.py
232
# 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 in the hope that ...
isandlaTech/cohorte-runtime
refs/heads/master
python/src/lib/python/nvd3/discreteBarChart.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- """ Python-nvd3 is a Python wrapper for NVD3 graph library. NVD3 is an attempt to build re-usable charts and chart components for d3.js without taking away the power that d3.js gives you. Project location : https://github.com/areski/python-nvd3 """ from .NVD3Chart import NVD...
dmsimard/ansible
refs/heads/devel
test/units/vars/test_module_response_deepcopy.py
118
# -*- coding: utf-8 -*- # (c) 2018 Matt Martz <matt@sivel.net> # 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 from ansible.vars.clean import module_response_deepcopy import pytest def...
prakritish/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_rollback.py
21
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
maralla/vim-fixup
refs/heads/master
pythonx/validator/__init__.py
3
# -*- coding: utf-8 -*- from __future__ import absolute_import import collections import importlib import json import re import vim import logging from .utils import config_logging, exe_exist, get_vim_var, to_unicode, \ find_file config_logging() logger = logging.getLogger('validator') def _get_type(msg): ...
logicus4078/vertx-web
refs/heads/master
src/test/sockjs-protocol/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py
950
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
LCBRU/reporter
refs/heads/master
reporter/uhl_reports/national_bioresource/data_quality/civicrm.py
1
#!/usr/bin/env python3 from reporter.emailing import RECIPIENT_BIORESOURCE_ADMIN from reporter.uhl_reports.civicrm.enrolment_dq import ( DuplicateStudyIdReport, MissingStudyNumber, MultipleRecruitementsReport, CivicrmInvalidCaseStatus ) class NationalBioresourceCiviCrmMissingStudyNumber(Mi...
yvonguy/pi_thermostat
refs/heads/master
therm/app/plots.py
1
'''This example demonstrates embedding a standalone Bokeh document into a simple Flask application, with a basic HTML web form. To view the example, run: python simple.py in this directory, and navigate to: http://localhost:5000 ''' from __future__ import print_function import flask import datetime from d...
RO-ny9/python-for-android
refs/heads/master
python-modules/twisted/twisted/words/protocols/jabber/error.py
49
# -*- test-case-name: twisted.words.test.test_jabbererror -*- # # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ XMPP Error support. """ import copy from twisted.words.xish import domish NS_XML = "http://www.w3.org/XML/1998/namespace" NS_XMPP_STREAMS = "urn:ietf:params:xml:ns:xm...
martinkirch/tofbot
refs/heads/master
plugins/teachme.py
1
# -*- coding: utf-8 -*- # # This file is part of tofbot, a friendly IRC bot. # You may redistribute it under the Simplified BSD License. # If we meet some day, and you think this stuff is worth it, # you can buy us a beer in return. # # Copyright (c) 2011 Christophe-Marie Duquesne <chm.duquesne@gmail.com> # ...
aarchiba/scipy
refs/heads/master
scipy/stats/contingency.py
7
"""Some functions for working with contingency tables (i.e. cross tabulations). """ from __future__ import division, print_function, absolute_import from functools import reduce import numpy as np from .stats import power_divergence __all__ = ['margins', 'expected_freq', 'chi2_contingency'] def margins(a): "...
loonycyborg/scons-plusplus
refs/heads/master
python_modules/Tool/sgiar.py
2
"""SCons.Tool.sgiar Tool-specific initialization for SGI ar (library archive). If CC exists, static libraries should be built with it, so the prelinker has a chance to resolve C++ template instantiations. There normally shouldn't be any need to import this module directly. It will usually be imported through the gen...
madhavsuresh/chimerascan
refs/heads/master
chimerascan/deprecated/merge_read_pairs.py
6
''' Created on Jan 9, 2011 @author: mkiyer chimerascan: chimeric transcript discovery using RNA-seq Copyright (C) 2011 Matthew Iyer 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...
artwr/airflow
refs/heads/master
airflow/contrib/operators/bigquery_check_operator.py
3
# -*- coding: utf-8 -*- # # 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 #...
fvcproductions/dotfiles
refs/heads/master
bin/alfred/Alfred.alfredpreferences/workflows/user.workflow.DEDF5652-6FEF-4776-80D8-ACEDF577D06A/bs4/dammit.py
23
# -*- coding: utf-8 -*- """Beautiful Soup bonus library: Unicode, Dammit This library converts a bytestream to Unicode through any means necessary. It is heavily based on code from Mark Pilgrim's Universal Feed Parser. It works best on XML and HTML, but it does not rewrite the XML or HTML to reflect a new encoding; th...
grnet/agkyra
refs/heads/master
agkyra/__init__.py
196
__version__ = '0.1'
martynovp/edx-platform
refs/heads/master
common/test/acceptance/pages/lms/fields.py
26
# -*- coding: utf-8 -*- """ Mixins for fields. """ from bok_choy.promise import EmptyPromise from ...tests.helpers import get_selected_option_text, select_option_by_text class FieldsMixin(object): """ Methods for testing fields in pages. """ def field(self, field_id): """ Return fiel...
DrLuke/gpnshader
refs/heads/master
oldmodules/openglbase.py
1
__author__ = 'drluke' from baseModule import BaseNode, Pin from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.arrays import * from OpenGL.GL import shaders import OpenGL from OpenGL.GL.ARB.framebuffer_object import * from OpenGL.GL.EXT.framebuffer_object import * from PyQt5.QtWidgets import QDialog impo...
ygenc/onlineLDA
refs/heads/master
onlineldavb_new/build/scipy/scipy/fftpack/setup.py
11
#!/usr/bin/env python # Created by Pearu Peterson, August 2002 from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('fftpack',parent_package, top_path) config.add_data_dir('tests') config.add_data_dir(...
NeuralEnsemble/neuroConstruct
refs/heads/master
lib/jython/Lib/distutils/command/build_py.py
176
"""distutils.command.build_py Implements the Distutils 'build_py' command.""" __revision__ = "$Id$" import os import sys from glob import glob from distutils.core import Command from distutils.errors import DistutilsOptionError, DistutilsFileError from distutils.util import convert_path from distutils import log c...
manipopopo/tensorflow
refs/heads/master
tensorflow/contrib/hooks/python/__init__.py
140
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Cynerva/cxmanage
refs/heads/master
cxmanage_api/tests/fabric_test.py
4
# pylint: disable=protected-access # pylint: disable=too-many-public-methods # Copyright (c) 2012-2013, Calxeda 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 s...
pixelrebel/st2
refs/heads/master
st2common/st2common/util/url.py
13
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
bellwethers-in-se/defects
refs/heads/master
src/old/Test Oracle/dtree.py
2
from __future__ import division from lib import * from demos import * from table import * from fi import * from abcd import * # from learn import * from settings import * from dtree import * import numpy as np import sys sys.dont_write_bytecode = True from pdb import set_trace def nl(): print "" def rankedFeatur...
airtrick/zxing
refs/heads/master
cpp/scons/scons-local-2.0.0.final.0/SCons/Options/EnumOption.py
34
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 li...
coberger/DIRAC
refs/heads/integration
ConfigurationSystem/scripts/dirac-admin-add-resources.py
2
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-admin-add-resources # Author : Andrei Tsaregorodtsev ######################################################################## """ Add resources from the BDII database for a given VO """ __RCSID...
cetic/ansible
refs/heads/devel
lib/ansible/modules/network/cloudengine/ce_bgp_neighbor.py
26
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
yesudeep/greatship
refs/heads/master
app/console/app/pygments/lexers/__init__.py
27
# -*- coding: utf-8 -*- """ pygments.lexers ~~~~~~~~~~~~~~~ Pygments lexers. :copyright: 2006-2007 by Georg Brandl. :license: BSD, see LICENSE for more details. """ import fnmatch import types from os.path import basename try: set except NameError: from sets import Set as set from pygmen...
mohamedhagag/dvit-odoo
refs/heads/10.0
dvit_sale_line_no/__init__.py
10
# -*- coding: uَtَf-8 -*- َfrom . imporَt models
SuperStarPL/mopidy
refs/heads/develop
tests/m3u/test_playlists.py
10
# encoding: utf-8 from __future__ import absolute_import, unicode_literals import os import platform import shutil import tempfile import unittest import urllib import pykka from mopidy import core from mopidy.internal import deprecation from mopidy.m3u import actor from mopidy.m3u.translator import playlist_uri_to...
sunlianqiang/kbengine
refs/heads/master
kbe/src/lib/python/Tools/freeze/makefreeze.py
37
import marshal import bkfile # Write a file containing frozen code for the modules in the dictionary. header = """ #include "Python.h" static struct _frozen _PyImport_FrozenModules[] = { """ trailer = """\ {0, 0, 0} /* sentinel */ }; """ # if __debug__ == 0 (i.e. -O option given), set Py_OptimizeFlag in frozen...
scottquiring/Udacity_Deeplearning
refs/heads/master
transfer-learning/tensorflow_vgg/vgg19_trainable.py
153
import tensorflow as tf import numpy as np from functools import reduce VGG_MEAN = [103.939, 116.779, 123.68] class Vgg19: """ A trainable version VGG19. """ def __init__(self, vgg19_npy_path=None, trainable=True, dropout=0.5): if vgg19_npy_path is not None: self.data_dict = np....
MartijnBraam/wifite-ng
refs/heads/master
wifiteng/helpers.py
1
import subprocess class Color(object): GRAY = "\033[1;30m" RED = "\033[1;31m" GREEN = "\033[1;32m" YELLOW = "\033[1;33m" BLUE = "\033[1;34m" MAGENTA = "\033[1;35m" CYAN = "\033[1;36m" WHITE = "\033[1;37m" RESET = "\033[0m" class ShellTool(object): def call_and_communicate(se...
lm-tools/sectors
refs/heads/master
web/prototype/apps/sectors/apps.py
1
from django.apps import AppConfig class SectorsConfig(AppConfig): name = 'sectors' verbose_name = "Job roles" icon_url = 'images/icons/app-icon-red.png' start_url_name = "start"
ksmit799/Toontown-Source
refs/heads/master
toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py
12
from SpecImports import * from toontown.toonbase import ToontownGlobals CogParent = 10000 LowerCogParent = 10003 BattleParent = 10002 LowerBattleParent = 10005 FrontCogParent = 10013 CenterCogParent = 10040 BattleCellId = 0 LowerBattleCellId = 1 FrontBattleCellId = 2 CenterBattleCellId = 3 BattleCells = {BattleCellId: ...
jness/torrent_tracker
refs/heads/master
Providers/basic.py
1
# This Provider can be used for any site that # has a list of direct download torrent links from StringIO import StringIO import gzip import urllib2 from re import compile def episodes(s): '''Returns a list of all episodes greather than or equal to your startnum from a source with direct downloads.''' ...
Titan-C/sympy
refs/heads/master
sympy/solvers/tests/test_diophantine.py
5
from sympy import (Add, factor_list, igcd, Matrix, Mul, S, simplify, Symbol, symbols, Eq, pi, factorint, oo, powsimp) from sympy.core.function import _mexpand from sympy.core.compatibility import range from sympy.functions.elementary.trigonometric import sin from sympy.solvers.diophantine import (descent, diop_bf_D...
liikGit/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/f2py/auxfuncs.py
51
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" """ Auxiliary functions for f2py2e. Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy (...
40223240/2015cdb_g3
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/webbrowser.py
735
from browser import window __all__ = ["Error", "open", "open_new", "open_new_tab"] class Error(Exception): pass _target = { 0: '', 1: '_blank', 2: '_new' } # hack... def open(url, new=0, autoraise=True): """ new window or tab is not controllable on the client side. autoraise not available. ""...
fengbaicanhe/intellij-community
refs/heads/master
python/testData/mover/multiLineSelection10_afterDown.py
83
if True: pass <caret><selection>a = 2 b = 3</selection>
andydandy74/ClockworkForDynamo
refs/heads/master
nodes/0.7.x/python/WallLocationLine.FinishFaceInterior.py
12
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * OUT = WallLocationLine.FinishFaceInterior
leilihh/nova
refs/heads/stable/icehouse
nova/cert/rpcapi.py
12
# Copyright 2013, Red Hat, 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 agr...
developerinlondon/ansible-modules-extras
refs/heads/devel
messaging/rabbitmq_exchange.py
74
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@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...
kelvin13/Knockout
refs/heads/master
meredith/elements.py
2
from meredith.box import Box, random_serial from meredith.styles import _text_DNA font_serial_generator = random_serial() class Fontpost(Box): name = '_f_' inline = True DNA = [('class', 'texttc', '')] def copy(self): return self.__class__(self.KT, self.attrs) def __eq__(self, other): ...
manti-by/M2DJ
refs/heads/master
home/utils.py
1
def get_home_items(): pass
mbayon/TFG-MachineLearning
refs/heads/master
vbig/lib/python2.7/site-packages/django/contrib/contenttypes/__init__.py
809
default_app_config = 'django.contrib.contenttypes.apps.ContentTypesConfig'
peerster/CouchPotatoServer
refs/heads/master
libs/chardet/sjisprober.py
1776
######################## 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...
domenicosolazzo/practice-django
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/auth/tests/utils.py
220
from unittest import skipIf from django.conf import settings def skipIfCustomUser(test_func): """ Skip a test if a custom user model is in use. """ return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func)
azaghal/django-wiki
refs/heads/main
tests/plugins/images/test_views.py
2
import base64 import os import re from io import BytesIO from django.core.files.uploadedfile import InMemoryUploadedFile from django.urls import reverse from PIL import Image from wiki.core.plugins import registry as plugin_registry from wiki.models import URLPath from wiki.plugins.images import models from wiki.plugi...
Luffin/powerline
refs/heads/develop
powerline/lib/vcs/__init__.py
35
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os import errno from threading import Lock from collections import defaultdict from powerline.lib.watcher import create_tree_watcher from powerline.lib.unicode import out_u from powerline.lib.pat...
kevin-vb/drupdevelop
refs/heads/master
sites/all/themes/drupdevelop/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSUserFile.py
2710
# 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 user preferences file writer.""" import os import re import socket # for gethostname import gyp.common import gyp.easy_xml as easy_xml #------...
heeraj123/oh-mainline
refs/heads/master
mysite/project/tests.py
15
# This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2009, 2010 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the ...
tammoippen/nest-simulator
refs/heads/master
topology/examples/conncon_sources.py
16
# -*- coding: utf-8 -*- # # conncon_sources.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
reddraggone9/youtube-dl
refs/heads/master
youtube_dl/extractor/extremetube.py
2
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_urllib_request from ..utils import ( int_or_none, str_to_int, ) class ExtremeTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?extremetube\.com/(?:[^/]+/)?video/(?P<id>[^/#?&]+)' _T...
40443111/2017springcd_hw
refs/heads/gh-pages
course/a_grouping.py
39
content = open("2016fall_cadp_a_groups.txt").read() #print(content) result = content.splitlines() #print(result) gno = 1 for i in range(len(result)): #print(result[i]) group = result[i].split(":") #列出組序 print("<a href='../g"+str(gno)+"'>第"+str(gno)+"組</a>:<br />") #print("第"+str(gno)+"組:<br />") ...
silviaegt/bdcv_metadata
refs/heads/master
Comparador/ComFunctions.py
1
# -*- coding: utf-8 -*- """ Created on Thu Mar 23 20:37:30 2017 @author: Antonio Las bibliotecas externas son csv y os La versión de Python usada es 3.6.0 """ from csv import reader import os """ * Función que se encarga de comparar dos directorios para determinar cuáles * archivos del directorio 1 no se encuentran e...
amyodov/python-datetimeex
refs/heads/master
datetimeex/_timedeltaex.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division import numbers from datetime import date, datetime, time, timedelta from fractions import Fraction from _common import (MICROSECONDS_IN_SECOND, MICROSECONDS_IN_MINUTE, MICROSECONDS_IN_HOUR, MICROSECONDS_IN_DAY, ...
j5shi/Thruster
refs/heads/master
pylibs/unittest/test/test_runner.py
1
import unittest from cStringIO import StringIO import pickle from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun class TestCleanUp(unittest.TestCase): def testCleanUp(self): class TestableTest(unittest.TestCase): def testNothing(self): pass ...
jhoos/django
refs/heads/master
django/contrib/gis/geos/prototypes/geom.py
288
from ctypes import POINTER, c_char_p, c_int, c_size_t, c_ubyte from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck import ( check_geom, check_minus_one, check_sized_string, check_string, check_zero, ) # This is the return type used by bina...
softwaresaved/fat
refs/heads/master
lowfat/migrations/0139_auto_20181211_1005.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-12-11 10:05 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depend...
Mitali-Sodhi/CodeLingo
refs/heads/master
Dataset/python/cursor_manager.py
18
# Copyright 2009-2012 10gen, 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,...
ipernet/RatticWeb
refs/heads/master
ratticweb/wsgi.py
8
""" WSGI config for ratticweb project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`...
RichardLeeK/MachineLearning
refs/heads/master
MachineLearning/CNN_PLATEAU/modelController.py
1
import preprocess as pp import preprocess_image as ppimg import CNN_data as cd import numpy as np from keras.models import model_from_json from env import Env def _refine_Y(Y,threshold=0.5): # for sigmoid for i in range(len(Y)): cur_y=Y[i] Y[i]= 1 if cur_y>threshold else 0 return Y...
AngelChadni/support-tools
refs/heads/master
googlecode-issues-exporter/github_issue_converter_test.py
90
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
IllusionRom-deprecated/android_platform_tools_idea
refs/heads/master
python/testData/codeInsight/smartEnter/comment_after.py
4
#comment #<caret>
luto/django-import-export
refs/heads/master
import_export/resources.py
1
from __future__ import unicode_literals import functools from copy import deepcopy import sys import traceback import tablib from diff_match_patch import diff_match_patch from django import VERSION from django.utils.safestring import mark_safe from django.utils import six from django.db.models.fields import FieldDoe...
factorlibre/server-tools
refs/heads/8.0
auth_admin_passkey/__init__.py
61
# -*- encoding: utf-8 -*- ############################################################################## # # Admin Passkey module for OpenERP # Copyright (C) 2013-2014 GRAP (http://www.grap.coop) # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # # This program is free software: you can redistrib...
monikagrabowska/osf.io
refs/heads/develop
osf/migrations/0029_externalaccount_date_last_refreshed.py
4
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-19 15:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osf', '0028_merge'), ] operations = [ migrations.AddField( model_n...
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/html5lib/treewalkers/_base.py
61
from __future__ import absolute_import, division, unicode_literals from six import text_type, string_types __all__ = ["DOCUMENT", "DOCTYPE", "TEXT", "ELEMENT", "COMMENT", "ENTITY", "UNKNOWN", "TreeWalker", "NonRecursiveTreeWalker"] from xml.dom import Node DOCUMENT = Node.DOCUMENT_NODE DOCTYPE = Node.DOCU...
meabsence/python-for-android
refs/heads/master
python3-alpha/extra_modules/gdata/health/service.py
263
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
extremewaysback/django
refs/heads/master
tests/cache/closeable_cache.py
446
from django.core.cache.backends.locmem import LocMemCache class CloseHookMixin(object): closed = False def close(self, **kwargs): self.closed = True class CacheClass(CloseHookMixin, LocMemCache): pass
facebook/buck
refs/heads/master
test/com/facebook/buck/features/python/testdata/prebuilt_package/package/file.py
10
def say_hi(): print("Hello there!")
MrNuggles/HeyBoet-Telegram-Bot
refs/heads/master
temboo/Library/Amazon/IAM/__init__.py
5
from temboo.Library.Amazon.IAM.AddRoleToInstanceProfile import AddRoleToInstanceProfile, AddRoleToInstanceProfileInputSet, AddRoleToInstanceProfileResultSet, AddRoleToInstanceProfileChoreographyExecution from temboo.Library.Amazon.IAM.AddUserToGroup import AddUserToGroup, AddUserToGroupInputSet, AddUserToGroupResultSet...
kiwicopple/MyMDb
refs/heads/master
venv/Lib/encodings/ptcp154.py
647
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,err...
zhangrj/Learn_Python
refs/heads/master
string.py
1
#--coding:utf-8-- x = "There are %d types of people." %10 binary = "binary" do_not = "don't" y = "Those who know %s and those who %s." %(binary,do_not) print x print y print "I said:%r." %x print "I also said:'%s'." %y hilarious = False joke_evaluation = "Isn't that joke so funny?! %r" print joke_eva...
darjeeling/django
refs/heads/master
tests/template_tests/syntax_tests/test_exceptions.py
513
from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup from .test_extends import inheritance_templates class ExceptionsTests(SimpleTestCase): @setup({'exception01': "{% extends 'nonexistent' %}"}) def test_exception01(self): ...
nyuwireless/ns3-mmwave
refs/heads/master
src/bridge/examples/csma-bridge.py
171
# /* # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the i...
Bugheist/website
refs/heads/master
website/models.py
1
import os from urllib.parse import urlparse import requests import tweepy from PIL import Image from annoying.fields import AutoOneToOneField from colorthief import ColorThief from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.cor...
awemulya/fieldsight-kobocat
refs/heads/master
onadata/apps/fieldsight/generatereport.py
1
import json import time import datetime from datetime import date from io import BytesIO from reportlab.lib.pagesizes import letter, A4 from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportl...
beernarrd/gramps
refs/heads/sl-master
gramps/gen/simple/_simpledoc.py
10
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 Donald N. Allingham # # 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 opt...
ndemir/scrapy
refs/heads/master
scrapy/utils/testproc.py
19
import sys import os from twisted.internet import reactor, defer, protocol class ProcessTest(object): command = None prefix = [sys.executable, '-m', 'scrapy.cmdline'] cwd = os.getcwd() # trial chdirs to temp dir def execute(self, args, check_code=True, settings='missing'): env = os.environ.c...
masayukig/tempest
refs/heads/master
tempest/api/network/test_service_providers.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...
romain-dartigues/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_dnszone_facts.py
7
#!/usr/bin/python # # Copyright (c) 2017 Obezimnaka Boms, <t-ozboms@microsoft.com> # # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
cxxgtxy/tensorflow
refs/heads/master
tensorflow/python/summary/summary_test.py
57
# 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...
collective/mr.poe
refs/heads/master
raven/contrib/django/raven_compat/templatetags/raven.py
1
""" raven.contrib.django.raven_compat.templatetags.raven ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from raven.contrib.django.templatetags.raven import * # NOQA
nwjs/blink
refs/heads/nw12
Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay_unittest.py
59
# 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 webkitpy.layout_tests.controllers import repaint_overlay LAYER_TREE = """{ "bounds":[800.00,600.00], "children":[ { "po...
freedomgames/Planet-Lab
refs/heads/master
backend/tests/s3/views_test.py
3
"""Tests for handling s3.""" import boto.s3.bucket import boto.s3.key import datetime import json import mock import unittest import backend import backend.common.s3 as s3 import backend.quests.views as quest_views import harness class FakeDateTime(datetime.datetime): """Mock object to return a constant 'now' t...
kangkot/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_zipfile.py
48
# We can test part of the module without zlib. try: import zlib except ImportError: zlib = None import zipfile, os, unittest, sys, shutil, struct from StringIO import StringIO from tempfile import TemporaryFile from random import randint, random import test.test_support as support from test.test_support impo...
Explosound/ExplosoundCluster
refs/heads/master
pymir/MFCC.py
2
""" MFCC methods Compute Mel-Frequency Cepstral Coefficients Last updated: 17 December 2012 """ from __future__ import division import math import numpy from numpy import * import scipy from scipy.fftpack import * def mfcc2(spectrum, numFilters = 32): """ Alternative (and vectorized) MFCC computation from Steve ...
caLew/sugartest
refs/heads/master
src/jarabe/__init__.py
18
"""OLPC Sugar Graphical "Shell" Interface Provides the shell-level operations for managing the OLPC laptop computers. It interacts heavily with (and depends upon) the Sugar UI libraries. This is a "graphical" shell, the name does not refer to a command-line "shell" interface. """ # Copyright (C) 2006-2007, Red Hat,...
iledarn/access-addons
refs/heads/9.0
access_apps/__init__.py
1350
import controllers