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
#!/usr/bin/env python # encoding: utf-8 """ juypter_notebooks_munin.py Created by Christian Stade-Schuldt on 2016-12-30. Copyright (c) 2016 Project-A Ventures. All rights reserved. """ import sys import os import requests BASE_URL = os.environ['jupyter_url'] def get_number_of_notebooks(): """ Fetches the nu...
Tafkas/jupyter-munin
juypter_notebooks_munin.py
Python
gpl-2.0
2,809
""" Copyright 2014 Magnus Briden 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 ...
Haxtastic/FatbotIRC
modules/games/__init__.py
Python
apache-2.0
675
#!/usr/bin/python """ Joint adapters generator """ from __future__ import print_function import argparse import os import joint import joint.generators MYPY = False if MYPY: import typing # pylint: disable=locally-disabled, bad-option-value, import-error, unused-import, wrong-import-position class CmdLineE...
koplyarov/joint
joint-gen/joint_gen.py
Python
isc
3,047
"""Utility functions for test code that uses astroid ASTs as input.""" import functools import sys from astroid import nodes from astroid import builder from astroid import util # The name of the transient function that is used to # wrap expressions to be extracted when calling # extract_node. _TRANSIENT_FUNCTION = ...
pylint-bot/astroid-unofficial
astroid/test_utils.py
Python
gpl-2.0
7,024
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid - **Test for Building Exposure Report Mixin** Contact : ole.moller.nielsen@gmail.com .. note:: 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 ...
Samweli/inasafe
safe/impact_reports/test/test_road_exposure_report_mixin.py
Python
gpl-3.0
5,317
import re from markdown import Markdown, TextPreprocessor from smartypants import smartyPants from pygments import highlight from pygments.formatters import HtmlFormatter from pygments.lexers import get_lexer_by_name, TextLexer class CodeBlockPreprocessor(TextPreprocessor): """ The Pygments Markdown Pre...
taylanpince/django-doc-wiki
doc_wiki/parsers.py
Python
apache-2.0
2,666
'''Tests for program runner.''' from ...core import column as cl from program_runner import ProgramRunner from ..helpers_test import createTable, stdoutIO, TableFileHelper, \ TEST_DIR, augmentPythonPath from api_util import writeObjectToFile import numpy as np import os import shutil import unittest # Constants ...
ScienceStacks/JViz
mysite/scisheets/core/helpers/test_program_runner.py
Python
apache-2.0
4,032
import pika connection=pika.BlockingConnection(pika.ConnectionParameters(host="10.0.0.25")) channel=connection.channel() channel.exchange_declare(exchange="direct_logs",type="direct") severity="error" message="hiiiii" channel.basic_publish(exchange="direct_logs",routing_key=severity,body=message) connection.close(...
xiaoyongaa/ALL
网络编程进阶/RabbitMQ/rabbitMQ(生产者)关键字.py
Python
apache-2.0
321
""" Copyright 2013 Adaptive Lab This file is part of the datasift_preview_grabber script. The datasift_preview_grabber script 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 (...
adaptivelab/datasift-preview-grabber
test/test_datasift_preview_grabber.py
Python
gpl-3.0
9,473
#!/usr/bin/env python3 import io import os import pprint import sys import time import torch.distributed as dist if __name__ == "__main__": env_dict = { k: os.environ[k] for k in ( "LOCAL_RANK", "RANK", "GROUP_RANK", "WORLD_SIZE", "MAST...
kubeflow/training-operator
examples/pytorch/elastic/echo/echo.py
Python
apache-2.0
1,114
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Intel 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...
sacharya/nova
nova/db/sqlalchemy/migrate_repo/versions/228_add_metrics_in_compute_nodes.py
Python
apache-2.0
1,671
# Copyright 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 requ...
varunarya10/tempest
tempest/api/network/test_security_groups.py
Python
apache-2.0
10,912
# -*- coding: utf-8 -*- # # metaci documentation build configuration file, created by # sphinx-quickstart. # # 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. # # All configuration values have a ...
SalesforceFoundation/mrbelvedereci
docs/conf.py
Python
bsd-3-clause
7,888
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import logging from google.appengine.api import mail from webapp2_extras.i18n import gettext as _ from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required from pswdless import facade from pswdless.la...
renzon/pswdless
backend/appengine/routes/task.py
Python
gpl-2.0
1,848
#!/usr/bin/env python import os, sys, re, string, fnmatch allmodules = ["core", "flann", "imgproc", "ml", "highgui", "video", "features2d", "calib3d", "objdetect", "legacy", "contrib", "gpu", "androidcamera", "java", "python", "stitching", "ts", "photo", "nonfree", "videostab", "ocl", "superres"] verbose = False show_...
grace-/opencv-3.0.0-cvpr
opencv/modules/java/generator/rst_parser.py
Python
bsd-3-clause
29,907
# Copyright (C) 2016 - Yevgen Muntyan # Copyright (C) 2016 - Ignacio Casal Quinteiro # Copyright (C) 2016 - Arnavion # # 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 t...
wingtk/gvsbuild
gvsbuild/projects/pkgconf.py
Python
gpl-2.0
1,651
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from django.conf import settings from store.views import HomePage urlpatterns = patterns('', # Examples: # url(r'^$', 'celery_demo.views.home', name='home'), # url(r'^blog/', include('blog.urls')), ...
pynoco/celery-talk
celery_demo/celery_demo/urls.py
Python
mit
640
import errno import os import random import selectors import signal import socket import sys from test import support from time import sleep import unittest import unittest.mock from time import monotonic as time try: import resource except ImportError: resource = None if hasattr(socket, 'socketpair'): so...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/test/test_selectors.py
Python
gpl-3.0
15,788
#!/usr/bin/python -OOOO # vim: set fileencoding=utf8 shiftwidth=4 tabstop=4 textwidth=80 foldmethod=marker : # Copyright (c) 2010, Kou Man Tong. All rights reserved. # For licensing, see LICENSE file included in the package. """ BSON serialization and deserialization logic. Specifications taken from: http://bsonspec.or...
andreas/bson
bson/__init__.py
Python
bsd-3-clause
4,012
''' Created on June 7, 2013 @package: superdesk livedesk @copyright: 2012 Sourcefabric o.p.s. @license: http://www.gnu.org/licenses/gpl-3.0.txt @author: Rus Mugur Contains upgrade functions ''' from ..gui_core.gui_core import cdmGUI from ..livedesk_embed.gui import themes_path from ..superdesk.db_superdesk import al...
superdesk/Live-Blog
plugins/livedesk/__plugin__/livedesk/upgrade.py
Python
agpl-3.0
20,218
# -*- coding: utf-8 -*- import gc import warnings import numpy as np from sklearn.utils.validation import check_random_state from . import compute, structures, utils def gen_permsamp(groups, n_cond, n_perm, seed=None, verbose=True): """ Generates permutation arrays for PLS permutation testing Parameters...
rmarkello/pyls
pyls/base.py
Python
gpl-2.0
31,764
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import #################################################################### # fixXreacs.py # The program is meant to take a model and reconfigure any cross-compartment # reactions so that they are split into portions on either side coupl...
BhallaLab/moose-core
python/moose/fixXreacs.py
Python
gpl-3.0
6,995
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
SKIRT/PTS
core/filter/__init__.py
Python
agpl-3.0
628
# coding=utf-8 from __future__ import unicode_literals import inspect from faker import utils class Documentor(object): def __init__(self, generator): """ :param generator: a localized Generator with providers filled, for which to write the documentation :type...
Nebucatnetzer/tamagotchi
pygame/lib/python3.4/site-packages/faker/documentor.py
Python
gpl-2.0
3,188
import json import os with open( "config/config.json", "r" ) as configFile : data = configFile.read( ) data = json.loads( data ) # APP VARS APP_EMAIL = data['APP']['EMAIL'] APP_TOOL = data['APP']['TOOL'] # DATABASE VARS DB_HOST = data['DB']['DB_HOST'] DB_USER = data['DB']['DB_USER'] DB_PASS = data[...
BioGRID/BioGRID-Annotation
Config.py
Python
mit
2,777
# -*- coding: utf-8 -*- import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) PROJECT_DIR = os.path.dirname(__file__) SECRET_KEY = 'l8h=t&zq%7f_vv8ge3@0jw^qgvedz*82j2$2rkbr^)i*y0p&x(' DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.co...
ulule/django-badgify
example/settings.py
Python
mit
2,879
# -*- coding: utf-8 -*- # # lect documentation build configuration file, created by # sphinx-quickstart on Fri Aug 2 17:40:25 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. # # All co...
dhh1128/lect
docs/source/conf.py
Python
apache-2.0
9,538
from setuptools import setup, Extension setup(name='aiotkinter', author='Mathias Rav', url='https://github.com/Mortal/aiotkinter', description='An asyncio API for the Tkinter event loop', long_description=open('README.rst').read(), version='0.3.1', classifiers=[ 'Developm...
Mortal/aiotkinter
setup.py
Python
mit
657
from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^$', views.republica, name='home'), url(r'^quarto/list/$', login_required(views.QuartoListView.as_view()), name='quartos'), url(r'^quarto/edit/(?P<pk>\d+)/$', views.QuartoUpd...
rafaelnsantos/batfinancas
republica/urls.py
Python
mit
823
# =========================================================================== # Copyright 2015 Dublin City University # # This file is part of DREAM. # # DREAM 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 Founda...
bchiroma/dreamproject
dream/simulation/applications/DemandPlanning/AllocationRoutine_ForecastGA.py
Python
gpl-3.0
5,472
#date time import datetime from datetime import date print date(day=input(), month=input(), year=input()).strftime('%A, %d %B, %Y') # datetime.datetime.today() # datetime.datetime.now() # %H = hours, %I = 12hrs clock, %M = minute, %B = month, %Y = year
ganesh-95/python-programs
thoughtworks/english.py
Python
mit
260
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
sleepsonthefloor/openstack-dashboard
django-nova/src/django_nova/connection.py
Python
apache-2.0
1,226
from .chucky_neighborhood_tool import NeighborhoodTool
a0x77n/chucky-tools
src/chucky_tools/neighborhood/__init__.py
Python
gpl-3.0
55
"""Tests for the BinnedStatistics class""" from scitbx.array_family import flex from dials.algorithms.statistics import BinnedStatistics def test_partitions(): vals = flex.double((1, 2, 3, 1, 2, 3, 1, 2, 3)) bins = flex.size_t((0, 1, 3, 0, 1, 3, 0, 1, 3)) binned_statistics = BinnedStatistics(vals, bins...
dials/dials
tests/algorithms/statistics/test_binned_statistics.py
Python
bsd-3-clause
2,467
from django.db import models from django.test import SimpleTestCase from .models import Book class IndexesTests(SimpleTestCase): def test_suffix(self): self.assertEqual(models.Index.suffix, 'idx') def test_repr(self): index = models.Index(fields=['title']) multi_col_index = models.I...
camilonova/django
tests/model_indexes/tests.py
Python
bsd-3-clause
3,292
# Copyright 2017 reinforce.io. 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 applicable law or...
lefnire/tensorforce
tensorforce/core/explorations/epsilon_decay.py
Python
apache-2.0
2,398
""" in verts v .=[] n=0 in faces s .=[] n=0 in scale s .=0.0 n=0 in itera s .=1 n=0 in multi s .=-1.0 n=0 out overts v out ofaces s """ from mathutils import Vector as V from mathutils.geometry import normal as nm import numpy as np overts = verts ofaces = faces itera = min(ma...
elfnor/sverchok
node_scripts/SNLite_templates/Alt_P_alike_divider.py
Python
gpl-3.0
1,095
from __future__ import division from sys import stdin, stdout from collections import deque def solve(n, edges, s): def build_graph(n, edges): graph = [[] for _ in range(n)] for (a, b) in edges: a, b = a - 1, b - 1 graph[a].append(b) graph[b].append(a) re...
m00nlight/hackerrank
algorithm/Graph-Theory/Breadth-First-Search-Shortest-Reach/main.py
Python
gpl-2.0
1,017
from sympy import (Matrix, Symbol, solve, exp, log, cos, acos, Rational, Eq, sqrt, oo, LambertW, pi, I, sin, asin, Function, diff, Derivative, symbols, S, sympify, var, simplify, Integral, sstr, Wild, solve_linear, Interval, And, Or, Lt, Gt, Assume, Q, re, im, expand, zoo) from sympy.solvers import solve_l...
pernici/sympy
sympy/solvers/tests/test_solvers.py
Python
bsd-3-clause
13,913
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
socialplanning/opencore
opencore/__init__.py
Python
gpl-3.0
246
# -*- coding: utf-8 -*- # # Test links: # http://180upload.com/js9qdm6kjnrs from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class HundredEightyUploadCom(XFSHoster): __name__ = "HundredEightyUploadCom" __type__ = "hoster" __version__ = "0.04" __pattern__ = r'http://(?:ww...
sebdelsol/pyload
module/plugins/hoster/HundredEightyUploadCom.py
Python
gpl-3.0
739
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
crmccreary/openerp_server
openerp/addons/hr_recruitment/hr_recruitment.py
Python
agpl-3.0
22,823
__author__ = 'junz' import os import matplotlib.pyplot as plt import retinotopic_mapping.RetinotopicMapping as rm from tools import FileTools as ft trialName = "160211_M214522_Trial1.pkl" isSave = True params = {'phaseMapFilterSigma': 1., 'signMapFilterSigma': 9., 'signMapThr': 0.3, 'e...
zhuangjun1981/retinotopic_mapping
retinotopic_mapping/examples/signmap_analysis/scripts/script_analysis.py
Python
gpl-3.0
1,015
# 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...
hfp/tensorflow-xsmm
tensorflow/contrib/distributions/python/ops/vector_diffeomixture.py
Python
apache-2.0
44,649
import pexpect PROMPT=['#','>>>','>','\$' ] def send_command(child,cmd): child.sendline(cmd) child.expect(PROMPT) print child.before def connect(user,host,password): ssh_newKey='Are you sure you want to continue connecting' connStr='ssh '+user+'@'+host print connStr child=pexpect.spawn(connStr) ret=child.expe...
zhangmingkai4315/BlackHatPython
scanner/pexpect-login.py
Python
mit
1,134
# -*- coding: utf-8 -*- # Copyright(C) 2017 ZeHiro # # This file is part of a weboob module. # # This weboob module 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,...
laurentb/weboob
modules/avendrealouer/pages.py
Python
lgpl-3.0
6,825
# -*- coding: utf-8 -*- vim:fileencoding=utf-8: # vim: tabstop=4:shiftwidth=4:softtabstop=4:expandtab # Copyright (C) 2010-2014 GRNET S.A. # # 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...
grnet/flowspy
flowspec/admin.py
Python
gpl-3.0
4,147
# Copyright (c) 2014 Cisco Systems Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
CiscoSystems/nova-solver-scheduler
nova/scheduler/solvers/constraints/num_instances_constraint.py
Python
apache-2.0
2,244
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.utils.data class Fa...
mlperf/training_results_v0.7
NVIDIA/benchmarks/transformer/implementations/pytorch/fairseq/data/fairseq_dataset.py
Python
apache-2.0
1,260
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import json import os from enum impo...
SymbiFlow/prjxray
fuzzers/063-gtp-common-conf/generate.py
Python
isc
4,350
# -*- coding: utf-8 -*- """This module contains classes representing syntactical elements of SQL.""" import re from sqlparse import tokens as T class Token(object): """Base class for all other classes in this module. It represents a single token and has two instance attributes: ``value`` is the unchan...
sosguns2002/interactive-mining
interactive-mining-3rdparty-madis/madis/src/lib/sqlparse/sql.py
Python
gpl-3.0
16,042
""" /test_routes resource """ from zunzuncito import tools class APIResource(object): def dispatch(self, request, response): request.log.debug(tools.log_json({ 'API': request.version, 'Method': request.method, 'URI': request.URI, 'vroot': request.vroot ...
nbari/zunzuncito
my_api/default/v0/zun_test_routes/zun_test_routes.py
Python
bsd-3-clause
360
""" Common Helper utilities for transformers """ def get_field_on_block(block, field_name, default_value=None): """ Get the field value that is directly set on the xblock. Do not get the inherited value since field inheritance returns value from only a single parent chain (e.g., doesn't take a uni...
ahmadiga/min_edx
lms/djangoapps/course_blocks/transformers/utils.py
Python
agpl-3.0
472
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-24 22:45 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interactive', '0002_auto_20160924_2245'), ] operat...
adminq80/Interactive_estimation
game/interactive/migrations/0003_auto_20160924_2245.py
Python
mit
523
import numpy as np from features import base, commonWords, punctuation, sentLength, diversity FEATURES = [commonWords.CommonWords, punctuation.Punctuation, sentLength.SentenceLength, diversity.Diversity] class FeatureCalculator(): def __init__(self, text, textName="", args=[[]] * len(FEATURES), features=FEATURES,...
darksteelcode/authorship
calcFeatures.py
Python
gpl-3.0
1,096
########################################################################### # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...
google/starthinker
starthinker/task/dv_targeter/first_and_third_party_audience.py
Python
apache-2.0
3,158
from gui.shape_ui import ShapeUI from PyQt5.QtGui import QPixmap class BulletUI(ShapeUI): def __init__(self, parent, game, player_ui): super().__init__(parent, game) self.player_ui = player_ui self.image_height_fix = 5 self.pixmap = QPixmap("../images/bullet.png") self.se...
hristy93/FallingRocks
gui/bullet_ui.py
Python
mit
855
import unittest import numpy as np import importAgilentBin class TestImportFunctions(unittest.TestCase): def setUp(self): pass def test_10point(self): """test example 1 of agilent doc """ time, data = importAgilentBin.readfile("testcase/points10.bin", 0) timeAns = 1.0...
yodalee/keysightBin
test_agilentBin.py
Python
gpl-3.0
940
""" Models for various kinds of arrow heads that can be added to Arrow annotations """ from __future__ import absolute_import from ..core.properties import abstract from ..core.properties import Float, Include, Override from ..core.property_mixins import LineProps, FillProps from .annotations import Annotation @abst...
phobson/bokeh
bokeh/models/arrow_heads.py
Python
bsd-3-clause
1,593
"""change parameter.shape to MULTIPOLYGON Revision ID: 45719cfc11f9 Revises: 40d9139ba0ed Create Date: 2014-10-24 18:43:27.550538 """ # revision identifiers, used by Alembic. revision = '45719cfc11f9' down_revision = '40d9139ba0ed' from alembic import op import sqlalchemy as sa import geoalchemy2 as ga from sqlalch...
pbougue/navitia
source/sql/alembic/versions/45719cfc11f9_change_parameter_shape_to_multipolygon.py
Python
agpl-3.0
741
""" .. module:: editor_watch_release_group_type The **Editor Watch Release Group Type** Model. PostgreSQL Definition --------------------- The :code:`editor_watch_release_group_type` table is defined in the MusicBrainz Server as: .. code-block:: sql CREATE TABLE editor_watch_release_group_type ( ed...
marios-zindilis/musicbrainz-django-models
musicbrainz_django_models/models/editor_watch_release_group_type.py
Python
gpl-2.0
1,385
#!/usr/bin/env python # -*- coding: latin-1 -*- """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide online help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydo...
MicroTrustRepos/microkernel
src/l4/pkg/python/contrib/Lib/pydoc.py
Python
gpl-2.0
92,350
# Copyright 2013 Spanish National Research Council (CSIC) # # 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...
alvarolopez/pyocci
pyocci/shell.py
Python
apache-2.0
8,898
# -*- coding: utf-8 -*- # getNearestElement method test. import xc_base import geom import xc from solution import predefined_solutions from model import predefined_spaces from materials import typical_materials import time __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Copyright 2014, LCPT" __license__= "GPL...
lcpt/xc
verif/tests/preprocessor/cad/test_nearest_element_01.py
Python
gpl-3.0
1,375
from datetime import datetime from django.db import models from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext_lazy as _ class SourceManager(models.Manager): def active(self): return self.filter(is_active=True) class Source(models.Model): is_active = ...
matthiask/django-newswall
newswall/models.py
Python
bsd-3-clause
2,672
from nose.tools import eq_ from .. import instance def test_simple_repr(): eq_( instance.simple_repr("Classname", 'foo', 5, herp=[5]), "Classname('foo', 5, herp=[5])" ) eq_( instance.simple_repr("Classname", ordered_kwargs=[('foo', "foo"), ...
wikimedia/operations-debs-python-jsonable
jsonable/tests/test_instance.py
Python
mit
2,330
#!/usr/bin/env python # -*- coding: utf-8 -*- # # kmeans_scikit.py # # Copyright 2014 Carlos "casep" Sepulveda <casep@alumnos.inf.utfsm.cl> # # 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 Foundat...
creyesp/RF_Estimation
Clustering/clustering/kmeans_scikit.py
Python
gpl-2.0
6,117
from lib import cache from lib.api import oauth from contextlib import suppress from datetime import datetime from typing import Any, Dict, Iterable, List, Mapping, MutableMapping from typing import NamedTuple, Optional, Set, Tuple, Union # noqa: F401 import aiohttp import asyncio import bot import bot.utils import e...
MeGotsThis/BotGotsThis
lib/api/twitch.py
Python
gpl-3.0
18,833
# -*- coding: utf-8 -*- # Part of the psychopy.iohub library. # Copyright (C) 2012-2016 iSolver Software Solutions # Distributed under the terms of the GNU General Public License (GPL). from __future__ import division, absolute_import import json import os import sys import tempfile import time import gevent import p...
psychopy/versions
psychopy/iohub/launchHubProcess.py
Python
gpl-3.0
3,831
# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. # # 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 option) any la...
alexsalo/genenetwork2
wqflask/base/webqtlFormData.py
Python
agpl-3.0
12,806
# This file is part of Gajim. # # Gajim 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 only. # # Gajim is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
gajim/gajim
gajim/common/modules/bookmarks.py
Python
gpl-3.0
10,109
"""A random prime number generator.""" import random def prime_test_naive(num): for i in range(2, (num / 2) + 1): if num % i == 0: return False return True class RandomPrimeGenerator: def __init__(self): pass @staticmethod def generate(bits): max = 2 ** bits...
jonathanmcmahon/rsa
randomprime.py
Python
gpl-3.0
529
from .utfyaml import ( dump, load, ) __all__ = [ 'dump', 'load', ]
sejust/pykit
utfyaml/__init__.py
Python
mit
84
"""A collection of auxiliary funtions for working with radiance files and objects.""" import re import os def getRadianceObjectsFromString(fullString): """ separate a Radinace file string into multiple strings for each object. Args: radFileString: Radiance data as a single string. The string can ...
antonszilasi/honeybeex
honeybeex/honeybee/radiance/filemanager.py
Python
gpl-3.0
1,613
# Author: Stefan Wunsch CERN 07/2019 ################################################################################ # Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. # # All rights reserved. # # ...
karies/root
bindings/pyroot/pythonizations/python/ROOT/pythonization/_rtensor.py
Python
lgpl-2.1
4,527
# # 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...
wileeam/airflow
airflow/providers/google/cloud/operators/kubernetes_engine.py
Python
apache-2.0
11,168
""" Reads tabular binding energy/nucleon data file and supplies table data. """ # Common Imports from __future__ import print_function import os from pynucastro.nucdata import BindingNuclide class BindingTable(object): """A simple class to manage reading and parsing the table of binding energy/nucleon.""" h...
pyreaclib/pyreaclib
pynucastro/nucdata/binding_table.py
Python
bsd-3-clause
1,791
#!/usr/bin/env python # -*- coding: utf-8 -*- from app import app, templated, redirect_url from flask import abort, render_template, redirect, url_for, session, request from sql import * from playhouse.shortcuts import model_to_dict from app.common import * from app.auth import is_login, require_login from app.commo...
dkmatt0/banking-alpha
app/transaction.py
Python
agpl-3.0
7,402
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2013 - 2014 by Wilbert Berendsen # # 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 ...
shimpe/frescobaldi
frescobaldi_app/documentstructure.py
Python
gpl-2.0
3,406
# Copyright 2019 Virgil Dupras # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html from ..testutil import eq_, with_app from ..base import TestApp from ...co...
hsoft/moneyguru
core/tests/gui/bar_graph_test.py
Python
gpl-3.0
4,032
#!/usr/bin/env python # # VMEncryption extension # # Copyright 2015 Microsoft 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 # ...
jasonzio/azure-linux-extensions
VMEncryption/main/ConfigUtil.py
Python
apache-2.0
3,221
from gi.repository import Gtk, Gdk, GdkPixbuf import PK class SC(): def __init__(self): self.init_Gui() #TODO: Loading window self.apply_css() self.window.show_all() self.after_finish = None self.client = PK.PKClient(self.finished) self.load_database() def init_Gui(self): #Glade file(s) ...
linuxer9/sc-ng
main.py
Python
gpl-2.0
5,300
#!/usr/bin/env python # encoding: utf-8 """ server.py Created by Nikolaus Sonnenschein on 2008-05-02. Copyright (c) 2008 Jacobs University of Bremen. All rights reserved. """ import ifba.distFBA.networking as nw import sys import random import Queue import threading import time import pickle import pprint from ifba.g...
phantomas1234/fbaproject
work/iAF1260_rndMediumKnocks/server.py
Python
mit
2,862
from setuptools import setup, find_packages setup( name = "jkm.paste.template", version = "1.0a3", url = '', license = 'BSD', description = "A buildout tamplate for PasteScript.", author = 'Damien Lebrun', packages = find_packages('src'), package_dir = {'': 'src'}, namespace_package...
dinoboff/jkm.buildout.template
setup.py
Python
bsd-3-clause
572
""" **Design automation module** Provides functions and classes for computing sensitivity, sizing a design across corners, worst case performance, worst case distance, yield targeting, and Monte Carlo analysis. """ from scipy.special import erf, erfinv from numpy import ceil def wcd2yield(beta): """ Computes ...
blorgon9000/pyopus
pyopus/design/__init__.py
Python
gpl-3.0
1,022
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # import logging import re import time import pytest import dns.resolver import dns.rrset import dns.rdatatype import dns.rdataclass from ipatests.test_integration.base import IntegrationTest from ipatests.pytest_ipa.integration import tasks from ipa...
encukou/freeipa
ipatests/test_integration/test_dns_locations.py
Python
gpl-3.0
19,075
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Purchasing"), "icon": "icon-star", "items": [ { "type": "doctype", "name": "Material Request", "description": _("Request for purchase."), }, { "type": "doctype", "name": ...
bhupennewalkar1337/erpnext
erpnext/config/buying.py
Python
gpl-3.0
4,412
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'Course', fields ['department', 'number'] db.delete_unique('courses_course...
JGrippo/YACS
courses/south_migrations/0006_auto__del_unique_course_department_number__add_unique_course_departmen.py
Python
mit
8,019
import os from montreal_forced_aligner.command_line.mfa import parser from montreal_forced_aligner.command_line.train_acoustic_model import run_train_acoustic_model def test_train_and_align_basic( basic_corpus_dir, sick_dict_path, generated_dir, temp_dir, mono_train_config_path, textgrid_outp...
MontrealCorpusTools/Montreal-Forced-Aligner
tests/test_commandline_train.py
Python
mit
1,735
from jinja2 import Template import codecs def render(file, props=None): if props == None: return '404' with codecs.open('./views/' + file + '.html', 'r', encoding='utf8') as f: content = f.read() templated = Template(content).render(props) return templated
avocadoinnocenceproject/farflungfruit
render.py
Python
mit
303
# -*- coding: utf-8 -*- """ /*************************************************************************** OpenLayers Plugin A QGIS plugin ------------------- begin : 2010-02-03 copyright : (C) 2010 by Pirmin Kalberer, Sourcepole email : pka at source...
TIGER-NET/WOIS_plugins
openlayers_plugin/openlayers_layer.py
Python
gpl-3.0
15,992
from unittest import skipIf from django.contrib.gis.db.models import fields from django.contrib.gis.geos import MultiPolygon, Polygon from django.core.exceptions import ImproperlyConfigured from django.db import connection, migrations, models from django.db.migrations.migration import Migration from django.db.migratio...
georgemarshall/django
tests/gis_tests/gis_migrations/test_operations.py
Python
bsd-3-clause
9,026
# encoding: utf-8 # module PyQt4.QtXml # from /usr/lib/python3/dist-packages/PyQt4/QtXml.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # no imports from .QDomNode import QDomNode class QDomProcessingInstruction(QDomNode): """ QDomProcessingInstruction() QDomProcessingInstruction(QDomProces...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtXml/QDomProcessingInstruction.py
Python
gpl-2.0
1,085
# -*- CODing: utf-8 -*- # test_secrets.py # Copyright (C) 2017 LEAP # # 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. # ...
leapcode/soledad
tests/client/test_secrets.py
Python
gpl-3.0
8,285
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
CoolCloud/taiga-back
tests/integration/test_notifications.py
Python
agpl-3.0
27,029
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.sessions.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Session', ...
yephper/django
django/contrib/sessions/migrations/0001_initial.py
Python
bsd-3-clause
1,053
# Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
tensorflow/tfx
tfx/examples/tfjs_next_page_prediction/bigquery_beam_data_generation_test.py
Python
apache-2.0
3,280
from urllib import quote_plus from sqlalchemy import ( Column, Integer, Text, String, DateTime, ForeignKey, Boolean, Numeric ) from sqlalchemy.orm import relationship, backref from sqlalchemy.ext.declarative import declarative_base, declared_attr from sqlalchemy.orm import ( scoped...
binarydud/almanac
almanac/models.py
Python
bsd-3-clause
3,374
from datetime import datetime from elasticsearch import Elasticsearch import requests import json, os baseurl = os.environ.get('es_url','https://admin:TFJPIAPRVDAYKSMA@sl-us-dal-9-portal2.dblayer.com:17586/') es = Elasticsearch(['https://admin:TFJPIAPRVDAYKSMA@sl-us-dal-9-portal2.dblayer.com:17586/']) def add(index_...
abhishekscript/ibm_hackathon
services/ElasticModule.py
Python
apache-2.0
1,832
import wx import wx.grid class GenericTable(wx.grid.GridTableBase): def __init__(self, data, rowLabels=None, colLabels=None): wx.grid.GridTableBase.__init__(self) self.data = data self.rowLabels = rowLabels self.colLabels = colLabels def GetNumberRows(self): return len...
joseamaita/guiprog-python
wxpython/files/generictable.py
Python
lgpl-3.0
787