code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
krmahadevan/selenium
py/selenium/webdriver/safari/webdriver.py
Python
apache-2.0
4,520
"""Get ride details and liveboard details for NMBS (Belgian railway).""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_NAME, CONF_SHOW_ON_MAP, ) import home...
joopert/home-assistant
homeassistant/components/nmbs/sensor.py
Python
apache-2.0
8,620
from redwind import app, db, util from redwind.models import Post import itertools db.engine.execute('alter table post add column historic_path varchar(256)') db.engine.execute('update post set historic_path = path') for post in Post.query.all(): print(post.historic_path) if not post.slug: post.slug =...
thedod/redwind
migrations/20141017-permalinks.py
Python
bsd-2-clause
531
# -*- coding: UTF-8 -*- import haystack from django.core.management.base import BaseCommand, CommandError from django.db import transaction from conference import models from conference.templatetags.conference import fare_blob from collections import defaultdict from datetime import datetime from xml.sax.saxutils im...
pythonitalia/pycon_site
p3/management/commands/partner_events.py
Python
bsd-2-clause
1,898
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): db.commit_transaction() try: self._forwards(orm) except E...
looker/sentry
src/sentry/south_migrations/0348_fix_project_key_rate_limit_window_unit.py
Python
bsd-3-clause
83,050
from rest_framework import relations, serializers import amo import mkt.carriers import mkt.regions from addons.models import Category from mkt.api.fields import SplitField, TranslationSerializerField from mkt.api.serializers import URLSerializerMixin from mkt.collections.serializers import (CollectionSerializer, Slug...
wagnerand/zamboni
mkt/feed/serializers.py
Python
bsd-3-clause
2,948
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD-3-Clause import copy import os im...
wmvanvliet/mne-python
mne/io/fiff/raw.py
Python
bsd-3-clause
20,018
import os import socket import geoip2.database from django.conf import settings from django.core.validators import ipv4_re from django.utils.ipv6 import is_valid_ipv6_address from .resources import City, Country # Creating the settings dictionary with any settings, if needed. GEOIP_SETTINGS = { 'GEOIP_PATH': ge...
mattseymour/django
django/contrib/gis/geoip2/base.py
Python
bsd-3-clause
8,991
from __future__ import unicode_literals from math import ceil from django.db import models, IntegrityError, connection from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature from django.utils.six.moves import range from .models import...
doismellburning/django
tests/delete/tests.py
Python
bsd-3-clause
15,685
""" Plots the instantaneous drag coefficient between 0 and 3 time-units of flow simulation and compares with numerical results from Koumoutsakos and Leonard (1995). _References:_ * Koumoutsakos, P., & Leonard, A. (1995). High-resolution simulations of the flow around an impulsively started cylinder using vortex me...
mesnardo/PetIBM
examples/ibpm/cylinder2dRe3000_GPU/scripts/plotDragCoefficient.py
Python
bsd-3-clause
2,006
from __future__ import print_function import shutil import os.path import tempfile import cProfile import pstats import nineml from nineml.utils.comprehensive_example import ( instances_of_all_types, v1_safe_docs) from nineml.serialization import ext_to_format, format_to_serializer format_to_ext = dict((v, k) for...
INCF/lib9ML
test/serialization_profile.py
Python
bsd-3-clause
1,617
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hs_core', '0018_merge'), ] operations = [ migrations.AddField( model_name='baseresource', name='lock...
ResearchSoftwareInstitute/MyHPOM
hs_core/migrations/0019_baseresource_locked_time.py
Python
bsd-3-clause
410
# $Id$ # # Copyright (C) 2005-2006 greg landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from __future__ import...
soerendip42/rdkit
rdkit/DataStructs/VectCollection.py
Python
bsd-3-clause
6,300
# lots to do: # __ native drawLines # __ add native drawCurve method # __ native rectangle/round rect method # __ native drawEllipse # __ native drawArc # __ drawImage support (work on Pyart side of things) from __future__ import print_function import pyart from rdkit.sping.pid import * from rdkit.sping...
soerendip42/rdkit
rdkit/sping/Pyart/pidPyart.py
Python
bsd-3-clause
9,314
from typing import ( Dict, Optional, ) import numpy as np from pandas.compat._optional import import_optional_dependency from pandas.core.util.numba_ import ( NUMBA_FUNC_CACHE, get_jit_arguments, ) def generate_online_numba_ewma_func(engine_kwargs: Optional[Dict[str, bool]]): """ Generate a...
rs2/pandas
pandas/core/window/online.py
Python
bsd-3-clause
3,789
#!/usr/bin/env python # -*- coding: utf-8 -*- # # tests/spf.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 of condit...
zigitax/king-phisher
tests/spf.py
Python
bsd-3-clause
5,698
# In this example we will show the difference between a 2-d Sobol sequence # and sampling uniformly at random in 2 dimensions. # The Sobol sequence has far lower discrepancy, i.e., the generated samples # are spread out better in the sampling space. # # This example requires matplotlib to generate figures. import matp...
chrinide/optunity
bin/examples/python/sobol_vs_uniform.py
Python
bsd-3-clause
960
""" Based on http://vaig.be/2009/03/getting-client-os-in-django.html """ import re def client_os(user_agent): ''' Context processor for Django that provides operating system information base on HTTP user agent. A user agent looks like (line break added): "Mozilla/5.0 (X11; U; Linux i686; en-US; r...
Alwnikrotikz/marinemap
lingcod/common/uaparser/clientos.py
Python
bsd-3-clause
1,804
import os import django TEST_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'tests') COMPRESS_CACHE_BACKEND = 'locmem://' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } INSTALLED_APPS = [ 'compressor', 'coffin', 'jingo',...
ramcn/demo3
venv/lib/python3.4/site-packages/compressor/test_settings.py
Python
mit
880
from stormed.util import WithFields class Declare(WithFields): _name = "queue.declare" _class_id = 50 _method_id = 10 _sync = True _content = False _fields = [ ('ticket' , 'short'), ('queue' , 'shortstr'), ('passive' , '...
bufferx/stormed-amqp
stormed/method/codegen/queue.py
Python
mit
3,261
""" Support for the definition of zones. For more details about this component, please refer to the documentation at https://home-assistant.io/components/zone/ """ import logging import voluptuous as vol from homeassistant.const import ( ATTR_HIDDEN, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_NAME, CONF_LATITUDE, C...
Smart-Torvy/torvy-home-assistant
homeassistant/components/zone.py
Python
mit
4,669
import unittest import threading from electrum import constants # Set this locally to make the test suite run faster. # If set, unit tests that would normally test functions with multiple implementations, # will only be run once, using the fastest implementation. # e.g. libsecp256k1 vs python-ecdsa. pycryptodomex vs...
cryptapus/electrum
electrum/tests/__init__.py
Python
mit
902
# -*- coding: UTF-8 -*- __revision__ = '$Id$' # Copyright (c) 2005-2007 Vasco Nunes # # 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...
FiloSottile/Griffith-mirror
lib/plugins/export/PluginExportCSV.py
Python
gpl-2.0
3,429
#!/usr/bin/env python # -*- coding: utf-8 -*- # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Inse...
markofu/scripts
nmap/nmap/zenmap/zenmapGUI/DiffCompare.py
Python
gpl-2.0
22,982
# util/_collections.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Collection classes and helpers.""" from __future__ import absolute_import ...
gltn/stdm
stdm/third_party/sqlalchemy/util/_collections.py
Python
gpl-2.0
29,219
# $Id: icmp.py,v 1.1.1.1 2005/10/29 18:20:48 provos Exp $ from dpkt import Packet, in_cksum as _icmp_cksum import ip # Types (icmp_type) and codes (icmp_code) - # http://www.iana.org/assignments/icmp-parameters ICMP_CODE_NONE = 0 # for types without codes ICMP_ECHOREPLY = 0 # echo reply ICMP_UNREACH = 3 # dest u...
Banjong1990/honey
dpkt/dpkt/icmp.py
Python
gpl-2.0
4,112
'''OpenGL extension NV.pixel_data_range This module customises the behaviour of the OpenGL.raw.GL.NV.pixel_data_range to provide a more Python-friendly API Overview (from the spec) The vertex array range extension is intended to improve the efficiency of OpenGL vertex arrays. OpenGL vertex arrays' coherency m...
D4wN/brickv
src/build_data/windows/OpenGL/GL/NV/pixel_data_range.py
Python
gpl-2.0
3,489
# (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...
alxgu/ansible
lib/ansible/playbook/__init__.py
Python
gpl-3.0
4,467
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others # # 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 Foun...
wehkamp/ansible
lib/ansible/plugins/__init__.py
Python
gpl-3.0
12,794
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
electrolinux/weblate
weblate/accounts/tests.py
Python
gpl-3.0
26,044
#!/usr/bin/env python """ dirac-rss-list-status Script that dumps the DB information for the elements into the standard output. If returns information concerning the StatusType and Status attributes. Usage: dirac-rss-list-status --element= Element family to be Synchronized ( Sit...
andresailer/DIRAC
ResourceStatusSystem/scripts/dirac-rss-list-status.py
Python
gpl-3.0
5,951
def sv_main(num_verts=20, radius=5, num_rings=3, rotation=0.3, mdist=0.3): # in boilerplate, could be less verbose in_sockets = [ ['s', 'num_verts', num_verts], ['s', 'radius', radius], ['s', 'num_rings', num_rings], ['s', 'rotation', rotation], ['s', 'distance', mdist...
kilon/sverchok
node_scripts/templates/zeffii/vert_edges_kdtree_range.py
Python
gpl-3.0
1,409
import os import sys import math import time import json from rpc_client import RPC_Client ROOT = os.path.dirname(os.path.realpath(sys.argv[0])) DBPATH = os.path.join(ROOT, 'build.json') MAXGAS = hex(int(math.pi*1e6)) def get_db(): with open(DBPATH) as dbfile: return json.load(dbfile) def save_db(db): ...
kustomzone/augur-core
pyrpctools/__init__.py
Python
gpl-3.0
1,125
# Copyright (c) Microsoft Corporation 2015 from z3 import * x = Real('x') y = Real('y') s = Solver() s.add(x + y > 5, x > 1, y > 1) print(s.check()) print(s.model())
sccblom/vercors
deps/z3/4.4.1/Windows NT/intel/bin/example.py
Python
mpl-2.0
178
# -*- coding: utf-8 -*- # The Hazard Library # Copyright (C) 2013-2014, GEM Foundation # # This program 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 opt...
mmpagani/oq-hazardlib
openquake/hazardlib/gsim/edwards_fah_2013a.py
Python
agpl-3.0
9,481
# -*- coding: utf-8 -*- # Copyright(C) 2014 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 opt...
sputnick-dev/weboob
modules/bp/pages/pro.py
Python
agpl-3.0
3,390
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import timedelta from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError class SaleOrder(models.Model): _inherit = 'sale.order' @api.model def default_...
rven/odoo
addons/sale_management/models/sale_order.py
Python
agpl-3.0
12,391
import models import pombola.core.models from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404, redirect def in_place(request, slug): place = get_object_or_404( pombola.core.models.Place, slug=slug) projects = place.project_set return render_to...
patricmutwiri/pombola
pombola/projects/views.py
Python
agpl-3.0
504
# -*- coding: utf-8 -*- from . import test_product_margin_classification
acsone/sale-workflow
product_margin_classification/tests/__init__.py
Python
agpl-3.0
74
# -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it un...
macopedia/hr
__unported__/hr_language/hr_language.py
Python
agpl-3.0
2,057
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
account_exchange_rates_adjustment/__init__.py
Python
agpl-3.0
1,086
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) Camptocamp SA # Author: Arnaud WÃŒst # # # This file is part of the c2c_report_tools module. # # # WARNING: This program as such is intended to be used by professional # programmers who take the w...
VitalPet/c2c-rd-addons
c2c_reporting_tools_chricar/__terp__.py
Python
agpl-3.0
2,752
# -*- coding: utf-8 -*- # Copyright (C) 2009 Canonical # # Authors: # Michael Vogt # # 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; version 3. # # This program is distributed in the hope that...
gusDuarte/software-center-5.2
softwarecenter/ui/gtk3/review_gui_helper.py
Python
lgpl-3.0
55,851
__all__ = ['DirectEntryScroll'] from pandac.PandaModules import * import DirectGuiGlobals as DGG from DirectScrolledFrame import * from DirectFrame import * from DirectEntry import * class DirectEntryScroll(DirectFrame): def __init__(self, entry, parent = None, **kw): optiondefs = ( ('pgFunc',...
silly-wacky-3-town-toon/SOURCE-COD
toontown/pgui/DirectEntryScroll.py
Python
apache-2.0
4,075
# # 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 # ...
noironetworks/neutron
neutron/db/migration/alembic_migrations/versions/queens/expand/594422d373ee_fip_qos.py
Python
apache-2.0
1,485
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
CMSS-BCRDB/RDS
trove/guestagent/strategies/restore/mysql_impl.py
Python
apache-2.0
13,702
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
rvs/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/lib/dbstate.py
Python
apache-2.0
3,081
#!/usr/bin/env python # # Copyright (C) 2011 Nigel Bree # 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 co...
uvbs/steam-limiter
updateapp/main.py
Python
bsd-2-clause
18,251
""" CryptoPy - a pure python cryptographic libraries crypto.passwords package Copyright (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. """
realms-team/solmanager
libs/smartmeshsdk-REL-1.3.0.1/external_libs/cryptopy/crypto/passwords/__init__.py
Python
bsd-3-clause
179
from itty import * @error(500) def my_great_500(request, exception): html_output = """ <html> <head> <title>Application Error! OH NOES!</title> </head> <body> <h1>OH NOES!</h1> <p>Yep, you broke it.</p> <...
husio/itty
examples/error_handling.py
Python
bsd-3-clause
1,152
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= K-means Clustering ========================================================= The plots display firstly what a K-means algorithm would yield using three clusters. It is then shown what the effect of a bad initializa...
florian-f/sklearn
examples/cluster/plot_cluster_iris.py
Python
bsd-3-clause
2,573
"""Unit tests for collections.defaultdict.""" import os import copy import pickle import tempfile import unittest from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): d1 = defaultdict() self.assertEqual(d1.default_fact...
yotchang4s/cafebabepy
src/main/python/test/test_defaultdict.py
Python
bsd-3-clause
6,033
# Copyright 2017 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 os import sys _HEADERS = """ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data...
scheib/chromium
tools/binary_size/libsupersize/testdata/mock_toolchain/mock_readelf.py
Python
bsd-3-clause
11,261
#!/usr/bin/env python from circuits import Component, Event class bark(Event): """bark Event""" class Pound(Component): def __init__(self): super(Pound, self).__init__() self.bob = Bob().register(self) self.fred = Fred().register(self) class Dog(Component): def started(sel...
treemo/circuits
docs/source/tutorials/woof/009.py
Python
mit
550
import unittest import os import math from rdbtools import RdbCallback, RdbParser class RedisParserTestCase(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_empty_rdb(self): r = load_rdb('empty_database.rdb') self.assert_('start_rdb' in r...
idning/redis-rdb-tools
tests/parser_tests.py
Python
mit
14,949
import datetime from django import template from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.syndication.views import Feed, add_domain from django.utils import feedgenerator, tzinfo from django.utils.encoding im...
steventimberman/masterDebater
venv/lib/python2.7/site-packages/disqus/wxr_feed.py
Python
mit
9,430
import os # toolchains options ARCH='arm' CPU='cortex-m7' CROSS_TOOL='gcc' # bsp lib config BSP_LIBRARY_TYPE = None if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute...
blueskycoco/rt-thread
bsp/stm32/stm32f767-fire-challenger/rtconfig.py
Python
gpl-2.0
4,079
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2015 Nick Hall # # 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) a...
beernarrd/gramps
gramps/gui/actiongroup.py
Python
gpl-2.0
1,674
#!/usr/bin/env python """ Usage: AppcastReplaceItem <path-to-appcast> <old-version> <new-version> <path-to-dmg> Example: AppcastReplaceItem appcast-release.xml 1.1.4 1.2 Release/build/Adium_1.2.dmg """ # Configurable variables. app_name = 'Adium' changelog_fmt = 'http://www.adium.im/changelogs/%(version)s.html' encl...
mosleyjr/Adium
Utilities/AppcastReplaceItem.py
Python
gpl-2.0
3,173
""" rewrite of lambdify - This stuff is not stable at all. It is for internal use in the new plotting module. It may (will! see the Q'n'A in the source) be rewritten. It's completely self contained. Especially it does not use lambdarepr. It does not aim to replace the current lambdify. Most importantly it will never...
wxgeo/geophar
wxgeometrie/sympy/plotting/experimental_lambdify.py
Python
gpl-2.0
26,133
#!/usr/bin/env python from flask.ext.script import Manager from flask_frozen import Freezer import discovery import logging out = logging.StreamHandler() out.setFormatter(logging.Formatter()) out.setLevel(logging.DEBUG) logging.getLogger('freepto-web').setLevel(logging.INFO) logging.getLogger('freepto-web').addHandler...
vinc3nt/freepto-web
manage.py
Python
gpl-2.0
842
#!/usr/bin/env python from sqlalchemy import create_engine, and_, or_ from sqlalchemy.orm.session import sessionmaker from rts2.db import Targets,Grb Session = sessionmaker() engine = create_engine('postgresql://petr:petr@localhost/stars',echo='debug') Session.configure(bind=engine) sess = Session() targ = sess.que...
xyficu/rts2
python/testalchemy.py
Python
gpl-2.0
575
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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; eith...
sam-m888/gramps
gramps/gen/filters/rules/_hassourceofbase.py
Python
gpl-2.0
2,721
import gc import hashlib import os import os.path import tempfile import zipfile import numpy as np import pytest import requests from hyperspy import signals from hyperspy.io import load MY_PATH = os.path.dirname(__file__) ZIPF = os.path.join(MY_PATH, "edax_files.zip") TMP_DIR = tempfile.TemporaryDirectory() TEST_F...
thomasaarholt/hyperspy
hyperspy/tests/io/test_edax.py
Python
gpl-3.0
19,779
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,re,traceback,sys from waflib import Utils,ansiterm if not os.environ.get('NOSYNC',False): if sys.stdout.isatty()and id(sys.stdout)==id(sys.__stdout__): sys.stdout=ansiterm.AnsiTerm(sys.s...
Gnurou/glmark2
waflib/Logs.py
Python
gpl-3.0
5,584
# Copyright (C) 2013, Walter Bender - Raul Gutierrez Segales # # 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 version. # # This ...
icarito/sugar
extensions/cpsection/webaccount/view.py
Python
gpl-3.0
4,477
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
fxfitz/ansible
lib/ansible/modules/network/nxos/nxos_linkagg.py
Python
gpl-3.0
12,502
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import ValidationError from odoo import models, fields, api, _ from odoo.osv import expression SII_VAT = '60805000-0' class AccountMove(models.Model): _inherit = "account.move" partner_id_...
jeremiahyan/odoo
addons/l10n_cl/models/account_move.py
Python
gpl-3.0
9,118
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document from frappe.contacts.address_and_contact import load_address_and_contact STANDARD_USERS = ("...
indictranstech/erpnext
erpnext/non_profit/doctype/member/member.py
Python
agpl-3.0
738
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import flt, get_datetime from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_p...
gangadhar-kadam/verve_test_erp
erpnext/manufacturing/doctype/production_order/test_production_order.py
Python
agpl-3.0
5,084
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RIlluminahumanmethylation450kannoIlmn12Hg19(RPackage): """Annotation for Illumina's 450k m...
LLNL/spack
var/spack/repos/builtin/packages/r-illuminahumanmethylation450kanno-ilmn12-hg19/package.py
Python
lgpl-2.1
982
# pylint: disable=redefined-outer-name import os import pytest from pylint import checkers from pylint.lint import PyLinter # pylint: disable=no-name-in-module from pylint.testutils import MinimalTestReporter @pytest.fixture def linter(checker, register, enable, disable, reporter): _linter = PyLinter() _lint...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/test/conftest.py
Python
apache-2.0
1,039
from contextlib import nested from contextlib import contextmanager import mock import testing as T import types from core import db from core.settings import Settings from core.mail import MailQueue from core.util import get_servlet_urlspec from core.xmppclient import XMPPQueue import servlets.newpush from servlets....
pombredanne/pushmanager
tests/test_servlet_newpush.py
Python
apache-2.0
6,300
from temboo.Library.Yelp.SearchByAddress import SearchByAddress, SearchByAddressInputSet, SearchByAddressResultSet, SearchByAddressChoreographyExecution from temboo.Library.Yelp.SearchByBoundingBox import SearchByBoundingBox, SearchByBoundingBoxInputSet, SearchByBoundingBoxResultSet, SearchByBoundingBoxChoreographyExec...
jordanemedlock/psychtruths
temboo/core/Library/Yelp/__init__.py
Python
apache-2.0
1,354
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012 Red Hat, Inc. # Copyright 2013 Nicira, Inc. # All Rights Reserved # # Licen...
zestrada/nova-cs498cc
nova/network/security_group/security_group_base.py
Python
apache-2.0
8,407
# Copyright (c) 2018 PaddlePaddle 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 app...
QiJune/Paddle
python/paddle/fluid/tests/unittests/test_crop_op.py
Python
apache-2.0
3,722
# 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...
kobejean/tensorflow
tensorflow/python/ops/ctc_ops.py
Python
apache-2.0
11,926
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-02-16 17:16 from __future__ import unicode_literals import base.utils from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('challenges', '0022_challengephase_dataset_split'), ] operations =...
taranjeet/EvalAI
apps/challenges/migrations/0023_upload_unique_random_filename.py
Python
bsd-3-clause
767
""" ========================================================================= 2 samples permutation test on source data with spatio-temporal clustering ========================================================================= Tests if the source space data are significantly different between 2 groups of subjects (simu...
Odingod/mne-python
examples/stats/plot_cluster_stats_spatio_temporal_2samp.py
Python
bsd-3-clause
4,284
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from datetime import datetime, date from optionaldict import optionaldict from wechatpy.client.api.base import BaseWeChatAPI class WeChatWiFi(BaseWeChatAPI): API_BASE_URL = 'https://api.weixin.qq.com/bizwifi/' def list_shops(s...
chenjiancan/wechatpy
wechatpy/client/api/wifi.py
Python
mit
5,576
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url, include import spirit.comment.bookmark.urls import spirit.comment.flag.urls import spirit.comment.history.urls import spirit.comment.like.urls from . import views urlpatterns = [ url(r'^(?P<topic_id>\d+)/publish/$...
gogobook/Spirit
spirit/comment/urls.py
Python
mit
1,185
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
sadanandb/pmt
src/tactic/triggers/data_trigger.py
Python
epl-1.0
2,434
""" This page is in the table of contents. The xml.py script is an import translator plugin to get a carving from an Art of Illusion xml file. An import plugin is a script in the interpret_plugins folder which has the function getCarving. It is meant to be run from the interpret tool. To ensure that the plugin works...
natetrue/ReplicatorG
skein_engines/skeinforge-35/fabmetheus_utilities/geometry/solids/cube.py
Python
gpl-2.0
3,514
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 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 (at your option) any...
tiborsimko/invenio-ext
invenio_ext/fixtures/registry.py
Python
gpl-2.0
1,417
from math import sqrt import gtk from gettext import gettext as _ from ase.gui.widgets import pack, Help class Constraints(gtk.Window): def __init__(self, gui): gtk.Window.__init__(self) self.set_title(_('Constraints')) vbox = gtk.VBox() b = pack(vbox, [gtk.Button(_('Constrain'))...
grhawk/ASE
tools/ase/gui/constraints.py
Python
gpl-2.0
1,497
#!/usr/bin/env python from __future__ import print_function ''' display a image in a subprocess Andrew Tridgell June 2012 ''' import time from MAVProxy.modules.lib.wx_loader import wx import cv2 import numpy as np import warnings from MAVProxy.modules.lib import mp_util from MAVProxy.modules.lib import mp_widgets f...
Dronecode/MAVProxy
MAVProxy/modules/lib/mp_image.py
Python
gpl-3.0
20,342
import fnmatch import os import re import shutil import sys import uuid from base import Step, StepRunner from tree import Commit here = os.path.abspath(os.path.split(__file__)[0]) bsd_license = """W3C 3-clause BSD License Redistribution and use in source and binary forms, with or without modification, are permitte...
peterjoel/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/sync.py
Python
mpl-2.0
6,707
""" Script for exporting all courseware from Mongo to a directory and listing the courses which failed to export """ from django.core.management.base import BaseCommand from six import text_type from xmodule.contentstore.django import contentstore from xmodule.modulestore.django import modulestore from xmodule.modul...
stvstnfrd/edx-platform
cms/djangoapps/contentstore/management/commands/export_all_courses.py
Python
agpl-3.0
2,278
from funtests import transport class test_redis(transport.TransportCase): transport = "redis" prefix = "redis" def after_connect(self, connection): client = connection.channel().client client.info() def test_cant_connect_raises_connection_error(self): conn = self.get_connecti...
mzdaniel/oh-mainline
vendor/packages/kombu/funtests/tests/test_redis.py
Python
agpl-3.0
399
# -*- coding: utf-8 -*- ############################################################################## # # Daniel Reis # 2011 # # This program 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 ...
hbrunn/server-tools
__unported__/import_odbc/import_odbc.py
Python
agpl-3.0
10,315
#!/usr/bin/env python """Create a "virtual" Python installation """ # If you change the version here, change it in setup.py # and docs/conf.py as well. virtualenv_version = "1.7.1.2" import base64 import sys import os import optparse import re import shutil import logging import tempfile import zlib import errno impo...
makerbot/conveyor
virtualenv.py
Python
agpl-3.0
101,937
## \file ## \ingroup tutorial_tdataframe ## \notebook -nodraw ## This tutorial shows how to express the concept of ranges when working with the TDataFrame. ## \macro_code ## ## \date March 2017 ## \author Danilo Piparo import ROOT fill_tree_code = ''' void fill_tree(const char *filename, const char *treeName) { TF...
bbockelm/root
tutorials/dataframe/tdf006_ranges.py
Python
lgpl-2.1
2,283
from __future__ import absolute_import import six import warnings from . import backend as K from .utils.generic_utils import deserialize_keras_object from .engine import Layer def softmax(x, axis=-1): """Softmax activation function. # Arguments x : Tensor. axis: Integer, axis along which the...
deepforge-dev/deepforge-keras
test/test-cases/activations.py
Python
apache-2.0
2,712
# Copyright 2011 OpenStack Foundation # Copyright 2011 Justin Santa Barbara # 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/l...
nash-x/hws
cinder/api/extensions.py
Python
apache-2.0
13,552
# -*- coding: utf-8 -*- # # Copyright 2018 Vote 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 ag...
riga/luigi
test/config_toml_test.py
Python
apache-2.0
3,012
# Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # # You may o...
nis-sdn/odenos
apps/cli/producer.py
Python
apache-2.0
16,458
# Copyright (c) 2016 EMC Corporation # # 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...
Hybrid-Cloud/cinder
cinder/api/v3/group_specs.py
Python
apache-2.0
5,882
"""Tests for streams.py""" import asyncio import unittest from unittest import mock from aiohttp import streams from aiohttp import test_utils class TestStreamReader(unittest.TestCase): DATA = b'line1\nline2\nline3\n' def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_...
vasylbo/aiohttp
tests/test_streams.py
Python
apache-2.0
21,126
__author__ = 'Lorenzo' planet_mapper = { '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>': 'planet type', # link to yago category, can be explored more '<http://live.dbpedia.org/ontology/wikiPageExternalLink>': 'external link', # many '<http://live.dbpedia.org/property/inclination>': 'inclination', ...
pincopallino93/rdfendpoints
parser/dbpediamap.py
Python
apache-2.0
2,410
# 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...
tensorflow/tensorflow
tensorflow/python/framework/c_api_util.py
Python
apache-2.0
7,542