repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
jaredsampson/pymolprobity
refs/heads/master
pymolprobity/kinemage.py
1
'''Kinemage handling for PyMOLProbity plugin.''' from __future__ import absolute_import from __future__ import print_function import copy import logging import re from pymol import cmd from . import points from . import utils logger = logging.getLogger(__name__) ################################################...
simonmonk/pi_starter_kit
refs/heads/master
06_reactions.py
1
# 06_reactions.py # From the code for the Electronics Starter Kit for the Raspberry Pi by MonkMakes.com import RPi.GPIO as GPIO import time, random # Configure the Pi to use the BCM (Broadcom) pin names, rather than the pin positions GPIO.setmode(GPIO.BCM) # pins used for the LED and switches red_pin = 18 green_pin ...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/eospac/package.py
1
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Eospac(Package): """A collection of C routines that can be used to access the Sesame data...
bemeurer/beautysh
refs/heads/master
beautysh/__init__.py
1
"""__init__: Holds version info.""" from .beautysh import Beautify __version__ = '5.0.2'
slabanja/ase
refs/heads/lammps
ase/calculators/jacapo/changed.py
1
import numpy as np import logging log = logging.getLogger('Jacapo') ''' provides functions to determine if an input parameter has changed. ''' ####################################################################### #### changed functions def kpts_changed(calc, x): ''' check if kpt grid has changed. we ...
ksmit799/Toontown-Source
refs/heads/master
toontown/minigame/TwoDStomperMgr.py
5
from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.minigame import ToonBlitzGlobals from toontown.minigame import TwoDStomper class TwoDStomperMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategor...
asoliveira/NumShip
refs/heads/master
scripts/plot/brl-ace-v-zz-plt.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- #É adimensional? adi = False #É para salvar as figuras(True|False)? save = True #Caso seja para salvar, qual é o formato desejado? formato = 'jpg' #Caso seja para salvar, qual é o diretório que devo salvar? dircg = 'fig-sen' #Caso seja para salvar, qual é o nome do arquivo...
deepmind/open_spiel
refs/heads/master
open_spiel/python/mfg/algorithms/policy_value_test.py
1
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
gritlogic/incubator-airflow
refs/heads/master
airflow/ti_deps/deps/trigger_rule_dep.py
6
# -*- coding: utf-8 -*- # # 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 ...
miguelgrinberg/climax
refs/heads/master
test_climax.py
1
from __future__ import print_function import argparse try: from StringIO import StringIO except ImportError: from io import StringIO import unittest try: from unittest import mock except ImportError: import mock import sys import coverage cov = coverage.coverage(branch=True, source=['climax']) cov.st...
saketkc/statsmodels
refs/heads/master
statsmodels/sandbox/examples/ex_kaplan_meier.py
33
#An example for the Kaplan-Meier estimator from __future__ import print_function from statsmodels.compat.python import lrange import statsmodels.api as sm import matplotlib.pyplot as plt import numpy as np from statsmodels.sandbox.survival2 import KaplanMeier #Getting the strike data as an array dta = sm.datasets.stri...
jonfoster/pyxb-upstream-mirror
refs/heads/master
tests/trac/test-trac-0139.py
3
# -*- coding: iso-2022-jp -*- import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) # import sys import pyxb.binding.generate import pyxb.binding.datatypes as xs import pyxb.binding.basis import pyxb.utils.saxutils import tempfile import xml.sax import os.path xsd='''<...
ted-gould/nova
refs/heads/master
nova/tests/unit/test_bdm.py
70
# Copyright 2011 Isaku Yamahata # 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...
craneworks/python-pyroute2
refs/heads/master
pyroute2/netlink/rtnl/iw_event.py
2
from pyroute2.netlink import nla class iw_event(nla): nla_map = ((0xB00, 'SIOCSIWCOMMIT', 'hex'), (0xB01, 'SIOCGIWNAME', 'hex'), # Basic operations (0xB02, 'SIOCSIWNWID', 'hex'), (0xB03, 'SIOCGIWNWID', 'hex'), (0xB04, 'SIOCSIWFREQ', 'hex'...
Frenchisman/travel-blog
refs/heads/master
galleries/migrations/0007_auto_20160803_0920.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-08-03 07:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('galleries', '0006_auto_20160802_1709'), ] operations = [ migrations.AddField...
wkritzinger/asuswrt-merlin
refs/heads/master
release/src/router/samba36/source4/heimdal/lib/wind/gen-normalize.py
35
#!/usr/local/bin/python # -*- coding: iso-8859-1 -*- # $Id$ # Copyright (c) 2004 Kungliga Tekniska Högskolan # (Royal Institute of Technology, Stockholm, Sweden). # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following...
jorik041/scrapy
refs/heads/master
scrapy/stats.py
159
""" Obsolete module, kept for giving a meaningful error message when trying to import. """ raise ImportError("scrapy.stats usage has become obsolete, use " "`crawler.stats` attribute instead")
talumbau/webapp-public
refs/heads/master
webapp/apps/taxbrain/migrations/0020_auto_20141021_1954.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('taxbrain', '0019_auto_20141021_1953'), ] operations = [ migrations.AddField( model_name='standarddeductionsinput...
ridfrustum/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/db/models/signals.py
63
from django.dispatch import Signal class_prepared = Signal(providing_args=["class"]) pre_init = Signal(providing_args=["instance", "args", "kwargs"]) post_init = Signal(providing_args=["instance"]) pre_save = Signal(providing_args=["instance", "raw"]) post_save = Signal(providing_args=["instance", "raw", "created"])...
GabrielCasarin/SimuladorBASYS
refs/heads/master
PSE/__init__.py
45382
pepetreshere/odoo
refs/heads/patch-2
addons/point_of_sale/models/pos_order.py
1
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from datetime import timedelta from functools import partial import psycopg2 import pytz from odoo import api, fields, models, tools, _ from odoo.tools import float_is_zero, float_round from odoo.exceptio...
isudox/leetcode-solution
refs/heads/master
python-algorithm/leetcode/unique_paths_ii.py
1
"""63. Unique Paths II https://leetcode.com/problems/unique-paths-ii/ A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' i...
antgonza/qiime
refs/heads/master
scripts/alpha_diversity.py
15
#!/usr/bin/env python # File created on 09 Feb 2010 from __future__ import division __author__ = "Justin Kuczynski" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Justin Kuczynski", "Rob Knight", "Jose Antonio Navas Molina", "Jai Ram Rideout"] __license__ = "GPL" __version__ = "1.9....
rawjam/dj-stripe
refs/heads/master
djstripe/widgets.py
1
try: import floppyforms except ImportError: floppyforms = None if floppyforms: class StripeWidget(floppyforms.TextInput): template_name = 'djstripe/stripe_input.html'
nhippenmeyer/django
refs/heads/master
tests/auth_tests/test_basic.py
328
from __future__ import unicode_literals from django.apps import apps from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tests.custom_user import CustomUser from django.core.exceptions import ImproperlyConfigured from django.dispatch import...
jw0201/luigi
refs/heads/master
test/auto_namespace_test/__init__.py
22
import luigi luigi.auto_namespace(scope=__name__)
shingonoide/odoo
refs/heads/deverp_8.0
addons/web_analytics/__openerp__.py
305
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
bozzmob/dxr
refs/heads/master
dxr/cli/deploy.py
1
"""Continuous deployment script for DXR Glossary ======== build directory - A folder, typically in the ``builds`` folder, containing these folders... dxr - A checkout of the DXR source code virtualenv - A virtualenv with DXR and its dependencies installed Builds are named after an excerpt of their git h...
aikramer2/spaCy
refs/heads/master
spacy/lang/vi/__init__.py
3
# coding: utf8 from __future__ import unicode_literals from ...attrs import LANG, NORM from ..norm_exceptions import BASE_NORMS from ...language import Language from ...tokens import Doc from .stop_words import STOP_WORDS from ...util import update_exc, add_lookups from .lex_attrs import LEX_ATTRS #from ..tokenizer_ex...
prisis/sublime-text-packages
refs/heads/master
Packages/SublimeCodeIntel/libs/chardet/langhungarianmodel.py
63
######################## 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...
mixmar91/whatsapp
refs/heads/master
yowsup/layers/protocol_messages/layer.py
69
from yowsup.layers import YowLayer, YowLayerEvent, YowProtocolLayer from .protocolentities import TextMessageProtocolEntity class YowMessagesProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "message": (self.recvMessageStanza, self.sendMessageEntity) } super(YowM...
gentunian/tellapic
refs/heads/master
src/client/python/pyqt/TwoInits.py
2
class A: def __init__(self): self.__m1() def __m1(self): print("m1 en A") class B(A): def __init__(self): super(B, self).__init__() self.__m1() def __m1(self): print("m1 en B")
tadek-project/tadek-common
refs/heads/master
tests/core/config.py
1
################################################################################ ## ## ## This file is a part of TADEK. ## ## ...
dreamsxin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/distutils/command/build_scripts.py
92
"""distutils.command.build_scripts Implements the Distutils 'build_scripts' command.""" import os, re from stat import ST_MODE from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path, Mixin2to3 from distutils import log import tok...
TRESCLOUD/odoopub
refs/heads/master
addons/website_event_sale/models/sale_order.py
41
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.osv import osv, fields from openerp.tools.translate import _ # defined for access rules class sale_order(osv.Model): _inherit = "sale.order" def _cart_find_product_line(self, cr, uid, ids, product_id=None, line_id=None, context=None, **kwar...
wesleykendall/django-issue
refs/heads/develop
issue/builder.py
2
from django.db import transaction from issue.models import Responder, ResponderAction @transaction.atomic def build_responder(dict_): """ Construct a Responder and ResponderActions from a dictionary representation. """ r = Responder.objects.create(watch_pattern=dict_['watch_pattern']) for action ...
YelaSeamless/pyc2py
refs/heads/master
decompile/constructs/if_constructs.py
2
# pyc2py - The smart python decompiler. # Copyright (C) 2012 Centre National de la Recherche Scientifique # # 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,...
Sup3Roque/Pancas
refs/heads/master
plugin.video.Anima.PT/resources/libs/common_addon.py
26
''' common XBMC Module Copyright (C) 2011 t0mm0 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, or (at your option) any later version. Th...
MyGb/PythonApplication
refs/heads/master
webApp/api/views.py
1
from django.http import HttpResponse from django.db.models import Count from .models import Job import json # Create your views here. def index(request): #select industryfield,count(industryfield) from job group by industryfield groupResult = Job.objects.values("industryfield").annotate(total=Count("industryfield"))...
zepheira/amara
refs/heads/master
test/xslt/test_strip_space.py
1
#!/usr/bin/env python ''' These new tests complete the test_basics.py tests I want to test the xsl:strip-space command that is failing now with Amara The expected results are the ones I'm getting with saxon. ''' import sys from nose import with_setup from amara.xslt.processor import processor from amara.lib import...
nerzhul/ansible
refs/heads/devel
lib/ansible/plugins/terminal/iosxr.py
19
# # (c) 2016 Red Hat Inc. # # 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 d...
fortmeier/yge-game-engine
refs/heads/master
test/gtest-1.7.0/scripts/fuse_gtest_files.py
2577
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
achang97/YouTunes
refs/heads/master
lib/python2.7/site-packages/botocore/serialize.py
2
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
diagramsoftware/odoomrp-wip
refs/heads/8.0
purchase_homologation/__init__.py
8
# -*- coding: utf-8 -*- ############################################################################## # # # OpenERP, Open Source Management Solution. # # ...
soulshake/readthedocs.org
refs/heads/master
readthedocs/settings/base.py
21
# encoding: utf-8 import os import djcelery from kombu.common import Broadcast from kombu import Exchange, Queue djcelery.setup_loader() _ = gettext = lambda s: s DEBUG = True TEMPLATE_DEBUG = DEBUG TASTYPIE_FULL_DEBUG = True LOG_DEBUG = False PRODUCTION_DOMAIN = 'readthedocs.org' USE_SUBDOMAIN = False ADMINS = ( ...
tmylk/gensim
refs/heads/develop
gensim/corpora/sharded_corpus.py
63
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Original author: Jan Hajic jr. # Copyright (C) 2015 Radim Rehurek and gensim team. # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ This module implements a corpus class that stores its data in separate files called "shards". This is a com...
cactorium/HyperDex
refs/heads/master
test/doctest-runner.py
7
# Copyright (c) 2013, Cornell University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condi...
meisterkleister/erpnext
refs/heads/master
erpnext/accounts/general_ledger.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 from frappe.utils import flt, cstr, cint from frappe import _ from frappe.model.meta import get_field_precision from erpnext.accounts.util...
anirudhSK/chromium
refs/heads/master
tools/telemetry/telemetry/page/actions/repaint_continuously.py
2
# 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 time from telemetry.page.actions import page_action class RepaintContinuouslyAction(page_action.PageAction): """ Continuously repaints the visible...
quadcores/cbs_4.2.4
refs/heads/master
scripts/gdb/linux/lists.py
630
# # gdb helper commands and functions for Linux kernel debugging # # list tools # # Copyright (c) Thiebaud Weksteen, 2015 # # Authors: # Thiebaud Weksteen <thiebaud@weksteen.fr> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import utils list_head = utils.CachedType("st...
n0trax/ansible
refs/heads/devel
lib/ansible/modules/cloud/centurylink/clc_publicip.py
49
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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', 'status': ['previe...
pudo/aleph
refs/heads/master
aleph/migrate/versions/e03ea7302070_kill_events.py
1
"""Kill events domain object. Revision ID: e03ea7302070 Revises: cbd285d713b4 Create Date: 2016-05-20 15:38:09.274167 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'e03ea7302070' down_revision = 'cbd285d713b4' def ...
scaphilo/koalixcrm
refs/heads/master
koalixcrm/crm/contact/customer.py
2
# -*- coding: utf-8 -*- from django.http import HttpResponseRedirect from django.db import models from django.contrib import admin from django.utils.translation import ugettext as _ from koalixcrm.plugin import * from koalixcrm.crm.contact.contact import Contact, ContactCall, ContactVisit,\ PeopleInlineAdmin, Post...
wujuguang/sentry
refs/heads/master
src/sentry/migrations/0118_create_default_rules.py
36
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): from sentry.receivers.rules import create_default_rules Project = orm['sentry.Project'] Rule = orm['sent...
rwillmer/django
refs/heads/master
django/contrib/postgres/fields/jsonb.py
341
import json from psycopg2.extras import Json from django.contrib.postgres import forms, lookups from django.core import exceptions from django.db.models import Field, Transform from django.utils.translation import ugettext_lazy as _ __all__ = ['JSONField'] class JSONField(Field): empty_strings_allowed = False ...
Juniper/contrail-dev-neutron
refs/heads/master
neutron/tests/unit/cisco/test_nexus_plugin.py
9
# Copyright (c) 2012 OpenStack Foundation. # # 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...
fqez/JdeRobot
refs/heads/master
src/types/python/jderobotTypes/ir.py
5
# # Copyright (C) 1997-2017 JDE Developers Team # # 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, or # (at your option) any later version. # # This program...
amjadm61/bedrock
refs/heads/master
bedrock/mozorg/credits.py
4
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import csv from operator import itemgetter from django.utils.functional import cached_property from ordereddict import...
nanuda/ranger
refs/heads/master
ranger/core/actions.py
1
# This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. # pylint: disable=too-many-lines,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) import codecs import os from os import link, symlink, getcwd, l...
hgl888/chromium-crosswalk-efl
refs/heads/efl/crosswalk-10/39.0.2171.19
tools/telemetry/telemetry/unittest/run_tests.py
27
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import unittest from telemetry import decorators from telemetry.core import browser_finder from telemetry.core import browser_options from te...
dcroc16/skunk_works
refs/heads/master
google_appengine/lib/django-1.5/django/contrib/comments/__init__.py
97
from django.conf import settings from django.core import urlresolvers from django.core.exceptions import ImproperlyConfigured from django.contrib.comments.models import Comment from django.contrib.comments.forms import CommentForm from django.utils.importlib import import_module DEFAULT_COMMENTS_APP = 'django.contrib....
nevermoreluo/privateoverseas
refs/heads/master
overseas/models/invalidations.py
1
# _*_ coding:utf-8 _*_ # !/usr/bin/env python # auth: nevermore from django.db import models class Invalidations(models.Model): taskid = models.CharField(max_length=100) url = models.CharField(max_length=100) percentComplete = models.CharField(max_length=100, default='0') force = models.BooleanField(...
kitz99/misc
refs/heads/master
some_algorithms/insertion.py
1
def insertion_sort(a): for j in range(1, len(a)): key = a[j] # try to insert key in the correct position in the array i = j - 1 while i >= 0 and a[i] > key: a[i + 1] = a[i] i = i - 1 a[i + 1] = key if __name__ == '__main__': v = [1, 7, 9, 3, 2, -1, -19] insertion_sort(v) print v
kustodian/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_waf_signature.py
7
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
ganeshgore/myremolab
refs/heads/master
server/launch/sample_balanced2_concurrent_experiments/main_machine/lab_and_experiment2/experiment36/server_config.py
242
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- weblab_xilinx_experiment_xilinx_device = 'FPGA' weblab_xilinx_experiment_port_number = 1 # This should be something like this: # import os as _os # xilinx_home = _os.getenv('XILINX_HOME') # if xilinx_home == None: # if _os.name == 'nt': # xilinx_home = r'C:...
rtucker-mozilla/inventory
refs/heads/master
user_systems/migrations/0002_auto__add_field_userlicense_purchase_date.py
2
# -*- 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 'UserLicense.purchase_date' db.add_column(u'user_licenses', 'purchase_date', ...
unreal666/outwiker
refs/heads/master
test/samplewiki/Страница 1/__attach/__init__.py
45382
mdworks2016/work_development
refs/heads/master
Python/05_FirstPython/Chapter9_WebApp/fppython_develop/lib/python3.7/site-packages/pip/_vendor/colorama/ansi.py
640
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. ''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' OSC = '\033]' BEL = '\007' def code_to_chars(code): return CSI + str(code) + 'm' def set...
GehenHe/Recognize-Face-on-Android
refs/heads/master
tensorflow/python/kernel_tests/ctc_loss_op_test.py
10
# 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...
szaydel/psutil
refs/heads/master
test/test_psutil.py
1
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ psutil test suite (you can quickly run it with "python setup.py test"). Note: this is targeted for both python 2.x and 3.x so t...
joachimmetz/plaso
refs/heads/main
tests/engine/extractors.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the extractor classes.""" import os import shutil import unittest from dfvfs.helpers import file_system_searcher from dfvfs.lib import definitions as dfvfs_definitions from dfvfs.path import factory as path_spec_factory from dfvfs.resolver import context fro...
Yukinoshita47/Yuki-Chan-The-Auto-Pentest
refs/heads/master
Module/metagoofil/hachoir_parser/archive/zip.py
72
""" Zip splitter. Status: can read most important headers Authors: Christophe Gisquet and Victor Stinner """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, ParserError, Bit, Bits, Enum, TimeDateMSDOS32, SubFile, UInt8, UInt16, UInt32, UInt64, String, PascalString16, Ra...
BT-fgarbely/stock-logistics-workflow
refs/heads/8.0
stock_ownership_by_move/__openerp__.py
9
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # 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...
Lujeni/ansible
refs/heads/devel
test/units/module_utils/facts/test_utils.py
78
# 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 ...
cbrafter/TRB18_GPSVA
refs/heads/master
codes/sumoAPI/HVA_OPT1.py
1
#!/usr/bin/env python """ @file HybridVAControl.py @author Craig Rafter @date 19/08/2016 class for fixed time signal control """ import signalControl, readJunctionData, traci from math import atan2, degrees, hypot import numpy as np from collections import defaultdict class HybridVAControl(signalControl.signa...
sudheesh001/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/trial/test/mockcustomsuite3.py
87
# Copyright (c) 2006 Twisted Matrix Laboratories. See LICENSE for details """ Mock test module that contains both a C{test_suite} and a C{testSuite} method. L{runner.TestLoader} should load the tests from the C{testSuite}, not from the C{Foo} C{TestCase} nor from the C{test_suite} method. See {twisted.trial.test.test...
SpheMakh/Stimela
refs/heads/master
stimela/cargo/cab/casa47_plotuv/src/run.py
2
import os import sys import logging import yaml import glob import shutil import drivecasa CONFIG = os.environ["CONFIG"] INPUT = os.environ["INPUT"] OUTPUT = os.environ["OUTPUT"] MSDIR = os.environ["MSDIR"] with open(CONFIG, "r") as _std: cab = yaml.safe_load(_std) junk = cab["junk"] casa = drivecasa.Casapy(log2...
montanapr/Plugin.Video.Mercy
refs/heads/master
tools/scrape.py
6
# -*- coding: utf-8 -*- #-------------------------------------------------------- # creado por quequeQ para PalcoTV # (http://forum.rojadirecta.es/member.php?1370946-quequeQ) # (http://xbmcspain.com/foro/miembro/quequino/) # Version 0.0.1 (26.10.2014) #-------------------------------------------------------- # License...
cyang1/dotfiles
refs/heads/master
vim/vim.symlink/ycm_extra_conf.py
1
import os import ycm_core # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. flags = [ '-Wall', '-Wextra', '-Werror', '-Wc++98-compat', '-Wno-l...
jamesmarva/jsonschema
refs/heads/master
jsonschema/cli.py
65
from __future__ import absolute_import import argparse import json import sys from jsonschema._reflect import namedAny from jsonschema.validators import validator_for def _namedAnyWithDefault(name): if "." not in name: name = "jsonschema." + name return namedAny(name) def _json_file(path): with...
Fusion-Rom/android_external_chromium_org
refs/heads/lp5.1
tools/profile_chrome/main.py
26
#!/usr/bin/env python # # 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 logging import optparse import os import sys import webbrowser from profile_chrome import chrome_controller from profile_chro...
amakaroff82/three.js
refs/heads/dev
utils/exporters/blender/modules/msgpack/_version.py
648
version = (0, 4, 2)
ol-loginov/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/tripleQuotedSubstring.py
83
print(""""One two * <selection>Three</selection> * Four * Five""" + suffix)
miloharper/neural-network-animation
refs/heads/master
matplotlib/tests/test_streamplot.py
9
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np from numpy.testing import assert_array_almost_equal import matplotlib.pyplot as plt from matplotlib.testing.decorators import image_comparison, cleanup import matplotlib.transform...
tonihr/pyGeo
refs/heads/master
Topografia/RadiacionUTM.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 4/5/2015 @author: Antonio Hermosilla Rodrigo. @contact: anherro285@gmail.com @organization: Antonio Hermosilla Rodrigo. @copyright: (C) 2015 by Antonio Hermosilla Rodrigo @version: 1.0.0 ''' import Geometrias.PuntoUTM as putm import Geometrias.Angulo as ang ...
jbergant/endpoints-proto-datastore
refs/heads/master
examples/simple_get/main.py
6
# If you have not yet seen the source in basic/main.py, please take a look. # In this sample we add an additional method MyModelGet which allows a specific # entity to be retrieved. import endpoints from google.appengine.ext import ndb from protorpc import remote from endpoints_proto_datastore.ndb import EndpointsM...
ToBe2015/Ardupilot-stable
refs/heads/master
Tools/scripts/magfit_flashlog.py
278
#!/usr/bin/env python ''' fit best estimate of magnetometer offsets from ArduCopter flashlog using the algorithm from Bill Premerlani ''' import sys, time, os, math # command line option handling from optparse import OptionParser parser = OptionParser("magfit_flashlog.py [options]") parser.add_option("--verbose", ac...
hn8841182/2015cd_0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/SDL.py
603
from browser import document SDL_INIT_VIDEO=0 SDL_GL_DOUBLEBUFFER=1 SDL_GL_DEPTH_SIZE=2 SDL_DOUBLEBUF=3 SDL_ANYFORMAT=4 SDL_ACTIVEEVENT=5 SDL_ALLEVENTS=5 SDL_KEYDOWN=6 SDL_KEYUP=7 SDL_MOUSEMOTION=8 SDL_MOUSEBUTTONDOWN=9 SDL_MOUSEBUTTONUP=10 SDL_JOYAXISMOTION=11 SDL_JOYBALLMOTION=12 SDL_JOYHATMOTION=13 SDL_JOYBUTTON...
m039/Void
refs/heads/master
third-party/void-boost/tools/build/example/generate/gen.py
67
from b2.build.virtual_target import NonScanningAction, FileTarget def generate_example(project, name, ps, sources): result = [] for s in sources: a = NonScanningAction([s], "common.copy", ps) # Create a target to represent the action result. Uses the target name # passed here via th...
dnozay/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/utils.py
397
from django.conf import settings from django.db import DEFAULT_DB_ALIAS # function that will pass a test. def pass_test(*args): return def no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: ...
sebalix/OpenUpgrade
refs/heads/8.0
addons/association/__openerp__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
gravitystorm/fifengine
refs/heads/master
engine/python/fife/extensions/fife_settings.py
1
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
ihahoo/gin-api-boilerplate
refs/heads/master
vendor/github.com/ugorji/go/codec/test.py
181
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). # Ensure msgpack-python and cbor are installed first, using: # sudo apt-get install python-dev # sudo apt-g...
mitchrule/Miscellaneous
refs/heads/master
Django_Project/django/Lib/site-packages/django/contrib/postgres/fields/__init__.py
237
from .array import * # NOQA from .hstore import * # NOQA from .ranges import * # NOQA
txemagon/1984
refs/heads/master
modules/Telegram-bot-python/build/lib/telegram/inlinequery.py
2
#!/usr/bin/env python # pylint: disable=R0902,R0912,R0913 # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Les...
jcrmatos/tai
refs/heads/master
setup_py2exe.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2009-2015 Joao Carlos Roseta Matos # # 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, or # (at your opt...
trmznt/fatools
refs/heads/master
fatools/scripts/fa.py
2
def init_argparser(parser=None): from fatools.lib.fautil import cmds return cmds.init_argparser(parser) def main(args): from fatools.lib.fautil import cmds return cmds.main(args)
matmutant/sl4a
refs/heads/master
python-build/python-libs/gdata/src/atom/mock_http.py
278
#!/usr/bin/python # # Copyright (C) 2008 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 ...
yotchang4s/cafebabepy
refs/heads/develop
src/main/python/concurrent/__init__.py
1383
# This directory is a Python package.
topshed/RPi_8x8GridDraw
refs/heads/master
8x8grid-unicorn.py
1
''' 8x8grid-unicorn.py Animation and single frame creation append for Pimoroni UnicornHat 8x8 LED matrix''' import pygame import sys import math from pygame.locals import * from led import LED from buttons import Button import png # pypng #from astro_pi import AstroPi import unicornhat as uh import copy, time saved = ...