repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
fanscribed/django-react
refs/heads/fs
example/manage.py
12
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangosite.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/libaio/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) class Libaio(MakefilePackage): """Linux native Asynchronous I/O interface library. AIO enables even a single app...
jobiols/knowledge
refs/heads/8.0
document_rtf_index/tests/__init__.py
5
# -*- coding: utf-8 -*- # © 2016 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_rtf_index
yuruofeifei/mxnet
refs/heads/master
python/mxnet/gluon/model_zoo/vision/inception.py
10
# 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 u...
fran918/repuestos365
refs/heads/master
client/node_modules/node-gyp/gyp/gyp_main.py
1452
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys # Make sure we're using the version of pylib in this repo, not one installed # elsewhere on the system. sys.path.inser...
nhippenmeyer/django
refs/heads/master
tests/fixtures_regress/models.py
281
from __future__ import unicode_literals from django.contrib.auth.models import User from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Animal(models.Model): name = models.CharField(max_length=150) latin_na...
vrthra/pygram
refs/heads/master
libs/accesslog.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path class LogAnalyzer(): """ Parses and summarizes nginx logfiles """ def __init__(self, content, topcount=5): """ Initializing """ self.summary = { "requests": {}, "ips": {}, "useragents": {} ...
blacklin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/encodings/zlib_codec.py
202
"""Python 'zlib_codec' Codec - zlib compression encoding. This codec de/encodes from bytes to bytes. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import zlib # this codec needs the optional zlib module ! ### Codec APIs def zlib_encode(input, errors='strict'): assert errors == 'strict' ...
acsone/hr
refs/heads/8.0
hr_family/models/hr_employee_marital_status.py
1
# -*- coding: utf-8 -*- # © 2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models class HrEmployeeMaritalStatus(models.Model): _name = 'hr.employee.marital.status' _description = 'Marital status' name = fields.Char(req...
imageboards/Orphereus
refs/heads/master
Orphereus/model/Picture.py
1
################################################################################ # Copyright (C) 2009 Johan Liebert, Mantycore, Hedger, Rusanon # # < anoma.team@gmail.com ; http://orphereus.anoma.ch > # # ...
mlufei/depot_tools
refs/heads/master
third_party/boto/s3/__init__.py
59
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without res...
Gogistics/prjGogistics
refs/heads/master
prjGogistics/src/dispatchers/dispatchers_index.py
1
# -*- coding: utf-8 -*- ''' Created on May 21, 2014 @author: Alan Tai @Discription: The project is for developing the company web-site. The part is the view controller of dispatching url paths ''' __author__ = 'Alan Tai<gogistics@gogistics-tw.com>' import json import logging from handlers_general.handler_languages_...
FATruden/boto
refs/heads/master
boto/beanstalk/layer1.py
13
# 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 in the Software without...
Xarthisius/girder
refs/heads/master
girder/utility/_cache.py
4
import cherrypy from dogpile.cache import make_region, register_backend from dogpile.cache.backends.memory import MemoryBackend class CherrypyRequestBackend(MemoryBackend): """ A memory backed cache for individual CherryPy requests. This provides a cache backend for dogpile.cache which is designed to...
ondrokrc/gramps
refs/heads/master
gramps/gen/plug/menu/_note.py
2
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2008 Gary Burton # # 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 v...
aquatix/imagine-gallery
refs/heads/master
imaginegallery/imagine/managers.py
1
# encoding: utf-8 from django.db import models class CollectionManager(models.Manager): def public_collections(self): return self.exclude(is_public=False)
ProstoMaxim/incubator-airflow
refs/heads/master
airflow/contrib/operators/sqoop_operator.py
20
# -*- 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 ...
npiganeau/odoo
refs/heads/master
addons/sale/report/invoice_report.py
336
# -*- 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...
fsbr/se3-path-planner
refs/heads/master
modularPlanner/cuspAnalyze.py
2
#2 okay lets do this import sys sys.path.append('../.') import pandas as pd import numpy as np import itertools as it import path_planner as plan pathName = '../../data-se3-path-planner/cherylData/' pathName1 = '../../data-se3-path-planner/yearData/batch2019/' months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', ...
Sutto/cloud-custodian
refs/heads/master
tools/c7n_gcp/c7n_gcp/entry.py
1
# Copyright 2018 Capital One Services, LLC # # 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...
abhijo89/Django-facebook
refs/heads/master
docs/docs_env/Lib/encodings/mac_croatian.py
593
""" Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.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,inp...
sahana/Turkey
refs/heads/master
modules/templates/VM/controllers.py
15
# -*- coding: utf-8 -*- from gluon import * from s3 import S3CustomController THEME = "VM" # ============================================================================= class index(S3CustomController): """ Custom Home Page """ def __call__(self): output = {} # Allow editing of page conte...
CSC-ORG/Dynamic-Dashboard-2015
refs/heads/master
engine/lib/python2.7/site-packages/django/contrib/gis/gdal/tests/test_geom.py
94
import json from binascii import b2a_hex try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geometry.test_data import TestDataMixin from django.utils.six...
ktnyt/chainer
refs/heads/master
chainer/functions/array/split_axis.py
1
import numpy import six import chainer from chainer import backend from chainer.backends import intel64 from chainer import function_node from chainer.utils import collections_abc from chainer.utils import type_check import chainerx _numpy_split_ok = numpy.lib.NumpyVersion(numpy.__version__) >= '1.11.0' def _fix_n...
J4LP/eve-wspace
refs/heads/develop
evewspace/Map/admin_pages.py
23
from core.admin_page_registry import registry registry.register('Map Admin', 'map_admin.html', 'Map.map_admin')
kivatu/kivy_old
refs/heads/master
examples/widgets/scrollview.py
17
import kivy kivy.require('1.0.8') from kivy.app import App from kivy.uix.button import Button from kivy.uix.scrollview import ScrollView from kivy.uix.gridlayout import GridLayout class ScrollViewApp(App): def build(self): # create a default grid layout with custom width/height layout = GridLay...
klusark/android_external_chromium_org
refs/heads/cm-11.0
chrome/common/extensions/docs/server2/github_file_system_test.py
23
#!/usr/bin/env python # Copyright (c) 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 json import os import sys import unittest from appengine_blobstore import AppEngineBlobstore from appengine_url_fetcher imp...
CatsAndDogsbvba/odoo
refs/heads/8.0
addons/hw_proxy/__openerp__.py
313
# -*- 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...
daltonmaag/robofab
refs/heads/master
Docs/Examples/objects/RInfo_00.py
7
# robofab manual # Info object # usage examples from robofab.world import CurrentFont f = CurrentFont() print f.info.postscriptFullName print f.info.openTypeNameDesigner f.info.openTypeNameDesigner = "Jan van Krimpen" print f.info.openTypeNameDesigner print f.info.openTypeOS2VendorID print f.info.unitsPerEm print f....
mcepl/youtube-dl
refs/heads/master
youtube_dl/extractor/niconico.py
17
# encoding: utf-8 from __future__ import unicode_literals import re import json import datetime from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlencode, compat_urlparse, ) from ..utils import ( ExtractorError, int_or_none, parse_duration, parse_iso8601, sanit...
michalkurka/h2o-3
refs/heads/master
h2o-py/tests/testdir_sklearn/pyunit_sklearn_classification_search_pipeline.py
2
from __future__ import print_function import importlib, inspect, os, sys import numpy as np from sklearn.datasets import make_classification from sklearn.decomposition import TruncatedSVD from sklearn.metrics import accuracy_score, make_scorer from sklearn.model_selection import train_test_split, RandomizedSearchCV fr...
MichaelNedzelsky/intellij-community
refs/heads/master
python/helpers/pydev/tests_mainloop/gui-gtk.py
100
#!/usr/bin/env python """Simple GTK example to manually test event loop integration. To run this: 1) Enable the PyDev GUI event loop integration for gtk 2) do an execfile on this script 3) ensure you have a working GUI simultaneously with an interactive console """ if __name__ == '__main__': import pygtk p...
paplorinc/intellij-community
refs/heads/master
python/testData/quickFixes/PyAddImportQuickFixTest/osPathFunctions/main_after.py
27
from os.path import join join
EvanK/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_category.py
47
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ =...
kosermedve/pokeapi
refs/heads/master
pokemon/models.py
12
from __future__ import unicode_literals from django.db import models from imagekit.models.fields import ProcessedImageField from imagekit.processors import ResizeToFill from .utils import unique_filename class DateTimeModel(models.Model): class Meta: abstract = True modified = models.DateTimeField...
isabellaleehs/isabellaleehs.github.io
refs/heads/gh-pages
projects/webapp1/flask/lib/python2.7/site-packages/pip/_vendor/requests/cookies.py
355
# -*- coding: utf-8 -*- """ requests.cookies ~~~~~~~~~~~~~~~~ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import calendar import collections from .compat import cookielib, urlparse, urlunparse, Mo...
2014c2g3/0623exam
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/base_1.py
603
#!/usr/bin/env python ## https://bitbucket.org/pygame/pygame/raw/2383b8ab0e2273bc83c545ab9c18fee1f3459c64/pygame/base.py '''Pygame core routines Contains the core routines that are used by the rest of the pygame modules. Its routines are merged directly into the pygame namespace. This mainly includes the auto-initia...
KevinFuU/flasky
refs/heads/master
migrations/versions/190163627111_account_confirmation.py
144
"""account confirmation Revision ID: 190163627111 Revises: 456a945560f6 Create Date: 2013-12-29 02:58:45.577428 """ # revision identifiers, used by Alembic. revision = '190163627111' down_revision = '456a945560f6' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
ikaee/bfr-attendant
refs/heads/master
facerecognitionlibrary/jni-build/jni/include/tensorflow/contrib/distributions/__init__.py
2
# 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...
jkadlec/knot-dns-zoneapi
refs/heads/master
tests-extra/tests/basic/flags/test.py
2
#!/usr/bin/env python3 '''Test for header flags in response''' from dnstest.test import Test t = Test() knot = t.server("knot") bind = t.server("bind") zone = t.zone("flags.") # Disable ANY over UDP knot.disable_any = True t.link(zone, knot) t.link(zone, bind) t.start() # RD flag preservation. resp = knot.dig("...
HyperGroups/pelican
refs/heads/master
pelican/tests/test_importer.py
15
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import os import re import locale from codecs import open from pelican.tools.pelican_import import wp2fields, fields2pelican, decode_wp_content, build_header, build_markdown_header, get_attachments, download_attachments from pelican.tests...
blaskovic/systemd-rhel
refs/heads/master
src/python-systemd/journal.py
39
# -*- Mode: python; coding:utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. # # Copyright 2012 David Strauss <david@davidstrauss.net> # Copyright 2012 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> # Copyright 2012 Marti Raudsepp <marti@juffo.org> # # systemd is free software; you can redist...
talhaburak/Arduino
refs/heads/master
arduino-core/src/processing/app/i18n/python/requests/packages/charade/langhebrewmodel.py
168
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved...
BenSimner/speccer
refs/heads/master
tests/test_misc.py
1
from speccer.misc import * def with_return(g, r): yield from g return r def from_gen(g): xs = [] try: while True: xs.append(next(g)) except StopIteration as e: return xs, e.value def test_with_and_from(): assert from_gen(with_return(range(3), 2)) == ...
proversity-org/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/entrance_exam.py
12
""" Entrance Exams view module -- handles all requests related to entrance exam management via Studio Intended to be utilized as an AJAX callback handler, versus a proper view/screen """ import logging from functools import wraps from django.conf import settings from django.contrib.auth.decorators import login_require...
indictranstech/vestasi-erpnext
refs/heads/develop
erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.py
41
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class AppraisalTemplateGoal(Document): pass
beiko-lab/gengis
refs/heads/master
bin/Lib/site-packages/wx-2.8-msw-unicode/wx/lib/pubsub/core/__init__.py
7
''' Core package of pubsub, holding the publisher, listener, and topic object modules. Functions defined here are used internally by pubsub so that the right modules can be found later, based on the selected messaging protocol. Indeed some of the API depends on the messaging protocol used. For instance sendMessage(), ...
EthanHeilman/bitcoin
refs/heads/master
test/functional/feature_notifications.py
4
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the -alertnotify, -blocknotify and -walletnotify options.""" import os from test_framework.addres...
Tiduszk/CS-100
refs/heads/master
Chapter 3/Book Exercises/C3-2.py
2
#Made by Zachary C. on 10/2/16 #Algorithm #1. Start #2. Greet user #3. Ask user for the length of rectangle 1 #4. Save length of rectangle 1 (length_1) #5. Ask user for the width of rectangle 1 #6. Save width of rectangle 1 (width_1) #7. Ask user for the length of rectangle 2 #8. Save the length of rectangle 2 (length...
poppogbr/genropy
refs/heads/master
packages/glbl/model/localita.py
1
#!/usr/bin/env python # encoding: utf-8 class Table(object): def config_db(self, pkg): tbl = pkg.table('localita', pkey='id', name_long='Localita', rowcaption='nome,@provincia.sigla:%s (%s)',broadcast=True) tbl.column('id', size='22', group='_', readOnly=True, name_long='!!Id') tbl.column('...
NavyaJayaram/MyRepository
refs/heads/master
SoundCloudUsingAJS/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py
160
""" Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipul...
rupran/ansible
refs/heads/devel
lib/ansible/modules/monitoring/logentries.py
77
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Ivan Vanderbyl <ivan@app.io> # # 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 of the License, or # (at your option) any la...
cloudant/spark-cloudant
refs/heads/master
test/test-scripts/schema/schema_sample_size_004.py
3
#******************************************************************************* # Copyright (c) 2015 IBM Corp. # # 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/li...
asm666/sympy
refs/heads/master
sympy/printing/pretty/stringpict.py
46
"""Prettyprinter by Jurjen Bos. (I hate spammers: mail me at pietjepuk314 at the reverse of ku.oc.oohay). All objects have a method that create a "stringPict", that can be used in the str method for pretty printing. Updates by Jason Gedge (email <my last name> at cs mun ca) - terminal_string() method - minor f...
salguarnieri/intellij-community
refs/heads/master
python/testData/codeInsight/controlflow/assignment2.py
83
sibling = [] if sibling: sibling[0].text = 123
RetailMeNotSandbox/dartclient
refs/heads/master
docs/source/conf.py
1
# -*- coding: utf-8 -*- # # dartclient documentation build configuration file, created by # sphinx-quickstart on Thu Oct 20 11:10:38 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
CourseTalk/edx-platform
refs/heads/master
lms/djangoapps/django_comment_client/forum/tests.py
5
import json import logging import ddt from django.core.urlresolvers import reverse from django.http import Http404 from django.test.client import Client, RequestFactory from django.test.utils import override_settings from lms.lib.comment_client.utils import CommentClientPaginatedResult from edxmako.tests import mako_m...
eoghan2t9/primou-kernel-IRONMAN
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...
amanikamail/flexx
refs/heads/master
flexx/util/screenshot.py
21
""" Make screenshots of windows on Windows and Linux. We need this to do visual tests. """ import sys if sys.platform.startswith('win'): import ctypes from ctypes import windll from ctypes.wintypes import (BOOL, DOUBLE, DWORD, HBITMAP, HDC, HGDIOBJ, HWND, INT, LPARAM, ...
DazWorrall/ansible
refs/heads/devel
test/units/module_utils/test_postgresql.py
63
import json import sys from ansible.compat.tests import unittest from ansible.compat.tests.mock import patch, MagicMock from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import builtins from ansible.module_utils._text import to_native from units.mock.procenv import swap_stdin_an...
DEVSENSE/PTVS
refs/heads/master
Python/Tests/TestData/WFastCgi/DjangoApp/DjangoApp/wsgi.py
7
""" WSGI config for DjangoApplication7 project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APP...
stewgeo/fmepedia-data-upload-validation-display
refs/heads/master
pythonLibraries/setuptools-0.6c11/build/lib/setuptools/command/rotate.py
167
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * class rotate(Command): """Delete older distributions""" description = "delete older distributions, keeping N newest files" user_options = [ ('match='...
cjdelisle/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/win/gyptest-long-command-line.py
344
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure long command lines work. """ import TestGyp import subprocess import sys if sys.platform == 'win32': test = TestGyp.TestG...
maxdeliso/elevatorSim
refs/heads/master
Lib/encodings/tis_620.py
272
""" Python Character Mapping Codec tis_620 generated from 'python-mappings/TIS-620.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,input,errors='st...
underbluewaters/marinemap
refs/heads/master
lingcod/bioregions/migrations/0001_initial.py
3
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.conf import settings class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Bioregion' db.create_table('bioregions_bioregion', ( ...
suttond/MODOI
refs/heads/master
ase/gui/calculator.py
2
# encoding: utf-8 """calculator.py - module for choosing a calculator.""" import gtk from gettext import gettext as _ import os import numpy as np from copy import copy from ase.gui.setupwindow import SetupWindow from ase.gui.progress import DefaultProgressIndicator, GpawProgressIndicator from ase.gui.widgets import p...
ericfc/django
refs/heads/master
tests/migrations/test_migrations_run_before/0003_third.py
427
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): """ This is a wee bit crazy, but it's just to show that run_before works. """ dependencies = [ ("migrations", "0001_initial"), ] run_before...
m0ose/pydc1394
refs/heads/master
examples/display_qt.py
2
#!/usr/bin/env python # encoding: utf-8 # # This file is part of pydc1394. # # pydc1394 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 3 of the # License, or (at your option) any later ...
dparlevliet/zelenka-report-storage
refs/heads/master
server-local/twisted/protocols/htb.py
51
# -*- test-case-name: twisted.test.test_htb -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Hierarchical Token Bucket traffic shaping. Patterned after U{Martin Devera's Hierarchical Token Bucket traffic shaper for the Linux kernel<http://luxik.cdi.cz/~devik/qos/htb/>}. @seealso: U{HT...
jlcarmic/producthunt_simulator
refs/heads/master
venv/lib/python2.7/site-packages/scipy/signal/tests/test_wavelets.py
108
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import TestCase, run_module_suite, assert_equal, \ assert_array_equal, assert_array_almost_equal, assert_array_less, assert_ from scipy._lib.six import xrange from scipy.signal import wavelets class TestWavele...
emilkjer/xhtml2pdf
refs/heads/master
demo/tgpisa/setup.py
168
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from turbogears.finddata import find_package_data import os execfile(os.path.join("tgpisa", "release.py")) packages=find_packages() package_data = find_package_data(where='tgpisa', package='tgpisa') if os.path.isdir('locales'): packages.appe...
asimshankar/tensorflow
refs/heads/master
tensorflow/python/keras/applications/vgg16.py
12
# Copyright 2015 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...
dannyboi104/SickRage
refs/heads/master
lib/rtorrent/rpc/__init__.py
158
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com> # 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, ...
gitsimon/tq_website
refs/heads/master
cms_plugins/migrations/0003_delete_thumbnailpluginmodel.py
2
# Generated by Django 2.2.12 on 2020-04-29 11:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0022_auto_20180620_1551'), ('cms_plugins', '0002_auto_20200215_1336'), ] operations = [ migrations.DeleteModel( name='Th...
zakandrewking/cobrapy
refs/heads/master
cobra/test/data/update_pickles.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from collections import OrderedDict from json import dump as json_dump import cobra from cobra.io import ( load_matlab_model, read_sbml_model, save_json_model, save_matlab_model, write_sbml_model) from cobra.io.sbml3 import ...
andremissaglia/ekaaty_liveusbcreator
refs/heads/master
liveusb/setup.py
2
from distutils.core import setup def main(): setup( name='gettext_windows', version='1.0', py_modules=['gettext_windows'], author='Alexander Belchenko', author_email='bialix@ukr.net', url='https://launchpad.net/gettext-py-windows', description='Helper for sta...
xaviercobain88/framework-python
refs/heads/master
openerp/tools/func.py
63
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can red...
doismellburning/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/users/urls.py
130
""" URLs for user API """ from django.conf.urls import patterns, url from django.conf import settings from .views import UserDetail, UserCourseEnrollmentsList, UserCourseStatus USERNAME_PATTERN = r'(?P<username>[\w.+-]+)' urlpatterns = patterns( 'mobile_api.users.views', url('^' + USERNAME_PATTERN + '$', Use...
orangeduck/PyAutoC
refs/heads/master
Python27/Lib/plat-irix6/FL.py
132
# Constants used by the FORMS library (module fl). # This corresponds to "forms.h". # Recommended use: import FL; ... FL.NORMAL_BOX ... etc. # Alternate use: from FL import *; ... NORMAL_BOX ... etc. from warnings import warnpy3k warnpy3k("the FL module has been removed in Python 3.0", stacklevel=2) del warnpy3k _v20 ...
gpapakyriakopoulos/PyFlask
refs/heads/master
pyflask/lib/python2.7/site-packages/jinja2/testsuite/__init__.py
404
# -*- coding: utf-8 -*- """ jinja2.testsuite ~~~~~~~~~~~~~~~~ All the unittests of Jinja2. These tests can be executed by either running run-tests.py using multiple Python versions at the same time. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ i...
kernc/networkx
refs/heads/master
networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py
89
#!/usr/bin/env python from nose.tools import * from nose import SkipTest import networkx from nose.plugins.attrib import attr from networkx import edge_current_flow_betweenness_centrality \ as edge_current_flow from networkx import approximate_current_flow_betweenness_centrality \ as approximate_cfbc class T...
fatiando/fatiando
refs/heads/master
cookbook/gravmag_tensor_prism_noisy.py
9
""" GravMag: Generate noise-corrupted gravity gradient tensor data """ from fatiando import mesher, gridder, utils from fatiando.gravmag import prism from fatiando.vis import mpl model = [mesher.Prism(-1000, 1000, -1000, 1000, 0, 2000, {'density': 1000})] shape = (100, 100) xp, yp, zp = gridder.regular((-5000, 5000, -...
griffinfoster/pulsar-polarization-sims
refs/heads/master
scripts/smoothProfile.py
1
#!/usr/bin/env python """ Apply a low pass filter to a pulsar profile """ #broaden filter import pyfits as pf import numpy as n import pylab as p import os import sys import shutil import time from scipy import signal def smooth(x,window_len=11,window='hanning'): """smooth the data using a window with requested ...
munyirik/python
refs/heads/develop
cpython/PC/testpy.py
89
import sys # This is a test module for Python. It looks in the standard # places for various *.py files. If these are moved, you must # change this module too. try: import os except: print("""Could not import the standard "os" module. Please check your PYTHONPATH environment variable.""") sys.exit(1) ...
mistercrunch/airflow
refs/heads/master
airflow/operators/latest_only.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...
laiqiqi886/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_tracemalloc.py
60
import contextlib import os import sys import tracemalloc import unittest from unittest.mock import patch from test.script_helper import assert_python_ok, assert_python_failure from test import support try: import threading except ImportError: threading = None EMPTY_STRING_SIZE = sys.getsizeof(b'') def get_fr...
michael-dev2rights/ansible
refs/heads/ansible-d2r
test/units/module_utils/facts/other/test_ohai.py
118
# unit tests for ansible ohai fact collector # -*- coding: utf-8 -*- # # 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. # # An...
htzy/bigfour
refs/heads/master
common/djangoapps/student/migrations/0009_auto__del_courseregistration__add_courseenrollment.py
188
# -*- 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): # Deleting model 'CourseRegistration' db.delete_table('student_courseregistration') # Adding model ...
runekaagaard/django-contrib-locking
refs/heads/master
tests/migrations/test_migrations_squashed_complex_multi_apps/app2/1_squashed_2.py
385
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): replaces = [ ("app2", "1_auto"), ("app2", "2_auto"), ] dependencies = [("app1", "1_auto")] operations = [ migrations.RunPython(migrations....
renatopp/vindinium-python
refs/heads/master
vindinium/utils/timer.py
1
import time __all__ = ['Timer'] class Timer(object): '''Timer helper. A timer object helps to verify how much time has been taken to execute some code. Example: You can use this class in two ways. First as a with statement:: with Timer() as timer: # your code her...
steeve/xbmctorrent
refs/heads/master
resources/site-packages/xbmcswift2/mockxbmc/xbmc.py
20
import tempfile import os, errno from xbmcswift2 import log from xbmcswift2.cli.create import get_value TEMP_DIR = os.path.join(tempfile.gettempdir(), 'xbmcswift2_debug') log.info('Using temp directory %s', TEMP_DIR) def _create_dir(path): '''Creates necessary directories for the given path or does nothing ...
tantexian/sps-2014-12-4
refs/heads/master
tools/install_venv_common.py
166
# Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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 ...
NusaCode/NusaAccounting
refs/heads/master
atk/attributes/fck/editor/filemanager/connectors/py/upload.py
53
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.or...
fengzhyuan/scikit-learn
refs/heads/master
examples/covariance/plot_robust_vs_empirical_covariance.py
248
r""" ======================================= Robust vs Empirical covariance estimate ======================================= The usual covariance maximum likelihood estimate is very sensitive to the presence of outliers in the data set. In such a case, it would be better to use a robust estimator of covariance to guar...
mittya/duoclub
refs/heads/master
duoclub/photos/apps.py
1
# -*- coding: utf-8 -*- from django.apps import AppConfig class PhotosConfig(AppConfig): name = 'photos' verbose_name = '相册列表'
holmes/intellij-community
refs/heads/master
python/testData/formatter/wrapBeforeElse_after.py
79
id = 1 if looooooooooooooooooooooooong_vaaaaaaaaaaaaaaaar == 'loooooooooooooooong_vaaaaaaaaaaaaaaaaaaaaaaaaaalue' else \ list('foo')[0]
jank3/django
refs/heads/master
django/contrib/gis/gdal/raster/const.py
238
""" GDAL - Constant definitions """ from ctypes import ( c_byte, c_double, c_float, c_int16, c_int32, c_uint16, c_uint32, ) # See http://www.gdal.org/gdal_8h.html#a22e22ce0a55036a96f652765793fb7a4 GDAL_PIXEL_TYPES = { 0: 'GDT_Unknown', # Unknown or unspecified type 1: 'GDT_Byte', # Eight bit unsigned int...
ubc/edx-platform
refs/heads/release
openedx/core/djangoapps/course_groups/views.py
67
""" Views related to course groups functionality. """ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_POST from django.contrib.auth.models import User from django.core.paginator import Paginator, EmptyPage from django.core.urlresolvers import reverse from dj...
olemis/zebra
refs/heads/master
tests/io/jsonrpclib/SimpleJSONRPCServer.py
6
import jsonrpclib from jsonrpclib import Fault from jsonrpclib.jsonrpc import USE_UNIX_SOCKETS import SimpleXMLRPCServer import SocketServer import socket import logging import os import types import traceback import sys try: import fcntl except ImportError: # For Windows fcntl = None def get_version(reque...
FedoraScientific/salome-med
refs/heads/master
src/MEDOP/tui/xmedpy/tests/test_xmed_fieldOperations.py
1
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # Copyright (C) 2007-2014 CEA/DEN, EDF R&D # # 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.1 of the License, or (...