repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
n4hy/gnuradio
refs/heads/master
gr-digital/python/qa_fll_band_edge.py
3
#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) ...
tectronics/evergreen-mobile-opac
refs/heads/master
dev/asciidoc/tests/testasciidoc.py
3
#!/usr/bin/env python USAGE = '''Usage: testasciidoc.py [OPTIONS] COMMAND Run AsciiDoc conformance tests specified in configuration FILE. Commands: list List tests run [NUMBER] [BACKEND] Execute tests update [NUMBER] [BACKEND] Regenerate and update test data Options: -f, ...
Zhongqilong/mykbengineer
refs/heads/master
kbe/res/scripts/common/Lib/_compat_pickle.py
85
# This module is used to map the old Python 2 names to the new names used in # Python 3 for the pickle module. This needed to make pickle streams # generated with Python 2 loadable by Python 3. # This is a copy of lib2to3.fixes.fix_imports.MAPPING. We cannot import # lib2to3 and use the mapping defined there, becaus...
leyondlee/HoneyPy-Docker
refs/heads/master
HoneyPy-0.6.2/lib/clilib/unix/whoami.py
4
def whoami(user, *params): """ WHOAMI(1) User Commands WHOAMI(1) NAME whoami - print effective userid SYNOPSIS whoami [OPTION]... DESCRIPTION Print the user name associated with the current effective user ID. Same as ...
jswanljung/iris
refs/heads/master
lib/iris/tests/unit/fileformats/pp_rules/test__convert_time_coords.py
6
# (C) British Crown Copyright 2014 - 2016, Met Office # # This file is part of Iris. # # Iris 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 l...
bsmr-eve/Pyfa
refs/heads/master
eos/effects/shipbonussmallmissileexplosionradiuscd2.py
2
# shipBonusSmallMissileExplosionRadiusCD2 # # Used by: # Ship: Flycatcher type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost( lambda mod: mod.charge.requiresSkill("Rockets") or mod.charge.requiresSkill("Light Missiles"), "aoeCloudSize", ship.getModifiedItemAttr("ship...
longman694/youtube-dl
refs/heads/mod
youtube_dl/extractor/__init__.py
89
from __future__ import unicode_literals try: from .lazy_extractors import * from .lazy_extractors import _ALL_CLASSES _LAZY_LOADER = True except ImportError: _LAZY_LOADER = False from .extractors import * _ALL_CLASSES = [ klass for name, klass in globals().items() if na...
litchfield/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex/3_auto.py
385
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "2_auto")] operations = [ migrations.RunPython(migrations.RunPython.noop) ]
GunoH/intellij-community
refs/heads/master
python/testData/resolve/multiFile/reimportStar/ReimportStar.py
83
from django.db import models class Foo: bar = models.CharField('bar') # <ref>
sekikn/incubator-airflow
refs/heads/master
airflow/providers/google/cloud/sensors/pubsub.py
5
# # 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...
andyhedges/vertx-web
refs/heads/master
src/test/sockjs-protocol/venv/lib/python2.7/abc.py
4
/usr/lib/python2.7/abc.py
awahlig/skype4py
refs/heads/master
Skype4Py/lang/nl.py
23
apiAttachAvailable = u'API beschikbaar' apiAttachNotAvailable = u'Niet beschikbaar' apiAttachPendingAuthorization = u'Wacht op autorisatie' apiAttachRefused = u'Geweigerd' apiAttachSuccess = u'Succes' apiAttachUnknown = u'Onbekend' budDeletedFriend = u'Van de vriendenlijst verwijderd' budFriend = u'Vriend' budNeverBeen...
brianwoo/django-tutorial
refs/heads/master
ENV/lib/python2.7/site-packages/django/core/mail/__init__.py
230
""" Tools for sending email. """ from __future__ import unicode_literals from django.conf import settings from django.utils.module_loading import import_string # Imported for backwards compatibility, and for the sake # of a cleaner namespace. These symbols used to be in # django/core/mail.py before the introduction o...
jinjin123/devops2.0
refs/heads/master
devops/xadmin/adminx.py
11
from __future__ import absolute_import import xadmin from .models import UserSettings, Log from xadmin.layout import * from django.utils.translation import ugettext_lazy as _, ugettext class UserSettingsAdmin(object): model_icon = 'fa fa-cog' hidden_menu = True xadmin.site.register(UserSettings, UserSettings...
ingokegel/intellij-community
refs/heads/master
python/testData/copyPaste/Indent1.src.py
332
class C: def foo(self): <selection> x = 1 y = 2</selection>
xlzdew/seleniumN
refs/heads/master
py/test/selenium/webdriver/common/implicit_waits_tests.py
9
#!/usr/bin/python # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
socialwareinc/Diamond
refs/heads/master
src/collectors/haproxy/test/testhaproxy.py
15
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from haproxy import HAProx...
GunoH/intellij-community
refs/heads/master
python/testData/inspections/PyProtectedMemberInspection/DunderAll/pkg/A/C.py
45
class CLS: pass
marcoarruda/MissionPlanner
refs/heads/master
Lib/encodings/mac_roman.py
93
""" Python Character Mapping Codec mac_roman generated from 'MAPPINGS/VENDORS/APPLE/ROMAN.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(s...
SoftwareMaven/django
refs/heads/master
django/contrib/gis/geos/collections.py
292
""" This module houses the Geometry Collection objects: GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon """ import json from ctypes import byref, c_int, c_uint from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.geometry import ( GEOSGeometry, ProjectInterpolateM...
julienvey/solum
refs/heads/master
solum/tests/common/test_trace_data.py
2
# Copyright 2014 - Rackspace # # 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,...
googlearchive/pywebsocket
refs/heads/master
mod_pywebsocket/headerparserhandler.py
29
# Copyright 2011, 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 the f...
Nicotine-Plus/nicotine-plus
refs/heads/master
pynicotine/interests.py
1
# COPYRIGHT (C) 2021 Nicotine+ Team # # GNU GENERAL PUBLIC LICENSE # Version 3, 29 June 2007 # # 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 o...
shybovycha/buck
refs/heads/master
docs/presentations/droidcon-nyc-2014/images/create_images.py
48
#!/usr/bin/env python """ This exports a bunch of images from the base-dependency-diagram.graffle file using py-appscript: http://appscript.sourceforge.net/py-appscript/doc/appscript-manual/index.html This example from GitHub was particularly helpful as a template: https://github.com/fikovnik/omnigraffle-export/blob/m...
SiriusBizniss/evetowerthing
refs/heads/master
lib/eveapi-1.2.6/eveapi.py
2
#----------------------------------------------------------------------------- # eveapi - EVE Online API access # # Copyright (c)2007-2014 Jamie "Entity" van den Berge <jamie@hlekkir.com> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # f...
techtonik/numpy
refs/heads/master
numpy/core/tests/test_ufunc.py
2
from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.testing import * import numpy.core.umath_tests as umt import numpy.core.operand_flag_tests as opflag_tests from numpy.compat import asbytes from numpy.core.test_rational import * class TestUfunc(TestCase): d...
elysium001/zamboni
refs/heads/master
mkt/search/indexers.py
11
import logging import sys from django.conf import settings import elasticsearch from celery import task from elasticsearch import helpers from elasticsearch_dsl import Search import mkt from lib.es.models import Reindexing from lib.post_request_task.task import task as post_request_task from mkt.constants.regions im...
psychopy/psychopy
refs/heads/release
psychopy/demos/coder/stimuli/variousVisualStims.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Demo of several visual stimuli depending on the mouse position. """ from __future__ import division from psychopy import visual, event, core import numpy win = visual.Window([600, 600], color='black') gabor = visual.GratingStim(win, mask='gauss', pos=[-0.5, -0.5], ...
bartvm/pylearn2
refs/heads/master
pylearn2/datasets/csv_dataset.py
5
# -*- coding: utf-8 -*- """ A simple general csv dataset wrapper for pylearn2. Can do automatic one-hot encoding based on labels present in a file. """ __authors__ = "Zygmunt Zając" __copyright__ = "Copyright 2013, Zygmunt Zając" __credits__ = ["Zygmunt Zając", "Nicholas Dronen"] __license__ = "3-clause BSD" __maintain...
dd00/commandergenius
refs/heads/dd00
project/jni/python/src/Lib/test/test_unicode_file.py
58
# Test some Unicode file name semantics # We dont test many operations on files other than # that their names can be used with Unicode characters. import os, glob, time, shutil import unicodedata import unittest from test.test_support import run_unittest, TestSkipped, TESTFN_UNICODE from test.test_support import TESTF...
mhallsmoore/qstrader
refs/heads/master
qstrader/data/backtest_data_handler.py
1
import numpy as np class BacktestDataHandler(object): """ """ def __init__( self, universe, data_sources=None ): self.universe = universe self.data_sources = data_sources def get_asset_latest_bid_price(self, dt, asset_symbol): """ """ ...
Memrise/unidecode
refs/heads/master
unidecode/x0fb.py
252
data = ( 'ff', # 0x00 'fi', # 0x01 'fl', # 0x02 'ffi', # 0x03 'ffl', # 0x04 'st', # 0x05 'st', # 0x06 '[?]', # 0x07 '[?]', # 0x08 '[?]', # 0x09 '[?]', # 0x0a '[?]', # 0x0b '[?]', # 0x0c '[?]', # 0x0d '[?]', # 0x0e '[?]', # 0x0f '[?]', # 0x10 '[?]', # 0x11 '[?]', ...
paul-cao/everythingtagServer
refs/heads/master
scanner.py
1
import webapp2 from google.appengine.ext import ndb from everyThingModel import EvUsers from everyThingModel import EvScannerDev import datetime class MainPage(webapp2.RequestHandler): def post(self): #self.response.headers['Content-Type'] = 'text/plain' userinfo = self.r...
joshua-cogliati-inl/moose
refs/heads/devel
modules/tensor_mechanics/doc/tests/cosserat_glide.py
13
#!/usr/bin/env python import os import sys import numpy as np import matplotlib.pyplot as plt def expected(y): mu = 2.0 mu_c = 3.0 be = 0.6 bbb = 1.0 we = np.sqrt(2 * mu * mu_c / be / (mu + mu_c)) phi = bbb * np.sinh(we * y) u = 2 * mu_c * bbb * (1 - np.cosh(we * y)) / we / (mu + mu_c) ...
conversationai/wikidetox
refs/heads/main
experimental/extract_pov_edits/experimental/match_modify.py
1
""" Matching deleted sentences with the revised version of it (if any) in Wikipedia edits. Input: rejected.json -- Sentences deleted in revisions. improved.json -- Sentences added in the same set of revisions. Constraint: 1. Every revision in rejected.json appears exactly once. 2. Every revision appeared in rej...
defance/edx-platform
refs/heads/master
common/djangoapps/util/keyword_substitution.py
148
""" keyword_substitution.py Contains utility functions to help substitute keywords in a text body with the appropriate user / course data. Supported: LMS: - %%USER_ID%% => anonymous user id - %%USER_FULLNAME%% => User's full name - %%COURSE_DISPLAY_NAME%% => display name of the course ...
elit3ge/SickRage
refs/heads/master
lib/hachoir_parser/image/iptc.py
95
""" IPTC metadata parser (can be found in a JPEG picture for example) Sources: - Image-MetaData Perl module: http://www.annocpan.org/~BETTELLI/Image-MetaData-JPEG-0.15/... ...lib/Image/MetaData/JPEG/TagLists.pod - IPTC tag name and description: http://peccatte.karefil.com/software/IPTCTableau.pdf Author: Victor...
juzer10/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_empty_enum.py
276
import WebIDL def WebIDLTest(parser, harness): try: parser.parse(""" enum TestEmptyEnum { }; """) harness.ok(False, "Should have thrown!") except: harness.ok(True, "Parsing TestEmptyEnum enum should fail") results = parser.finish()
IQSS/gentb-site
refs/heads/master
apps/uploads/migrations/0005_uploadfile_flag.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('uploads', '0004_manualuploadfile'), ] operations = [ migrations.AddField( model_name='uploadfile', n...
TaylorSMarks/FinGUI
refs/heads/master
fingui/event.py
1
# Someday: Right now, subclasses need the exact same arguments their originals # took. It'd be nice if they did not... from functools import wraps def camelPrefix(prefix, original): return prefix + original[0].upper() + original[1:] def eventSource(cls): methodsToAdd = {} for name, method in cls...
HaebinShin/tensorflow
refs/heads/master
tensorflow/python/ops/math_grad.py
1
# 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...
fhaoquan/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/filecmp.py
124
"""Utilities for comparing files and directories. Classes: dircmp Functions: cmp(f1, f2, shallow=True) -> int cmpfiles(a, b, common) -> ([], [], []) clear_cache() """ import os import stat from itertools import filterfalse __all__ = ['clear_cache', 'cmp', 'dircmp', 'cmpfiles', 'DEFAULT_IGNORES'] _...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/numpy/matrixlib/setupscons.py
93
#!/usr/bin/env python import os def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('matrixlib', parent_package, top_path) config.add_data_dir('tests') return config if __name__ == "__main__": from numpy.distutils.core imp...
CYBAI/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/pywebsocket3/mod_pywebsocket/handshake/_base.py
14
# Copyright 2012, 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 the f...
jasonwzhy/django
refs/heads/master
django/utils/ipv6.py
225
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
elky/django
refs/heads/master
django/core/files/temp.py
28
""" The temp module provides a NamedTemporaryFile that can be reopened in the same process on any platform. Most platforms use the standard Python tempfile.NamedTemporaryFile class, but Windows users are given a custom class. This is needed because the Python implementation of NamedTemporaryFile uses the O_TEMPORARY f...
rahul67/hue
refs/heads/master
desktop/core/ext-py/pysaml2-2.4.0/src/saml2/ecp_client.py
32
#!/usr/bin/env python # -*- coding: utf-8 -*- # """ Contains a class that can do SAML ECP Authentication for other python programs. """ import cookielib import logging from saml2 import soap from saml2 import saml from saml2 import samlp from saml2 import SAMLError from saml2 import BINDING_SOAP from saml2.client_ba...
sahiljain/catapult
refs/heads/master
third_party/google-endpoints/Crypto/Random/OSRNG/fallback.py
138
# # Random/OSRNG/fallback.py : Fallback entropy source for systems with os.urandom # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to ...
oyamad/QuantEcon.py
refs/heads/learning_algos
quantecon/tests/test_lss.py
1
""" Tests for lss.py """ import sys import unittest import numpy as np from numpy.testing import assert_allclose from quantecon.lss import LinearStateSpace from nose.tools import raises class TestLinearStateSpace(unittest.TestCase): def setUp(self): # Initial Values A = .95 C = .05 ...
dezelin/qemu-kvm
refs/heads/master
scripts/tracetool/format/stap.py
208
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generate .stp file (DTrace with SystemTAP only). """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ ...
Carmezim/tensorflow
refs/heads/master
tensorflow/tools/dist_test/server/grpc_tensorflow_server.py
109
#!/usr/bin/python # 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 r...
xindus40223115/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/locals.py
603
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License...
mitodl/ccxcon
refs/heads/master
courses/serializers.py
1
""" Django Rest Framework Serializers for Course API """ import logging from django.core.urlresolvers import reverse from rest_framework import serializers from .fields import JsonListField, StringyManyToManyField from .models import Course, Module, EdxAuthor from oauth_mgmt.models import BackingInstance log = loggi...
kerel-fs/skylines
refs/heads/master
skylines/api/views/airspace.py
3
from flask import Blueprint, request from skylines import api from .json import jsonify from .parser import parse_location airspace_blueprint = Blueprint('airspace', 'skylines') @airspace_blueprint.route('/airspace/') @airspace_blueprint.route('/airspace', endpoint='list') def _list(): location = parse_location...
pinch-tn/pinch-app
refs/heads/master
pinch/walkthrough/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Project' db.create_table(u'walkthrough_project', ( (u'id', self.gf('django.db.mo...
puckipedia/youtube-dl
refs/heads/master
youtube_dl/extractor/appleconnect.py
139
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( str_to_int, ExtractorError ) class AppleConnectIE(InfoExtractor): _VALID_URL = r'https?://itunes\.apple\.com/\w{0,2}/?post/idsa\.(?P<id>[\w-]+)' _TEST = { 'url': 'https://itunes.app...
jptomo/rpython-lang-scheme
refs/heads/master
rpython/jit/metainterp/test/test_immutable.py
1
from rpython.rlib import jit from rpython.jit.metainterp.test.support import LLJitMixin @jit.dont_look_inside def escape(x): return x class ImmutableFieldsTests: def test_fields(self): class X(object): _immutable_fields_ = ["x"] def __init__(self, x): self.x =...
eharney/cinder
refs/heads/master
cinder/cmd/volume_usage_audit.py
1
#!/usr/bin/env python # Copyright (c) 2011 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/LICE...
meabsence/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/idlelib/ObjectBrowser.py
67
# XXX TO DO: # - popup menu # - support partial or total redisplay # - more doc strings # - tooltips # object browser # XXX TO DO: # - for classes/modules, add "open source" to object browser from idlelib.TreeWidget import TreeItem, TreeNode, ScrolledCanvas from reprlib import Repr myrepr = Repr() myrepr.maxstring...
SoftwareMaven/django
refs/heads/master
django/contrib/admin/filters.py
188
""" This encapsulates the logic for displaying filters in the Django admin. Filters are specified in models with the "list_filter" option. Each filter subclass knows how to display a filter for a field that passes a certain test -- e.g. being a DateField or ForeignKey. """ import datetime from django.contrib.admin.op...
odicraig/kodi2odi
refs/heads/master
addons/plugin.video.icefilms/resources/script.tv.show.next.aired/dateutil/easter.py
2
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" import datetime __all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "E...
jturney/psi4
refs/heads/master
psi4/driver/p4util/inpsight.py
6
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
GeraldLoeffler/nupic
refs/heads/master
external/linux32/lib/python2.6/site-packages/matplotlib/numerix/_na_imports.py
70
"""Imports from numarray for numerix, the numarray/Numeric interchangeability module. These array functions are used when numarray is chosen. """ from numarray import Int8, UInt8, Int16, UInt16, Int32, UInt32, \ Float32, Float64, Complex32, Complex64, Float, Int, Complex,\ typecode import numarray.ieeespecia...
michaelMinar/limbo
refs/heads/master
limbo/plugins/wiki.py
8
"""!wiki <topic> returns a wiki link for <topic>""" import re try: from urllib import quote except ImportError: from urllib.request import quote import requests from bs4 import BeautifulSoup def wiki(searchterm): """return the top wiki search result for the term""" searchterm = quote(searchterm) ...
akshatharaj/django
refs/heads/master
django/contrib/gis/gdal/prototypes/ds.py
349
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
plasma-disassembler/plasma
refs/heads/master
plasma/lib/fileformat/pefile2.py
4
#!/usr/bin/env python3 # # PLASMA : Generate an indented asm code (pseudo-C) with colored syntax. # Copyright (C) 2015 Joel # # 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 ...
cuauv/software
refs/heads/master
fishbowl/fishbowl.py
1
import socket import struct # See PROTOCOL.md for fishbowl protocol specification. class Fishbowl: header = ">BI" OK = 0 ERROR = 1 COMPLETED = 255 def connect(self, address="localhost", port=7772): self.sock = socket.socket() try: self.sock.connect((address, port)) except ConnectionRefuse...
Unow/edx-platform
refs/heads/master
common/djangoapps/user_api/middleware.py
9
""" Middleware for user api. Adds user's tags to tracking event context. """ from track.contexts import COURSE_REGEX from eventtracking import tracker from user_api.models import UserCourseTag from opaque_keys.edx.locations import SlashSeparatedCourseKey class UserTagsEventContextMiddleware(object): """Middleware...
oplatek/lxmls-toolkit
refs/heads/master
lxmls/sequences/sequence_list.py
5
import lxmls.sequences.sequence as seq import pdb class _SequenceIterator(object): def __init__(self, seq): self.seq = seq self.pos = 0 def __iter__(self): return self def next(self): if self.pos >= len(self.seq): raise StopIteration r = self.seq[self.p...
gdi2290/django
refs/heads/master
tests/migrations/migrations_test_apps/unspecified_app_with_conflict/migrations/0001_initial.py
2995
# -*- 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",...
joelstanner/electrum
refs/heads/master
lib/wizard.py
1
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 thomasv@gitorious, kyuupichan@gmail # # 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...
greg-ashby/deep-learning-nanodegree
refs/heads/master
transfer-learning/tensorflow_vgg/utils.py
145
import skimage import skimage.io import skimage.transform import numpy as np # synset = [l.strip() for l in open('synset.txt').readlines()] # returns image of shape [224, 224, 3] # [height, width, depth] def load_image(path): # load image img = skimage.io.imread(path) img = img / 255.0 assert (0 <= ...
xuleiboy1234/autoTitle
refs/heads/master
tensorflow/tensorflow/contrib/boosted_trees/estimator_batch/custom_export_strategy_test.py
11
# 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...
Abi1ity/uniclust2.0
refs/heads/master
SQLAlchemy-0.9.9/lib/sqlalchemy/testing/assertsql.py
21
# testing/assertsql.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 from ..engine.default import DefaultDialect from .. import util import re cla...
guerrerocarlos/odoo
refs/heads/8.0
addons/website_blog/controllers/main.py
53
# -*- coding: utf-8 -*- import datetime import werkzeug from openerp import tools from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import slug from openerp.osv.orm import browse_record from openerp.tools.translate import _ from openerp import S...
carylF/lab5
refs/heads/master
main/lib/werkzeug/contrib/atom.py
311
# -*- coding: utf-8 -*- """ werkzeug.contrib.atom ~~~~~~~~~~~~~~~~~~~~~ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: def atom_feed(request): feed = AtomFeed("My Blog", feed...
joariasl/odoo
refs/heads/8.0
addons/sale_layout/models/__init__.py
433
import sale_layout
flschiavoni/harpia
refs/heads/master
harpia/control/diagramcontrol.py
2
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- """ This module contains the DiagramControl class. """ import os import gi gi.require_version('Gdk', '3.0') from gi.repository import Gdk from harpia.utils.XMLUtils import XMLParser from harpia.system import System as Syste...
edmaas/son-cli
refs/heads/master
src/son/monitor/profiler.py
1
""" Copyright (c) 2015 SONATA-NFV 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 agreed to in...
steedos/odoo
refs/heads/8.0
addons/hr_gamification/__init__.py
388
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
trenton3983/Artificial_Intelligence_for_Humans
refs/heads/master
vol1/python-examples/examples/example_error.py
2
#!/usr/bin/env python """ Artificial Intelligence for Humans Volume 1: Fundamental Algorithms Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2013 by Jeff Heaton Licensed under the Apache License, Version 2...
AsgerPetersen/QGIS
refs/heads/master
python/plugins/processing/modeler/ModelerOnlyAlgorithmProvider.py
2
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerOnlyAlgorithmProvider.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********...
dracos/django
refs/heads/master
django/db/backends/dummy/features.py
555
from django.db.backends.base.features import BaseDatabaseFeatures class DummyDatabaseFeatures(BaseDatabaseFeatures): supports_transactions = False
ajaniv/django-contacts
refs/heads/master
configs/common/django.py
1
""" .. module:: configs.common.django :synopsis: Django settings file. Django settings for django_core_models project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and the...
erdc/proteus
refs/heads/cutfem_update
proteus/tests/poisson_2d/poisson_het_2d_ncp1_n.py
1
from __future__ import absolute_import from builtins import range from proteus import * from proteus.default_n import * from .poisson_het_2d_p import * parallel = False timeIntegration = NoIntegration nDTout = 1 femSpaces = dict((i,NC_AffineLinearOnSimplexWithNodalBasis) for i in range(nc)) elementQuadrature = Simp...
saltastro/pysalt
refs/heads/master
lib/saltsafelog.py
2
################################# LICENSE ################################## # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. # # # # Redistribu...
Orav/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/baseparser.py
1
"""Base option parser setup""" import sys import optparse import os import textwrap from distutils.util import strtobool from pip.backwardcompat import ConfigParser, string_types from pip.locations import default_config_file from pip.util import get_terminal_size, get_prog from pip._vendor import pkg_resou...
davelab6/pyfontaine
refs/heads/master
fontaine/charsets/noto_chars/cousine_italic.py
2
# -*- coding: utf-8 -*- class Charset(object): common_name = 'Cousine-Italic' native_name = '' def glyphs(self): chars = [] chars.append(0x200C) #uni200C ZERO WIDTH NON-JOINER chars.append(0x200D) #uni200D ZERO WIDTH JOINER chars.append(0x200E) #uni200E LEFT-TO-RIGHT MA...
ruikong/WinObjC
refs/heads/master
deps/3rdparty/icu/icu/source/tools/icu-svnprops-check.py
388
#! /usr/bin/python # Copyright (C) 2009-2011, International Business Machines Corporation, Google and Others. # All rights reserved. # # Script to check and fix svn property settings for ICU source files. # Also check for the correct line endings on files with svn:eol-style = native # # THIS SCRIPT DOES NOT WORK O...
kiterunner-t/pssh
refs/heads/master
test/test.py
73
#!/usr/bin/python # Copyright (c) 2009, Andrew McNabb # Copyright (c) 2003-2008, Brent N. Chun import os import sys import shutil import tempfile import time import unittest basedir, bin = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0]))) sys.path.append("%s" % basedir) if os.getenv("TEST_HOSTS") is Non...
ApuliaSoftware/odoo
refs/heads/8.0
addons/account/project/report/analytic_journal.py
358
# -*- 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...
jtattermusch/grpc
refs/heads/master
src/python/grpcio_tests/tests_aio/status/grpc_status_test.py
10
# Copyright 2020 The gRPC Authors # # 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 writ...
ampax/edx-platform
refs/heads/master
lms/djangoapps/student_account/test/test_views.py
1
# -*- coding: utf-8 -*- """ Tests for student account views. """ import re from nose.plugins.attrib import attr from unittest import skipUnless from urllib import urlencode import mock import ddt from django.conf import settings from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFil...
raghavrv/scikit-learn
refs/heads/master
sklearn/linear_model/ransac.py
12
# coding: utf-8 # Author: Johannes Schönberger # # License: BSD 3 clause import numpy as np import warnings from ..base import BaseEstimator, MetaEstimatorMixin, RegressorMixin, clone from ..utils import check_random_state, check_array, check_consistent_length from ..utils.random import sample_without_replacement fr...
mganeva/mantid
refs/heads/master
scripts/HFIR_4Circle_Reduction/downloaddialog.py
1
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + ########## # Dialog to set up HTTP data downl...
kjaym/pypif
refs/heads/master
pypif/obj/common/tests/test_value.py
2
from pypif.obj.common.value import Value def test_basic(): """Test that constructor arguments are saved""" foo = Value(name="foo", units="eV", tags=["tag1", "tag2"]) assert foo.name == "foo" assert foo.units == "eV" assert len(foo.tags) == 2 assert "tag1" in foo.tags assert "tag2" in foo.t...
lfalvarez/votai
refs/heads/master
medianaranja2/tests/lectura_groups_tests.py
2
# coding=utf-8 from .adapter_tests import MediaNaranjaAdaptersBase from elections.models import Candidate from popular_proposal.models import (PopularProposal, Commitment, ProposalLike ) from medianaranja2.mod...
patilsangram/erpnext
refs/heads/develop
erpnext/accounts/doctype/closed_document/closed_document.py
18
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ClosedDocument(Document): pass
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/draft_schematic/weapon/pistol_intimidator.py
85615
import sys def setup(core, object): return
fxfitz/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_errorpagebody.py
26
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...