repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
funtoo/portage-funtoo
refs/heads/2013-06-07
pym/portage/tests/resolver/test_old_dep_chain_display.py
16
# Copyright 2010-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage.tests import TestCase from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase class OldDepChainDisplayTestCase(TestCase): def testOldDepChainDisplay(se...
amir-qayyum-khan/edx-platform
refs/heads/master
lms/djangoapps/ccx/api/v0/tests/test_views.py
9
""" Tests for the CCX REST APIs. """ import json import math import pytz import string import urllib import urlparse from datetime import datetime, timedelta from itertools import izip import ddt import mock from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers impo...
MarkWieczorek/SHTOOLS
refs/heads/master
pyshtools/spectralanalysis/spectrum.py
2
import numpy as _np from scipy.special import factorial as _factorial def spectrum(clm, normalization='4pi', degrees=None, lmax=None, convention='power', unit='per_l', base=10.): """ Return the spectrum of the spherical harmonic coefficients as a function of spherical harmonic degree. Us...
stephengroat/miasm
refs/heads/master
miasm2/jitter/csts.py
2
#-*- coding:utf-8 -*- # VM Mngr Exceptions EXCEPT_DO_NOT_UPDATE_PC = 1 << 25 EXCEPT_NUM_UPDT_EIP = (1<<11) EXCEPT_CODE_AUTOMOD = (1 << 0) EXCEPT_SOFT_BP = (1 << 1) EXCEPT_INT_XX = (1 << 2) EXCEPT_BREAKPOINT_INTERN = (1 << 10) EXCEPT_ACCESS_VIOL = ((1 << 14) | EXCEPT_DO_NOT_UPDATE_PC) EXCEPT_DIV_BY_ZERO = ((1 << 16)...
kytvi2p/Sigil
refs/heads/master
3rdparty/python/Lib/test/test_importlib/import_/test_api.py
81
from .. import util from . import util as import_util from importlib import machinery import sys import types import unittest PKG_NAME = 'fine' SUBMOD_NAME = 'fine.bogus' class BadSpecFinderLoader: @classmethod def find_spec(cls, fullname, path=None, target=None): if fullname == SUBMOD_NAME: ...
GunoH/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg1/_pkg1_0/_pkg1_0_1/_pkg1_0_1_0/_pkg1_0_1_0_1/_mod1_0_1_0_1_2.py
30
name1_0_1_0_1_2_0 = None name1_0_1_0_1_2_1 = None name1_0_1_0_1_2_2 = None name1_0_1_0_1_2_3 = None name1_0_1_0_1_2_4 = None
miguelotemagno/imagestion
refs/heads/master
drone/TelloKeyboardCommands.py
1
# This example script demonstrates how use Python to allow users to send SDK to Tello commands with their keyboard # This script is part of our course on Tello drone programming # https://learn.droneblocks.io/p/tello-drone-programming-with-python/ # Import the necessary modules import socket import threading import ti...
piquadrat/django
refs/heads/master
tests/forms_tests/tests/test_i18n.py
45
from django.forms import ( CharField, ChoiceField, Form, IntegerField, RadioSelect, Select, TextInput, ) from django.test import SimpleTestCase from django.utils import translation from django.utils.translation import gettext_lazy class FormsI18nTests(SimpleTestCase): def test_lazy_labels(self): class...
aevum/moonstone
refs/heads/master
src/moonstone/gui/qt/viewplane2d.py
2
# -*- coding: utf-8 -*- # # Moonstone is platform for processing of medical images (DICOM). # Copyright (C) 2009-2011 by Neppo Tecnologia da Informação LTDA # and Aevum Softwares LTDA # # This file is part of Moonstone. # # Moonstone is free software: you can redistribute it and/or modify # it under the terms of the GN...
XiaosongWei/chromium-crosswalk
refs/heads/master
chrome/browser/chromeos/PRESUBMIT.py
127
# Copyright 2015 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. """Presubmit script for chromeos. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
redbear/micropython
refs/heads/redbear-duo
tests/extmod/uctypes_native_float.py
18
import uctypes desc = { "f32": uctypes.FLOAT32 | 0, "f64": uctypes.FLOAT64 | 0, } data = bytearray(8) S = uctypes.struct(uctypes.addressof(data), desc, uctypes.NATIVE) S.f32 = 12.34 print('%.4f' % S.f32) S.f64 = 12.34 print('%.4f' % S.f64)
drod2169/android_kernel_lge_bullhead
refs/heads/android-msm-bullhead-3.10-marshmallow-dr-0
tools/perf/util/setup.py
2079
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
Sbalbp/DIRAC
refs/heads/integration
DataManagementSystem/scripts/dirac-dms-create-replication-request.py
11
#!/usr/bin/env python """ Create a DIRAC transfer/replicateAndRegister request to be executed by the DMS Transfer Agent """ __RCSID__ = "$Id$" import os from hashlib import md5 import time from DIRAC.Core.Base import Script from DIRAC.Core.Utilities.List import breakListIntoChunks Script.setUsageMessage( '\n'.joi...
joansmith/openmicroscopy
refs/heads/develop
components/tools/OmeroWeb/omeroweb/feedback/sendfeedback.py
12
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008 University of Dundee. # # 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 # License, or (at ...
porcobosso/spark-ec2
refs/heads/master
lib/boto-2.34.0/boto/dynamodb2/__init__.py
145
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without ...
pattisdr/osf.io
refs/heads/develop
osf/migrations/0146_merge_20181119_2236.py
11
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-11-19 22:36 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('osf', '0143_merge_20181115_1458'), ('osf', '0145_add_preprint_contenttype_to_collections'),...
whatsthehubbub/rippleeffect
refs/heads/master
riskgame/migrations/0015_auto__add_field_teamplayer_episode_events__del_field_team_check_next__.py
1
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'TeamPlayer.episode_events' db.add_column(u'riskgame_teamplayer', 'episode_events', ...
bradmwalker/wanmap
refs/heads/master
wanmap/tasks_test.py
1
from unittest.mock import Mock, patch import pytest from sqlalchemy.orm import Session from .scanners import Scanner from .tasks import PersistenceTask def test_persistence_task_passes_initialized_dbsession( session_factory, celery_app): @celery_app.task(base=PersistenceTask, bind=True) def db_task(sel...
vikatory/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_time.py
81
from test import support import time import unittest import locale import sysconfig import sys import platform try: import threading except ImportError: threading = None # Max year is only limited by the size of C int. SIZEOF_INT = sysconfig.get_config_var('SIZEOF_INT') or 4 TIME_MAXYEAR = (1 << 8 * SIZEOF_INT...
MediaSapiens/autonormix
refs/heads/master
django/contrib/messages/tests/urls.py
80
from django.conf.urls.defaults import * from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext, Template def add(request, message_type): #...
erdc-cm/air-water-vv
refs/heads/master
2d/hydraulicStructures/sharp_crested_weir/deprecated/sharp_crested_weir_VM_V1/ls_consrv_n.py
3
from proteus import * from sharp_crested_weir import * from ls_consrv_p import * timeIntegrator = ForwardIntegrator timeIntegration = NoIntegration femSpaces = {0:basis} subgridError = None massLumping = False numericalFluxType = DoNothing conservativeFlux = None shockCapturing = None fullNewtonFlag...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/South-1.0.2/south/tests/deps_a/migrations/0001_a.py
2088
from south.db import db from django.db import models class Migration: def forwards(self): pass def backwards(self): pass
beblount/Steer-Clear-Backend-Web
refs/heads/web
steerclear/views.py
4
""" Import all blueprint and modules views """ from .api.views import * from .driver_portal.views import * from .login.views import *
aioue/ansible
refs/heads/devel
test/units/module_utils/basic/test_set_mode_if_different.py
63
# -*- coding: utf-8 -*- # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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 # (a...
ronen85/compilation
refs/heads/master
compiler/remove_adl.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # status: not released !!! # this program grabs PDDL problem and domain and removes 'not' from: # - preconditions # - goal # in order to save the data we make the following changes: # - predicates: # for all predicates in domain : # copy and add 'isnt-' to name # ...
malkoto1/just_cook
refs/heads/master
SQLAlchemy-1.0.4/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
25
# postgresql/pypostgresql.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+pypostgresql :name: py-postgresql :db...
zerobatu/edx-platform
refs/heads/master
lms/djangoapps/bulk_email/migrations/0003_add_optout_user.py
182
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Optout.user' db.add_column('bulk_email_optout', 'user', self.gf('django.db.models.fields.related.ForeignKey')(to=o...
jdgwartney/boundary-plugin-port-scan
refs/heads/master
setup.py
2
from distutils.core import setup from meterplugin import PluginManifest setup( name='meter-plugin-port-scan', version='0.8.0', url="http://github.io/boundary/meter-plugin-port-scan", author='David Gwartney', author_email='david_gwartney@bmc.com', packages=['meterplugin', ], scripts=[], ...
sosey/ginga
refs/heads/master
examples/tk/example2_tk.py
4
#! /usr/bin/env python # # example2_tk.py -- Simple, configurable FITS viewer. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from __future__ import print_function im...
gmccreight/geoquiz
refs/heads/master
olpcgames/camera.py
1
"""Accesses OLPC Camera functionality via gstreamer Depends upon: pygame python-gstreamer """ import threading import logging import time import os import pygame import gst from olpcgames.util import get_activity_root log = logging.getLogger( 'olpcgames.camera' ) #log.setLevel( logging.DEBUG ) CAMERA_LOAD =...
whitkirkchurch/baltimore
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/request.py
853
try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from .filepost import encode_multipart_formdata __all__ = ['RequestMethods'] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen` method, such as :class:`~urllib3....
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/boto/pyami/bootstrap.py
17
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
djo938/pyshell
refs/heads/master
pyshell/register/test/key_test.py
3
#!/usr/bin/env python -t # -*- coding: utf-8 -*- # Copyright (C) 2016 Jonathan Delvaux <pyshell@djoproject.net> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License...
jymannob/CouchPotatoServer
refs/heads/develop
libs/oauthlib/oauth2/__init__.py
186
# -*- coding: utf-8 -*- from __future__ import absolute_import """ oauthlib.oauth2 ~~~~~~~~~~~~~~ This module is a wrapper for the most recent implementation of OAuth 2.0 Client and Server classes. """ from .draft25 import Client, Server
54shady/android-iw-libnl3
refs/heads/master
doc/doxygen-link.py
11
#!/usr/bin/env python import fileinput import re import sys links = {} for line in open(sys.argv[1], 'r'): m = re.match('^([^=]+)=([^\n]+)$', line); if m: link = "<a href=\"" + m.group(2) + "\" class=\"dg\">" + m.group(1) + "</a>" links[m.group(1)] = link def translate(match): return links[match.group(0)] r...
rsms/smisk
refs/heads/master
lib/smisk/util/DateTime.py
1
# encoding: utf-8 '''Date and Time utilities ''' import re, time from datetime import datetime, timedelta, tzinfo ZERO_TIMEDELTA = timedelta(0) __all__ = ['UTCTimeZone', 'OffsetTimeZone', 'DateTime'] class UTCTimeZone(tzinfo): '''UTC ''' def __new__(cls): try: return cls._instance except Attribute...
abhattad4/Digi-Menu
refs/heads/master
digimenu2/django/utils/termcolors.py
260
""" termcolors.py """ from django.utils import six color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = {color_names[x]: '3%s' % x for x in range(8)} background = {color_names[x]: '4%s' % x for x in range(8)} RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink...
jdmcbr/Shapely
refs/heads/master
shapely/geometry/proxy.py
1
"""Proxy for coordinates stored outside Shapely geometries """ from shapely.geometry.base import EMPTY from shapely.geos import lgeos class CachingGeometryProxy(object): context = None factory = None __geom__ = EMPTY _gtag = None def __init__(self, context): self.context = context ...
alexcrichton/gyp
refs/heads/master
pylib/gyp/generator/msvs.py
5
# 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. import collections import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml i...
dlareau/puzzlehunt_server
refs/heads/master
huntserver/urls.py
1
"""puzzlehunt_server URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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')...
lidavidm/mathics-heroku
refs/heads/master
venv/lib/python2.7/site-packages/sympy/integrals/tests/test_integrals.py
1
from sympy import ( Abs, acos, acosh, Add, adjoint, asin, asinh, atan, Ci, conjugate, cos, Derivative, diff, DiracDelta, E, exp, erf, erfi, EulerGamma, factor, Function, Heaviside, I, Integral, integrate, Interval, Lambda, LambertW, log, Matrix, O, oo, pi, Piecewise, Poly, Rational, S, simplify, sin, sq...
lpsinger/astropy
refs/heads/main
astropy/utils/iers/iers.py
5
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ The astropy.utils.iers package provides access to the tables provided by the International Earth Rotation and Reference Systems Service, in particular allowing interpolation of published UT1-UTC values for given times. These are used in `astropy.time`...
netjunki/trac-Pygit2
refs/heads/mergewithbeta1.0
tracopt/ticket/deleter.py
3
# -*- coding: utf-8 -*- # # Copyright (C) 2010 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consists o...
GaussDing/django
refs/heads/master
tests/i18n/patterns/tests.py
3
from __future__ import unicode_literals import os from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import clear_url_caches, reverse, translate_url from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django.template impor...
sujeet4github/MyLangUtils
refs/heads/master
LangPython/oreilly-intro-to-flask-video/venv/lib/python3.6/site-packages/flask/sessions.py
119
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from base64 import b64encode, b64decode from datetime import dateti...
GedheFoundation/sidesa2.0
refs/heads/master
laporan_potensi.py
2
#Boa:Frame:laporan_potensi import wx def create(parent): return laporan_potensi(parent) [wxID_LAPORAN_POTENSI, wxID_LAPORAN_POTENSIBUTTON1, wxID_LAPORAN_POTENSIBUTTON2, wxID_LAPORAN_POTENSIEKONOMI, wxID_LAPORAN_POTENSILAHAN, wxID_LAPORAN_POTENSIPARIWISATA, wxID_LAPORAN_POTENSISTATICTEXT1, wxID_LAPORAN_POTE...
Tesora-Release/tesora-trove
refs/heads/master
trove/tests/unittests/common/test_template.py
4
# 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 the Li...
mskala/birdie
refs/heads/master
birdieapp/twython/compat.py
23
# -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplejson as json except ...
SEL-Columbia/commcare-hq
refs/heads/master
custom/opm/opm_reports/incentive.py
1
""" Field definitions for the Incentive Payment Report. Takes a CommCareUser and points to the appropriate fluff indicators for each field. """ from .constants import * class Worker(object): method_map = [ # If you need to change any of these names, keep the key intact ('name', "List of AWWs", Tru...
mattlinares/django-reg
refs/heads/master
registration/admin.py
107
from django.contrib import admin from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): actions = ['activate_users', 're...
mbdriscoll/ctree
refs/heads/master
examples/stencil_grid/laplacian.py
2
from numpy import * from examples.stencil_grid.stencil_kernel import * from examples.stencil_grid.stencil_grid import StencilGrid import sys alpha = 0.5 beta = 1.0 class LaplacianKernel(StencilKernel): def __init__(self, alpha, beta): super(LaplacianKernel, self).__init__() self.constants = {'a...
phobson/statsmodels
refs/heads/master
statsmodels/tsa/arima_model.py
1
# Note: The information criteria add 1 to the number of parameters # whenever the model has an AR or MA term since, in principle, # the variance could be treated as a free parameter and restricted # This code does not allow this, but it adds consistency with other # packages such as gretl and X1...
brianwc/courtlistener
refs/heads/master
cl/lib/sunburnt/search.py
5
from __future__ import absolute_import import collections, copy, operator, re from .schema import SolrError, SolrBooleanField, SolrUnicodeField, WildcardFieldInstance class LuceneQuery(object): default_term_re = re.compile(r'^\w+$') def __init__(self, schema, option_flag=None, original=None): self.s...
museomix/2013_Quebec_thermoscope
refs/heads/master
raspberry/pygame-1.9.1release/examples/camera.py
9
#!/usr/bin/env python # 1. Basic image capturing and displaying using the camera module import pygame import pygame.camera from pygame.locals import * class VideoCapturePlayer(object): size = ( 640, 480 ) def __init__(self, **argd): self.__dict__.update(**argd) super(VideoCapturePlayer, self)._...
DeercoderResearch/pyexperiment
refs/heads/master
pyexperiment/utils/interactive.py
4
"""Provides helper functions for interactive prompts Written by Peter Duerr """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from pyexperiment import state from pyexperiment import conf def embed_interactive(**k...
ltucker/radarpost
refs/heads/master
radarpost/web/app.py
1
import logging from beaker.middleware import SessionMiddleware from routes import Mapper from routes.middleware import RoutesMiddleware import sys import traceback from webob import Request, Response from radarpost.config import CONFIG_INI_PARSER_PLUGIN, parse_bool, config_section from radarpost.cli import COMMANDLIN...
isyippee/nova
refs/heads/master
nova/objects/quotas.py
38
# Copyright 2013 Rackspace Hosting. # # 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...
virtuald/exaile
refs/heads/master
xl/migrations/settings/osd.py
5
# Copyright (C) 2012 Mathias Brodala # # 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. # # This program is distributed in the hope that...
0sc0d3r/enigma2
refs/heads/master
lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
48
from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.Pixmap import Pixmap from enigma import ePicLoad from Components.config import config, getConfigListEntry, ConfigInteger from Components.ConfigList import ConfigListScreen fr...
tungvx/deploy
refs/heads/master
.google_appengine/lib/webapp2/webapp2_extras/appengine/users.py
66
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.users ============================== Helpers for google.appengine.api.users. :copyright: 2011 tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from google.appengine.api import users def login_required(handler_method): ...
aeph6Ee0/youtube-dl
refs/heads/master
devscripts/prepare_manpage.py
28
from __future__ import unicode_literals import io import optparse import os.path import re ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) README_FILE = os.path.join(ROOT_DIR, 'README.md') PREFIX = r'''%YOUTUBE-DL(1) # NAME youtube\-dl \- download videos from youtube.com or other video platf...
strazzere/dexterity
refs/heads/master
addstr.py
2
#!/usr/bin/python import argparse from dx.dex import Dex from dx.hash import update_signature from dx.hash import update_checksum def main(): parser = argparse.ArgumentParser(description="Add a string to a DEX file.") parser.add_argument('source',help='Source DEX file') parser.add_argument('target',help...
akhilaananthram/nupic
refs/heads/master
tests/swarming/nupic/swarming/experiments/simpleV2/permutations.py
38
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
karllessard/tensorflow
refs/heads/master
tensorflow/python/keras/premade/wide_deep_test.py
8
# Copyright 2019 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...
sinkuri256/python-for-android
refs/heads/master
python-build/python-libs/gdata/build/lib/gdata/__init__.py
136
#!/usr/bin/python # # Copyright (C) 2006 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 ...
JuBra/GEMEditor
refs/heads/master
GEMEditor/model/display/base.py
1
import webbrowser from GEMEditor.base.ui.TableDisplayWidgetAddDel import Ui_TableDisplayWidgetAddDel from GEMEditor.base.widgets import TableDisplayWidget from GEMEditor.model.classes.evidence import Evidence from GEMEditor.model.display.tables import AnnotationTable, EvidenceTable from GEMEditor.model.display.ui.Comme...
marineam/systemd-deprecated
refs/heads/master
tools/make-man-rules.py
34
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. # # Copyright 2013 Zbigniew Jędrzejewski-Szmek # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Fou...
kawula-openerp-indonesia/koi_base
refs/heads/7.0
ar_pendidikan/object_modul/jenjang_pendidikan.py
2
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under ...
madmouser1/aubio
refs/heads/master
python/demos/demo_pysoundcard_record.py
8
#! /usr/bin/env python def record_sink(sink_path): """Record an audio file using pysoundcard.""" from aubio import sink from pysoundcard import Stream hop_size = 256 duration = 5 # in seconds s = Stream(block_length = hop_size) g = sink(sink_path, samplerate = s.sample_rate) s.start(...
delattreb/TemperatureHumidityServer
refs/heads/master
Doc/ssd1306-master/tests/baseline_data.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- def primitives(device, draw): padding = 2 shape_width = 20 top = padding bottom = device.height - padding - 1 draw.rectangle(device.bounding_box, outline="white", fill="black") x = padding draw.ellipse((x, top, x + shape_width, bottom), outline...
xaviercobain88/framework-python
refs/heads/master
build/lib.linux-i686-2.7/openerp/addons/base_status/base_state.py
54
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
wolfram74/numerical_methods_iserles_notes
refs/heads/master
venv/lib/python2.7/site-packages/sympy/physics/tests/test_hydrogen.py
27
from sympy import exp, integrate, oo, S, simplify, sqrt, symbols from sympy.physics.hydrogen import R_nl, E_nl, E_nl_dirac from sympy.utilities.pytest import raises n, r, Z = symbols('n r Z') def feq(a, b, max_relative_error=1e-12, max_absolute_error=1e-12): a = float(a) b = float(b) # if the numbers are...
zutshi/S3CAMX
refs/heads/master
examples/fuzzy_invp/invp.py
1
import numpy as np from scipy.integrate import ode #import matplotlib.pyplot as plt class SIM(object): def __init__(self, plt, pvt_init_data): pass def sim(self, TT, X0, D, P, U, I, property_checker, property_violated_flag): # atol = 1e-10 rtol = 1e-5 num_dim_x = len(X0) ...
ashgang/RandomAlgos
refs/heads/master
Python/calculator.py
1
firstNo = raw_input("Enter first number:") firstNo = int(firstNo) secondNo = raw_input("Enter second number:") secondNo = int(secondNo) op = raw_input("Enter the operand:") if op == '+': result = firstNo + secondNo elif op == '-': result = firstNo - secondNo elif op == '*': result = firstNo * secondNo elif op == '/...
zdary/intellij-community
refs/heads/master
python/testData/copyPaste/singleLine/Indent31.src.py
249
class C: def foo(self): <selection> x = 1 </selection> y = 2
openstack-packages/DLRN
refs/heads/master
dlrn/migrations/versions/00a31f1f39c0_add_component_to_civote.py
1
# 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...
stnava/ITK
refs/heads/master
Utilities/Maintenance/BuildHeaderTest.py
4
#!/usr/bin/env python #========================================================================== # # Copyright Insight Software Consortium # # 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 Licen...
potzenheimer/chromsystems.userdata
refs/heads/master
chromsystems/userdata/adapter.py
1
from plone.app.users.browser.personalpreferences import UserDataPanelAdapter class EnhancedUserDataPanelAdapter(UserDataPanelAdapter): """ """ def get_salutation(self): return unicode(self.context.getProperty('salutation', ''), 'utf-8') def set_salutation(self, value): return self.co...
rrooij/youtube-dl
refs/heads/master
youtube_dl/extractor/streamango.py
4
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_chr from ..utils import ( determine_ext, ExtractorError, int_or_none, js_to_json, ) class StreamangoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?:streamango\....
open2bizz/odoo-addons
refs/heads/12.0
project_task_planning_o2b/models/__init__.py
7
# -*- coding: utf-8 -*- from . import task
Hao-Liu/avocado-vt
refs/heads/master
selftests/unit/test_nfs.py
8
#!/usr/bin/python import unittest import os import sys from avocado.utils import path from avocado.utils import process # simple magic for using scripts within a source tree basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(basedir, 'virttest')): sys.path.append(b...
GunoH/intellij-community
refs/heads/master
python/testData/quickdoc/InheritedMethod.py
18
# copied doc of inherited method class A: def foo(self): "Doc from A.foo." pass class B(A): def foo(self): return None b = B() b.<the_ref>foo()
guildenstern70/pyfab
refs/heads/master
src/reportlab/platypus/figures.py
29
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/figures.py """This includes some demos of platypus for use in the API proposal""" __version__=''' $Id$ ''' import os from reportlab.lib impo...
StrellaGroup/erpnext
refs/heads/develop
erpnext/setup/doctype/territory/test_territory.py
17
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe test_records = frappe.get_test_records('Territory') test_ignore = ["Item Group"]
Ztiany/CodeRepository
refs/heads/master
Python/Python3-Base/13_Network/UDP/UDPBroadcastClient.py
2
######################### # udp 广播客户端 ######################### import socket def start_client(): dest = ('<broadcast>', 8888) # 创建udp套接字 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # 对这个需要发送广播数据的套接字进行修改设置(固定写法),否则不能发送广播数据 s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) #...
rainwoodman/mpi4py_test
refs/heads/master
runtests/mpi/tests/test_assertblock.py
3
from runtests.mpi import MPITest, nompi @MPITest(commsize=[1, 2]) def test_assert_block(comm): error = None try: with nompi(comm): if comm.rank == 0: raise ValueError("This is an error raised on rank 0. Other ranks will see a RuntimeError instead") except RuntimeError as...
OptimusGitEtna/RestSymf
refs/heads/master
Python-3.4.2/Lib/encodings/iso2022_jp_1.py
816
# # iso2022_jp_1.py: Python Unicode Codec for ISO2022_JP_1 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_1') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class Incrementa...
cdjones32/vertx-web
refs/heads/master
src/test/sockjs-protocol/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/charsetprober.py
3126
######################## 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...
samdoran/ansible
refs/heads/devel
lib/ansible/modules/database/vertica/vertica_facts.py
20
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
luiscarlosgph/nas
refs/heads/master
env/lib/python2.7/site-packages/django/conf/locale/de/formats.py
82
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i:s' DAT...
EvanK/ansible
refs/heads/devel
test/units/module_utils/basic/test_argument_spec.py
5
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: Ansible Project # 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_functio...
heisencoder/route-finder
refs/heads/master
third_party/lib/python/django/contrib/gis/db/models/sql/compiler.py
17
import datetime from django.conf import settings from django.db.backends.util import truncate_name, typecast_date, typecast_timestamp from django.db.models.sql import compiler from django.db.models.sql.constants import MULTI from django.utils import six from django.utils.six.moves import zip, zip_longest from django.u...
muttiopenbts/fusion
refs/heads/master
fusion_level02_5.py
1
#!/usr/bin/python ''' Simple script to interact with fusion level 02 challenge network daemon, #!/usr/bin/python mkocbayi@gmail.com ''' from pwn import * import sys #Use this hexdump lib because pwntools hexdump is too slow from hexdump import * def doMode(mode): # Either E or Q print('Sending mode call: {}'.forma...
bthirion/nipy
refs/heads/master
nipy/modalities/fmri/fmristat/invert.py
2
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: __docformat__ = 'restructuredtext' import numpy as np from nipy.algorithms.statistics.models.nlsmodel import NLSModel def invertR(delta, IRF, niter=20): """ If IRF has 2 components (w0, w1) retu...
DelazJ/QGIS
refs/heads/master
tests/src/python/test_qgslegendpatchshapebutton.py
31
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLegendPatchShapeButton. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later vers...
wwf5067/statsmodels
refs/heads/master
statsmodels/datasets/stackloss/__init__.py
829
from .data import *
taxpon/sverchok
refs/heads/master
nodes/modifier_make/wireframe.py
1
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
StrellaGroup/frappe
refs/heads/develop
frappe/integrations/doctype/oauth_bearer_token/test_oauth_bearer_token.py
23
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('OAuth Bearer Token') class TestOAuthBearerToken(unittest.TestCase): pass
liorvh/raspberry_pwn
refs/heads/master
src/pentest/voiper/sulley/requests/rendezvous.py
8
from sulley import * ######################################################################################################################## s_initialize("trillian 1") s_static("\x00\x00") # transaction ID s_static("\x00\x00") # flags (standard query) s_word(1, endian=">...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/mission/quest_item/singular_nak_q1_needed.py
85615
import sys def setup(core, object): return