repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
tgstation/-tg-station
refs/heads/master
SQL/ban_conversion_2018-10-28.py
51
#Python 3+ Script for converting ban table format as of 2018-10-28 made by Jordie0608 # #Before starting ensure you have installed the mysqlclient package https://github.com/PyMySQL/mysqlclient-python #It can be downloaded from command line with pip: #pip install mysqlclient # #You will also have to create a new ban ta...
machtfit/django-analytical
refs/heads/master
docs/_ext/local.py
6
def setup(app): app.add_crossref_type( directivename="setting", rolename="setting", indextemplate="pair: %s; setting", ) app.add_crossref_type( directivename="templatetag", rolename="ttag", indextemplate="pair: %s; template tag" ) app.add_crossref_type...
numerobis/KSP-scripts
refs/heads/master
planeDesigner.py
1
from __future__ import division import math import engine import jets import lift import planet import physics class part(object): def __init__(self, parttype, n = 1, AoAdegrees = 0, extraMass = 0, Cd = None): self._parttype = parttype self._n = n self._AoA = AoAdegrees self._extr...
vinoth3v/In
refs/heads/master
In/content/page/content_view.py
1
def content_view(context, action, entity_id, **args): entity_type = 'Content' view_mode = 'full' IN.entitier.entity_page_view(entity_type, entity_id, view_mode)
837468220/python-for-android
refs/heads/master
python-build/python-libs/gdata/src/gdata/blogger/client.py
135
#!/usr/bin/env python # # Copyright (C) 2009 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 ...
matmutant/sl4a
refs/heads/master
python/src/Lib/hmac.py
253
"""HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. """ import warnings as _warnings trans_5C = "".join ([chr (x ^ 0x5C) for x in xrange(256)]) trans_36 = "".join ([chr (x ^ 0x36) for x in xrange(256)]) # The size of the digests returned by HMAC ...
Adai0808/scikit-learn
refs/heads/master
sklearn/covariance/tests/test_robust_covariance.py
213
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause import numpy as np from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_alm...
BorisJeremic/Real-ESSI-Examples
refs/heads/master
valgrind_test/test_cases/8NodeBrick/cantilever_irregular_element_with_divisions/shape2/NumberOfDivision4/vertical_load/extract_numerical_solution.py
441
#!/usr/bin/python import h5py import sys import numpy as np import os import re import random # find the path to my own python function: cur_dir=os.getcwd() sep='test_cases' test_DIR=cur_dir.split(sep,1)[0] scriptDIR=test_DIR+'compare_function' sys.path.append(scriptDIR) # import my own function for color and comparat...
dunkhong/grr
refs/heads/master
grr/core/grr_response_core/lib/util/compat/csv_test.py
2
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl.testing import absltest from grr_response_core.lib.util.compat import csv class CsvReaderTest(absltest.TestCase): def testEmpty(self): reade...
javierder/dogestart.me
refs/heads/master
django/db/models/__init__.py
107
from functools import wraps from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.db.models.loading import get_apps, get_app_paths, get_app, get_models, get_model, register_models, UnavailableApp from django.db.models.query import Q from django.db.models.expressions import F from djan...
alkadis/vcv
refs/heads/master
src/adhocracy/controllers/stats.py
6
from adhocracy.lib.base import BaseController from adhocracy.lib.templating import render_json class StatsController(BaseController): """ This controller is an endpoint for AJAX requests that monitor user behavior. You'll want to enable `adhocracy.requestlog_active` to record them. """ def read_comm...
antgonza/qiita
refs/heads/master
qiita_db/test/test_processing_job.py
3
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
open-synergy/opensynid-fleet
refs/heads/8.0
fleet_work_order/__init__.py
1
# -*- coding: utf-8 -*- # © 2016 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models, wizard, reports
sathlan/python-rh-nexttaks
refs/heads/master
src/rh_nexttask/constants.py
1
class Constants: INCLUDE_FIELDS = [ 'external_bugs', 'id', 'summary', 'assigned_to', 'status', 'keywords', 'depends_on_all', 'fixed_in', 'devel_whiteboard', 'internal_whiteboard', 'devel_whiteboard', 'target_release', ...
jtriley/gizmod
refs/heads/develop
scripts/modules.d/599-LIRC-MceUSB2-Default.py
1
#*** #********************************************************************* #************************************************************************* #*** #*** GizmoDaemon Config Script #*** LIRCMceUSB2 Default config #*** #***************************************** #***************************************** ...
achang97/YouTunes
refs/heads/master
lib/python2.7/site-packages/youtube_dl/extractor/upskill.py
32
from __future__ import unicode_literals import re from .common import InfoExtractor from .wistia import WistiaIE from ..compat import compat_str from ..utils import ( clean_html, ExtractorError, get_element_by_class, urlencode_postdata, urljoin, ) class UpskillBaseIE(InfoExtractor): _LOGIN_U...
dg321123/cache
refs/heads/master
cache_exceptions.py
1
class KeyMissingFromCacheException(Exception): def __init__(self, key): self.key = key def __str__(self): return repr(self.key)
Goldmund-Wyldebeast-Wunderliebe/raven-python
refs/heads/master
raven/transport/tornado.py
1
""" raven.transport.tornado ~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from raven.transport.http import HTTPTransport try: from tornado import ioloop from tornado.h...
googleads/google-ads-python
refs/heads/master
google/ads/googleads/v6/services/services/income_range_view_service/transports/grpc.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google 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 o...
roadmapper/ansible
refs/heads/devel
lib/ansible/modules/network/cloudengine/ce_vxlan_gateway.py
2
#!/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 distribut...
rdhyee/modular-file-renderer
refs/heads/develop
mfr/core/remote_logging.py
4
import copy import json import logging import aiohttp # from geoip import geolite2 import mfr from mfr.server import settings # import waterbutler from waterbutler.core.utils import async_retry logger = logging.getLogger(__name__) async def log_analytics(request, metrics, is_error=False): """Send events to K...
skevy/django
refs/heads/master
django/forms/widgets.py
2
""" HTML Widget classes """ import copy import datetime import time from itertools import chain from urlparse import urljoin from util import flatatt from django.conf import settings from django.utils.datastructures import MultiValueDict, MergeDict from django.utils.html import escape, conditional_escape from django....
newerthcom/savagerebirth
refs/heads/master
libs/python-2.72/Lib/UserList.py
327
"""A more or less complete user-defined wrapper around list objects.""" import collections class UserList(collections.MutableSequence): def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if type(initlis...
fogbow/fogbow-dashboard
refs/heads/master
openstack_dashboard/api/cinder.py
9
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit...
wolfthefallen/king-phisher
refs/heads/master
tests/server/database/storage.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # # tests/server/database/storage.py # # 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,...
thanhacun/odoo
refs/heads/8.0
addons/product_extended/wizard/wizard_price.py
270
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP S.A. (<http://www.openerp.com>). # $Id$ # # This program is free...
Dekken/tick
refs/heads/master
tick/prox/tests/prox_slope_test.py
2
# License: BSD 3 clause import unittest import numpy as np from scipy.stats import norm as normal from tick.prox import ProxSlope from tick.prox.tests.prox import TestProx class ProxSlopeTest(object): def get_coeffs_weak(self, n_coeffs): return (-1) ** np.arange(n_coeffs) * \ np.sqrt(2 * np...
dimitdim/ElectronAdventures
refs/heads/master
lab4/temp.py
1
import smu s = smu.smu() f = open('temp.csv', 'w') f.write('"Iin"\n') s.set_voltage(1, 0) # s.set_current(1, 0) while True: # s.set_current(1, .001) s.autorange(1) s.autorange(2) print s.get_current(1) # print s.get_voltage(1) s.set_voltage(1, 0.) f.close()
fusion809/fusion809.github.io-old
refs/heads/master
vendor/bundle/ruby/2.3.0/gems/pygments.rb-0.6.3/vendor/simplejson/simplejson/tests/test_errors.py
71
from unittest import TestCase import simplejson as json class TestErrors(TestCase): def test_string_keys_error(self): data = [{'a': 'A', 'b': (2, 4), 'c': 3.0, ('d',): 'D tuple'}] self.assertRaises(TypeError, json.dumps, data) def test_decode_error(self): err = None try: ...
weimingtom/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/xmlrpc/client.py
45
# # XML-RPC CLIENT LIBRARY # $Id$ # # an XML-RPC client interface for Python. # # the marshalling and response parser code can also be used to # implement XML-RPC servers. # # Notes: # this version is designed to work with Python 2.1 or newer. # # History: # 1999-01-14 fl Created # 1999-01-15 fl Changed dateTime to u...
kumarshivam675/Mobile10X-Hack
refs/heads/master
yowsup/layers/network/__init__.py
70
from .layer import YowNetworkLayer
argivaitv/argivaitv
refs/heads/master
repo/plugin.video.phstreams/resources/lib/libraries/f4mproxy/flvlib/tags.py
99
import os import struct import logging from primitives import * from constants import * from astypes import MalformedFLV from astypes import get_script_data_variable, make_script_data_variable log = logging.getLogger('flvlib.tags') STRICT_PARSING = False def strict_parser(): return globals()['STRICT_PARSING'] ...
magopian/olympia
refs/heads/master
migrations/653-backfill-app-install-counts.py
39
import datetime from stats.models import GlobalStat from mkt.monolith.models import MonolithRecord METRIC = 'apps_count_installed' def run(): """Backfill apps_count_installed.""" # Get the first metric and increment daily until today's date. today = datetime.datetime.today().replace(hour=0, minute=0, s...
zaffra/Inquire
refs/heads/master
GAE/django/template/debug.py
15
from django.conf import settings from django.template import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError from django.utils.encoding import force_unicode from django.utils.html import escape from django.utils.safestring import SafeData, EscapeData from django.utils.formats import localize class D...
ThirdProject/android_external_chromium_org
refs/heads/cm-11.0
mojo/public/bindings/generators/mojom_generator.py
23
# 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. """Code shared by the various language-specific code generators.""" import mojom import re def GetStructFromMethod(interface, method): """Converts a meth...
AndreasMadsen/course-02456-sparsemax
refs/heads/master
benchmark/run_description.py
1
import _benchmark import os.path as path import datasets from table import Table thisdir = path.dirname(path.realpath(__file__)) tabledir = path.join(thisdir, '..', 'latex', 'report', 'tables') def descriptions(datasets): col_names = ['\\#Features', '\\#Labels', 'Train size', 'Test size'] row_names = [] ...
chiehwen/mongo-connector
refs/heads/master
mongo-connector/doc_managers/sample_doc_manager.py
19
# Copyright 2012 10gen, 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, soft...
wklm/dockerized_trains
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/common.py
55
# 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. from __future__ import with_statement import collections import errno import filecmp import os.path import re import tempfile import sys # A minimal memoizing d...
Shao-Feng/crosswalk-test-suite
refs/heads/master
apptools/apptools-manifest-tests/tests_windows.py
12
#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2016 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of c...
suncycheng/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/contenttypes/tests.py
87
from django import db from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.contenttypes.views import shortcut from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test...
tamsky/ansible-upstream
refs/heads/devel
lib/ansible/plugins/callback/skippy.py
4
# (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...
nickswebsite/r2dto_rdf
refs/heads/master
tests/utils.py
2
from __future__ import unicode_literals from rdflib import BNode, URIRef, Literal from rdflib.term import Identifier from pprint import pprint try: basestring except NameError: basestring = str def print_graph(g): print(g.serialize(format="turtle")) pprint(list(g)) def to_rdf_triples(s, p, o, da...
agry/NGECore2
refs/heads/master
scripts/collections/col_entertainer_01.py
2
from java.lang import System import sys def modify(core, actor, count): return def complete(core, actor, collection): ghost = actor.getSlottedObject('ghost') actor.sendSystemMessage('@collection_n:col_entertainer_01_finished', 0) ghost.addAbility('bm_dancing_pet_entertainer') return
msunardi/PTVS
refs/heads/master
Python/Product/Django/Templates/Projects/StarterDjangoProject/app-models.py
19
""" Definition of models. """ from django.db import models # Create your models here.
0x0mar/king-phisher
refs/heads/master
tests/client/export.py
9
#!/usr/bin/env python # -*- coding: utf-8 -*- # # tests/client/export.py # # 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...
joberreiter/pyload
refs/heads/stable
module/plugins/crypter/FourChanOrg.py
15
# -*- coding: utf-8 -*- # # Based on 4chandl by Roland Beermann (https://gist.github.com/enkore/3492599) import re import urlparse from module.plugins.internal.Crypter import Crypter class FourChanOrg(Crypter): __name__ = "FourChanOrg" __type__ = "crypter" __version__ = "0.33" __status__ = "t...
jeasoft/odoo
refs/heads/marcos-8.0
addons/website_mail_group/__init__.py
3964
import controllers import models
EventGhost/EventGhost
refs/heads/master
plugins/System/DeviceChangeNotifier.py
2
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/> # # EventGhost is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either versio...
estnltk/estnltk
refs/heads/master
estnltk/wiki/sections.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import __author__ = 'Andres' import re from .externalLink import addExternalLinks, ExtLinkBracketedRegex from .internalLink import addIntLinks from .references import reffinder from .internalLink import relatedArticles from .ta...
tasoc/photometry
refs/heads/devel
run_make_catalog.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Create catalogs of stars in a given TESS observing sector. Example: In order to create catalogs for sector 14 simple call this program from the command-line like so: >>> python run_make_catalog.py 14 This will create the catalog files (`*.sqlite`) corresponding ...
thiblahute/meson
refs/heads/master
mesonbuild/modules/windows.py
1
# Copyright 2015 The Meson development team # 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 ...
dvberkel/mypaint
refs/heads/master
brushlib/generate.py
1
# brushlib - The MyPaint Brush Library # Copyright (C) 2007-2008 Martin Renold <martinxyz@gmx.ch> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # ...
IllusionRom-deprecated/android_platform_tools_idea
refs/heads/master
python/testData/copyPaste/Whitespace.dst.py
83
def f(): <caret>try: a = 1 except: b = 1
ProstoMaxim/incubator-airflow
refs/heads/master
airflow/contrib/sensors/jira_sensor.py
14
# -*- 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 ...
leodemoura/z3
refs/heads/master
scripts/mk_unix_dist.py
17
############################################ # Copyright (c) 2013 Microsoft Corporation # # Scripts for automatically generating # Linux/OSX/BSD distribution zip files. # # Author: Leonardo de Moura (leonardo) ############################################ import os import glob import re import getopt import sys import...
janisz/Diamond-1
refs/heads/master
src/diamond/handler/libratohandler.py
32
# coding=utf-8 """ [Librato](http://librato.com) is an infrastructure software as a service company dedicated to delivering beautiful, easy to use tools that make managing your operations more fun and efficient. #### Dependencies * [librato-metrics](https://github.com/librato/python-librato) #### Configuration En...
Obus/scikit-learn
refs/heads/master
examples/plot_johnson_lindenstrauss_bound.py
134
""" ===================================================================== The Johnson-Lindenstrauss bound for embedding with random projections ===================================================================== The `Johnson-Lindenstrauss lemma`_ states that any high dimensional dataset can be randomly projected in...
adiletmaratov/horoscope-bot
refs/heads/master
src/bot/urls.py
1
from django.conf.urls import url from .views import FollowBotView, UnfollowBotView, NewChatView urlpatterns = [ url(r'user/follow', FollowBotView.as_view(), name='follow'), url(r'user/unfollow', UnfollowBotView.as_view(), name='unfollow'), url(r'new/chat', NewChatView.as_view(), name='new_chat'), ]
gennad/Django-nonrel-stub-for-Google-App-Engine
refs/heads/master
django/contrib/admin/templatetags/admin_list.py
154
import datetime from django.conf import settings from django.contrib.admin.util import lookup_field, display_for_field, label_for_field from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE, ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR) from django.core.exceptions import ObjectDoesNotExis...
tinkhaven-organization/odoo
refs/heads/8.0
openerp/tools/appdirs.py
376
#!/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: # ...
mozilla/build-relengapi
refs/heads/master
relengapi/blueprints/badpenny/cron.py
3
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import import structlog from flask import Blueprint from flask import current_app from...
aequitas/home-assistant
refs/heads/dev
homeassistant/components/lutron/switch.py
7
"""Support for Lutron switches.""" import logging from homeassistant.components.switch import SwitchDevice from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Lutron switches.""" ...
faywong/FFPlayer
refs/heads/trunk
project/jni/python/src/Lib/xml/etree/cElementTree.py
326
# Wrapper module for _elementtree from _elementtree import *
Bowenislandsong/Distributivecom
refs/heads/master
Final_website/app.py
1
from flask import Flask, render_template, url_for, request, session, redirect from flask import flash, Markup, send_from_directory from flask_pymongo import PyMongo from werkzeug import secure_filename from validate_email import validate_email from pymongo import MongoClient import os import bcrypt import subprocess im...
TeachAtTUM/edx-platform
refs/heads/master
openedx/core/djangoapps/user_api/urls.py
4
""" Defines the URL routes for this app. """ from django.conf import settings from django.conf.urls import url from ..profile_images.views import ProfileImageView from .accounts.views import AccountDeactivationView, AccountViewSet from .preferences.views import PreferencesDetailView, PreferencesView from .verificatio...
vFense/vFenseAgent-nix
refs/heads/development
agent/deps/mac/Python-2.7.5/lib/python2.7/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py
73
"""Suite Web Browser Suite: Class of events supported by Web Browser applications Level 1, version 1 Generated from /Applications/Internet Explorer.app AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'WWW!' class Web_Browser_Suite_Events: def Activate(self, _object=...
RockySteveJobs/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/importlib/test/import_/__init__.py
52
import importlib.test import os.path import unittest def test_suite(): directory = os.path.dirname(__file__) return importlib.test.test_suite('importlib.test.import_', directory) if __name__ == '__main__': from test.support import run_unittest run_unittest(test_suite())
cainmatt/django
refs/heads/master
tests/migrations/test_migrations_squashed_erroneous/3_squashed_5.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): replaces = [ ("migrations", "3_auto"), ("migrations", "4_auto"), ("migrations", "5_auto"), ] dependencies = [("migrations", "2_auto")] ope...
catapult-project/catapult
refs/heads/master
third_party/google-auth/google/auth/impersonated_credentials.py
6
# Copyright 2018 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,...
nhippenmeyer/python-xbrl
refs/heads/master
xbrl/__init__.py
1
#! /usr/bin/env python # encoding: utf-8 from __future__ import absolute_import from .xbrl import XBRLParser, GAAP, GAAPSerializer, XBRLParserException version = (1, 1, 0)
dantebarba/docker-media-server
refs/heads/master
plex/Sub-Zero.bundle/Contents/Libraries/Shared/dateutil/_common.py
48
""" Common code used in multiple modules. """ class weekday(object): __slots__ = ["weekday", "n"] def __init__(self, weekday, n=None): self.weekday = weekday self.n = n def __call__(self, n): if n == self.n: return self else: return self.__class__(s...
Pakoach/Sick-Beard-Animes
refs/heads/master
lib/simplejson/encoder.py
91
"""Implementation of JSONEncoder """ import re try: from lib.simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from lib.simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder ...
ashhher3/cvxpy
refs/heads/master
cvxpy/constraints/leq_constraint.py
4
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
felliott/osf.io
refs/heads/develop
api_tests/waffle/views/test_waffle_cookies.py
10
import pytest from osf_tests.factories import ( FlagFactory, ) @pytest.mark.django_db class TestWaffleCookies: @pytest.fixture() def flag(self): flag = FlagFactory(name='test_flag') flag.percent = 50 flag.everyone = None flag.save() return flag @pytest.mark.en...
OpenPymeMx/OCB
refs/heads/7.0
addons/hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py
52
# -*- 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...
borisroman/vdsm
refs/heads/master
lib/vdsm/tool/configfile.py
1
# Copyright 2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the ...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/network/f5/bigip_asm_policy_import.py
38
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
ndparker/wtf
refs/heads/master
wtf/ext/sharedance.py
2
# -*- coding: ascii -*- # # Copyright 2007-2012 # Andr\xe9 Malo or his licensors, as applicable # # 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-...
SebKuzminsky/linuxcnc-mirror
refs/heads/master
tests/halmodule.1/stream_writer.py
8
#!/usr/bin/env python import hal import time c = hal.component("stream_writer") writer = hal.stream(c, hal.streamer_base, 10, "bfsu") for i in range(9): assert writer.writable writer.write((i % 2, i, i, i)) assert not writer.writable assert writer.num_overruns == 0 try: writer.write((1,1,1,1)) except: ...
hgl888/chromium-crosswalk
refs/heads/master
tools/telemetry/telemetry/internal/actions/pinch_unittest.py
23
# Copyright 2014 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. from telemetry.internal.actions import page_action from telemetry.page import action_runner as action_runner_module from telemetry.testing import tab_test_ca...
ryfeus/lambda-packs
refs/heads/master
Tensorflow_Pandas_Numpy/source3.6/tensorboard/default.py
3
# 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...
bmccary/utd
refs/heads/master
utd/blackboard.py
1
from . import config from . import util from webdriver_manager.chrome import ChromeDriverManager from selenium import webdriver from datetime import datetime, timedelta import time import tempfile import os import getpass from random import random from glob import glob import shutil import atexit import logging _log...
william-richard/moto
refs/heads/master
tests/test_iam/test_iam_groups.py
2
from __future__ import unicode_literals from datetime import datetime import boto import boto3 import sure # noqa import pytest from boto.exception import BotoServerError from botocore.exceptions import ClientError from moto import mock_iam, mock_iam_deprecated from moto.core import ACCOUNT_ID MOCK_POLICY = """ { ...
ismailakbudak/read-google-drive-files
refs/heads/master
with-gui/gui_helper.py
1
from nymph.IP import * import json ### # helper is the object interface for GDManager # its responsible comminication between GDManager and user class ### class helper(nymph): # helper is a nymph def __init__(self,nymphdata,managerNymphData): super(helper,self).__init__(nymphdata) ...
kustodian/ansible
refs/heads/devel
test/lib/ansible_test/_internal/cloud/azure.py
13
"""Azure plugin for integration tests.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ..util import ( ApplicationError, display, is_shippable, ConfigParser, ) from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig...
Grets/qBittorrent
refs/heads/master
src/searchengine/nova/engines/btdigg.py
25
#VERSION: 1.30 #AUTHORS: BTDigg team (research@btdigg.org) # GNU GENERAL PUBLIC LICENSE # Version 3, 29 June 2007 # # <http://www.gnu.org/licenses/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
chrisndodge/edx-platform
refs/heads/master
common/djangoapps/microsite_configuration/backends/__init__.py
67
""" Supported backends for microsites 1. filebased This backend supports retrieval of microsite configurations/templates from filesystem. 2. database This backend supports retrieval of microsite configurations/templates from database. """
icdishb/scikit-learn
refs/heads/master
sklearn/linear_model/bayes.py
18
""" Various bayesian regression """ from __future__ import print_function # Authors: V. Michel, F. Pedregosa, A. Gramfort # License: BSD 3 clause from math import log import numpy as np from scipy import linalg from .base import LinearModel from ..base import RegressorMixin from ..utils.extmath import fast_logdet, p...
BT-astauder/odoo
refs/heads/8.0
addons/hr_attendance/report/__init__.py
375
# -*- 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...
bak1an/django
refs/heads/master
tests/migrations/test_migrations_atomic_operation/0001_initial.py
33
from django.db import migrations, models def raise_error(apps, schema_editor): # Test atomic operation in non-atomic migration is wrapped in transaction Editor = apps.get_model('migrations', 'Editor') Editor.objects.create(name='Test Editor') raise RuntimeError('Abort migration') class Migration(mig...
dmkent/sensor-feed
refs/heads/master
sensor_feed/sensor.py
1
"""Sensor definitions.""" from datetime import datetime import logging from threading import Event, Thread import time LOGGER = logging.getLogger(__name__) class Sensor: """ A sensor is a basic event source. Each sensor is started in its own thread and is free to what ever it needs to r...
udacity/ggplot
refs/heads/master
ggplot/themes/theme.py
12
""" Theme elements: * element_line * element_rect * element_text * element_title These elements define what operations can be performed. The specific targets, eg. line, rect, text, title and their derivatives axis_title or axis_title_x specify the scope of the theme application. """ from copy import deepcopy from ....
kdmurray91/scikit-bio
refs/heads/master
skbio/alignment/tests/__init__.py
178
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
maellak/invenio
refs/heads/master
modules/miscutil/lib/shellutils.py
12
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or ...
amisrs/angular-flask
refs/heads/master
angular_flask/lib/python2.7/site-packages/requests/packages/urllib3/request.py
60
# urllib3/request.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php try: from urllib.parse import urlencode except ImportError: from urllib import urlencod...
caisq/tensorflow
refs/heads/master
tensorflow/contrib/estimator/python/estimator/boosted_trees.py
3
# Copyright 2018 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...
bjura/pisak2
refs/heads/master
pisak/res/__init__.py
1
""" Package designates a directory for resources. """ import os.path """ Absolute path to the package directory. """ PATH = os.path.abspath(os.path.dirname(__file__)) def getRes(relative): """ Get absolute resource path from relative resource. """ return os.path.join(PATH, relative)
neversun/sailfish-hackernews
refs/heads/master
pyPackages/requests-armv7hl/requests/structures.py
1159
# -*- coding: utf-8 -*- """ requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. """ import collections class CaseInsensitiveDict(collections.MutableMapping): """ A case-insensitive ``dict``-like object. Implements all methods and operations of ``collections.MutableMapping...
azoft-dev-team/imagrium
refs/heads/win
env/Lib/test/double_const.py
238
from test.test_support import TestFailed # A test for SF bug 422177: manifest float constants varied way too much in # precision depending on whether Python was loading a module for the first # time, or reloading it from a precompiled .pyc. The "expected" failure # mode is that when test_import imports this after al...
bayerj/chainer
refs/heads/master
chainer/optimizers/sgd.py
8
from chainer import cuda from chainer import optimizer class SGD(optimizer.Optimizer): """Vanilla Stochastic Gradient Descent.""" def __init__(self, lr=0.01): self.lr = lr def update_one_cpu(self, param, grad, _): param -= self.lr * grad def update_one_gpu(self, param, grad, _): ...