repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
easyw/kicad-3d-models-in-freecad
refs/heads/master
cadquery/FCAD_script_generator/Valves/cq_generic_socket.py
2
# -*- coding: utf-8 -*- #!/usr/bin/python # # This is derived from a cadquery script for generating PDIP models in X3D format # # from https://bitbucket.org/hyOzd/freecad-macros # author hyOzd # This is a # Dimensions are from Microchips Packaging Specification document: # DS00000049BY. Body drawing is the same as QFP ...
mgagne/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/259_placeholder.py
200
# 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 # d...
gsehub/edx-platform
refs/heads/gsehub-release
common/djangoapps/xblock_django/admin.py
24
""" Django admin dashboard configuration. """ from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConf...
binoculars/osf.io
refs/heads/develop
addons/zotero/tests/test_views.py
2
# -*- coding: utf-8 -*- import mock import pytest import urlparse from framework.auth import Auth from nose.tools import (assert_equal, assert_true, assert_false) from addons.base.tests import views from addons.base.tests.utils import MockLibrary, MockFolder from addons.zotero.models import Zotero from addons.zotero.pr...
takeshineshiro/nova
refs/heads/master
nova/objects/migration.py
12
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
chrisdjscott/Atoman
refs/heads/master
atoman/rendering/renderers/tests/test_vacancyRenderer.py
1
""" Tests for the vacancy renderer """ from __future__ import absolute_import from __future__ import unicode_literals import unittest import numpy as np import vtk from vtk.util import numpy_support from .. import vacancyRenderer from ... import utils from ....filtering.filters import pointDefectsFilter from six.mo...
vvuk/servo
refs/heads/master
tests/wpt/web-platform-tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/buildtests.py
75
#!/usr/bin/python import os import urllib import hashlib doctmpl = """<!doctype html> <title>WebVTT cue data parser test %s</title> <style>video { display:none }</style> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/html/syntax/parsing/template.js><...
krlohnes/tinkerpop
refs/heads/master
gremlin-python/src/main/python/gremlin_python/__init__.py
12
# # 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...
mozilla/olympia
refs/heads/master
src/olympia/amo/views.py
1
import json import os import sys import django from django import http from django.conf import settings from django.core.exceptions import ViewDoesNotExist from django.db.transaction import non_atomic_requests from django.http import Http404, HttpResponse, JsonResponse from django.views.decorators.cache import never_c...
artmin/sammeltopf
refs/heads/master
sammeltopf.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import pyexcel import pyexcel.ext.ods3 import datetime from xhtml2pdf import pisa import codecs import locale import eater # Prüfen der Argumente if len(sys.argv) < 2: print 'Bitte Datei mit Berechnungsgrundlagen angeben!' print 'USAGE: sammeltopf.py [Dat...
memo/tensorflow
refs/heads/master
tensorflow/python/training/momentum.py
15
# 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...
svn2github/distcc
refs/heads/master
test/testdistcc.py
21
#! /usr/bin/env python2.2 # Copyright (C) 2002, 2003, 2004 by Martin Pool <mbp@samba.org> # Copyright 2007 Google 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 th...
MichaelNedzelsky/intellij-community
refs/heads/master
python/testData/completion/pep328/package/subpackage1/moduleX.py
83
from ..subpackage2.mo<caret>
plamut/ggrc-core
refs/heads/develop
src/ggrc_workflows/migrations/versions/20140610235548_5ac75b9cbb64_add_cycle_related_tables.py
7
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Add Cycle-related tables Revision ID: 5ac75b9cbb64 Revises: 2078f4b2c9f9 Create Date: 2014-06-10 23:55:48.137814 """ # revision identifiers, used by Alembic. revision = '5ac75b9cbb64' down_revision = ...
itsjeyd/edx-platform
refs/heads/master
lms/envs/cms/acceptance.py
66
""" This config file is a copy of dev environment without the Debug Toolbar. I it suitable to run against acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import from .dev...
kevinhikali/ml_kevin
refs/heads/master
backup/unet/demo.py
1
import image_gen import unet import util from __future__ import division, print_function import matplotlib.pyplot as plt plt.rcParams['image.cmap'] = 'gist_earth' nx = 572 ny = 572 generator = image_gen.GrayScaleDataProvider(nx, ny, cnt=20) x_test, y_test = generator(1) fig, ax = plt.subplots(1, 2, sharey=True, f...
shikhir-arora/Giesela
refs/heads/documentation
musicbot/imgur.py
1
from io import BytesIO from imgurpython import ImgurClient from imgurpython.helpers.error import (ImgurClientError, ImgurClientRateLimitError) client_id = "a2ef870c9cfc5c0" client_secret = "9006ebbaed1dd639ef79de176ae10419664ac4c6" access_token = "2028c849e4a68badd5fe83b4a7a5411...
Distrotech/qtwebkit
refs/heads/distrotech-qtwebkit
Tools/Scripts/webkitpy/style/checkers/test_expectations.py
126
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
Keruspe/ibus
refs/heads/master
ibus/interface/__init__.py
6
# vim:set et sts=4 sw=4: # # ibus - The Input Bus # # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com> # Copyright (c) 2007-2010 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Sof...
rklabs/scrapy
refs/heads/master
scrapy/extension.py
41
""" The Extension Manager See documentation in docs/topics/extensions.rst """ from scrapy.middleware import MiddlewareManager from scrapy.utils.conf import build_component_list class ExtensionManager(MiddlewareManager): component_name = 'extension' @classmethod def _get_mwlist_from_settings(cls, setting...
lujung/python-spresso
refs/heads/master
spresso/controller/grant/api/api.py
1
from spresso.controller.grant.base import GrantHandler from spresso.view.api.api import ApiView class ApiInformationHandler(GrantHandler): def __init__(self, application, settings, **kwargs): super(ApiInformationHandler, self).__init__(**kwargs) self.application = application self.settings...
velocyno/glances
refs/heads/amps_extended_stats
glances/plugins/glances_processcount.py
1
# -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com> # # Glances 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 Lic...
mwcraig/vpython-jupyter
refs/heads/master
ez_setup.py
103
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
ArchiveTeam/rapidshare-discovery
refs/heads/master
discover.py
1
import gzip import re import requests import string import sys import time import random import os DEFAULT_HEADERS = {'User-Agent': 'ArchiveTeam'} class FetchError(Exception): '''Custom error class when fetching does not meet our expectation.''' def main(): # Take the program arguments given to this script...
indera/bubbles
refs/heads/master
tests/test_graph.py
4
import unittest from bubbles import * class GraphTestCase(unittest.TestCase): def test_basic(self): g = Graph() g.add(Node("src"), "n1") g.add(Node("distinct"),"n2") g.add(Node("pretty_print"), "n3") self.assertEqual(3, len(g.nodes)) g.connect("n1", "n2") ...
alfredoavanzosc/odoo-addons
refs/heads/8.0
report_odoo_logo/models/__init__.py
4
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import odoo_category from . import res_company
xuzhikethinker/t4f-data
refs/heads/master
nosql/cassandra/src/test/python/cassandra-node-token-lister.py
1
#!/usr/bin/python num_node = 4 for n in range(num_node): print str(n) + ': ' + str(int(2**127 / num_node * n))
MrSami/sandbox
refs/heads/master
alpagu/alpagu/settings/prod.py
3
from .core import *
atomic83/youtube-dl
refs/heads/master
youtube_dl/downloader/http.py
17
from __future__ import unicode_literals import errno import os import socket import time import re from .common import FileDownloader from ..compat import compat_urllib_error from ..utils import ( ContentTooShortError, encodeFilename, sanitize_open, sanitized_Request, ) class HttpFD(FileDownloader):...
gurunars/dict-validator
refs/heads/master
dict_validator/__init__.py
1
""" The package aims to simplify payload validation using schemas represented by by regular Python classes. In the heart of the library there are just a few top level concepts. To begin with a Schema is nothing else but a collection of fields that boils down to a definition of the following shape: .. code:: python ...
PizzaHackers/pizza-blog
refs/heads/master
node_modules/pg/node_modules/generic-pool/fabfile.py
926
# # dependencies: # fabric (apt-get install fabric) # node-jslint (http://github.com/reid/node-jslint) # expresso (or replace with whatever node.js test tool you're using) # from fabric.api import local import os, os.path def test(): local('expresso -I lib test/*', capture=False) def jslint(): ...
codilime/contrail-controller
refs/heads/windows3.1
src/config/utils/add_route_target.py
5
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import argparse import ConfigParser from provision_bgp import BgpProvisioner class MxProvisioner(object): def __init__(self, args_str=None): self._args = None if not args_str: args_str ...
partofthething/home-assistant
refs/heads/dev
homeassistant/components/auth/__init__.py
2
"""Component to allow users to login and get tokens. # POST /auth/token This is an OAuth2 endpoint for granting tokens. We currently support the grant types "authorization_code" and "refresh_token". Because we follow the OAuth2 spec, data should be send in formatted as x-www-form-urlencoded. Examples will be in JSON ...
nash-x/hws
refs/heads/master
nova/cells/scheduler.py
15
# Copyright (c) 2012 Rackspace Hosting # 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 req...
muxi/grpc
refs/heads/master
src/python/grpcio_testing/grpc_testing/_common.py
27
# Copyright 2017 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 writing...
evensonbryan/yocto-autobuilder
refs/heads/master
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/web/_newclient.py
9
# -*- test-case-name: twisted.web.test.test_newclient -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client. The way to use the functionality provided by this module is to: - Connect a L{HTTP11ClientProtocol} to an HT...
agry/NGECore2
refs/heads/master
scripts/object/tangible/ship/crafted/chassis/tieaggressor_deed.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/tangible/space/content_infrastructure/ground_missile_marker.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/weapon/melee/sword/sword_wod_sword.py
85615
import sys def setup(core, object): return
illagrenan/django-fab-deployer
refs/heads/master
setup.py
1
# coding=utf-8 from setuptools import setup try: from pypandoc import convert def read_md(file_name): # http://stackoverflow.com/a/23265673/752142 return convert(file_name, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") def r...
abhi11/dak
refs/heads/master
dak/rm.py
1
#!/usr/bin/env python """ General purpose package removal tool for ftpmaster """ # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 James Troup <james@nocrew.org> # Copyright (C) 2010 Alexander Reichle-Schmehl <tolimar@debian.org> # This program is free software; you can redistribute it and/or modify # it under the ...
kawasaki2013/python-for-android-x86
refs/heads/master
python3-alpha/python3-src/Doc/includes/sqlite3/countcursors.py
96
import sqlite3 class CountCursorsConnection(sqlite3.Connection): def __init__(self, *args, **kwargs): sqlite3.Connection.__init__(self, *args, **kwargs) self.numcursors = 0 def cursor(self, *args, **kwargs): self.numcursors += 1 return sqlite3.Connection.cursor(self, *args, **k...
ESOedX/edx-platform
refs/heads/master
common/lib/capa/capa/tests/test_util.py
1
# coding=utf-8 """ Tests capa util """ from __future__ import absolute_import import unittest import ddt from lxml import etree from capa.tests.helpers import test_capa_system from capa.util import ( compare_with_tolerance, contextualize_text, get_inner_html_from_xpath, remove_markup, sanitize_ht...
lkhomenk/integration_tests
refs/heads/master
cfme/utils/path.py
6
"""Project path helpers Contains `py.path.local`_ objects for accessing common project locations. Paths rendered below will be different in your local environment. .. _py.path.local: http://pylib.readthedocs.org/en/latest/path.html """ import imp from py.path import local _cfme_package_dir = local(imp.find_module(...
Netuitive/netuitive-diamond
refs/heads/master
src/collectors/mysqlstat/mysqlstat.py
1
# coding=utf-8 """ #### Grants * Normal usage ``` GRANT REPLICATION CLIENT on *.* TO 'user'@'hostname' IDENTIFIED BY 'password'; ``` * For innodb engine status ``` GRANT SUPER ON *.* TO 'user'@'hostname' IDENTIFIED BY 'password'; ``` * For innodb engine status on MySQL versions 5.1.24+ ``` GRANT PROCESS ON *.* ...
DavidAndreev/indico
refs/heads/devel
indico/MaKaC/services/implementation/base.py
1
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
toshywoshy/ansible
refs/heads/devel
lib/ansible/modules/database/influxdb/influxdb_retention_policy.py
68
#!/usr/bin/python # (c) 2016, Kamil Szczygiel <kamil.szczygiel () intel.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
SerpentCS/odoo
refs/heads/8.0
addons/hr/__openerp__.py
260
# -*- 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...
mabuchilab/QNET
refs/heads/develop
docs/_extensions/graphviz_ext.py
1
# -*- coding: utf-8 -*- """ sphinx.ext.graphviz ~~~~~~~~~~~~~~~~~~~ Allow graphviz-formatted graphs to be included in Sphinx-generated documents inline. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs import posixpath ...
rohangpatil/788DataInteraction
refs/heads/master
final/populate_features_matrix.py
1
#------------------------------------------------------------------------------ #Author: Vineet Nair #Parsing the raw graph file into gexf file for sigma.js readability #------------------------------------------------------------------------------ import re import sys #import pickle import random from operator import...
syn2cat/syndilights
refs/heads/master
open-lighting-architecture/protobuf-2.3.0/python/google/protobuf/internal/test_util.py
295
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
tedi3231/openerp
refs/heads/master
openerp/addons/l10n_co/__init__.py
119
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) Vauxoo S.A. de C.V. (<http://www.vauxoo.com>). # All Rights Reserved ###############Credits##########################################...
marcsans/cnn-physics-perception
refs/heads/master
phy/lib/python2.7/site-packages/sklearn/metrics/tests/test_ranking.py
46
from __future__ import division, print_function import numpy as np from itertools import product import warnings from scipy.sparse import csr_matrix from sklearn import datasets from sklearn import svm from sklearn.datasets import make_multilabel_classification from sklearn.random_projection import sparse_random_mat...
spektom/incubator-airflow
refs/heads/master
airflow/providers/amazon/aws/operators/emr_add_steps.py
4
# # 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...
bjwbell/servo
refs/heads/master
tests/wpt/harness/wptrunner/wpttest.py
33
# 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/. DEFAULT_TIMEOUT = 10 # seconds LONG_TIMEOUT = 60 # seconds import os import mozinfo from wptmanifest.parser import ...
pedrotgn/pyactor
refs/heads/master
examples/chord/example3.py
1
from pyactor.context import set_context, create_host, sleep, shutdown, \ interval from chord import Node nodes = [1, 8, 14, 21, 32, 38, 42, 48, 51, 56] nodes_h = {} if __name__ == '__main__': set_context('green_thread') host = create_host() # Create and initialize nodes for i in range(len(nodes...
dmitry-sobolev/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/cloudstack.py
175
# -*- coding: utf-8 -*- # Copyright (c) 2015 René Moser <mail@renemoser.net> # # 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 # (...
mkuron/espresso
refs/heads/python
testsuite/scripts/tutorials/test_11-ferrofluid_3.py
1
# Copyright (C) 2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 versio...
attakei/readthedocs-oauth
refs/heads/master
readthedocs/donate/urls.py
32
from django.conf.urls import url, patterns, include from .views import DonateCreateView from .views import DonateListView from .views import DonateSuccessView urlpatterns = patterns( '', url(r'^$', DonateListView.as_view(), name='donate'), url(r'^contribute/$', DonateCreateView.as_view(), name='donate_ad...
azavea/nyc-trees
refs/heads/develop
src/nyc_trees/nyc_trees/context_processors.py
3
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.conf import settings from django.core.urlresolvers import reverse from apps.users.views.user import USER_SETTINGS_PRIVACY_TAB_ID from apps.event.models import EventRegistra...
shreyas/lstree
refs/heads/master
tests/test_nodeTreeBuilder.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2016 Shreyas Kulkarni (shyran@gmail.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the right...
Bforartists/scons
refs/heads/master
scons-local/SCons/Tool/hpc++.py
3
"""SCons.Tool.hpc++ Tool-specific initialization for c++ on HP/UX. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of...
TQRG/physalia
refs/heads/master
physalia/energy_profiler.py
1
"""Module with main classes for energy profiling.""" import time import subprocess import types import click from physalia.power_meters import EmulatedPowerMeter from physalia.models import Measurement import physalia.utils.android as android_utils from physalia.exceptions import PhysaliaExecutionFailed class Androi...
sh4t/Sick-Beard
refs/heads/development
sickbeard/clients/transmission.py
30
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
wuxinwei240/three.js
refs/heads/master
utils/exporters/blender/modules/msgpack/_version.py
648
version = (0, 4, 2)
grupoprog3/proyecto_final
refs/heads/master
Entrega Final/flask/Lib/site-packages/migrate/changeset/databases/sqlite.py
60
""" `SQLite`_ database specific implementations of changeset classes. .. _`SQLite`: http://www.sqlite.org/ """ try: # Python 3 from collections import MutableMapping as DictMixin except ImportError: # Python 2 from UserDict import DictMixin from copy import copy import re from sqlalchemy.databases imp...
sigma-random/asuswrt-merlin
refs/heads/master
release/src/router/samba36/lib/dnspython/dns/__init__.py
35
# Copyright (C) 2003-2007, 2009 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS...
hackebrot/cookiedozer
refs/heads/master
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}.py
1
# -*- coding: utf-8 -*- import webbrowser import gettext import sys import kivy kivy.require('{{cookiecutter.kivy_version}}') from kivy.animation import Animation from kivy.app import App from kivy.clock import Clock from kivy.logger import Logger from kivy.properties import ( BoundedNumericProperty, ObjectPrope...
demitri/cornish
refs/heads/master
source/cornish/plot/matplotlib.py
1
from typing import Union, Tuple import matplotlib.pyplot as plt import astropy.units as u import starlink.Grf as Grf import starlink.Ast as Ast #import starlink.Atl as Atl import numpy as np import astropy.units as u from astropy.units import Quantity from astropy.coordinates import SkyCoord from .cornish import Co...
jackytu/newbrandx
refs/heads/rankx
tests/unit/catalogue/__init__.py
60
# -*- coding: utf-8 -*- from django.test import TestCase from oscar.apps.catalogue.models import Product, ProductClass, Category class TestProductPickling(TestCase): def setUp(self): self.product_class, _ = ProductClass.objects.get_or_create( name='Pickle') def test_product_pickling_work...
ZuluPro/moto
refs/heads/master
tests/test_cloudformation/fixtures/fn_join.py
35
from __future__ import unicode_literals template = { "Resources": { "EC2EIP": { "Type": "AWS::EC2::EIP" } }, "Outputs": { "EIP": { "Description": "EIP for joining", "Value": { "Fn::Join": [ ":", ...
bd-j/magellanic
refs/heads/master
magellanic/starfit/add_stamps.py
1
import numpy as np import os, time #import astropy.io.fits as pyfits import pyfits from astropy import wcs import hrdspyutils as utils rp={} rp['stamp_size'] = 31 #in pixels, odd number rp['catname'] = 'results/massey_lmc_test_starprops.fits' #rp['catname'] = 'results/mcps_lmc_V20_detect4_starprops.fits' rp['imname'] ...
Usherwood/usherwood_ds
refs/heads/master
usherwood_ds/data_imports/reddit_api/api_class.py
1
#!/usr/bin/env python """Class for querying the Reddit API""" __author__ = "Peter J Usherwood" __python_version__ = "3.6" import praw import os import json from datetime import datetime import copy from usherwood_ds.data_imports.import_classes.common_classes import TextMention, User with open(os.path.join(os.path...
ellmetha/django-machina
refs/heads/main
machina/apps/forum_conversation/forum_attachments/apps.py
1
""" Forum attachments app config ============================ This module contains the application configuration class - available in the Django app registry. For more information on this file, see https://docs.djangoproject.com/en/dev/ref/applications/ """ from django.apps import AppConfig from djan...
wojtekwalczak/kaggle_titanic
refs/heads/master
titanic/transformers/FareFiller.py
1
import numpy as np import pandas as pd from sklearn.base import TransformerMixin fare_mean = None class FareFiller(TransformerMixin): def transform(self, features_raw, **transform_params): features = features_raw.copy(deep=True) global fare_mean if fare_mean is None: fare_mea...
wooga/airflow
refs/heads/master
airflow/providers/singularity/__init__.py
5130
# # 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...
mayankcu/Django-social
refs/heads/master
venv/Lib/site-packages/django/contrib/formtools/wizard/views.py
90
import re from django import forms from django.shortcuts import redirect from django.core.urlresolvers import reverse from django.forms import formsets, ValidationError from django.views.generic import TemplateView from django.utils.datastructures import SortedDict from django.utils.decorators import classonlymethod ...
jdreaver/vispy
refs/heads/master
examples/basics/scene/colored_line.py
18
# -*- coding: utf-8 -*- # vispy: gallery 30 # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -----------------------------------------------------...
fheinle/Photoblog
refs/heads/master
update.py
1
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' Update handler, gets new pictures from picasa only admins should be allowed to access this.''' # Copyright (C) 2009 Florian Heinle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
StephenWeber/ansible
refs/heads/devel
lib/ansible/modules/cloud/rackspace/rax_meta.py
50
#!/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...
CuonDeveloper/cuon
refs/heads/master
cuon_client/Client/CUON/cuon/Articles/ArticlesFastSelection.py
3
# -*- coding: utf-8 -*- ##Copyright (C) [2009] [Jürgen Hamel, D-32584 Löhne] ##This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as ##published by the Free Software Foundation; either version 3 of the License, or (at your option) any later versi...
BlackPole/bp-dvbapp
refs/heads/master
lib/python/Screens/PictureInPicture.py
13
from Screens.Screen import Screen from enigma import ePoint, eSize, eServiceCenter, getBestPlayableServiceReference, eServiceReference from Components.VideoWindow import VideoWindow from Components.config import config, ConfigPosition, ConfigYesNo from os import access, W_OK pip_config_initialized = False class Pictu...
apixandru/intellij-community
refs/heads/master
python/testData/intentions/returnTypeInPy3Annotation2_after.py
166
def my_func(p1=1) -> object: return p1 d = my_func(1)
pjg101/SickRage
refs/heads/master
lib/urllib3/exceptions.py
223
from __future__ import absolute_import from .packages.six.moves.http_client import ( IncompleteRead as httplib_IncompleteRead ) # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class Po...
yoanisgil/docker
refs/heads/master
vendor/src/github.com/hashicorp/go-msgpack/codec/msgpack_test.py
1233
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). import msgpack, msgpackrpc, sys, os, threading def get_test_data_list(): # get list with all primitive typ...
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/webrtc/src/chromium/src/tools/perf/page_sets/new_tab_page.py
24
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import time from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story INTERACTION_NAME = 'Inte...
Gabriel439/pants
refs/heads/master
tests/python/pants_test/backend/project_info/tasks/test_export_integration.py
1
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import json import o...
mdaniel/intellij-community
refs/heads/master
python/testData/inspections/PyPackageRequirementsInspection/IpAddressNotInRequirements/test1.py
40
import ipaddress print(ipaddress)
fengzhe29888/gnuradio-old
refs/heads/master
volk/python/volk_modtool/cfg.py
8
#!/usr/bin/env python # # Copyright 2013 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) # ...
mpasternak/michaldtz-fix-552
refs/heads/master
setup.py
7
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import shutil import sys # Bump pyglet/__init__.py version as well. VERSION = '1.2dev' long_description = '''pyglet provides an object-oriented programming interface for developing games and other visually-rich applicat...
fyabc/MiniGames
refs/heads/master
HearthStone2/MyHearthStone/ui/ui_cocos/card_sprite.py
1
#! /usr/bin/python # -*- coding: utf-8 -*- """The card sprite class.""" from cocos import rect, cocosnode, euclid from cocos.sprite import Sprite from cocos.text import Label, HTMLLabel from .select_effect import SelectEffectManager from .utils.active import ActiveMixin, children_inside_test from .utils.basic import...
fvpolpeta/devide
refs/heads/master
modules/user/testModule2.py
7
from module_base import ModuleBase from module_mixins import NoConfigModuleMixin import module_utils import vtk class testModule2(NoConfigModuleMixin, ModuleBase): """Resample volume according to 4x4 homogeneous transform. """ def __init__(self, module_manager): # initialise our base class ...
UK992/servo
refs/heads/master
tests/wpt/web-platform-tests/xhr/resources/accept.py
26
def main(request, response): return [("Content-Type", "text/plain")], request.headers.get("accept", "NO")
rmehta/erpnext
refs/heads/develop
erpnext/patches/v5_4/fix_invoice_outstanding.py
92
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt def execute(): frappe.reload_doctype("Sales Invoice") ...
wlerin/streamlink
refs/heads/master
src/streamlink/plugins/idf1.py
4
import re from streamlink.plugin import Plugin from streamlink.plugin.api import useragents, validate from streamlink.stream import HLSStream from streamlink.utils import parse_json, update_scheme class IDF1(Plugin): DACAST_API_URL = 'https://json.dacast.com/b/{}/{}/{}' DACAST_TOKEN_URL = 'https://services....
drpngx/tensorflow
refs/heads/master
tensorflow/contrib/layers/python/kernel_tests/sparse_feature_cross_op_test.py
15
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mediafactory/tryton_core_daemon
refs/heads/stable-2.4
trytond/backend/database.py
1
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from trytond.const import MODEL_CACHE_SIZE DatabaseIntegrityError = None DatabaseOperationalError = None class DatabaseInterface(object): ''' Define generic interface ...
vmax-feihu/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/admin/helpers.py
102
from __future__ import unicode_literals from django import forms from django.contrib.admin.util import (flatten_fieldsets, lookup_field, display_for_field, label_for_field, help_text_for_field) from django.contrib.admin.templatetags.admin_static import static from django.contrib.contenttypes.models import ContentT...
yotchang4s/cafebabepy
refs/heads/develop
src/main/python/importlib/machinery.py
101
"""The machinery of importlib: finders, loaders, hooks, etc.""" import _imp from ._bootstrap import ModuleSpec from ._bootstrap import BuiltinImporter from ._bootstrap import FrozenImporter from ._bootstrap_external import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES, OPTIMIZED_BYTECODE_SUFFIXES, BY...
AgrAlert/AgrAlert_Backend
refs/heads/master
lib/python2.7/site-packages/setuptools/command/__init__.py
475
__all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', 'register', 'bdist_wininst', 'upload_docs', ] from distutils.command.bdist imp...