repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
edmundgentle/schoolscript
refs/heads/master
SchoolScript/bin/Debug/pythonlib/Lib/test/test_imaplib.py
3
from test import support # If we end up with a significant number of tests that don't require # threading, this test module should be split. Right now we skip # them all if we don't have threading. threading = support.import_module('threading') from contextlib import contextmanager import imaplib import os.pa...
jennolsen84/PyTables
refs/heads/develop
bench/search-bench-plot.py
13
from __future__ import print_function import tables from pylab import * def get_values(filename, complib=''): f = tables.open_file(filename) nrows = f.root.small.create_best.cols.nrows[:] corrected_sizes = nrows / 10. ** 6 if mb_units: corrected_sizes = 16 * nrows / 10. ** 6 if insert: ...
KousikaGanesh/purchaseandInventory
refs/heads/master
openerp/addons/account_budget/report/crossovered_budget_report.py
22
# -*- 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...
stephaneAG/PengPod700
refs/heads/master
QtEsrc/qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/inspector/inline-javascript-imports.py
62
#!/usr/bin/env python # # Copyright (C) 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...
vinhlh/bite-project
refs/heads/master
deps/gdata-python-client/tests/gdata_tests/photos_test.py
133
#!/usr/bin/python # # Copyright (C) 2006 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
ageron/tensorflow
refs/heads/master
tensorflow/python/autograph/pyct/transformer_test.py
4
# 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...
mm112287/2015cda_g8
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/webbrowser.py
735
from browser import window __all__ = ["Error", "open", "open_new", "open_new_tab"] class Error(Exception): pass _target = { 0: '', 1: '_blank', 2: '_new' } # hack... def open(url, new=0, autoraise=True): """ new window or tab is not controllable on the client side. autoraise not available. ""...
rwl/PyCIM
refs/heads/master
CIM15/IEC61970/Informative/InfAssets/PowerRating.py
1
# Copyright (C) 2010-2011 Richard Lincoln # # 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, publish...
xitrum-framework/FrameworkBenchmarks
refs/heads/master
toolset/benchmark/test_types/update_type.py
22
from benchmark.test_types.framework_test_type import FrameworkTestType from benchmark.test_types.verifications import verify_query_cases class UpdateTestType(FrameworkTestType): def __init__(self): kwargs = { 'name': 'update', 'accept_header': self.accept('json'), 'req...
sylvestre/bedrock
refs/heads/master
bedrock/base/models.py
9
from django.db import models class ConfigValue(models.Model): name = models.CharField(max_length=100, db_index=True, unique=True) value = models.CharField(max_length=200) class Meta: app_label = 'base' def __str__(self): return '%s=%s' % (self.name, self.value) def get_config_dict(...
ilmir-k/website-addons
refs/heads/8.0
website_proposal/controllers/__init__.py
468
# -*- coding: utf-8 -*- from . import main
vincent-psarga/job-sensors
refs/heads/master
src/jobsensors/tests/test_response.py
1
import unittest from mock import Mock import urllib2 from time import sleep from db.utils import setup_db, drop_db from jobs import response class MockResponse(object): def __init__(self, code): self.code = code def getcode(self): return self.code class ResponseTest(unittest.TestCase): ...
b4ldr/atlas-traceroute-to-bgp
refs/heads/master
main.py
1
#!/usr/bin/env python import logging from trace2bgp.atlas import Asn, Asns from trace2bgp.utils import get_sagan_objects, get_cousteau_object from prettytable import PrettyTable from argparse import ArgumentParser from ripe.atlas.cousteau import AtlasLatestRequest def get_args(): parser = ArgumentParser(descripti...
cauchycui/scikit-learn
refs/heads/master
benchmarks/bench_plot_approximate_neighbors.py
85
""" Benchmark for approximate nearest neighbor search using locality sensitive hashing forest. There are two types of benchmarks. First, accuracy of LSHForest queries are measured for various hyper-parameters and index sizes. Second, speed up of LSHForest queries compared to brute force method in exact nearest neigh...
kans/birgo
refs/heads/master
deps/breakpad/src/tools/gyp/test/actions-subdir/src/subdir/make-subdir-file.py
489
#!/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 sys contents = 'Hello from make-subdir-file.py\n' open(sys.argv[1], 'wb').write(contents)
edgarcosta/endomorphisms
refs/heads/master
endomorphisms/bounds/Genus2Factors.py
1
""" * Bound functionality * * Copyright (C) 2016-2017 * Edgar Costa (edgarcosta@math.dartmouth.edu) * Davide Lombardo (davide.lombardo@math.u-psud.fr) * Jeroen Sijsling (jeroen.sijsling@uni-ulm.de) * * See LICENSE.txt for license details. """ from sage.all import is_p...
tanmaykm/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_library_content.py
39
# -*- coding: utf-8 -*- """ Basic unit tests for LibraryContentModule Higher-level tests are in `cms/djangoapps/contentstore/tests/test_libraries.py`. """ from bson.objectid import ObjectId from mock import Mock, patch from xblock.fragment import Fragment from xblock.runtime import Runtime as VanillaRuntime from xmo...
stefan-jonasson/home-assistant
refs/heads/dev
homeassistant/components/notify/kodi.py
4
""" Kodi notification service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.kodi/ """ import asyncio import logging import aiohttp import voluptuous as vol from homeassistant.const import ( ATTR_ICON, CONF_HOST, CONF_PORT, CONF_USERNAME, C...
gerald-yang/ubuntu-iotivity-demo
refs/heads/master
grovepi/pygrovepi/grove_firmware_version_check.py
7
#!/usr/bin/env python # # GrovePi Example for checking the firmware for the GrovePi # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask on the forums here: http://www.dexterindustries....
andresriancho/PyGithub
refs/heads/master
github/tests/Logging_.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...
wd5/jangr
refs/heads/master
_django/core/management/base.py
248
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
benjaminrigaud/django
refs/heads/master
django/db/models/sql/query.py
3
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
theyaa/Impala
refs/heads/cdh5-trunk
thirdparty/hive-1.1.0-cdh5.7.0-SNAPSHOT/lib/py/thrift/transport/THttpClient.py
71
# # 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...
jantman/python-mcollective
refs/heads/master
tests/integration/test_with_b64.py
2
import os from pymco.test import ctxt from . import base FIXTURES_PATH = os.path.join(ctxt.ROOT, 'fixtures') class Base64TestCase(base.IntegrationTestCase): """ActiveMQ integration test case.""" CTXT = { 'plugin.activemq.pool.1.port': 61614, 'plugin.activemq.pool.1.password': 'marionette', ...
libscie/liberator
refs/heads/master
liberator/lib/python3.6/site-packages/appdirs.py
177
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
dvliman/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.4/tests/modeltests/model_inheritance_same_model_name/tests.py
92
from __future__ import absolute_import from django.test import TestCase from ..model_inheritance.models import Title class InheritanceSameModelNameTests(TestCase): def setUp(self): # The Title model has distinct accessors for both # model_inheritance.Copy and model_inheritance_same_model_name.C...
RouxRC/weboob
refs/heads/master
modules/amazon/fr/browser.py
5
# -*- coding: utf-8 -*- # Copyright(C) 2015 Christophe Lampin # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
AndrewRook/game_designer
refs/heads/master
card_game/models.py
1
from django.db import models # Create your models here. class Card(models.Model): creature = 'CR' spell = 'SP' card_type_choices = ((creature,'Creature'),(spell,'Spell')) type = models.CharField(max_length=2,choices=card_type_choices,default=creature) name = models.CharField(max_length=64) cost...
myzhan/bottle-doc-zh-cn
refs/heads/master
test/testall.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import sys, os, glob test_root = os.path.dirname(os.path.abspath(__file__)) test_files = glob.glob(os.path.join(test_root, 'test_*.py')) os.chdir(test_root) sys.path.insert(0, os.path.dirname(test_root)) sys.path.insert(0, test_root) test_names = [os.path...
mgit-at/ansible
refs/heads/devel
lib/ansible/modules/crypto/openssl_pkcs12.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Copyright (c) 2017 Guillaume Delpierre <gde@llew.me> from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
kifcaliph/odoo
refs/heads/8.0
addons/hr_expense/report/hr_expense_report.py
287
# -*- 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...
wkschwartz/django
refs/heads/stable/3.2.x
django/db/models/sql/datastructures.py
11
""" Useful auxiliary data structures for query construction. Not useful outside the SQL domain. """ from django.db.models.sql.constants import INNER, LOUTER class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was attempted (if the caller wants ...
daajoe/doorbell
refs/heads/master
pjproject/tests/pjsua/scripts-sendto/410_fmtp_amrnb_offer_octet_align.py
42
# $Id: 410_fmtp_amrnb_offer_octet_align.py 3664 2011-07-19 03:42:28Z nanang $ import inc_sip as sip import inc_sdp as sdp # Answer for codec AMR should contain fmtp octet-align=1 sdp = \ """ v=0 o=- 3428650655 3428650655 IN IP4 192.168.1.9 s=pjmedia c=IN IP4 192.168.1.9 t=0 0 a=X-nat:0 m=audio 4000 RTP/AVP 99 101 a=r...
nojhan/weboob-devel
refs/heads/master
modules/barclays/browser.py
6
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
Teagan42/home-assistant
refs/heads/dev
homeassistant/components/fan/device_trigger.py
8
"""Provides device automations for Fan.""" from typing import List import voluptuous as vol from homeassistant.components.automation import AutomationActionType, state from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.const import ( CONF_DEVICE_ID, CONF_DOMAIN, ...
Karel-van-de-Plassche/bokeh
refs/heads/master
tests/integration/interaction/test_range_min_max.py
5
from __future__ import absolute_import from bokeh.io import save from bokeh.models import ( BoxZoomTool, ColumnDataSource, DataRange1d, PanTool, Plot, Range1d, Rect, LinearAxis ) from selenium.webdriver.common.action_chains import ActionChains from tests.integration.utils import has_no_...
pris54/reactjs-simple-form
refs/heads/master
node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py
1831
#!/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. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
breznak/nupic
refs/heads/master
examples/opf/experiments/multistep/hotgym_best_sp_5step/description.py
32
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gt-ros-pkg/hrl-haptic-manip
refs/heads/master
hrl_common_code_darpa_m3/src/hrl_common_code_darpa_m3/robot_config/multi_link_common.py
1
#!/usr/bin/env python height = 0.0 total_length = 1.2 total_mass = 6.0 #kg, the average weight of a male human arm is 11 lbs, this is slightly heavier than that
tyarkoni/featureX
refs/heads/master
pliers/tests/test_config.py
2
import tempfile import os import json import pytest import pliers from pliers.config import reset_options def test_load_from_standard_paths(): # Verify defaults reset_options(update_from_file=False) assert pliers.config._settings == pliers.config._default_settings # Verify that PLIERS_CONFIG and l...
romain-dartigues/ansible
refs/heads/devel
lib/ansible/modules/cloud/packet/packet_device.py
31
#!/usr/bin/python # (c) 2016, Tomas Karasek <tom.to.the.k@gmail.com> # (c) 2016, Matt Baldwin <baldwin@stackpointcloud.com> # (c) 2016, Thibaud Morel l'Horset <teebes@gmail.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, divisi...
openstack-attic/melange
refs/heads/master
melange/openstack/common/config.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.org/...
NaturalGIS/naturalgis_qgis
refs/heads/master
python/plugins/processing/gui/MultipleInputDialog.py
45
# -*- coding: utf-8 -*- """ *************************************************************************** MultipleInputDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
hefen1/chromium
refs/heads/master
tools/deep_memory_profiler/lib/symbol.py
99
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import sys _BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) _FIND_RUNTIME_SYMBOLS_PATH = os.path.join(_BASE...
2e2a/l-rex
refs/heads/master
apps/item/migrations/0001_initial.py
1
# Generated by Django 2.2.14 on 2020-10-28 07:23 from django.db import migrations, models import django.db.models.deletion import markdownx.models class Migration(migrations.Migration): initial = True dependencies = [ ('lrex_study', '0001_initial'), ('lrex_materials', '0001_initial'), ]...
peichman-umd/newspaper-batchload
refs/heads/develop
classes/ore.py
2
from rdflib import Literal from classes import ldp from namespaces import dcterms, iana, ore, rdf # alias the RDFlib Namespace ns = ore class Proxy(ldp.Resource): def __init__(self, position, proxy_for, proxy_in): super(Proxy, self).__init__() self.title = 'Proxy for {0} in {1}'.format(position, ...
tgoettel9401/Homepage-Schachclub-Niedermohr
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
896
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
daoluan/decode-Django
refs/heads/master
Django-1.5.1/tests/modeltests/properties/tests.py
126
from __future__ import absolute_import from django.test import TestCase from .models import Person class PropertyTests(TestCase): def setUp(self): self.a = Person(first_name='John', last_name='Lennon') self.a.save() def test_getter(self): self.assertEqual(self.a.full_name, 'John Le...
vlachoudis/sl4a
refs/heads/master
python/gdata/src/gdata/tlslite/utils/OpenSSL_TripleDES.py
359
"""OpenSSL/M2Crypto 3DES implementation.""" from cryptomath import * from TripleDES import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_TripleDES(key, mode, IV) class OpenSSL_TripleDES(TripleDES): def __init__(self, key, mode, IV): TripleDES.__init__(self, key, mo...
rimbalinux/LMD3
refs/heads/master
django/contrib/localflavor/pl/pl_administrativeunits.py
16
# -*- coding: utf-8 -*- """ Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski """ ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', u'Wrocław'), ('jeleniagora', u'Jelenia Góra'), ('legnica', u'Legnica'), ('boleslawiecki', u'bolesławiecki'), ('d...
techtonik/pip
refs/heads/master
src/pip/_vendor/urllib3/contrib/socks.py
65
# -*- coding: utf-8 -*- """ This module contains provisional support for SOCKS proxies from within urllib3. This module supports SOCKS4 (specifically the SOCKS4A variant) and SOCKS5. To enable its functionality, either install PySocks or install this module with the ``socks`` extra. The SOCKS implementation supports t...
ajaniv/django-core-models
refs/heads/master
django_core_models/core/apps.py
1
""" .. module:: django_core_models.core.apps :synopsis: django_core_models core application configuration module. django_core_models core application configuration module. """ from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class CoreModelsConfig(AppConfig): ""...
mcarton/thefuck
refs/heads/master
thefuck/rules/django_south_merge.py
17
def match(command): return 'manage.py' in command.script and \ 'migrate' in command.script \ and '--merge: will just attempt the migration' in command.stderr def get_new_command(command): return u'{} --merge'.format(command.script)
Samuel789/MediPi
refs/heads/master
MedManagementWeb/env/lib/python3.5/site-packages/django/contrib/sessions/management/commands/clearsessions.py
729
from importlib import import_module from django.conf import settings from django.core.management.base import BaseCommand class Command(BaseCommand): help = ( "Can be run as a cronjob or directly to clean out expired sessions " "(only with the database backend at the moment)." ) def handl...
programulya/three.js
refs/heads/master
utils/converters/obj/convert_obj_three.py
160
"""Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with ascii / binary loader) ------------------------- How to use this converter ------------------------- python convert_obj_three.py -i infile.obj -o outfile.js [-m "morphfiles*.obj"] [-c "morphcolors*.obj"] [-a center|centerxz|top|bo...
MingdaZhou/gnuradio
refs/heads/master
gr-dtv/python/dtv/qa_dtv.py
46
#!/usr/bin/env python # # Copyright 2014 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) # ...
tschijnmo/drudge
refs/heads/master
tests/eldag_canon_test.py
1
"""Tests for the canonicalization facility for Eldags.""" from drudge import Perm, Group from drudge.canonpy import canon_eldag def test_eldag_can_be_canonicalized(): """Tests the Eldag canonicalization facility. Note that this test more focuses on better coverage in the canonpy interface to libcanon, r...
gugahoi/maraschino
refs/heads/master
lib/transmissionrpc/__init__.py
10
# -*- coding: utf-8 -*- # Copyright (c) 2008-2011 Erik Svensson <erik.public@gmail.com> # Licensed under the MIT license. from transmissionrpc.constants import DEFAULT_PORT, DEFAULT_TIMEOUT, PRIORITY, RATIO_LIMIT, LOGGER from transmissionrpc.error import TransmissionError, HTTPHandlerError from transmissionrpc.httphan...
foursquare/commons-old
refs/heads/master
src/python/twitter/common/decorators/lru_cache.py
16
# Taken from http://code.activestate.com/recipes/578078 # A 2.6.x backport of Python 3.3 functools.lru_cache # # Modified from 4=>2 length indents for code consistency. # # Added an on_eviction parameter that gets applied to each element # when it is evicted from the cache, e.g. file.close(...). from collections impor...
homme/ansible
refs/heads/devel
lib/ansible/new_inventory/__init__.py
170
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
kdwink/intellij-community
refs/heads/master
python/testData/intentions/returnTypeInPy3AnnotationNoColon.py
43
def fo<caret>o() @decorator def bar(): pass
wangyum/mxnet
refs/heads/master
example/gluon/kaggle_k_fold_cross_validation.py
25
# 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...
BuildingLink/sentry
refs/heads/master
src/sentry/south_migrations/0277_auto__add_commitfilechange__add_unique_commitfilechange_commit_filenam.py
4
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'CommitFileChange' db.create_table('sentry_commitfilechang...
Venturi/oldcms
refs/heads/master
env/lib/python2.7/site-packages/PIL/ExifTags.py
71
# # The Python Imaging Library. # $Id$ # # EXIF tags # # Copyright (c) 2003 by Secret Labs AB # # See the README file for information on usage and redistribution. # ## # This module provides constants and clear-text names for various # well-known EXIF tags. ## ## # Maps EXIF tags to tag names. TAGS = { # possib...
ashokrajbathu/boabrock
refs/heads/master
frappe/__init__.py
6
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt """ globals attached to frappe module + some utility functions that should probably be moved """ from __future__ import unicode_literals from werkzeug.local import Local, release_local import os, importlib, inspect, log...
opennode/nodeconductor-assembly-waldur
refs/heads/develop
src/waldur_core/core/migrations/0006_extend_organization.py
2
# Generated by Django 1.11.20 on 2019-04-15 10:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_user_backend_id'), ] operations = [ migrations.AlterField( model_name='user', name='organization', ...
shuggiefisher/django-on-google-app-engine-base
refs/heads/master
django/db/backends/postgresql/base.py
241
""" PostgreSQL database backend for Django. Requires psycopg 1: http://initd.org/projects/psycopg1 """ import sys from django.db import utils from django.db.backends import * from django.db.backends.signals import connection_created from django.db.backends.postgresql.client import DatabaseClient from django.db.backe...
tartavull/google-cloud-python
refs/heads/master
monitoring/google/cloud/monitoring/metric.py
7
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
hayd/pyfaker
refs/heads/master
pyfaker/xeger.py
1
# Xeger.py from https://bitbucket.org/leapfrogdevelopment/rstr/overview import re import string from random import choice, randint from itertools import chain import sys if sys.version_info[0] >= 3: unichr = chr # The * and + characters in a regular expression # match up to any number of repeats in theory, #(and...
hellofreedom/ansible-modules-core
refs/heads/devel
cloud/rackspace/rax_queue.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...
rhinstaller/pyparted
refs/heads/master
tests/test_parted_device.py
3
# # Test cases for the methods in the parted.device module itself # # Copyright (C) 2009-2011 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any l...
blossomica/airmozilla
refs/heads/master
airmozilla/main/views/reports.py
2
import datetime from django import http from django.utils import timezone from django.shortcuts import get_object_or_404, redirect, render from django.db.models import Count from django.contrib import messages from django.db import transaction from django.contrib.auth.decorators import login_required from airmozilla....
bjornaa/ladim
refs/heads/master
doc/source/conf.py
1
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
bmenasha/appengine-mapreduce
refs/heads/master
python/src/mapreduce/handlers.py
28
#!/usr/bin/env python # Copyright 2010 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 ...
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source - Copy/Lib/site-packages/pkg_resources/_vendor/packaging/version.py
1151
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import collections import itertools import re from ._structures import In...
xAKLx/pox
refs/heads/carp
pox/datapaths/pcap_switch.py
42
# Copyright 2013 James McCauley # # 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 writi...
pbanaszkiewicz/amy
refs/heads/develop
amy/workshops/management/commands/instructors_activity.py
1
import logging import os from django.core.mail import send_mail from django.core.management.base import BaseCommand from django.template.loader import get_template from workshops.models import Badge, Person, Role logger = logging.getLogger() class Command(BaseCommand): help = "Report instructors activity." ...
guillermooo/dart-sublime-bundle-releases
refs/heads/master
sublime_plugin_lib/subprocess.py
1
# Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details. # All rights reserved. Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file.) from subprocess import Popen import os from . import PluginLogger from .plat import supress_window _logg...
Yukarumya/Yukarum-Redfoxes
refs/heads/master
media/webrtc/trunk/tools/gyp/test/mac/gyptest-xcuitest.py
12
#!/usr/bin/env python # Copyright (c) 2013 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. """ Verifies that xcuitest targets are correctly configured. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp....
romanchyla/pylucene-trunk
refs/heads/master
samples/LuceneInAction/DocumentUpdateTest.py
2
import os, sys, unittest, lucene lucene.initVM() sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0]))) import lia.indexing.DocumentUpdateTest unittest.main(lia.indexing.DocumentUpdateTest)
Vagab0nd/SiCKRAGE
refs/heads/master
lib3/timeago/locales/fr.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2017-8-30 @author: generated by @lolobosse script ''' LOCALE = [ ["à l'instant", "dans un instant"], ["il y a %s secondes", "dans %s secondes"], ["il y a 1 minute", "dans 1 minute"], ["il y a %s minutes", "dans %s minutes"], ["il y a 1 he...
Shaps/ansible
refs/heads/devel
lib/ansible/plugins/lookup/csvfile.py
80
# (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com> # (c) 2017 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 DOCUMENTATION = """ lookup: csvfile author: Jan-Piet Me...
jacobfilik/scanning
refs/heads/master
org.eclipse.scanning.example.messaging/scripts/examples/05_get_names.py
2
from utilities.connections import create_connection, set_handlers, subscribe_all, send_all conn_dict = {'device-response-topic': "/topic/org.eclipse.scanning.response.device.topic", 'device-request-topic': "/topic/org.eclipse.scanning.request.device.topic", } class DeviceNamesHandler(object)...
feroda/django
refs/heads/master
django/utils/log.py
3
from __future__ import unicode_literals import logging import sys import warnings from django.conf import settings from django.core import mail from django.core.mail import get_connection from django.utils.deprecation import RemovedInNextVersionWarning from django.utils.encoding import force_text from django.utils.mo...
shownomercy/django
refs/heads/master
django/conf/locale/mk/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i' DATETI...
openaddresses/openaddresses
refs/heads/master
scripts/es/download_gml.py
5
# coding: utf-8 import sys, os, urllib with open(sys.argv[1], 'r') as f: urls = f.readlines() for url in urls: url = url.rstrip("\n") if len(url) > 0 filename = sys.argv[2] + url.split('/')[-1] urllib.urlretrieve(url, filename) sys.stdout.write('.') ...
masschallenge/django-accelerator
refs/heads/development
accelerator/tests/factories/bucket_state_factory.py
1
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from datetime import ( datetime, timedelta, ) import swapper from factory import SubFactory from factory.django import DjangoModelFactory from pytz import utc from accelerator.models import ( STALE_NOSTARTUP_B...
morphis/home-assistant
refs/heads/snap-support
homeassistant/components/sensor/sabnzbd.py
23
""" Support for monitoring an SABnzbd NZB client. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.sabnzbd/ """ import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from...
coderbone/SickRage-alt
refs/heads/master
lib/adba/aniDBmaper.py
70
#!/usr/bin/env python # # This file is part of aDBa. # # aDBa 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. # # aDBa is distributed i...
Syrcon/servo
refs/heads/master
tests/wpt/css-tests/tools/manifest/item.py
84
import os import urlparse from abc import ABCMeta, abstractmethod, abstractproperty from utils import from_os_path, to_os_path item_types = ["testharness", "reftest", "manual", "stub", "wdspec"] def get_source_file(source_files, tests_root, manifest, path): def make_new(): from sourcefile import SourceF...
fangxingli/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/admin_scripts/custom_templates/project_template/additional_dir/extra.py
701
# this file uses the {{ extra }} variable
nert-gu/Xposition
refs/heads/master
src/wiki/plugins/images/admin.py
2
from django import forms from django.contrib import admin from . import models class ImageForm(forms.ModelForm): class Meta: model = models.Image exclude = () def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if self.instance.pk: revisions = ...
gavinfaux/namebench
refs/heads/master
nb_third_party/jinja2/environment.py
199
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import * from ...
2gis/lode_runner
refs/heads/master
tests/test_multiple_decorators.py
1
import unittest from nose.plugins.attrib import attr from lode_runner.plugins.dataprovider import dataprovider tests_to_run = set([ "test_multiple_decorators_slow_1", "test_multiple_decorators_slow_2", "test_multiple_decorators_fast_1", "test_multiple_decorators_fast_2", ]) class MultipleDecoratorsT...
benob/chainer
refs/heads/master
chainer/optimizers/momentum_sgd.py
5
from chainer import cuda from chainer import optimizer class MomentumSGD(optimizer.GradientMethod): """Classical momentum SGD.""" def __init__(self, lr=0.01, momentum=0.9): self.lr = lr self.momentum = momentum def init_state(self, param, state): xp = cuda.get_array_module(param...
sheltowt/PIXLEE-computer-vision-clustering
refs/heads/master
PCV-master/examples/lktrack.py
18
from numpy import * import cv2 # some constants and default parameters lk_params = dict(winSize=(15,15),maxLevel=2, criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT,10,0.03)) subpix_params = dict(zeroZone=(-1,-1),winSize=(10,10), criteria = (cv2.TERM_CRITERIA_COUNT | cv...
dischinator/pyload
refs/heads/main
module/plugins/crypter/DuckCryptInfo.py
5
# -*- coding: utf-8 -*- import re import BeautifulSoup from module.plugins.internal.Crypter import Crypter class DuckCryptInfo(Crypter): __name__ = "DuckCryptInfo" __type__ = "crypter" __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?duckcrypt\.info/(folder|w...
FreeScienceCommunity/or-tools
refs/heads/master
examples/python/crossword2.py
32
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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 ...
BT-fgarbely/odoo
refs/heads/8.0
openerp/report/render/odt2odt/odt2odt.py
443
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
KWierso/treeherder
refs/heads/master
treeherder/perf/migrations/0012_rename_summary_last_updated.py
4
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-02-20 15:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('perf', '0011_inc_extra_options_length'), ] operations = [ migrations.RenameField( model_name='performancealerts...