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
# $Id: mc.py,v 1.1.2.1 2013/06/03 13:47:14 paus Exp $ import FWCore.ParameterSet.Config as cms process = cms.Process('FILEFI') # import of standard configurations process.load('Configuration/StandardSequences/Services_cff') process.load('FWCore/MessageService/MessageLogger_cfi') process.load('Configuration.StandardS...
cpausmit/Kraken
filefi/030/mc.py
Python
mit
2,176
from django.shortcuts import render_to_response import datetime import urllib import urllib2 import os from dixy_viz import qfa_parser from django.template import RequestContext def get_input_list(site='dixy'): if site == 'dixy': input_list = ['YKU70_23GIS_NEW.txt', 'CDC13-1_20GIS_NEW.txt', ...
Bioinformatics-Support-Unit/dixy
dixy/dixy_viz/views.py
Python
mit
9,546
#!/usr/bin/env python #coding:utf-8 # Purpose: test observer object # Created: 23.01.2011 # Copyright (C) , Manfred Moitzi # License: MIT from __future__ import unicode_literals, print_function, division __author__ = "mozman <mozman@gmx.at>" # Standard Library import unittest # objects to test from ezodf...
iwschris/ezodf2
tests/test_observer.py
Python
mit
3,678
# coding: utf-8 from .. import fixtures, config from ..assertions import eq_ from ..config import requirements from sqlalchemy import Integer, Unicode, UnicodeText, select from sqlalchemy import Date, DateTime, Time, MetaData, String, \ Text, Numeric, Float from ..schema import Table, Column from ... impor...
VagrantApe/flaskMicroblog
venv/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_types.py
Python
bsd-3-clause
11,192
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
dongjoon-hyun/tools
cli/spark.py
Python
apache-2.0
10,655
from djangomako.shortcuts import render_to_response from bellum.common.session.login import must_be_logged from bellum.common.session import getAccount from bellum.common.gui import PrimaryGUIObject from bellum.stats.larf.storage import fileFor @must_be_logged def process(request): acc = getAccount(request) l...
piotrmaslanka/bellum
stats/views/larf.py
Python
agpl-3.0
668
import os.path as op import numpy as nm import sfepy from sfepy.discrete.common import Field import sfepy.discrete.common.global_interp as gi from sfepy.base.testing import TestCommon class Test(TestCommon): @staticmethod def from_conf(conf, options): test = Test(conf=conf, options=options) ...
RexFuzzle/sfepy
tests/test_ref_coors.py
Python
bsd-3-clause
4,619
from django.shortcuts import render,get_object_or_404,redirect from .models import Post from .forms import PostForm from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator,EmptyPage,PageNotAnInteger from haystack.forms import Se...
kleinzh/PythonBlog
mysite/blog/views.py
Python
apache-2.0
2,496
""" Real spectrum tranforms (DCT, DST, MDCT) """ from __future__ import division, print_function, absolute_import __all__ = ['dct', 'idct', 'dst', 'idst'] import numpy as np from scipy.fftpack import _fftpack from scipy.fftpack.basic import _datacopied import atexit atexit.register(_fftpack.destroy_ddct1_cache) ate...
kmspriyatham/symath
scipy/scipy/fftpack/realtransforms.py
Python
apache-2.0
13,425
# -*- coding: utf-8 -*- """ Bok choy acceptance tests for problems in the LMS See also old lettuce tests in lms/djangoapps/courseware/features/problems.feature """ from textwrap import dedent from nose.plugins.attrib import attr from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from...
pepeportela/edx-platform
common/test/acceptance/tests/lms/test_lms_problems.py
Python
agpl-3.0
37,713
from __future__ import absolute_import, print_function, division from collections import MutableSet import types import weakref from six import string_types def check_deterministic(iterable): # Most places where OrderedSet is used, theano interprets any exception # whatsoever as a problem that an optimizati...
JazzeYoung/VeryDeepAutoEncoder
theano/misc/ordered_set.py
Python
bsd-3-clause
7,517
# 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...
FlaPer87/cookiecutter-marconi-storage
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/claims.py
Python
apache-2.0
2,321
# -*- coding: utf-8 -*- # Copyright (C) 2009-2011 Frédéric Bertolus. # # This file is part of Perroquet. # # Perroquet 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...
niavok/perroquet
perroquetlib/gui/gui_message_dialog.py
Python
gpl-3.0
2,149
import os import shutil import unittest from PySide.QtCore import QSettings from ibl_stuff.libs import base as libs LIBRARY = libs.get_library() ENV_LIBRARY = os.environ.get("IBL_LIBRARY") class SimpleTests(unittest.TestCase): def test_clear_cache(self): self.assertTrue(libs.clear_cache()) def t...
csaez/ibl_stuff
ibl_stuff/tests/test_libs.py
Python
mit
2,944
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # from sys import version_info __all__ = ['callable'] if (2, 7) < version_info[:2] < (3, 2): import collections def callable(x): return isinstance(x, c...
saurabhbajaj207/CarpeDiem
venv/Lib/site-packages/pyasn1/compat/calling.py
Python
mit
373
import random from collections import Counter from datetime import date, timedelta from django.test import TestCase from django.contrib.auth import get_user_model from django.utils import timezone from trackstats.models import ( Domain, Metric, StatisticByDate, StatisticByDateAndObject, Period) fr...
pennersr/django-trackstats
trackstats/tests/test_trackers.py
Python
mit
5,290
#title : checksum-homework.py #description : This provides functionality to verify and correct checksums provided #author : Lewis Relph #date : 12/03/17 #notes : This code is assuming the checksum is provided in the way specified by the AQA specification. # ...
sleawnis/python-codebank
checksum-homework.py
Python
mit
1,621
# Create your views here. from oauth2_provider.ext.rest_framework import OAuth2Authentication from rest_framework import permissions, generics from rest_framework.viewsets import ModelViewSet from feedback_survey.filters import FeedbackStudentFilter from rest_framework.response import Response from feedback_survey.mod...
mushahid54/feedback_survey
feedback_survey/views.py
Python
mit
4,099
from __future__ import absolute_import, unicode_literals # Third Party Stuff from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin, Group from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.t...
CuriousLearner/standup
src/authen/models.py
Python
gpl-3.0
4,591
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:1824") else: access = Ser...
itamae/Makicoin
contrib/bitrpc/bitrpc.py
Python
mit
7,838
# Authors: # Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2008 Red Hat # see file 'COPYING' for use and warranty information # # 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...
encukou/freeipa
ipalib/aci.py
Python
gpl-3.0
11,029
from django.http import HttpResponse from django.views.generic import View from RadioCanada.service import NewsService class Home(View): def get(self,request): return HttpResponse('This is the home page') class AllNews(View): def __init__(self): self.news_service = NewsService() def get(...
antoinedube/django-spine-news-display
Server/RadioCanada/views.py
Python
gpl-3.0
413
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' Cart test Case ''' import unittest from decimal import Decimal from nereid.globals import session, current_website from trytond.tests.test_tryton import USER, DB_NAME, CONTEXT, POOL from trytond.transaction import Transaction from test_product import BaseTestCas...
priyankarani/nereid-cart-b2c
tests/test_cart.py
Python
gpl-3.0
21,563
from __future__ import division, print_function import numpy as np from functools import partial from itertools import product import warnings from sklearn import datasets from sklearn import svm from sklearn.datasets import make_multilabel_classification from sklearn.preprocessing import LabelBinarizer, MultiLabelB...
ashhher3/scikit-learn
sklearn/metrics/tests/test_classification.py
Python
bsd-3-clause
47,245
# (DWang) Cloud Service Provider must ensure that all the permissions need # to be protected are listed here. # If a permission is not found in this dict, it is in the charge of the # enforcer and the enforcer will deny requests of that permission by default. class DefaultRules(object): def __init__(self): ...
darren-wang/op
oslo_policy/_default_domain.py
Python
apache-2.0
4,982
#!/usr/bin/env python import numpy as np from selfdrive.car.honda.can_parser import CANParser from selfdrive.boardd.boardd import can_capnp_to_can_list from cereal import car import zmq from selfdrive.services import service_list import selfdrive.messaging as messaging def _create_radard_can_parser(): dbc_f = 'acu...
heidecjj/openpilot
selfdrive/radar/nidec/interface.py
Python
mit
2,420
import numpy as np import cv2 def color_transfer(source, target): source = cv2.cvtColor(source, cv2.COLOR_BGR2LAB).astype("float32") target = cv2.cvtColor(target, cv2.COLOR_BGR2LAB).astype("float32") (lMeanSrc, lStdSrc, aMeanSrc, aStdSrc, bMeanSrc, bStdSrc) = image_stats(source) (lMeanTar, lStdTar, ...
meizhoubao/pyimagesearch
color-transfer/color_transfer.py
Python
gpl-3.0
1,066
# -- external imports -- import numpy as np from onezone import imf as _imf # to do IMF sampling import time from fastloop import loop_over_rnum MASS_THRESHOLD = 8.0 # # # np.random.seed(12345) _imf.np.random.seed(12345) # make IMF function a global for now # and set to assumed defaults --- make this # easily modif...
aemerick/galaxy_analysis
initial_conditions/IC.py
Python
mit
10,054
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="surface.colorbar.title.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_nam...
plotly/python-api
packages/python/plotly/plotly/validators/surface/colorbar/title/font/_size.py
Python
mit
505
# -*- coding: utf-8 -*- from pprint import pprint from genshi.filters import Transformer from genshi.builder import tag from trac.core import * from trac.util.html import html from trac.web import IRequestHandler, HTTPInternalError from trac.web.chrome import INavigationContributor, ITemplateProvider, add_stylesheet...
bountyfunding/bountyfunding
plugin/trac/bountyfunding/trac/bountyfunding.py
Python
agpl-3.0
27,871
import os long_description = """HTTP server and request handler built on top of BaseHTTPServer intended for Raspberry Pi projects with a web interface""" if os.path.exists('README.rst'): long_description = open('README.rst').read() try: from setuptools import setup except ImportError: from distutils.core impo...
mauntrelio/RPiHTTPServer
setup.py
Python
mit
794
import pa2checker create_type_annotation = pa2checker.create_type_annotation update_ontology_utils = pa2checker.update_ontology_utils recompile_checker_framework = pa2checker.recompile_checker_framework revert_checker_source = pa2checker.revert_checker_source
aas-integration/integration-test
pa2checker/__init__.py
Python
mit
261
import shutil import subprocess from tut.tools import tool class PythonTool(tool.LangTool): def resolve_version(self, version_identifier): version = None if version_identifier in {'default', 'python'}: version = self._get_ver_from_env('python') elif version_identifier in {'pyt...
joshuamorton/tut
tut/tools/lang.py
Python
mit
1,621
import cgi import errno import mimetypes import os import posixpath import re import shutil import stat import sys import tempfile from os import path import django from django.core.management.base import BaseCommand, CommandError from django.core.management.utils import handle_extensions from django.template import C...
bretlowery/snakr
lib/django/core/management/templates.py
Python
bsd-3-clause
13,259
# -*- coding: utf-8 -*- """ 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 program is distri...
fener06/pyload
module/plugins/hoster/Xdcc.py
Python
gpl-3.0
8,399
from direct.directnotify.DirectNotifyGlobal import * from pandac.PandaModules import * from toontown.building import DoorTypes from toontown.building.DistributedDoorAI import DistributedDoorAI from toontown.building.DistributedKartShopInteriorAI import DistributedKartShopInteriorAI from toontown.toon import NPCToons ...
Spiderlover/Toontown
toontown/building/KartShopBuildingAI.py
Python
mit
2,918
# coding=utf-8 # # BSD 3-Clause License # # Copyright (c) 2016-21, University of Liverpool # 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 abov...
rigdenlab/conkit
conkit/applications/bbcontacts.py
Python
bsd-3-clause
5,619
# -*- coding: utf-8 -*- # # Copyright 2004-2006 Zuza Software Foundation # # This file is part of translate. # # translate 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 # ...
phlax/translate
translate/convert/ts2po.py
Python
gpl-2.0
3,410
# -*- coding: utf-8 -*- from setuptools import setup, find_packages version = '2.0.0rc3.dev0' long_description = ( open('README.rst').read() + '\n' + open('CHANGES.rst').read()+ '\n' ) setup( name='plone.app.mosaic', version=version, description='Plone Mosaic', long_description=long_descripti...
davilima6/plone.app.mosaic
setup.py
Python
gpl-2.0
1,916
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2016 Tecnativa S.L. - Pedro M. Baeza # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # Copyright 2019 Tecnativa - Cristina Martin R. # License AGPL-3.0 or later (https://www.gnu.org/l...
OCA/partner-contact
partner_industry_secondary/models/res_partner_industry.py
Python
agpl-3.0
2,067
#!/usr/bin/env python """Module for setting up statistical models""" from __future__ import division import numpy as np import pymc as mc import evac_flow_exit_mu_single_graphics as graphics import data_evac def model1(): """ PyMC configuration with Model 1. preevac_alpha vs theta[0] + theta[1]*type +...
koverholt/bayes-fire
Example_Cases/Evac_Stairs/Scripts/evac_alphabeta_paper_model.py
Python
bsd-3-clause
3,889
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import http.server import itertools import json import logging import mimetypes import os...
twitter/pants
src/python/pants/reporting/reporting_server.py
Python
apache-2.0
17,903
import logging import os.path import yaml from kpm.manifest import ManifestBase __all__ = ['ManifestChart'] logger = logging.getLogger(__name__) MANIFEST_FILES = ["Chart.yaml", "Chart.yml"] class ManifestChart(ManifestBase): def __init__(self, package=None, values=None): self.values = values if...
kubespray/kpm
kpm/manifest_chart.py
Python
apache-2.0
1,740
_unsorted = None _in_sorted_order = None import glob import datetime import os files = glob.glob('*.markdown') for f in files: print(f) date_part = f[0:10] name_part = f[11:] the_date = datetime.datetime.strptime(date_part, "%Y-%m-%d").date() dir = the_date.strftime("%Y/") if not os.path.exi...
mahnve/sinor
tools/convert.py
Python
mit
562
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
pknight007/electrum-vtc
gui/vtc/network_dialog.py
Python
mit
19,825
from tendrl.commons.event import Event from tendrl.commons.flows.exceptions import FlowExecutionFailedError from tendrl.commons.message import Message def get_node_ips(parameters): node_ips = [] for node, config in parameters["Cluster.node_configuration"].iteritems(): node_ips.append(config["provision...
rishubhjain/commons
tendrl/commons/flows/create_cluster/gluster_help.py
Python
lgpl-2.1
1,926
from collections import OrderedDict from allure_commons.types import AttachmentType from allure_commons.model2 import ExecutableItem from allure_commons.model2 import TestResult from allure_commons.model2 import Attachment, ATTACHMENT_PATTERN from allure_commons.utils import now from allure_commons._core import plugin...
allure-framework/allure-python
allure-python-commons/src/reporter.py
Python
apache-2.0
4,553
#!/usr/bin/env python # # Copyright (C) 2017 ShadowMan # import base64 import random def to_string(object, encoding = 'utf-8'): if isinstance(object, str): return object if isinstance(object, bytes): return object.decode(encoding) if hasattr(object, '__str__'): return object.__str_...
shadow-share/websocket
websocket/utils/generic.py
Python
mit
1,961
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2007-2014 Jeff Wang(<http://jeff@osbzr.com>).
vileopratama/vitech
src/addons/l10n_cn_standard/__init__.py
Python
mit
162
"""Added last_updated columns strategically Revision ID: 4e4814bebf31 Revises: 32aede9e7e69 Create Date: 2017-09-29 14:10:22.478961 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '4e4814bebf31' down_revision = '32aede9e7e69' branch_labels = None depends_on = N...
DavisPoGo/Monocle
migrations/versions/4e4814bebf31_added_last_updated_columns_strategically.py
Python
mit
983
# PYTHON 3 # # Author: Kate Willett # Created: 4 March 2019 # Last update: 15 April 2019 # Location: /data/local/hadkw/HADCRUH2/UPDATE2014/PROGS/PYTHON/ # GitHub: https://github.com/Kate-Willett/PYTHON # ----------------------- # CODE PURPOSE AND OUTPUT # ----------------------- # This code reads in monthly mean...
Kate-Willett/HadISDH_Build
MakeAreaAvgTS.py
Python
cc0-1.0
34,336
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleads/google-ads-python
google/ads/googleads/v10/enums/types/local_placeholder_field.py
Python
apache-2.0
1,702
# # 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 # ...
dims/heat
contrib/rackspace/rackspace/resources/cloud_loadbalancer.py
Python
apache-2.0
43,181
from ..core import Storage from ..parameters import InterpolatedLevelParameter from ..parameters.groundwater import KeatingStreamFlowParameter import numbers from scipy.interpolate import interp1d class KeatingAquifer(Storage): def __init__(self, model, name, num_streams, num_additional_inputs, ...
jetuk/pywr
pywr/domains/groundwater.py
Python
gpl-3.0
4,671
# Copyright (C) 2010-2011 Richard Lincoln # # 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 use, copy, modify, merge, publish...
rwl/PyCIM
CIM14/IEC61970/Dynamics/MetaBlockState.py
Python
mit
2,325
from django.utils.datastructures import MultiValueDict class HttpMergeParameters(object): def process_request(self, request): if request.method.lower() == 'GET': base = request.POST override = request.GET else: base = request.GET override = request.PO...
radoraykov/rating-gov-representatives
apps/website/core/middleware/rest.py
Python
unlicense
2,339
# -*- coding: utf-8 -*- class HTTPError(IOError): """Unified HTTPError used across all http_client implementations. """ def __init__(self, response, message=None, swagger_result=None): """ :type response: :class:`bravado_core.response.IncomingResponse` :param message: Optional str...
MphasisWyde/eWamSublimeAdaptor
src/third-party/bravado/exception.py
Python
mit
1,108
import threading import datetime import logging import pymongo import re from importlib import import_module from path import path from xmodule.errortracker import null_error_tracker from xmodule.x_module import XModuleDescriptor from xmodule.modulestore.locator import BlockUsageLocator, DescriptionLocator, CourseLoca...
rationalAgent/edx-platform-custom
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
Python
agpl-3.0
58,181
import collections import json import pkg_resources __version__ = "1.1.3" def versionList(versionString): """ Transform a version from string to integer list in order to make possible versions comparison. :param versionString: a string containing the version in the format '9.9.9.xxx' :return: a integer list...
neuroidss/nupic.studio
nupic_studio/__init__.py
Python
gpl-2.0
4,707
DEBUG = True SERVICE_NAME = 'tenykssame' SERVICE_VERSION = '0.1.0' SERVICE_UUID = '2b7b68b1-722d-4271-a82f-1ce0cf791d21' SERVICE_DESCRIPTION = 'same' ZMQ_CONNECTION = { 'out': 'tcp://localhost:61124', 'in': 'tcp://localhost:61123' }
kyleterry/tenyks-contrib
src/tenykssame/settings.py
Python
mit
241
#!/usr/bin/python2.7 # Compresses the core Blockly files into a single JavaScript file. # # Copyright 2012 Google Inc. # https://developers.google.com/blockly/ # # 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 o...
kesl-scratch/PopconBot
scratch-blocks/build.py
Python
mit
18,550
# BSD Licence # Copyright (c) 2011, Science & Technology Facilities Council (STFC) # All rights reserved. # # See the LICENSE file in the source distribution of this software for # the full license text. from drslib.cmip5 import CMIP5FileSystem from drslib import p_cmip5 from drslib import drs_tree import gen_drs im...
ESGF/esgf-drslib
test/test_drs_tree_product.py
Python
bsd-3-clause
2,575
#!/usr/bin/python # # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
gx1997/chrome-loongson
third_party/webdriver/python/test/selenium/webdriver/firefox/test_ff_api.py
Python
bsd-3-clause
1,189
# Copyright 2015 Google 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 required by applicable law or a...
DeepThoughtTeam/tensorflow
tensorflow/models/rnn/translate/translate.py
Python
apache-2.0
12,522
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
ypid-bot/check_mk
web/plugins/cron/user_sync.py
Python
gpl-2.0
1,544
# -*- coding: utf-8 -*- #============================================================================== # Copyright: Hybrid Labs # Licence: See LICENSE #============================================================================== from functools import partial class AttrFuncDecorator(object): ...
nehz/avalon
avalon/utils.py
Python
mit
522
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. project = 'prebuild' master_doc = 'index'
dmerejkowsky/qibuild
python/qidoc/test/projects/world/source/conf.py
Python
bsd-3-clause
214
""" This module is part of Orion2GoogleSpreadsheet project. Contains functionality used by Orion2GoogleSpreadsheet to normalize strings when parsing attributes from received data. """ import unicodedata import string import logs # Normalize strings def string_normalizer(message): try: # Convert to unico...
dflazaro/Orion2GoogleSpreadsheet
normalizer.py
Python
gpl-3.0
977
# # 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...
airbnb/airflow
airflow/providers/google/cloud/transfers/s3_to_gcs.py
Python
apache-2.0
9,700
import json import datetime from mock import MagicMock import dateutil.parser from django.utils import six from django.utils.http import urlquote from django.utils import timezone from django.test import TestCase from django.test.utils import override_settings from django import template from django.contrib.auth impo...
thenewguy/wagtail
wagtail/wagtailimages/tests.py
Python
bsd-3-clause
37,784
# -*- encoding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import sys import logging import argparse import traceback from mozdevice import DeviceManage...
mozilla-b2g/fxos-certsuite
mcts/securitysuite/suite.py
Python
mpl-2.0
7,388
import requests from flask import session, Blueprint, redirect from flask import request from grano import authz from grano.lib.exc import BadRequest from grano.lib.serialisation import jsonify from grano.views.cache import validate_cache from grano.core import db, url_for, app from grano.providers import github, twi...
clkao/grano
grano/views/sessions_api.py
Python
mit
5,328
#!/usr/bin/env python # -*- coding: utf-8 -*- # # seeder.py - Exports reachable nodes into DNS zone files for DNS seeder. # # Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the ...
ayeowch/bitnodes
seeder.py
Python
mit
9,236
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='user', options={}, ...
mod2/codex
accounts/migrations/0002_auto_20141031_1649.py
Python
mit
337
# 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 Externalmodule(Package): homepage = "http://somewhere.com" url = "http://somewher...
LLNL/spack
var/spack/repos/builtin.mock/packages/externalmodule/package.py
Python
lgpl-2.1
435
# # Copyright (C) 2016 Intel Corporation # # SPDX-License-Identifier: MIT # from oeqa.core.case import OETestCase class AnotherTest(OETestCase): def testAnother(self): self.assertTrue(True, msg='How is this possible?')
schleichdi2/OPENNFR-6.3-CORE
opennfr-openembedded-core/meta/lib/oeqa/core/tests/cases/loader/valid/another.py
Python
gpl-2.0
234
# Copyright 2009-2010 by Ka-Ping Yee # # 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 w...
Princessgladys/googleresourcefinder
lib/feedlib/geo.py
Python
apache-2.0
2,777
#!/usr/bin/env python #-*- coding: utf-8 -*- from setuptools import setup from setuptools import find_packages import os import re # https://github.com/zzzeek/sqlalchemy/blob/master/setup.py v_file = open(os.path.join(os.path.dirname(__file__), 'easylinker', '__init__.py')) VERSION = re.compile(r".*__version__ = '(....
if1live/easylinker
setup.py
Python
mit
1,689
from django.shortcuts import render from django.urls import reverse from .forms import CustomSurveyForm from .models import SenateProjects, StudentProjects from django.shortcuts import get_object_or_404 from django.http import HttpResponseRedirect def senate_project_survey(request, projectid): """ Generalized view ...
ByrdOfAFeather/AlphaTrion
Project/views.py
Python
mit
2,528
# -*- coding: utf-8 -*- # ## copyright (C) 2018 # The Icecube Collaboration # # $Id$ # # @version $Revision$ # @date $LastChangedDate$ # @author Hershal Pandya <hershal@udel.edu> Last changed by: $LastChangedBy$ # from icecube import shield tray.AddModule(IceTopPulseMerger, 'IceTopPulseMerger', outpu...
jrbourbeau/cr-composition
processing/legacy/icetop_llhratio/python/shield_snippets.py
Python
mit
2,763
import os import unittest from bs4 import BeautifulSoup from django.test import TestCase from bikestats.models import Make, Model, Stat, parse_all from bikestats.scraper import Scraper TEST_DIR = os.path.join(os.path.dirname(__file__), '../../www.motorcyclespecs.co.za') class TestScraper(TestCase): """ Test ou...
narfman0/bikestats
bikestats/tests/test_models.py
Python
gpl-3.0
743
import numpy as np import gelato import pytest @pytest.fixture() def seeded(): gelato.set_tt_rng(42) np.random.seed(42)
ferrine/gelato
gelato/tests/conftest.py
Python
mit
130
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
fichter/grpc
src/python/grpcio_test/grpc_test/_adapter/_c_test.py
Python
bsd-3-clause
2,073
from .base import CreateBaseCommand class HelperCloseOpenIndexCommand(CreateBaseCommand): command_name = "elasticsearch:helper-close-open-index" def is_enabled(self): return True def run_request(self, index=None): if not index: self.show_index_list_panel(self.run) ...
KunihikoKido/sublime-elasticsearch-client
commands/helper_close_open_index.py
Python
mit
569
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_almost_equal import abel from abel.benchmark import is_symmetric DATA_DIR = os.path.join(os.path.split(__file...
DhrubajyotiDas/PyAbel
abel/tests/test_tools.py
Python
mit
2,564
# -*- coding: utf-8 -*- { 'name': 'SaaS System Administration', 'summary': "System Administration Framework for SAAS Tools", 'version': '11.0.1.0.0', 'author': 'Salton Massally <smassally@idtlabs.sl> (iDT Labs), Nicolas JEUDY', 'license': 'LGPL-3', 'category': 'SaaS', 'website': 'idtlabs.sl'...
it-projects-llc/odoo-saas-tools
saas_sysadmin/__manifest__.py
Python
lgpl-3.0
441
""" This package contains packages that are primarily used for semantic analysis. """ __all__ = ['scope'] if __name__ == "__main__": pass
ldionne/nstl-lang
nstl/sema/__init__.py
Python
bsd-3-clause
146
#!/usr/bin/env python # -*- coding: utf-8 -*- #É adimensional? adi = False #É para salvar as figuras(True|False)? save = True #Caso seja para salvar, qual é o formato desejado? formato = 'jpg' #Caso seja para salvar, qual é o diretório que devo salvar? dircg = 'fig-sen' #Caso seja para salvar, qual é o nome do arquivo...
asoliveira/NumShip
scripts/plot/r-ace-u-cg-plt.py
Python
gpl-3.0
2,027
# # Copyright 2011-2016 Thomas Chiroux # # 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 program is distributed...
ThomasChiroux/dipplanner
dipplanner/tests/dive_cc_air_test.py
Python
gpl-3.0
6,118
import json import pytest import time import azrael.igor import azrael.aztypes import azrael.leonard import azrael.datastore import azrael.vectorgrid import azrael.eventstore import numpy as np import unittest.mock as mock import azrael.leo_api as leoAPI from azrael.aztypes import RetVal from IPython import embed as ...
olitheolix/azrael
azrael/test/test_leonard.py
Python
agpl-3.0
58,822
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch.py
Python
mit
1,372
import ConfigParser import os import glob from tworpus import settings def get_converter_dirs(): pathname = settings.CONVERTERS_DIR dirs = [] for dir in os.walk(pathname): if os.path.isdir(dir[0]) and dir[0] is not pathname: cfgfile = glob.glob(os.path.join(dir[0], "config.cfg")) ...
markusmichel/Tworpus-Client
tworpus/data_converter.py
Python
apache-2.0
1,560
#!/usr/bin/python3 # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: # bsc#1031358 # This script dumps stuck requests for every disk on the system from crash.subsystem.storage import for_each_disk from crash.subsystem.storage.decoders import for_each_bio_in_stack from crash.subsystem.storage import gendisk...
jeffmahoney/crash-python
contrib/stuck-requests.py
Python
gpl-2.0
1,702
# Licensed under the MIT License - https://opensource.org/licenses/MIT import unittest import numpy as np from pycobra.cobra import Cobra from pycobra.ewa import Ewa from pycobra.kernelcobra import KernelCobra import logging from sklearn.utils.estimator_checks import check_estimator class TestPrediction(unittest....
bhargavvader/pycobra
tests/test_cobra.py
Python
mit
2,212
#!/usr/bin/env python import socket import sys import requests import string r = requests.get("http://4.ipquail.com/ip") if r.status_code == 200: ipv4 = r.content.translate(None, string.whitespace) else: ipv4 = 'err' #print ipv4 # Create a UDP socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ...
tbaschak/bcp38-tests
bcp38-client.py
Python
mit
761
from typing import * from .component import Component from ..observable import Observable class Button(Component, Observable): """ An Observable Component that represents a Button with some text """ def __init__(self, text: AnyStr): super().__init__() self.text = text def on_cli...
purduesigbots/pros-cli
pros/common/ui/interactive/components/button.py
Python
mpl-2.0
591
from JumpScale import j import copy def extractDetails(remoteException): """Extract the details of an xml-rpc exception error message""" try: details = remoteException.faultString or remoteException.message details = details.split(":", 2)[-1].replace("'>", "").lstrip() except AttributeErr...
Jumpscale/jumpscale6_core
lib/JumpScale/portal/docgenerator/WikiClientConfluence.py
Python
bsd-2-clause
5,951
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url, include from . import views, Registry urlpatterns = [ url(r'^$', views.LoginFormView.as_view(), name="login"), url(r'^logout$', views.LogoutActionView.as_view(), name="logout"), url(r'^settings', views.Setti...
watchdogpolska/watchdog-id
watchdog_id/auth_factories/urls.py
Python
mit
582
# as_nrf_stream.py uasyncio stream interface for nRF24l01 radio # (C) Peter Hinch 2020 # Released under the MIT licence import io import ustruct import uasyncio as asyncio from time import ticks_ms, ticks_diff from micropython import const from nrf24l01 import NRF24L01 __version__ = (0, 1, 0) # I/O interface MP_STR...
peterhinch/micropython-radio
async/as_nrf_stream.py
Python
mit
9,620
from lomnikol import * import matplotlib.pyplot as plt import statistics as st # # dif = [] # diferr = [] # with open('Sheet1.dat') as file: # for line in file: # temp = line.strip().split('\t') # dif.append(float(temp[0])) # diferr.append(float(temp[1])) # # temperatura = [24....
Ossada/DLS-UVVis
module2.py
Python
mit
2,711