repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Bemujo/https-github.com-numenta-nupic
refs/heads/master
bindings/py/nupic/proto/__init__.py
32
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, 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...
ashlibaldwin/coding-for-managers
refs/heads/master
projects/html_to_markdown.py
2
#!/usr/bin/env python # pip install html2text if you don't have it import html2text import sys, os # set up the HTML to markdown converter converter = html2text.HTML2Text() converter.ignore_links = False # make a directory to put the converted markdown into generated_directory = 'generated' if not os.path.exists(gen...
hoomanlogic/hoomancmd
refs/heads/master
setup.py
1
from distutils.core import setup VERSION = '0.1.0' desc = """Command-line interface extends python's cmd.Cmd utiling the hoomanlogic text-based human language input framework.""" setup(name='hoomancmd', version=VERSION, author='Geoffrey Floyd', author_email='geoffrey.floyd@hoomanlogic.com'...
nvoron23/socialite
refs/heads/master
jython/Lib/email/_parseaddr.py
92
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time SPACE = ' ' EMPTYSTRING = ''...
poiesisconsulting/openerp-restaurant
refs/heads/master
base_import_module/controllers/main.py
13
# -*- coding: utf-8 -*- import functools import os import zipfile from os.path import join as opj import openerp from openerp.http import Controller, route, request, Response MAX_FILE_SIZE = 100 * 1024 * 1024 # in megabytes def webservice(f): @functools.wraps(f) def wrap(*args, **kw): try: ...
thejordan95/Groovebot2
refs/heads/master
plugins/util/execute.py
6
import http, web def eval_py(code, paste_multiline=True): attempts = 0 while True: try: output = http.get("http://eval.appspot.com/eval", statement=code).rstrip('\n') # sometimes the API returns a blank string on first attempt, lets try again # and make sure it is ...
hmgaudecker/econ-project-templates
refs/heads/master
{{cookiecutter.project_slug}}/waf.py
4
#!/usr/bin/env python # Thomas Nagy, 2005-2016 """ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following discla...
paulthulstrup/moose
refs/heads/master
python/TestHarness/util.py
1
import platform, os, re import subprocess from mooseutils import colorText TERM_COLS = 110 LIBMESH_OPTIONS = { 'mesh_mode' : { 're_option' : r'#define\s+LIBMESH_ENABLE_PARMESH\s+(\d+)', 'default' : 'REPLICATED', 'options' : { 'DISTRIBUTED...
dtysky/Gal2Renpy
refs/heads/master
Gal2Renpy/SpSyntax/DateSp.py
1
#coding:utf-8 ################################# #Copyright(c) 2014 dtysky ################################# import G2R class DateSp(G2R.SpSyntax): def Show(self,Flag,Attrs,US,UT,Tmp,FS): sw='' name,Attrs=self.Check(Flag,Attrs,UT,FS) if Flag not in Tmp.Args: Tmp.Args[Flag]={'Auto':'Off'} if name=='Auto': ...
maniteja123/sympy
refs/heads/master
sympy/physics/mechanics/tests/test_kane.py
48
import warnings from sympy import (cos, expand, Matrix, sin, symbols, tan, sqrt, S, simplify, zeros) from sympy.utilities.exceptions import SymPyDeprecationWarning from sympy.physics.mechanics import (dynamicsymbols, ReferenceFrame, Point, RigidBody, KanesMethod,...
NvanAdrichem/networkx
refs/heads/master
examples/drawing/giant_component.py
15
#!/usr/bin/env python """ This example illustrates the sudden appearance of a giant connected component in a binomial random graph. Requires pygraphviz and matplotlib to draw. """ # Copyright (C) 2006-2016 # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov>...
masatake/ctags
refs/heads/master
Units/parser-python.r/test.py.d/input.py
96
#!/usr/bin/env python def main(): return 0 if __name__ == '__main__': main() var = 'hi' var2 = 'hi' # blah = blah
kjc88/sl4a
refs/heads/master
python/gdata/tests/gdata_tests/health/service_test.py
127
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
josephsuh/extra-specs
refs/heads/master
nova/api/openstack/compute/views/images.py
2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack LLC. # 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...
ljgabc/lfs
refs/heads/master
usr/lib/python2.7/ctypes/__init__.py
117
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### """create and manipulate C data types in Python""" import os as _os, sys as _sys __version__ = "1.1.0" f...
CtopCsUtahEdu/chill-dev
refs/heads/master
examples/chill/testcases/bug1.script.py
2
# # example from CHiLL manual page 13 # # peel 4 statements from the END of innermost loop # from chill import * source('bug1.c') destination('bug1modified.c') procedure('mm') loop(0) known('ambn > 4') # this fails ???
jquacinella/IS602_Project
refs/heads/master
web/gluon/contrib/markmin/markmin2html.py
5
#!/usr/bin/env python # -*- coding: utf-8 -*- # created by Massimo Di Pierro # recreated by Vladyslav Kozlovskyy # license MIT/BSD/GPL import re import urllib from cgi import escape from string import maketrans try: from ast import parse as ast_parse import ast except ImportError: # python 2.5 from compiler i...
switchboardOp/ansible
refs/heads/devel
lib/ansible/modules/windows/win_package.py
22
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Trond Hindenes <trond@hindenes.com>, and others # # 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 versio...
nave91/dbt
refs/heads/development
test/integration/005_simple_seed_test/test_simple_seed.py
1
from nose.plugins.attrib import attr from test.integration.base import DBTIntegrationTest class TestSimpleSeed(DBTIntegrationTest): def setUp(self): DBTIntegrationTest.setUp(self) self.run_sql_file("test/integration/005_simple_seed_test/seed.sql") @property def schema(self): retu...
phb/squeakfs
refs/heads/master
defstat.py
1
import fuse import os import stat """ Contains stat entries for use with squeakfs. """ class DefaultStat(fuse.Stat): """ A stat class with all values set to 0. - st_mode (protection bits) - st_ino (inode number) - st_dev (device) - st_nlink (number of hard links) - st_uid (user ID of owne...
ferabra/edx-platform
refs/heads/master
lms/djangoapps/certificates/management/commands/ungenerated_certs.py
73
""" Management command to find all students that need certificates for courses that have finished, and put their cert requests on the queue. """ import logging import datetime from pytz import UTC from django.core.management.base import BaseCommand, CommandError from certificates.models import certificate_status_for_st...
kevinmel2000/brython
refs/heads/master
www/src/Lib/encodings/iso8859_3.py
37
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,i...
shipyard/docker-registry
refs/heads/master
test/gcs.py
9
import test_storage import storage class TestGSStorage(test_storage.TestLocalStorage): def setUp(self): self._storage = storage.load('gcs')
liangxia/origin
refs/heads/master
vendor/github.com/prometheus/client_model/python/prometheus/client/model/metrics_pb2.py
250
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: metrics.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _m...
theQRL/QRL
refs/heads/master
src/qrl/__init__.py
4
# -*- coding: utf-8 -*- __all__ = ['core', 'crypto'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions
amgill3/VaderPi
refs/heads/master
scripts/idv.py
1
#!/usr/bin/env python # Import Modules for Runtime import os from os import listdir from os.path import isfile, join import glob import glob2 import time import socket import ssl import json from time import sleep import RPi.GPIO as GPIO import bluetooth from bluetooth import * from thread import * import subprocess i...
ryano144/intellij-community
refs/heads/master
python/testData/console/indent2.py
163
for x in range(1, 10): print x print 1 print 2
mlufei/depot_tools
refs/heads/master
third_party/gsutil/gslib/commands/setdefacl.py
51
# Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
The-Demon12/msm8916
refs/heads/main
scripts/build-all.py
704
#! /usr/bin/env python # Copyright (c) 2009-2014, The Linux Foundation. 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 # ...
kevinconway/confpy
refs/heads/master
confpy/parser.py
1
"""Configuration file parser API.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse import os import sys from . import exc from .loaders import ini from .loaders import json from .loaders import pyfi...
pevzi/django-debug-toolbar
refs/heads/master
debug_toolbar/panels/sql/forms.py
7
from __future__ import absolute_import, unicode_literals import hashlib import hmac import json from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.db import connections from django.utils.crypto import constant_time_compare from django.utils.encodin...
Y3K/django
refs/heads/master
tests/migrations/migrations_test_apps/conflicting_app_with_dependencies/migrations/0001_initial.py
241
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name", ...
JacerOmri/PokemonGo-Bot-Desktop
refs/heads/development
pywin/Lib/encodings/euc_jis_2004.py
816
# # euc_jis_2004.py: Python Unicode Codec for EUC_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(m...
andresriancho/PyGithub
refs/heads/master
github/tests/CommitComment.py
2
# -*- coding: utf-8 -*- # Copyright 2012 Vincent Jacques # vincent@vincent-jacques.net # This file is part of PyGithub. http://vincent-jacques.net/PyGithub # PyGithub 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 Softwar...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
chrome/browser/ui/ash/PRESUBMIT.py
126
# 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 ash. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built into...
loco-odoo/localizacion_co
refs/heads/master
openerp/addons/payment_buckaroo/tests/test_buckaroo.py
321
# -*- coding: utf-8 -*- from lxml import objectify import urlparse import openerp from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_buckaroo.controllers.main import BuckarooController from opener...
cfossace/test
refs/heads/master
crits/emails/handlers.py
4
from __future__ import absolute_import import datetime import email as eml from email.parser import Parser from email.utils import parseaddr, getaddresses, mktime_tz, parsedate_tz import hashlib import json import magic import re import yaml import io import sys import olefile from dateutil.parser import parse as dat...
commial/miasm
refs/heads/master
miasm/arch/msp430/arch.py
3
#-*- coding:utf-8 -*- from builtins import range import logging from pyparsing import * from miasm.expression.expression import * from miasm.core.cpu import * from collections import defaultdict from miasm.core.bin_stream import bin_stream import miasm.arch.msp430.regs as regs_module from miasm.arch.msp430.regs impor...
gregkorte/Python-Koans
refs/heads/master
python2/koans/about_comprehension.py
15
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutComprehension(Koan): def test_creating_lists_with_list_comprehensions(self): feast = ['lambs', 'sloths', 'orangutans', 'breakfast cereals', 'fruit bats'] comprehension = [delicacy.capitalize() for de...
ChainsAutomation/chains
refs/heads/master
setup.py
2
from distutils.core import setup import glob import sys import os # thanks to python distutils cookbook. def is_package(path): #print("Looking for: %s" % os.path.isfile(os.path.join(path, '__init__.py'))) return ( os.path.isdir(path) and os.path.isfile(os.path.join(path, '__init__.py')) ...
ryanolson/cookiecutter-webapp
refs/heads/develop
{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/frontend/assets.py
2
# -*- coding: utf-8 -*- """ {{ cookiecutter.app_name }}.frontend.assets {{ "~" * (cookiecutter.app_name ~ ".frontend.assets")|count }} :author: {{ cookiecutter.author }} :copyright: © {{ cookiecutter.copyright }} :license: {{ cookiecutter.license }}, see LICENSE for more details. templated fro...
debugger06/MiroX
refs/heads/master
tv/lib/test/testhttpserver.py
2
"""testhttpserver.py -- Testing HTTP Server The code here is based off of the standard SimpleHTTPServer code. """ import BaseHTTPServer import hashlib import cgi import os import posixpath import urllib import socket import threading from miro.plat import utils from miro.plat import resources def md5(d): retur...
HesselTjeerdsma/Cyber-Physical-Pacman-Game
refs/heads/master
test programs/test/test/lib/python2.7/site-packages/pip/utils/__init__.py
15
from __future__ import absolute_import from collections import deque import contextlib import errno import io import locale # we have a submodule named 'logging' which would shadow this if we used the # regular name: import logging as std_logging import re import os import posixpath import shutil import stat import su...
maks-us/cabot
refs/heads/master
cabot/entrypoint.py
2
import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cabot.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
asdofindia/kitsune
refs/heads/master
kitsune/customercare/models.py
21
import json import time from datetime import datetime from django.contrib.auth.models import User from django.db import models from kitsune.search.models import ( SearchMappingType, SearchMixin, register_for_indexing, register_mapping_type) from kitsune.sumo.models import ModelBase from kitsune.users.models i...
JamesLinEngineer/RKMC
refs/heads/Jarvis
addons/plugin.video.salts/scrapers/moviehut_scraper.py
1
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
fake-name/ReadableWebProxy
refs/heads/master
WebMirror/management/rss_parser_funcs/feed_parse_extractIdidmybesttranslationsWordpressCom.py
1
def extractIdidmybesttranslationsWordpressCom(item): ''' Parser for 'ididmybesttranslations.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', ...
Ms2ger/servo
refs/heads/master
tests/wpt/css-tests/tools/pytest/testing/test_tmpdir.py
173
import sys import py import pytest from _pytest.tmpdir import tmpdir def test_funcarg(testdir): testdir.makepyfile(""" def pytest_generate_tests(metafunc): metafunc.addcall(id='a') metafunc.addcall(id='b') def test_func(tmpdir): pass """) from _pytes...
zenodo/invenio
refs/heads/zenodo-master
invenio/legacy/websubmit/functions/Notify_URL.py
13
# This file is part of Invenio. # Copyright (C) 2012 CERN. # # Invenio 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. # # Invenio is d...
jcrist1/iterated_bdry_solver
refs/heads/master
src/code.py
1
from fenics import * # Test for PETSc # Create mesh and define function space def inorout(V,boundaries,bvals,ibdry,obdry,key): if not has_linear_algebra_backend("PETSc"): info("DOLFIN has not been configured with TPETSc. Exiting.") exit() parameters["linear_algebra_backend"] = "PETSc" #key tells us whe...
evalsocket/tensorflow
refs/heads/master
object_detection/object_detection/core/region_similarity_calculator_test.py
23
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
xuru/pyvisdk
refs/heads/master
pyvisdk/do/vim_esx_cl_inetworkvswitchstandardpolicyshapingget_virtual_switch_traffic_shaping_policy.py
1
import logging from pyvisdk.exceptions import InvalidArgumentError # This module is NOT auto-generated # Inspired by decompiled Java classes from vCenter's internalvim25stubs.jar # Unless states otherside, the methods and attributes were not used by esxcli, # and thus not tested log = logging.getLogger(__name__) de...
Explosion-y6/android_kernel_huawei_msm8909
refs/heads/Explosion
tools/perf/python/twatch.py
7370
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
srimai/odoo
refs/heads/8.0
addons/account_analytic_plans/wizard/account_crossovered_analytic.py
341
# -*- 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...
digital-abyss/ansible-modules-core
refs/heads/devel
cloud/rackspace/rax_meta.py
157
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
rsvip/Django
refs/heads/master
tests/fixtures/models.py
128
""" Fixtures. Fixtures are a way of loading data into the database in bulk. Fixure data can be stored in any serializable format (including JSON and XML). Fixtures are identified by name, and are stored in either a directory named 'fixtures' in the application directory, or in one of the directories named in the ``FIX...
mgk/vault
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...
quarckster/cfme_tests
refs/heads/master
cfme/tests/cloud/test_instance_power_control.py
1
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme import test_requirements from cfme.base.login import BaseLoggedInPage from cfme.cloud.instance import Instance from cfme.cloud.provider import CloudProvider from cfme.cloud.provider.azure import AzureProvider from cfme.cloud.provider.openstack import O...
jgoclawski/django
refs/heads/master
tests/migrations/test_migrations_squashed_erroneous/6_auto.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "5_auto")] operations = [ migrations.RunPython(migrations.RunPython.noop) ]
AllenDowney/ThinkStats2
refs/heads/master
solutions/relay_normal.py
4
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ """This program generates a normal probability plot for the distribution of running speeds in a road race. The results sugg...
cyli/volatility
refs/heads/master
volatility/plugins/pooltracker.py
1
# Volatility # Copyright (C) Michael Ligh <michael.ligh@mnin.org> # # 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. # # ...
Maximilian-Reuter/SickRage
refs/heads/master
lib/enzyme/parsers/__init__.py
14224
# -*- coding: utf-8 -*-
tsdmgz/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_eip.py
18
#!/usr/bin/python # 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_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterf...
deltreey/ansible
refs/heads/devel
lib/ansible/plugins/action/unarchive.py
36
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # # 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 v...
rahul-c1/scikit-learn
refs/heads/master
sklearn/datasets/svmlight_format.py
6
"""This module implements a loader and dumper for the svmlight format This format is a text-based format, with one sample per line. It does not store zero valued features hence is suitable for sparse dataset. The first element of each line can be used to store a target variable to predict. This format is used as the...
bing-ads-sdk/BingAds-Python-SDK
refs/heads/master
examples/v12/invite_user.py
1
from datetime import datetime, timedelta from auth_helper import * from customermanagement_example_helper import * # You must provide credentials in auth_helper.py. # Specify the email address where the invitation should be sent. # The recipient can accept the invitation and sign up # with credentials that differ ...
WesternStar/tilinux
refs/heads/master
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
dwillcox/gauss-jordan-solver
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup(name='gauss-jordan-solver', version='1.2.0', description='Python code generator for a sparse gauss jordan linear solver', url='https://github.com/dwillcox/gauss-jordan-solver', author='Donald Willcox', author_email='eugene.willcox@gmail.co...
shanemcd/ansible
refs/heads/devel
lib/ansible/modules/cloud/smartos/imgadm.py
5
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, 2017 Jasper Lievisse Adriaanse <j@jasper.la> # 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'...
chubbymaggie/angr
refs/heads/master
angr/procedures/stubs/UserHook.py
5
import angr class UserHook(angr.SimProcedure): NO_RET = True # pylint: disable=arguments-differ def run(self, user_func=None, length=None): result = user_func(self.state) if result is None: self.successors.add_successor(self.state, self.state.addr+length, self.state.se.true, 'I...
DailyActie/Surrogate-Model
refs/heads/master
01-codes/numpy-master/numpy/doc/glossary.py
40
""" ======== Glossary ======== .. glossary:: along an axis Axes are defined for arrays with more than one dimension. A 2-dimensional array has two corresponding axes: the first running vertically downwards across rows (axis 0), and the second running horizontally across columns (axis 1...
tjsavage/full_nonrel_starter
refs/heads/master
django/templatetags/cache.py
309
from django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist from django.template import resolve_variable from django.core.cache import cache from django.utils.encoding import force_unicode from django.utils.http import urlquote from django.utils.hashcompat import md5_constructor regi...
snowball-one/django-oscar-support
refs/heads/master
oscar_support/api/urls.py
1
from django.conf import settings from django.conf.urls import url, patterns, include from rest_framework import routers from . import views router = routers.DefaultRouter() router.register(r'customers', views.CustomerViewSet, base_name="customer") router.register(r'agents', views.AgentViewSet, base_name="agent") ro...
bigdatauniversity/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/course_info/urls.py
147
""" URLs for course_info API """ from django.conf.urls import patterns, url from django.conf import settings from .views import CourseUpdatesList, CourseHandoutsList urlpatterns = patterns( 'mobile_api.course_info.views', url( r'^{}/handouts$'.format(settings.COURSE_ID_PATTERN), CourseHandouts...
s40523204/2016fallcp_hw
refs/heads/gh-pages
plugin/sitemap/sitemap.py
31
# -*- coding: utf-8 -*- ''' Sitemap ------- The sitemap plugin generates plain-text or XML sitemaps. ''' from __future__ import unicode_literals import re import collections import os.path from datetime import datetime from logging import warning, info from codecs import open from pytz import timez...
demon-ru/iml-crm
refs/heads/master
addons/base_import_module/controllers/main.py
354
# -*- coding: utf-8 -*- import functools import openerp from openerp.http import Controller, route, request, Response def webservice(f): @functools.wraps(f) def wrap(*args, **kw): try: return f(*args, **kw) except Exception, e: return Response(response=str(e), status=500...
jfarrell/thrift
refs/heads/master
test/py/RunClientServer.py
17
#!/usr/bin/env python # # 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 # "L...
swdream/neutron
refs/heads/master
neutron/tests/api/test_vpnaas_extensions.py
29
# Copyright 2013 OpenStack Foundation # 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 requ...
Kazade/NeHe-Website
refs/heads/master
django/contrib/gis/db/backends/oracle/models.py
310
""" The GeometryColumns and SpatialRefSys models for the Oracle spatial backend. It should be noted that Oracle Spatial does not have database tables named according to the OGC standard, so the closest analogs are used. For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns model and the `SDO_...
jamesfoley/cms
refs/heads/develop
cms/tests/test_views.py
3
from django.test import TestCase from django.views import generic from ..views import SearchMetaDetailMixin, TextTemplateView class TestViews(TestCase): def test_texttemplateview_render_to_response(self): view = TextTemplateView() view.request = {} view.template_name = 'templates/base.ht...
yoki/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py
126
# Copyright (C) 2010 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 of conditions and th...
kirca/OpenUpgrade
refs/heads/8.0
addons/website_membership/models/__init__.py
176
import product
weimingtom/python-for-android
refs/heads/master
python-build/python-libs/gdata/src/gdata/Crypto/Protocol/Chaffing.py
226
"""This file implements the chaffing algorithm. Winnowing and chaffing is a technique for enhancing privacy without requiring strong encryption. In short, the technique takes a set of authenticated message blocks (the wheat) and adds a number of chaff blocks which have randomly chosen data and MAC fields. This means...
userzimmermann/robotframework-python3
refs/heads/master
atest/testdata/output/listeners/logging_listener.py
30
import logging from robot.api import logger ROBOT_LISTENER_API_VERSION = 2 def get_logging_listener_method(name): def listener_method(*args): if name in ['message', 'log_message']: msg = args[0] message = '%s: %s %s' % (name, msg['level'], msg['message']) else: ...
sachinkum/Bal-Aveksha
refs/heads/master
WebServer/BalAvekshaEnv/lib/python3.5/site-packages/django/contrib/humanize/__init__.py
808
default_app_config = 'django.contrib.humanize.apps.HumanizeConfig'
mumuwoyou/vnpy-dev
refs/heads/master
vn.trader/dataRecorder/language/English/text.py
1
# encoding: UTF-8 DATA_RECORDER = u'Data Recorder' TICK_RECORD = u'Tick Record' BAR_RECORD = u'Bar Record' CONTRACT_SYMBOL = u'Contract Symbol' GATEWAY = u'Gateway' DOMINANT_CONTRACT = u'Dominant Contract' DOMINANT_SYMBOL = u'Dominant Symbol' TICK_LOGGING_MESSAGE = u'Record Tick Data {symbol}, Time:{time}, last:{l...
qiang437587687/pythonBrother
refs/heads/master
Borther/ReStartLearn/FlaskAndTodo__anotherproject/manager.py
1
from ReStartLearn.FlaskAndTodo.app import app from ReStartLearn.FlaskAndTodo.app.models import Todo from flask.ext.script import Manager manager = Manager(app) @manager.command def save(): todo = Todo(content='study flask') todo.save() save() # 这个是直接调用 视频中是 用的终端~ if __name__ == '__main__': manager.ru...
hackerspace/memberportal
refs/heads/master
payments/common.py
1
from datetime import date class YearInfo(object): def __init__(self, year, months_ok, months_na): self.year = year self.months = set(range(1, 13)) self.months_ok = set(months_ok) self.months_na = set(months_na) self.months_er = self.months - (self.months_ok | self.months_na)...
gorjuce/odoo
refs/heads/8.0
addons/payment_authorize/__openerp__.py
232
# -*- coding: utf-8 -*- { 'name': 'Authorize.Net Payment Acquirer', 'category': 'Hidden', 'summary': 'Payment Acquirer: Authorize.net Implementation', 'version': '1.0', 'description': """Authorize.Net Payment Acquirer""", 'author': 'Odoo SA', 'depends': ['payment'], 'data': [ 'v...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/xcb-demo/package.py
5
# 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 XcbDemo(AutotoolsPackage): """xcb-demo: A collection of demo programs that use the XCB lib...
ratilicus/sdtd
refs/heads/master
schemaforms.py
1
''' Simple Validation Form based on jsonschema by: Adam Dybczak (RaTilicus) Usage: class LoginForm(SchemaForm) schema={ 'type': 'object', 'properties': { 'username': {'type': 'string', 'minLength': 1}, 'password': {'type': 'string', 'minLength': 4}, }, 'requi...
Microvellum/Fluid-Designer
refs/heads/master
win64-vc/2.78/python/lib/test/test_xmlrpc_net.py
90
import collections.abc import errno import socket import sys import unittest from test import support import xmlrpc.client as xmlrpclib class PythonBuildersTest(unittest.TestCase): def test_python_builders(self): # Get the list of builders from the XMLRPC buildbot interface at # python.org. ...
sidzan/netforce
refs/heads/master
netforce_general/netforce_general/models/module.py
4
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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...
Aenyhm/pygame_framework
refs/heads/master
examples/open_vtmb/main.py
1
# -*- coding: utf-8 -*- from onox import Game from states import TITLE_STATE, GAME_STATE, QUIT_STATE if __name__ == '__main__': app = Game('Open VTMB', (800, 600)) app.add_state(TITLE_STATE) app.add_state(GAME_STATE) app.add_state(QUIT_STATE) app.enter_state(TITLE_STATE) app.start()
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/celery/local.py
2
# -*- coding: utf-8 -*- """Proxy/PromiseProxy implementation. This module contains critical utilities that needs to be loaded as soon as possible, and that shall not load any third party modules. Parts of this module is Copyright by Werkzeug Team. """ from __future__ import absolute_import, unicode_literals import op...
charukiewicz/beer-manager
refs/heads/master
venv/lib/python3.4/site-packages/pip/exceptions.py
398
"""Exceptions used throughout package""" class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class DistributionNotFound(InstallationError)...
charmoniumQ/EDGAR-research
refs/heads/master
edgar_code/util/picklable_threading.py
1
import threading from typing import Optional, Type, Dict, Any from types import TracebackType # No synchronization neeed take place between Python processes # Dask will try to pickle the CachedFunction, so this needs to be picklable class ThreadLocalData(threading.local): def __getstate__(self) -> Dict[str, Any]:...
ualikhansars/Gwent
refs/heads/master
lib/python2.7/site-packages/PIL/ImageTransform.py
21
# # The Python Imaging Library. # $Id$ # # transform wrappers # # History: # 2002-04-08 fl Created # # Copyright (c) 2002 by Secret Labs AB # Copyright (c) 2002 by Fredrik Lundh # # See the README file for information on usage and redistribution. # from PIL import Image class Transform(Image.ImageTransformHandler)...
akloster/porekit-python
refs/heads/master
porekit/plots.py
1
import numpy as np import matplotlib import matplotlib.pyplot as plt import porekit def read_length_distribution(meta, ax=None): """ Plot the distribution of the read length. "read length" is measured as the maximum of template vs complement length. """ if ax is None: f, ax = plt.subplots...
gnuhub/intellij-community
refs/heads/master
python/testData/copyPaste/multiLine/IndentInnerFunction1.src.py
166
<selection>def foo(self): x = 1 y = 2 </selection>