code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
"""Interface to the liblzma compression library. This module provides a class for reading and writing compressed files, classes for incremental (de)compression, and convenience functions for one-shot (de)compression. These classes and functions support both the XZ and legacy LZMA container formats, as well as raw com...
mfojtik/openshift-docker-registry
backports/lzma/__init__.py
Python
apache-2.0
17,555
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/__init__.py
Python
mit
586
""" Identity Based Signature | From: "David Pointcheval and Olivier Sanders. Short Randomizable Signatures" | Published in: 2015 | Available from: https://eprint.iacr.org/2015/525.pdf * type: signature (identity-based) * setting: bilinear groups (asymmetric) :Authors: Lovesh Harchandani :Date: ...
JHUISI/charm
charm/schemes/pksig/pksig_ps03.py
Python
lgpl-3.0
2,946
soma=0 i=1 k=10 x= while i<=k: termo = x**i/(k-i)+1 i=i+1 print(termo)
andersonsilvade/python_C
Python32/teste matematica.py
Python
mit
80
# Copyright (c) 2016 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ Skew-T with Complex Layout ========================== Combine a Skew-T and a hodograph using Matplotlib's `GridSpec` layout capability. """ import matplotlib.gridspec as gridsp...
metpy/MetPy
v0.9/_downloads/f6c53ea43150f4d2bd08cd74a37033b0/Skew-T_Layout.py
Python
bsd-3-clause
2,557
import uncertainties from uncertainties import ufloat import math import numpy import numpy import pylab from scipy.optimize import curve_fit import math import scipy.stats #Misuro a mano con il tester i valori che poi vado a mettere nel file, posso anche lasciare lo sfasamento vuoto def linear(x, a, b): return a*x+...
fedebell/Laboratorio3
relazione2/scriptVecchi/bode.py
Python
gpl-3.0
1,939
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'E:\Projects\PyDatcomLab\PyDatcomLab\GUIs\components\ImageTips.ui' # # Created by: PyQt5 UI code generator 5.10 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): d...
darkspring2015/PyDatcomLab
PyDatcomLab/GUIs/components/Ui_ImageTips.py
Python
mit
1,799
# -*- encoding: utf-8 -*- ############################################################################## # # Daniel Campos (danielcampos@avanzosc.es) Date: 08/09/2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publi...
mikelarre/odoomrp-wip-1
mrp_machine_manager/models/__init__.py
Python
agpl-3.0
1,051
from .local import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'temp.db', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } OPBEAT['APP_ID'] = None
pkimber/kbsoftware_couk
settings/dev_test.py
Python
apache-2.0
247
#!/usr/bin/env python # -*- coding: utf-8 -*- """Classes and functions to simulate an Ornstein-Uhlenbeck process for the instantaneous growth rate See also -------- :mod:`tunacell.simu.base` for base classes to parameterize numerical simulations """ from __future__ import print_function from builtins import input #...
LeBarbouze/tunacell
tunacell/simu/ou.py
Python
mit
22,612
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ericsson AB # # 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 ...
EricssonResearch/calvin-base
calvin/actorstore/systemactors/text/PostfixString.py
Python
apache-2.0
1,417
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache/incubator-mxnet
python/mxnet/contrib/quantization.py
Python
apache-2.0
46,525
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Public Library of Science # # 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 limitat...
PLOS/rhino
test/Base/WebDriverListener.py
Python
mit
6,741
# # Copyright (C) 2015 by YOUR NAME HERE # # This file is part of RoboComp # # RoboComp 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...
rajathkumarmp/robocomp-robolab
experimental/beaconsComp/src/beaconsI.py
Python
gpl-3.0
1,198
#!/usr/bin/env python from __future__ import absolute_import from __future__ import with_statement import fileinput from pprint import pprint def author(line): try: A, E = line.strip().rsplit(None, 1) E.replace(">", "").replace("<", "") except ValueError: A, E = line.strip(), None ...
couchbaselabs/celery
contrib/release/attribution.py
Python
bsd-3-clause
878
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # 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...
aboyett/blockdiag
src/blockdiag/utils/rst/directives.py
Python
apache-2.0
11,199
#!/usr/bin/env python3 """A pickle-able minimal representation of a QgsGeometry/QgsFeature.""" import math from qgis.core import ( QgsCoordinateReferenceSystem, QgsCoordinateTransformContext, QgsDistanceArea, QgsGeometry, QgsVertexId ) from .vertices import Vertices class CartogramFeature: ...
austromorph/cartogram3
lib/cartogramfeature.py
Python
gpl-3.0
4,821
COUNTS = [["can't", 2544], ["could've", 43], ["couldn't", 2296], ["couldn't've", 2], ["didn't", 5650], ["doesn't", 1264], ["don't", 6568], ["hadn't", 1085], ["hadn't've", 1], ["hasn't", 174], ["haven't", 469], ["he'd", 2494], ...
steven-cutting/latinpigsay
data/text/contractioncount.py
Python
mit
4,821
# Download the Python helper library from twilio.com/docs/python/install import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account # To set up environmental variables, see http://twil.io/secure account = os.environ['TWILIO_ACCOUNT_SID'] token = os.environ['TWILIO_AUTH_TOKE...
TwilioDevEd/api-snippets
ip-messaging/rest/services/update-service/update-service.6.x.py
Python
mit
504
# @package homotopy_weight # Module caffe2.fb.python.layers.homotopy_weight from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, schema from caffe2.python.layers.layers import ModelLayer imp...
ryfeus/lambda-packs
pytorch/source/caffe2/python/layers/homotopy_weight.py
Python
mit
4,451
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
jvrsantacruz/XlsxWriter
xlsxwriter/test/comparison/test_chart_scatter04.py
Python
bsd-2-clause
1,694
from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.testing import * import numpy.core.umath_tests as umt import numpy.core.operand_flag_tests as opflag_tests from numpy.compat import asbytes from numpy.core.test_rational import rational, test_add, test_add_ration...
jankoslavic/numpy
numpy/core/tests/test_ufunc.py
Python
bsd-3-clause
48,656
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------# # Imports. #----------------------------------------------------------------------------# from main import db from main import bcrypt # from carlae.main import db, bcrypt import base64 import urlparse import uuid i...
asobrien/carlae
carlae/models.py
Python
mit
7,521
import os import sys import time from data_processor.data_processor import process_data from support.command_line_parser import parse_command_line from support.support_funcs import decompress_file, is_file_zipped, print_seconds_nice def main(): args = parse_command_line() if args.inputfile is None: ...
JFF-Bohdan/tamaku
tamaku.py
Python
mit
2,222
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import posixpath import traceback from data_source import DataSource from docs_server_utils import FormatKey from extensions_paths import...
TeamEOS/external_chromium_org
chrome/common/extensions/docs/server2/template_data_source.py
Python
bsd-3-clause
1,884
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
openclimatedata/pymagicc
pymagicc/_version.py
Python
agpl-3.0
18,455
from copy import deepcopy import pytest from biothings.web.options.openapi import * _base_document = { 'openapi': '3.0.3', 'paths': {}, } def test_create(): o = OpenAPIDocumentBuilder() r = deepcopy(_base_document) assert o.document == r def test_create_child_context(): o = OpenAPIDocument...
biothings/biothings.api
tests/web/builder/test_openapi.py
Python
apache-2.0
5,552
from __future__ import absolute_import, division, generators, print_function import ast from ast import PyCF_ONLY_AST as _AST_FLAG from bisect import bisect_right import linecache import sys import six import inspect import tokenize import py cpy_compile = compile class Source(object): """ a immutable object ho...
tareqalayan/pytest
_pytest/_code/source.py
Python
mit
14,033
''' @ Harris Christiansen (code@HarrisChristiansen.com) Generals.io Automated Client - https://github.com/harrischristiansen/generals-bot Startup: Initiate Bots with command line arguments ''' import os import argparse from base import bot_base def startup(moveMethod, moveEvent=None, botName="PurdueBot"): parse...
harrischristiansen/generals-bot
startup.py
Python
mit
1,514
""" Each store has slightly different semantics wrt draft v published. XML doesn't officially recognize draft but does hold it in a subdir. Old mongo has a virtual but not physical draft for every unit in published state. Split mongo has a physical for every unit in every state. Given that, here's a table of semantics...
UQ-UQx/edx-platform_lti
common/lib/xmodule/xmodule/modulestore/xml_importer.py
Python
agpl-3.0
40,861
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines classes for reading/manipulating/writing the main sections of FEFF input file(feff.inp), namely HEADER, ATOMS, POTENTIAL and the program control tags. XANES and EXAFS input files, are a...
gmatteo/pymatgen
pymatgen/io/feff/inputs.py
Python
mit
32,754
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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...
sephalon/python-ivi
ivi/agilent/agilentBase8340.py
Python
mit
16,878
#!/usr/bin/env python # SIM-CITY client # # Copyright 2015 Joris Borgdorff <j.borgdorff@esciencecenter.nl> # # 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/licens...
fieldsofview/sim-city-client
scripts/deleteFromView.py
Python
apache-2.0
1,596
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2016 Alex Forencich 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...
Diti24/python-ivi
ivi/lecroy/lecroyWR44MXIA.py
Python
mit
1,652
import avro.schema from avro.datafile import DataFileReader, DataFileWriter from avro.io import DatumReader, DatumWriter schema = avro.schema.parse(open("user.avsc").read()) writer = DataFileWriter(open("users.avro", "w"), DatumWriter(), schema) writer.append({"name": "Alyssa", "favorite_number": 256}) writer.append(...
obulpathi/hadoop
avro/user.py
Python
apache-2.0
514
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
sebrandon1/neutron
neutron/plugins/ml2/drivers/type_vxlan.py
Python
apache-2.0
2,491
# Copyright (c) 2015 OpenStack Foundation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
eayunstack/neutron
neutron/quota/resource.py
Python
apache-2.0
15,516
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('contenttypes', '__latest__'), migrations.swappable_dependency(settings.AUTH_USER_MODEL...
openattic/openattic
backend/volumes/migrations/0001_initial.py
Python
gpl-2.0
6,297
# -*- coding: utf-8 -*- # # pytest-qt documentation build configuration file, created by # sphinx-quickstart on Mon Mar 04 22:54:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
The-Compiler/pytest-qt
docs/conf.py
Python
mit
7,906
# -*- coding: UTF-8 -*- from django.conf import settings as dsettings from django.contrib.auth import models as authModels from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.http import HttpResponse, Http404 from django.shortcuts import render, render_to_response, get_object_or_404 from dja...
matrixise/microblog
microblog/views.py
Python
bsd-2-clause
7,632
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import io import os import re import shutil from zipfile import ZipFile, ZIP_DEFLATED, BadZipfile from typing import Dict, Optional, TYPE_CHECKING from UM import i18nCatalog from UM.Logger import Logger from UM.Message imp...
Patola/Cura
cura/Backups/Backup.py
Python
lgpl-3.0
7,795
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hastexo', '0001_initial'), ] operations = [ migrations.CreateModel( name='Stack...
arbrandes/hastexo-xblock
hastexo/migrations/0002_stacklog.py
Python
agpl-3.0
2,016
def test_default(cookies): """ Checks if default configuration is working """ result = cookies.bake() assert result.exit_code == 0 assert result.project.isdir() assert result.exception is None
vchaptsev/cookiecutter-django-vue
tests/test_generation.py
Python
bsd-3-clause
222
# -*- coding: utf-8 -*- """ pygments.styles.pastie ~~~~~~~~~~~~~~~~~~~~~~ Style similar to the `pastie`_ default style. .. _pastie: http://pastie.caboo.se/ :copyright: 2006-2007 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.style import Style from pygments...
alon/polinax
libs/external_libs/Pygments-0.11.1/pygments/styles/pastie.py
Python
gpl-2.0
2,452
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt,...
ijat/Hotspot-PUTRA-Auto-login
PyInstaller-3.2/tests/old_suite/interactive/test_pygame.py
Python
gpl-3.0
8,057
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 # noqa: F401 # noqa: F401 import re def findOldestDate(incidentDate, newDate): incidentDate = datetime.strptime(incidentDate, "%Y-%m-%d %H:%M:%S") newDate = datetime.strptime(newDate, "%Y-%m-%d %H:%M:%S") return min...
demisto/content
Packs/HealthCheck/Scripts/HealthCheckServerLog/HealthCheckServerLog.py
Python
mit
9,356
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import numpy as np import tensorflow as tf from niftynet.layer.binary_masking import BinaryMaskingLayer from niftynet.layer.mean_variance_normalisation import MeanVarNormalisationLayer from tests.niftynet_testcase import NiftyNetTestCase ...
NifTK/NiftyNet
tests/mean_variance_normalisation_test.py
Python
apache-2.0
2,424
# -*- coding: utf-8 -*- # # Copyright © 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2, or (at your option) any later # version. This program is distributed in t...
release-monitoring/anitya
anitya/tests/test_distro.py
Python
gpl-2.0
3,802
# -*- coding: utf-8 -*- from neo4jrestclient.client import GraphDatabase from cypher.utils import urlparse class Connection(object): current = None connections = {} @classmethod def tell_format(cls): message = ("Format: " "(http|https)://username:password@hostname:port/db/...
crabhi/ipython-cypher
src/cypher/connection.py
Python
gpl-2.0
1,948
#!/usr/bin/env python2 # -*- coding: utf8 -*- # from __future__ import unicode_literals ''' This file is part of FIXME Screen Calendar. FIXME Events 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...
gcmalloc/screen-calendar
screen.py
Python
gpl-3.0
5,346
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.shtiker.KartPage from panda3d.core import CardMaker, DisplayRegion, NodePath, Plane, TextNode, Texture, Vec4 from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from direct.showbase import PythonUtil from direct.t...
DedMemez/ODS-August-2017
shtiker/KartPage.py
Python
apache-2.0
52,559
# Copyright (c) 2010-2013 OpenStack Foundation # # 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...
mjzmjz/swift
swift/common/request_helpers.py
Python
apache-2.0
16,917
""" Base types for extensions refactor """ from __future__ import absolute_import, unicode_literals from functools import wraps import inspect from django.contrib import admin from django.core.exceptions import ImproperlyConfigured from django.utils import six from feincms.utils import get_object class Extensions...
nickburlett/feincms
feincms/extensions.py
Python
bsd-3-clause
4,713
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to u...
maheshcn/memory-usage-from-ldfile
openpyxl/charts/reference.py
Python
gpl-2.0
3,753
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('autodidact', '0005_auto_20170308_1145'), ] operations = [ migrations.AlterModelOptions( name='programme', ...
JaapJoris/autodidact
autodidact/migrations/0006_auto_20170308_1203.py
Python
agpl-3.0
376
#------------------------------------------------------------------------------ # # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions d...
pankajp/pyface
pyface/ui/wx/message_dialog.py
Python
bsd-3-clause
2,411
import unittest from nose.plugins.attrib import attr import time import pymongo from tests.common import load_check PORT1 = 37017 PORT2 = 37018 MAX_WAIT = 150 @attr(requires='mongo') class TestTokuMX(unittest.TestCase): def testTokuMXCheck(self): self.agentConfig = { 'version': '0.1', ...
JohnLZeller/dd-agent
tests/test_tokumx.py
Python
bsd-3-clause
3,311
# MS STRING - NAMD # ------------------------------------- # The main file for the python script that runs MS string calculations using NAMD # as the engine. # Jeremy Tempkin # 11/6/13 #----------IMPORT------------ import sys import time import copy import numpy as np from subprocess import * from fileIO import * # ...
jtempkin/enhanced-sampling-toolkit
est/string_method/main.py
Python
mit
20,185
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import warnings import numpy as np from ...core.api import ImageList class FmriImageList(ImageList): """ Class to implement image list interface for FMRI time series Allows metadata such as vol...
bthirion/nipy
nipy/modalities/fmri/fmri.py
Python
bsd-3-clause
4,969
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lapare.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
themaxx75/lapare-bijoux
lapare.ca/manage.py
Python
bsd-3-clause
249
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Intel Corp. # """ Resource Pool Remove Plugin """ from control.commands.command import CommandResult from control.plugin.manager import DeclarePlugin from .resource_pool import ResourcePoolCommand @DeclarePlugin('resource_pool_remove', 100) class ResourcePoolRemoveComman...
intel-ctrlsys/actsys
actsys/control/commands/resource_pool/resource_pool_remove.py
Python
apache-2.0
933
# Copyright (c) 2015, Artem Osadchyi # # 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, Versi...
smithsane/openstack-env
openstack_env/cli.py
Python
bsd-3-clause
1,639
__author__ = 'Yves Bonjour' from Mock import Mock class FeedStoreMock(Mock): def set_feed_urls(self, feed_urls): self.feed_urls = feed_urls def get_feed_urls(self): self._handle_method_call("get_feed_urls") return self.feed_urls
ybonjour/nuus
services/feeds/tests/FeedStoreMock.py
Python
mit
264
import numpy as np from gensim.corpora import Dictionary from gensim.models import TfidfModel from scipy.sparse import dok_matrix import pickle from .compactmodel_io import CompactIOMachine from .classification_exceptions import NotImplementedException dtm_suffices = ['_docids.pkl', '_dictionary.dict', '_dtm.pkl']...
stephenhky/PyShortTextCategorization
shorttext/utils/dtm.py
Python
mit
8,040
# Copyright (c) 2017 Charles University, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2017 Tomas Machalek <tomas.machalek@gmail.com> # Copyright (c) 2017 Petr Duda <petrduda@seznam.cz> # # This program is free software; you can redistribute it and/or # modify it under the...
tomachalek/kontext
lib/plugins/abstract/token_connect.py
Python
gpl-2.0
7,487
# -*- coding: utf-8 -*- # Copyright (C) 2012-2015 Stéphane Graber # Author: Stéphane Graber <stgraber@ubuntu.com> # 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 Licens...
dmitry-sinina/samba4-manager
plugins/tree.py
Python
gpl-2.0
3,478
from behave import * @given('we are a registered user') def step_impl(context): pass @when('we choose to embark on a new quest') def step_impl(context): pass @then('gapz will ask us for a directive') def step_impl(context): pass
daonb/foxvi
tests/steps/eknight.py
Python
agpl-3.0
245
import numpy import time import ctypes from ..kdtree import kdtree from . import expr __all__ = [ 'Points', 'points', 'zeros', 'ones', 'empty', 'zeros_like', 'ones_like', 'empty_like', 'rand', 'load' ] class Final(type): # copied from https://stackoverflow.com/questions/16...
heremaps/pptk
pptk/points/points.py
Python
mit
8,717
# -*- coding: utf-8 -*- # # Copyright (c) 2016, Giacomo Cariello. 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 # # Un...
dockeroo/dockeroo
dockeroo/filters/scm/extract.py
Python
apache-2.0
2,429
#!/bin/env python # -*- coding: utf-8 -*- """ module for building discourse graphs from probability distribution and respecting some constraints, using Astar heuristics based search and variants (beam, b&b) TODO: unlabelled evaluation seems to bug on RF decoding (relation is of type orange.value -> go see in decoding...
kowey/attelo
attelo/decoding/astar.py
Python
gpl-3.0
19,295
""" Test basic std::weak_ptr functionality. """ from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestSharedPtr(TestBase): mydir = TestBase.compute_mydir(__file__) @add_test_categories(["libc++"]) @skipIf(compiler=no_match("clang")) ...
endlessm/chromium-browser
third_party/llvm/lldb/test/API/commands/expression/import-std-module/weak_ptr/TestWeakPtrFromStdModule.py
Python
bsd-3-clause
944
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore from .QDialog import QDialog class QErrorMessage(QDialog): """ QErrorMessage(QWidget parent=None) """ def cha...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QErrorMessage.py
Python
gpl-2.0
1,096
# 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...
snnn/tensorflow
tensorflow/python/ops/sparse_ops.py
Python
apache-2.0
90,456
from django.contrib.auth.models import Group, User, Permission from core.tests import datautil from grid.models import Grid from grid.models import Element, Feature, GridPackage from package.models import Category, PackageExample, Project from profiles.models import Profile def load(): category, created = Catego...
noisy/steemprojects.com
grid/tests/data.py
Python
mit
6,161
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
numenta/nupic.vision
src/nupic/vision/regions/ImageSensorFilters/Contrast.py
Python
agpl-3.0
2,899
# 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 # distributed under the Li...
rajalokan/keystone
keystone/tests/unit/auth/test_schema.py
Python
apache-2.0
15,001
class Clock(object): def schedule(self, *args): pass def schedule_interval(self, *args): pass def schedule_interval_soft(self, *args): pass def schedule_once(self, *args): pass def unschedule(self, *args): pass _default = Clock() def schedule(func, *args, **...
eevee/cocos2d-mirror
utest/pyglet_mockup1/pyglet/clock.py
Python
bsd-3-clause
786
# Copyright 2014 Kylincloud # # 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 ...
zouyapeng/horizon-newtouch
openstack_dashboard/dashboards/admin/networks/agents/forms.py
Python
apache-2.0
3,571
#!/usr/bin/env python3 import talalib import sqlite3 import threading import random import string import datetime import json import time import subprocess import os import urllib.request import urllib.error import sys import logging import logging.handlers import mount import shutil REPO_DIR = "/opt/tala/" STORAGE_D...
jake-walker/tala
index.py
Python
gpl-3.0
20,618
# # Copyright (C) 2004 SIPfoundry Inc. # Licensed by SIPfoundry under the GPL license. # # Copyright (C) 2004 SIP Forum # Licensed to SIPfoundry under a Contributor Agreement. # # # This file is part of SIP Forum User Agent Basic Test Suite which # belongs to the SIP Forum Test Framework. # # SIP Forum User Agent Basic...
VoIP-co-uk/sftf
UserAgentBasicTestSuite/case903.py
Python
gpl-2.0
2,723
#!/usr/local/autopkg/python # encoding: utf-8 # # Copyright 2015 The Pennsylvania State University. # """ BESTemplater.py Created by Matt Hansen (mah60@psu.edu) on 2015-04-30. AutoPkg Processor for importing tasks using the BigFix RESTAPI Updated by Rusty Myers (rzm102@psu.edu) on 2020-02-21. Work in progress. Does...
CLCMacTeam/AutoPkgBESEngine
Code/BESTemplater.py
Python
gpl-2.0
2,795
""" Performs a two-sided Kolmogorov-Smirnov test that the provided sample comes from the given probability distribution function. """ from __future__ import print_function import numpy import pyferret import pyferret.stats import scipy.stats def ferret_init(id): """ Initialization for the stats_kstest1 PyEF...
NOAA-PMEL/PyFerret
pyfermod/stats/stats_kstest1.py
Python
unlicense
5,870
# 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 # distributed under the Li...
rdo-management/tuskar
tuskar/manager/models.py
Python
apache-2.0
2,609
import json from uuid import uuid4 from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.contrib.auth.decorators import login_required from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore from xmodule.modulestore.inheritance import ...
rationalAgent/edx-platform-custom
cms/djangoapps/contentstore/views/item.py
Python
agpl-3.0
7,834
from django.shortcuts import render from django.template.context_processors import csrf from django.utils.translation import ugettext, ugettext_lazy as _ from users.utils import * @lawyer_required def show_documents(request): page = 'documents.html' con = {} con.update(csrf(request)) return render(request, page, ...
Maachi/Gestion
firms/views.py
Python
mit
461
""" Utility functions for validating various types of command line options using the 'schema' package. Exports: validate_file_option: Check if a file option exists or not. validate_dir_option: Check if a directory option exists or not. validate_list_option: Check if a string option is an item in a list validate_dict_o...
COMBINE-lab/piquant
piquant/options.py
Python
mit
9,519
from ..Qt import QtGui, QtCore try: from ..Qt import QtOpenGL HAVE_OPENGL = True except: HAVE_OPENGL = False import numpy as np from .GraphicsObject import GraphicsObject from .. import functions as fn from ..Point import Point import struct, sys from .. import getConfigOption from .. import debug __a...
pmaunz/pyqtgraph
pyqtgraph/graphicsItems/PlotCurveItem.py
Python
mit
24,635
# 序列解包 x, y, z = 1, 2, 3 print(x, y, z) # 交换值 x, y = y, x print(x, y, z) # 星号运算符收集多余的值 a, b, *rest = [1, 2, 3, 4] print(rest) # 链式赋值 a = b = 1 print(a, b) # 布尔 val = bool([]) # if else语句 if val: print('yes') else: print('no') # 运算符 # 是否同一个对象 print(a is b) print(a is not b) # 遍历 numbers = [0, 1, 2, 3] ...
technonac/studycode
python/begin_python_3rd/ch5/statement.py
Python
apache-2.0
1,340
# -*- coding: utf-8 -*- """ Log/output handling. """ from __future__ import print_function import sys import colors CRITICAL = 50 ERROR = 40 WARNING = 30 INFO = 20 DEBUG = 10 _levels = [ CRITICAL, ERROR, WARNING, INFO, DEBUG, ] _levels_to_names = { CRITICAL: 'CRITICAL', ERROR: 'ERROR',...
okdana/mp3civ
mp3sum/logging.py
Python
mit
3,911
# standard library import os.path import subprocess import json def dangerously_simulate_api_response(request_dict): """*SHOULD NOT RECEIVE USER INPUT*. Simulates the API output for the specified request using server files located within this repository's directory structure. The request should be in the form of...
cmu-delphi/delphi-epidata
src/server/simulate_api_response.py
Python
mit
2,007
# -*- coding: utf-8 -*- # # Copyright (C) 2009 Christopher Lenz # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Thin abstraction layer over the different available modules for decoding and encoding JSON data. This...
BenLand100/rat-pac
python/couchdb/json.py
Python
bsd-3-clause
4,738
# -*- coding: utf-8-unix; fill-column: 95; -*- ############################################################################################### # # This file is part of Escapade Trip Planner, a social web application for creating and # sharing motorcycle roadmaps. # # Copyright © 2011, Pierre-François Gomez <pef.gomez@...
pefgomez/escapade
escapade/frontend/http_client.py
Python
gpl-3.0
1,663
# -*- coding: utf-8 -*- # Copyright (C) 2013 by # Fred Morstatter <fred.morstatter@asu.edu> # Jordi Torrents <jtorrents@milnou.net> # All rights reserved. # BSD license. import random from networkx.utils import not_implemented_for __all__ = ['average_clustering'] __author__ = """\n""".join(['Fred Morstatter ...
LumPenPacK/NetworkExtractionFromImages
win_build/nefi2_win_amd64_msvc_2015/site-packages/networkx/algorithms/approximation/clustering_coefficient.py
Python
bsd-2-clause
1,992
#! /usr/bin/env python3 -u import http.client, urllib.request, urllib.parse, urllib.error, base64 from urllib.parse import urlencode, quote_plus import json from json.decoder import JSONDecodeError from string import ascii_uppercase import sys import csv from os import getenv, environ import json import select try:...
CivicKnowledge/metatab-packages
broken/askchisne.ucla.edu/askchisne.ucla.edu-foodhealth/scripts/dumpvar.py
Python
mit
1,952
"""Lifemapper backend constants module """ # Relative paths # For LmCompute command construction by LmServer (for Makeflow) SINGLE_SPECIES_SCRIPTS_DIR = 'LmCompute/tools/single' MULTI_SPECIES_SCRIPTS_DIR = 'LmCompute/tools/multi' COMMON_SCRIPTS_DIR = 'LmCompute/tools/common' BACKEND_SCRIPTS_DIR = 'LmBackend/tools' BOOM...
lifemapper/core
LmBackend/common/lmconstants.py
Python
gpl-3.0
2,487
from sympy.mpmath import * from sympy.mpmath.libmp import * def test_trig_misc_hard(): mp.prec = 53 # Worst-case input for an IEEE double, from a paper by Kahan x = ldexp(6381956970095103,797) assert cos(x) == mpf('-4.6871659242546277e-19') assert sin(x) == 1 mp.prec = 150 a = mpf(10**50) ...
pernici/sympy
sympy/mpmath/tests/test_trig.py
Python
bsd-3-clause
4,951
# Copyright 2013-2020 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 PyChronyk(PythonPackage): """A small Python 3 library containing some handy tools for hand...
iulian787/spack
var/spack/repos/builtin/packages/py-chronyk/package.py
Python
lgpl-2.1
834
from setuptools import setup setup( name="gdt", version="0.1", url='http://github.com/praekelt/vumi-go-data-tools', license='BSD', description="", long_description=open('README.rst', 'r').read(), author='Praekelt Foundation', author_email='dev@praekeltfoundation.org', packages=[ ...
praekelt/vumi-go-data-tools
setup.py
Python
bsd-3-clause
837
# -*- coding: utf-8 -*- import sys import typing import threading from .events import EventObservable, TestEventHandler from .bench import TestBench import logging logger = logging.getLogger(__name__) class TestContext: """ Test context bind with thread, each thread can only have one context. It used t...
yyang179/ngta
ngta/context.py
Python
mit
2,583
"""query1.py""" from pyspark import SparkContext print "Running Query III" sc = SparkContext("local", "Simple App") # Cache the data. data1 = sc.textFile("/srtec/kjan2009.csv") data2 = sc.textFile("/srtec/kjun2009.csv") data3 = sc.textFile("/srtec/kmar2009.csv") data4 = sc.textFile("/srtec/kmay2009.csv"...
mugglmenzel/spark-experiments
python/query7.py
Python
apache-2.0
743