repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
zidootech/zidoo-kodi-14.2
refs/heads/master
tools/EventClients/Clients/J2ME Client/j2me_remote.py
111
#!/usr/bin/python # # XBMC Media Center # J2ME Remote # Copyright (c) 2008 topfs2 # # 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 lat...
hackgnar/osquery
refs/heads/master
tools/tests/test_windows_service.py
4
#!/usr/bin/env python3 # Copyright (c) 2014-present, The osquery authors # # This source code is licensed as defined by the LICENSE file found in the # root directory of this source tree. # # SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) import re import os import psutil import random import shutil import sub...
AloneRoad/Inforlearn
refs/heads/1.0-rc3
django/core/management/commands/sqlsequencereset.py
36
from django.core.management.base import AppCommand class Command(AppCommand): help = 'Prints the SQL statements for resetting sequences for the given app name(s).' output_transaction = True def handle_app(self, app, **options): from django.db import connection, models return u'\n'.join(con...
barryrobison/arsenalsuite
refs/heads/master
cpp/lib/pyqt_modules/__init__.py
211
import build
cgwalters/gnome-ostree
refs/heads/wip/aws-install
src/ostbuild/pyostbuild/builtin_repoweb_json.py
3
# Copyright (C) 2012 Colin Walters <walters@verbum.org> # # This library 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 Foundation; either # version 2 of the License, or (at your option) any later version. # # Thi...
sivaprakashniet/push_pull
refs/heads/master
p2p/lib/python2.7/site-packages/nose/plugins/builtin.py
106
""" Lists builtin plugins. """ plugins = [] builtins = ( ('nose.plugins.attrib', 'AttributeSelector'), ('nose.plugins.capture', 'Capture'), ('nose.plugins.logcapture', 'LogCapture'), ('nose.plugins.cover', 'Coverage'), ('nose.plugins.debug', 'Pdb'), ('nose.plugins.deprecated', 'Deprecated'), ...
chris-j-tang/GLS
refs/heads/master
test/integration/Operation/one operation.py
8
- aaa + bbb -
prototype-U/lenovo_a706_kernel
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
giangnguyennet/linux
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
loretoparisi/nupic
refs/heads/master
examples/prediction/experiments/inspect_test.py
50
# ---------------------------------------------------------------------- # 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...
Kazade/NeHe-Website
refs/heads/master
google_appengine/lib/django-1.5/django/conf/locale/th/formats.py
433
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # 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 = 'G:i:s' DATETIME_FORMAT = 'j F Y, G:i:s' YEAR_MONTH_...
sidgleyandrade/crawler-twitter
refs/heads/master
crawler-twitter/crawler/src/models.py
1
class TwitterMessage: def __init__(self): self.id = None self.id_str = None self.created_at = None self.date = None self.favorite_count = None self.favorited = None self.lang = None self.latitude = None self.longitude = None self.coordi...
vwvww/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_bytestring.py
118
# -*- coding: UTF-8 -*- import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestByteString { attribute ByteString bs; attribute DOMString ds; }; """) results = parser.finish(); harness.ok(True, "TestByteString interface parsed without error...
kl-cruz/mbed-os
refs/heads/master
tools/test/config_test/test04/test_data.py
38
# Similar to test1, but this time B2 attempt to define base1_1. Since base1_1 # is already defined in B1 and F derives from both B1 and B2, this results # in an error. However, when building for B2 instead of F, defining base1_1 # should be OK. expected_results = { "f": { "desc": "attempt to redefine param...
zhjunlang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/colorama/win32.py
196
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # from winbase.h STDOUT = -11 STDERR = -12 import ctypes from ctypes import LibraryLoader try: windll = LibraryLoader(ctypes.WinDLL) from ctypes import wintypes except (AttributeError, ImportError): windll = None SetConsoleTex...
tnemis/staging-server
refs/heads/master
teachers/views/teacher_tpf_loan_views.py
2
from django.views.generic import View from teachers.models import Teacher_detail,completed_table,Teacher_GPF_loan from teachers.forms import Teacher_GPF_loanform from django.shortcuts import * from baseapp.models import * from schoolnew.models import Basicinfo from django.contrib import messages from django.db import *...
AlexanderPease/email-waze
refs/heads/master
tests/test_connection.py
1
import settings, logging from db.groupdb import Group from db.userdb import User from db.connectiondb import Connection def test_connection_class(): """ Only run on development or testing database! """ for c in Connection.objects(): c.delete() # Unique compound index t...
mjtamlyn/django
refs/heads/master
tests/prefetch_related/test_uuid.py
133
from django.test import TestCase from .models import Flea, House, Person, Pet, Room class UUIDPrefetchRelated(TestCase): def test_prefetch_related_from_uuid_model(self): Pet.objects.create(name='Fifi').people.add( Person.objects.create(name='Ellen'), Person.objects.create(name='G...
rahul-ramadas/leetcode
refs/heads/master
coin-change/Solution.57486803.py
1
class Solution: def coinChange(self, coins, amount): if amount <= 0: return 0 seen = {0} boundary = {0} level = 0 while boundary: level += 1 boundary = {a + c for a in boundary for c in coins if not a + c in seen and a + c <=...
swegener/micropython
refs/heads/master
tests/micropython/kbd_intr.py
26
# test the micropython.kbd_intr() function import micropython try: micropython.kbd_intr except AttributeError: print('SKIP') raise SystemExit # just check we can actually call it micropython.kbd_intr(3)
JoyMonteiro/parSpectral
refs/heads/master
pspec/testSphSW.py
2
import numpy as np import shtns import sphTrans as sph import matplotlib.pyplot as plt import time import AdamsBashforth nlons = 256 # number of longitudes ntrunc = int(nlons/3) # spectral truncation (for alias-free computations) nlats = int(nlons/2) # for gaussian grid. # parameters for test rsphere = 6.37122...
laborautonomo/quokka
refs/heads/master
quokka/core/middleware.py
16
# -*- coding: utf-8 -*- from werkzeug import url_decode class HTTPMethodOverrideMiddleware(object): """The HTTPMethodOverrideMiddleware middleware implements the hidden HTTP method technique. Not all web browsers support every HTTP method, such as DELETE and PUT. This middleware class allows clients to p...
ygol/dotfiles
refs/heads/master
bin/.venv-ansible-venv/lib/python2.6/site-packages/ansible/modules/core/files/synchronize.py
24
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012-2013, Timothy Appnel <tim@appnel.com> # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
cloud9UG/e-commerce
refs/heads/8.0
sale_automatic_workflow/invoice.py
25
# -*- coding: utf-8 -*- ############################################################################### # # sale_automatic_workflow for OpenERP # Copyright (C) 2011-TODAY Akretion <http://www.akretion.com>. # All Rights Reserved # @author Sébastien BEAU <sebastien.beau@akretion.com> # Copyright Camptocamp...
fredericlepied/ansible
refs/heads/devel
lib/ansible/plugins/lookup/env.py
46
# (c) 2012, Jan-Piet Mens <jpmens(at)gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
therealaltcoin/altcoin
refs/heads/master
contrib/wallettools/walletunlock.py
20
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:9335") pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
tzmgit/sublime-rst-completion
refs/heads/master
lists.py
5
# -*- coding: utf-8 -*- """Smart list is used to automatially continue the current list.""" # Author: Muchenxuan Tong <demon386@gmail.com> # Original from https://github.com/demon386/SmartMarkdown with this patch: # https://github.com/vovkkk/SmartMarkdown/commit/bb1bb76179771212c1f21883d9b64d0a299fc98c # roman number...
bhargav2408/python-for-android
refs/heads/master
python3-alpha/python3-src/Doc/includes/sqlite3/executescript.py
140
import sqlite3 con = sqlite3.connect(":memory:") cur = con.cursor() cur.executescript(""" create table person( firstname, lastname, age ); create table book( title, author, published ); insert into book(title, author, published) values ( ...
CyriusG/frontpage_backend
refs/heads/master
movie/api/views.py
1
from django.conf import settings from django.contrib.sessions.backends.db import SessionStore from django.utils.datastructures import MultiValueDictKeyError from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from movie.models import Request from .s...
nerdvegas/rez
refs/heads/master
src/rez/system.py
1
import os import os.path import re import platform from rez import __version__ from rez.utils.platform_ import platform_ from rez.exceptions import RezSystemError from rez.utils.data_utils import cached_property class System(object): """Access to underlying system data. """ @property def rez_version(...
Newmu/Theano-Tutorials
refs/heads/master
4_modern_net.py
18
import theano from theano import tensor as T from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams import numpy as np from load import mnist srng = RandomStreams() def floatX(X): return np.asarray(X, dtype=theano.config.floatX) def init_weights(shape): return theano.shared(floatX(np.random.ra...
tuskar/tuskar-ui
refs/heads/master
openstack_dashboard/dashboards/infrastructure/resource_management/panel.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # #...
wattad169/sportbuddy_server
refs/heads/master
lib/django/forms/extras/__init__.py
464
import warnings from django.forms.widgets import SelectDateWidget from django.utils.deprecation import RemovedInDjango20Warning __all__ = ['SelectDateWidget'] warnings.warn( "django.forms.extras is deprecated. You can find " "SelectDateWidget in django.forms.widgets instead.", RemovedInDjango20Warning, ...
s0930342674/pyload
refs/heads/stable
module/HookManager.py
35
# -*- coding: utf-8 -*- """ 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 is distributed in...
swift-lang/swift-e-lab
refs/heads/master
parsl/executors/zmq_plumbing.py
1
import zmq context = zmq.Context() class ZmQueue(): def __init__(self, incoming, outgoing): self.incoming = context.socket(zmq.PULL) self.incoming.connect(incoming) self.outgoing = context.socket(zmq.PUSH) self.outgoing.connect(outgoing) def get(self): print("Waiti...
williamvitorino3/pox-mesh
refs/heads/angler
pox/lib/packet/packet_utils.py
8
# Copyright 2011 James McCauley # Copyright 2008 (C) Nicira, Inc. # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
simontakite/sysadmin
refs/heads/master
pythonscripts/programmingpython/Internet/Ftp/Mirror/uploadflat_modular.py
2
#!/usr/bin/env python """ ############################################################################## use FTP to upload all files from a local dir to a remote site/directory; this version reuses downloader's functions, to avoid code redundancy; ###################################################################...
samkennerly/YahooStocks
refs/heads/master
yahoo_stocks.py
1
#!/usr/bin/env python """ Import historical stock/index/ETF data into pandas from Yahoo! Finance. Gets these variables: ['Open','High','Low','Close','Volume','Adj Close']. Also calculates ['Dividend','ShareMultiplier','TotalValue']. 'ShareMultiplier' is "How many shares would I have if I bought 1 share on start_date?...
strk/mapnik
refs/heads/master
scons/scons-local-2.2.0/SCons/Tool/masm.py
14
"""SCons.Tool.masm Tool-specific initialization for the Microsoft Assembler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011...
jbedorf/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/conditional_distribution_test.py
135
# 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...
ClearCorp-dev/odoo
refs/heads/8.0
addons/account/report/account_print_overdue.py
380
# -*- 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...
2014cdbg4/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_markupbase.py
891
"""Shared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the html.parser module. It has no documented public API and should not be used directly. """ import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match _declstringlit_match = re.com...
aruizramon/alec_erpnext
refs/heads/master
erpnext/patches/v6_4/fix_sales_order_maintenance_status.py
68
import frappe def execute(): for doc in frappe.get_all("Sales Order", filters={"docstatus": 1, "order_type": "Maintenance"}): doc = frappe.get_doc("Sales Order", doc.name) doc.set_status(update=True)
salguarnieri/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/models/sql/compiler.py
71
from django.core.exceptions import FieldError from django.db import connections from django.db.backends.util import truncate_name from django.db.models.sql.constants import * from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sq...
joedoublej/reach
refs/heads/master
reachapp/events.py
1
from __future__ import unicode_literals import logging from reachapp.models import ClickEvent, OpenEvent, UnsubEvent logger = logging.getLogger('default') def handle_click(event): ts = event.get('ts') url = event.get('url') ip_address = event.get('ip') message = event.get('msg', {'email': None}) ...
Kilhog/odoo
refs/heads/8.0
openerp/tools/config.py
178
#openerp.loggers.handlers. -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program...
GdZ/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_1_3/tests/regressiontests/null_queries/tests.py
51
from django.test import TestCase from django.core.exceptions import FieldError from regressiontests.null_queries.models import * class NullQueriesTests(TestCase): def test_none_as_null(self): """ Regression test for the use of None as a query value. None is interpreted as an SQL NULL, b...
abhi11/dak
refs/heads/master
daklib/regexes.py
1
#!/usr/bin/env python # vim:set et sw=4: """ Central repository of regexes for dak @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2001, 2002, 2003, 2004, 2005, 2006 James Troup <james@nocrew.org> @copyright: 2009 Mark Hymers <mhy@debian.org> @copyright: 2009, 2010 Joerg Jaspert <joerg@debian.org> @...
anubhavshrimal/Data_Structures_Algorithms_In_Python
refs/heads/master
String_or_Array/Shifted_Array_Search.py
1
"""If the sorted array arr is shifted left by an unknown offset and you don't have a pre-shifted copy of it, how would you modify your method to find a number in the shifted array?""" def binarySearch(arr, num, begin, end): while begin <= end: mid = round((begin+end)/2) if arr[mid] < num: ...
dreamsxin/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/lib2to3/fixes/fix_numliterals.py
203
"""Fixer that turns 1L into 1, 0755 into 0o755. """ # Copyright 2007 Georg Brandl. # Licensed to PSF under a Contributor Agreement. # Local imports from ..pgen2 import token from .. import fixer_base from ..fixer_util import Number class FixNumliterals(fixer_base.BaseFix): # This is so simple that we don't need ...
emonty/deb-vhd-util
refs/heads/master
tools/xm-test/tests/create/01_create_basic_pos.py
42
#!/usr/bin/python # Copyright (C) International Business Machines Corp., 2005 # Author: Dan Smith <danms@us.ibm.com> import sys import re import time from XmTestLib import * # Create a domain (default XmTestDomain, with our ramdisk) domain = XmTestDomain() if int(getInfo("free_memory")) < domain.config.getOpt("mem...
Daniel-CA/odoo
refs/heads/8.0
addons/account/wizard/account_change_currency.py
385
# -*- encoding: 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 G...
Yen-Chung-En/2015cdb_W12
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_runner.py
785
import io import os import sys import pickle import subprocess import unittest from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun class TestCleanUp(unittest.TestCase): def testCleanUp(self): class TestableTest(unittest.TestCase): def testNothing(self): p...
greeshmab/SAIL-DatabaseProject
refs/heads/master
Alumni/languages/plural-en.py
146
#!/usr/bin/env python { # "singular form (0)": ["first plural form (1)", "second plural form (2)", ...], 'account': ['accounts'], 'book': ['books'], 'is': ['are'], 'man': ['men'], 'miss': ['misses'], 'person': ['people'], 'quark': ['quarks'], 'shop': ['shops'], 'this': ['these'], 'was': ['were'], 'woman': ['women'], }
vismartltd/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/split_test_module.py
21
""" Module for running content split tests """ import logging import json from webob import Response from uuid import uuid4 from operator import itemgetter from xmodule.progress import Progress from xmodule.seq_module import SequenceDescriptor from xmodule.studio_editable import StudioEditableModule, StudioEditableDe...
pbrady/sympy
refs/heads/master
sympy/polys/domains/old_polynomialring.py
68
"""Implementation of :class:`PolynomialRing` class. """ from __future__ import print_function, division from sympy.polys.domains.ring import Ring from sympy.polys.domains.compositedomain import CompositeDomain from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.old_fractionf...
numerigraphe/odoo
refs/heads/8.0
addons/hr_applicant_document/__init__.py
389
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
lzweopard/carve
refs/heads/master
external/gtest-1.5.0/test/gtest_list_tests_unittest.py
1068
#!/usr/bin/env python # # Copyright 2006, 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...
anshumanchatterji/selenium
refs/heads/master
py/selenium/webdriver/remote/webelement.py
9
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
yeastgenome/SGDFrontend
refs/heads/master
src/sgd/frontend/frontend_interface.py
1
''' Created on Oct 11, 2013 @author: kpaskov ''' from abc import abstractmethod, ABCMeta class FrontendInterface(metaclass=ABCMeta): @abstractmethod def get_renderer(self, method_name): return None #Response @abstractmethod def response_wrapper(self, method_name, request): ret...
zackster/HipHopGoblin
refs/heads/master
lib/python2.6/django/contrib/comments/moderation.py
23
""" A generic comment-moderation system which allows configuration of moderation options on a per-model basis. To use, do two things: 1. Create or import a subclass of ``CommentModerator`` defining the options you want. 2. Import ``moderator`` from this module and register one or more models, passing the model...
damirda/ansible-modules-core
refs/heads/devel
cloud/openstack/os_floating_ip.py
22
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Author: Davide Guerri <davide.guerri@hp.com> # # This module 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 ...
nfedera/rg3-youtube-dl
refs/heads/master
youtube_dl/extractor/primesharetv.py
73
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, sanitized_Request, urlencode_postdata, ) class PrimeShareTVIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?primeshare\.tv/download/(?P<id>[\da-zA-Z]+)' _TEST = { 'url': 'h...
piroux/continuous-docs
refs/heads/master
docpkg/__init__.py
4
"""This is the base package for ``docpkg``. It really only contains the base exception for the package. """ class DocpkgError(Exception): """The base error for the package. All custom exceptions raised will derive from this exception. """ pass # vim:et:fdm=marker:sts=4:sw=4:ts=4
bealdav/OCB
refs/heads/patch-1
addons/web/tests/test_serving_base.py
329
# -*- coding: utf-8 -*- import random import unittest2 from openerp.tools import topological_sort def sample(population): return random.sample( population, random.randint(0, min(len(population), 5))) class TestModulesLoading(unittest2.TestCase): def setUp(self): self.mods = map(s...
sigma-random/ARMSCGen
refs/heads/master
shellcodes/arm/exit.py
3
# exit(n) def generate(n=0): sc = "\n" if n != 0: sc += "movw r0, #%s" % int(n) else: sc += "sub r0, r0, r0" sc += """ mov r7, #1 svc 0 """ return sc if __name__ == '__main__': print generate()
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/stunted_huf_dun.py
85615
import sys def setup(core, object): return
SL-prog/MountainDomination
refs/heads/master
main.py
1
#------------------------------------------------------------------------------- # Name: Mountain Domination # # Author: sl-prog et regisseur # # Licence: <GNU GENERAL PUBLIC LICENSE> #------------------------------------------------------------------------------- mountaindomination = True while mountai...
SerCeMan/intellij-community
refs/heads/master
python/lib/Lib/tarfile.py
80
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustäbel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, fre...
marwoodandrew/superdesk-aap
refs/heads/master
server/aap/macros/length_miles_to_metric_test.py
2
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import unitt...
dwightgunning/django
refs/heads/master
tests/gis_tests/geoadmin/admin.py
547
from django.contrib.gis import admin class UnmodifiableAdmin(admin.OSMGeoAdmin): modifiable = False
tomchristie/django
refs/heads/master
tests/get_or_create/models.py
32
from django.db import models class Person(models.Model): first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) birthday = models.DateField() defaults = models.TextField() def __str__(self): return '%s %s' % (self.first_name, self.last_name) class Def...
google/dpy
refs/heads/master
example_test.py
1
#!/usr/bin/python """Tests for example module.""" import example from jazz import jazz class HelloTest(jazz.Describe): def before_each(self): example.ioc.SetTestMode() def it_should_hello(self): msg = example.hello( greet='Greeting', app_name='Hello Method', user='Test User') jazz.expect(msg...
Warmachine28/oneplus_8974
refs/heads/cm-13.0
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
TomHeatwole/osf.io
refs/heads/develop
website/addons/s3/tests/test_model.py
11
from nose.tools import * # noqa import mock from boto.s3.connection import * # noqa from tests.base import OsfTestCase, get_default_metaschema from tests.factories import ProjectFactory from framework.auth import Auth from website.addons.base.testing import models from website.addons.s3.model import S3NodeSettings ...
waseem18/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/test/reflect_helper_IE.py
120
# Helper for a test_reflect test import idonotexist
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/layout/shape/_templateitemname.py
1
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.shape", **kwargs ): super(TemplateitemnameValidator, self).__init__( plotly_name=plotly_name, ...
DrOctogon/Satchmo
refs/heads/master
satchmo/apps/payment/modules/payflowpro/models.py
8
import config PAYMENT_PROCESSOR = True
spacy-io/spaCy
refs/heads/master
spacy/tests/lang/fi/test_tokenizer.py
1
import pytest ABBREVIATION_TESTS = [ ( "Hyvää uutta vuotta t. siht. Niemelä!", ["Hyvää", "uutta", "vuotta", "t.", "siht.", "Niemelä", "!"], ), ("Paino on n. 2.2 kg", ["Paino", "on", "n.", "2.2", "kg"]), ( "Vuonna 1 eaa. tapahtui kauheita.", ["Vuonna", "1", "eaa.", "tapa...
FrozenPigs/Taigabot
refs/heads/master
plugins/soundcloud.py
3
from util import hook, http, web, text from urllib import urlencode import re sc_re = (r'(.*:)//(www.)?(soundcloud.com)(.*)', re.I) api_url = "http://api.soundcloud.com" sndsc_re = (r'(.*:)//(www.)?(snd.sc)(.*)', re.I) def soundcloud(url, api_key): data = http.get_json(api_url + '/resolve.json?' + urlencode({'ur...
nukui-s/tfautoencoder
refs/heads/master
tfautoencoder/__init__.py
1
#!/usr/bin/env python from .autoencoder import TFAutoEncoder from .stackedautoencoder import TFStackedAutoEncoder __all__ = ['TFAutoEncoder', 'TFStackedAutoEncoder']
lberruti/ansible
refs/heads/maint1.99
lib/ansible/runner/lookup_plugins/etcd.py
8
# (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
duyet-website/api.duyet.net
refs/heads/master
lib/boto/glacier/layer1.py
32
# -*- coding: utf-8 -*- # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 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 ...
Distrotech/scons
refs/heads/distrotech-scons
build/scons/build/lib/SCons/Tool/ar.py
2
"""SCons.Tool.ar Tool-specific initialization for ar (library archive). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 201...
nagyistoce/odoo-dev-odoo
refs/heads/8.0
addons/crm/validate_email.py
462
# RFC 2822 - style email validation for Python # (c) 2012 Syrus Akbary <me@syrusakbary.com> # Extended from (c) 2011 Noel Bush <noel@aitools.org> # for support of mx and user check # This code is made available to you under the GNU LGPL v3. # # This module provides a single method, valid_email_address(), # which return...
h3biomed/luigi
refs/heads/master
test/contrib/bigquery_gcloud_test.py
8
# -*- coding: utf-8 -*- # # Copyright 2015 Twitter 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 ...
3nids/QGIS
refs/heads/master
tests/src/python/test_provider_db2.py
45
# -*- coding: utf-8 -*- """QGIS Unit tests for the DB2 provider. .. 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 version. """ ...
TangXT/edx-platform
refs/heads/master
common/djangoapps/external_auth/tests/test_shib.py
5
# -*- coding: utf-8 -*- """ Tests for Shibboleth Authentication @jbau """ import unittest from mock import patch from django.conf import settings from django.http import HttpResponseRedirect from django.test import TestCase from django.test.client import RequestFactory, Client as DjangoTestClient from django.test.util...
agry/NGECore2
refs/heads/master
scripts/object/static/structure/tatooine/wall_ruined_tatooine_large_style_01.py
85615
import sys def setup(core, object): return
jagguli/intellij-community
refs/heads/master
python/helpers/pydev/pydevd_attach_to_process/winappdbg/win32/user32.py
102
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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...
ehashman/oh-mainline
refs/heads/master
mysite/search/migrations/0063_fill_display_name.py
17
# encoding: 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): "If the display_name field in any Project is empty, copy in the name field." for project in orm.Project.objects.all(): ...
seanballais/botos
refs/heads/master
core/migrations/0014_auto_20200615_0517.py
1
# Generated by Django 2.2.13 on 2020-06-15 05:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0013_candidateposition_target_batches'), ] operations = [ migrations.AddField( model_name='voterprofile', n...
chamikaramj/incubator-beam
refs/heads/master
sdks/python/apache_beam/typehints/trivial_inference_test.py
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 "License"); you may not us...
jjenki11/blaze-chem-rendering
refs/heads/master
build_utils/scons-2.3.0/engine/SCons/cpp.py
11
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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, incl...
aglitke/mom
refs/heads/master
mom/Policy/spark.py
1
# Copyright (c) 1998-2000 John Aycock # # 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, modify, merge, publ...
Eric89GXL/data
refs/heads/master
setup.py
2
""" XXX """ from setuptools import setup, find_packages setup( name='scitran.data', version='0.0.1', packages=find_packages(), package_data={ 'scitran': ['data/*.json'], }, namespace_packages=['scitran'], )
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source/Lib/idlelib/idle_test/test_searchengine.py
7
'''Test functions and SearchEngine class in idlelib.searchengine.py.''' # With mock replacements, the module does not use any gui widgets. # The use of tk.Text is avoided (for now, until mock Text is improved) # by patching instances with an index function returning what is needed. # This works because mock Text.get d...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/SQLAlchemy-1.0.6/lib/sqlalchemy/inspection.py
81
# sqlalchemy/inspect.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 """The inspection module provides the :func:`.inspect` function, which deliver...
kronicz/ecommerce-2
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/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...
murfz/Sick-Beard
refs/heads/development
sickbeard/clients/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...