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 |
|---|---|---|---|---|---|
from setuptools import setup
setup(
name='stratosphere',
version='0.1.0',
description='AWS CloudFormation orchestration library',
author='Rob Zienert',
author_email='rob@robzienert.com',
license='MIT License',
packages=['stratosphere'],
setup_requires=['pep8', 'pyflakes', 'moto'],
i... | robzienert/stratosphere | setup.py | Python | mit | 452 |
# -*- coding: utf-8 -*-
""" RESTful Search Methods
@requires: U{B{I{gluon}} <http://web2py.com>}
@copyright: 2009-2012 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files... | ashwyn/eden-message_parser | modules/s3/s3search.py | Python | mit | 99,139 |
"""Tests for the Safe Mode integration."""
| Danielhiversen/home-assistant | tests/components/safe_mode/__init__.py | Python | apache-2.0 | 43 |
#!/usr/bin/python
import sys
sys.path.append('..')
from bcert_pb2 import *
import binascii
# fill out a minimal bitcoin cert
cert = BitcoinCert()
# first the data part (the part is later signed by the "higher level cert" or "the blockchain")
cert.data.version = '0.1'
cert.data.subjectname = 'Foo Project'
email = ce... | bcpki/bitcoin | src/bcert/examples/mk_fooproject.py | Python | mit | 3,118 |
#!/usr/bin/env python
"""Utils package for Avro Phonetic.
-------------------------------------------------------------------------------
Copyright (C) 2013 Kaustav Das Modak <kaustav.dasmodak@yahoo.co.in.
This file is part of pyAvroPhonetic.
pyAvroPhonetic is free software: you can redistribute it and/o... | improlabs/Banglish-Sentiment-Analysis | python3/pyavrophonetic/utils/__init__.py | Python | gpl-3.0 | 1,182 |
import logging
import utils
import options
_Warning = logging.Warning
_Info = logging.Info
#//===========================================================================//
_site_setup = []
_user_setup = {}
_tools_setup = {}
_tools_post_setup = {}
def ResetSetup( site_setup = _site_setup,
us... | menify/sandbox | trunk/setup.py | Python | mit | 5,383 |
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'geopastebin',
'USER': '',
'PASSWORD': '',
'HOST': '',
... | pragmaticbadger/geopastebin | example_project/settings.py | Python | bsd-3-clause | 1,183 |
df14['D'].day()
# D
# ---
# 18
# 19
# 20 | mathemage/h2o-3 | h2o-docs/src/booklets/v2_2015/source/Python_Vignette_code_examples/python_display_day_of_month.py | Python | apache-2.0 | 46 |
# Copyright (C) 2012 Equinor ASA, Norway.
#
# The file 'enkf_state.py' is part of ERT - Ensemble based Reservoir Tool.
#
# ERT 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 Lice... | joakim-hove/ert | res/enkf/enkf_state.py | Python | gpl-3.0 | 2,195 |
# -*- coding: utf-8 -*-
"""
sphinxcontrib.chapeldomain
~~~~~~~~~~~~~~~~~~~~~~~~~~
The Chapel language domain.
:copyright: Copyright 2015 by Chapel Team
:license: Apache v2.0, see LICENSE for details.
Chapel website: http://chapel.cray.com/
Chapel spec: http://chapel.cray.com/language.... | chapel-lang/sphinxcontrib-chapeldomain | sphinxcontrib/chapeldomain/__init__.py | Python | apache-2.0 | 41,851 |
# This script tests the speed limit and the orientation lock API calls.
# Created by Toni Sagrista
from py4j.java_gateway import JavaGateway, GatewayParameters
gateway = JavaGateway(gateway_parameters=GatewayParameters(auto_convert=True))
gs = gateway.entry_point
gs.disableInput()
gs.cameraStop()
gs.maximizeInterfac... | ari-zah/gaiasky | assets/scripts/tests/topspeed-orientation-test.py | Python | lgpl-3.0 | 1,039 |
import plotly as py
import plotly.graph_objs as go
color_Unoccupied = 'rgb(233,233,233)'
color_ExtremeCold = 'rgb(0,0,255)'
color_Cold = 'rgb(47,141,255)'
color_SlightlyCold = 'rgb(110,255,255)'
color_Comfortable = 'rgb(144,245,0)'
color_SlightlyWarm = 'rgb(255,204,0)'
color_Hot = 'rgb(255,111,71)'
color_Ext... | vhoangTS/LizardPMVPlot | PMVPlotting.py | Python | gpl-3.0 | 7,189 |
import unittest
from biothings_explorer.registry import Registry
from biothings_explorer.user_query_dispatcher import SingleEdgeQueryDispatcher
from .utils import get_apis
reg = Registry()
class TestSingleHopQuery(unittest.TestCase):
def test_genomicentity2protein(self):
"""Test gene-protein"""
s... | biothings/biothings_explorer | tests/test_apis/test_cordgenomicentity.py | Python | apache-2.0 | 5,030 |
#val is the height of the throw, cross is a char
class Toss:
cross = ''
def __init__(self, _val, _cross):
self.val = _val
self.cross = _cross
#find the drop location of a toss at a given offset
def location(self, offset, length, right):
retval = ((self.val/2)+offset) % length
... | JoshMermel/Juggle-Transition | toss.py | Python | gpl-2.0 | 1,272 |
# Copyright 2016. The Regents of the University of California.
# All rights reserved. Use of this source code is governed by
# a BSD-style license which can be found in the LICENSE file.
#
# Authors:
# 2016 Siddharth Iyer <sid8795@gmail.com>
# 2018 Soumick Chatterjee <soumick.chatterjee@ovgu.de> , WSL Support
import... | sdimoudi/bart | python/bart.py | Python | bsd-3-clause | 2,861 |
#python imports
import sys
import os
import time
import datetime
import subprocess
import json
import requests
from termcolor import colored
#third-party imports
#No third-party imports
#programmer generated imports
from logger import logger
from fileio import fileio
'''
***BEGIN DESCRIPTION***
Type: Search - Descri... | slaughterjames/static | modules/malware_bazaar_search.py | Python | gpl-2.0 | 5,588 |
"""
Stand-alone stream mocking decorator for easier imports.
"""
from functools import wraps
import sys
from StringIO import StringIO # No need for cStringIO at this time
class CarbonCopy(StringIO):
"""
A StringIO capable of multiplexing its writes to other buffer objects.
"""
def __init__(self, buf... | cmattoon/fabric | tests/mock_streams.py | Python | bsd-2-clause | 2,480 |
import toolbox
import numpy as np
import pylab
data, params = toolbox.initialise('prepro.su')
cdps = np.unique(data['cdp'])
#recreate original velocity field
vels = {}
vels[753]= (2456.0, 0.153), (2772.1, 0.413), (3003.2, 0.612), (3076.1, 0.704), (3270.7, 1.056), (3367.9, 1.668), (3538.2, 2.204), (3671.9, 3.566), (3... | stuliveshere/SeismicProcessing2015 | prac2_student_working/02.0_brute_vels.py | Python | mit | 780 |
#
# NOX 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.
#
# NOX is distributed in the hope that it will be useful,
# but WITHOUT ANY ... | zainabg/NOX | src/nox/webapps/webservice/web_arg_utils.py | Python | gpl-3.0 | 9,178 |
default_app_config = 'easyaudit.apps.EasyAuditConfig' | Puciek/django-easy-audit | easyaudit/__init__.py | Python | gpl-3.0 | 53 |
import py2exe
from distutils.core import setup
import sys
sys.setrecursionlimit(5000)
# these .py modules will be converted to .pyo and included in the .exe
sys.argv.append("py2exe")
sys.argv.append("-q")
setup(
name='src',
packages=['src', 'src.Misc', 'src.ProblemSpecifications', 'src.Readers', 'src.Writers'],
... | semanticsgirl/arithmetic-exercise-generator | src/setup.py | Python | gpl-3.0 | 804 |
# -*- coding: utf-8 -*-
# Copyright 2013 Dev in Cachu 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 unittest
from django.conf import settings
from django.core import management
from django.test import client
from django.view... | devincachu/devincachu-2014 | devincachu/palestras/tests/test_view_palestra.py | Python | bsd-2-clause | 8,536 |
# coding=utf-8
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/li... | ramineni/myironic | ironic/tests/drivers/test_pxe.py | Python | apache-2.0 | 44,025 |
#!/usr/bin/env python3
import pickle
import sys
import string
import heapq
from pos import core_tags
from nltk.tokenize import word_tokenize
if __name__ == '__main__':
score, npos_count = pickle.load(open("tagger.out", "rb"))
with open(sys.argv[1]) as input_file:
for line in input_file:
li... | pdekker12/nlp2 | Assignment2/run.py | Python | bsd-2-clause | 1,496 |
"""
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 use this ... | keedio/keedio-stacks | KEEDIO/1.1/services/YARN/package/scripts/yarn_resourcemanager.py | Python | apache-2.0 | 1,254 |
# -*- coding: utf-8 -*-
#
# Copyright 2008-2010 Brett Adams
# Copyright 2012-2015 Mario Frasca <mario@anche.no>.
#
# This file is part of bauble.classic.
#
# bauble.classic 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 ... | mfrasca/bauble.classic | bauble/plugins/report/mako/__init__.py | Python | gpl-2.0 | 4,268 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__='0.0.1'
import os
import re
import time
import platform
import SimpleXMLRPCServer
IP="0.0.0.0"
PORT=1234
class Proc:
def __init__(self):
self.proc_file = dict(
PROC = '/proc',
MEM_INFO = "/proc/meminfo", # 内存使用
... | ymero/ServerMonitor | Clients/Linux_like/server_client/ServerRun.py | Python | mit | 7,926 |
#
# distutils/version.py
#
# Implements multiple version numbering conventions for the
# Python Module Distribution Utilities.
#
# $Id$
#
# Copied here on 04/Dec/2021, as distutils will be deprecated in Py3.10
# This class is now part of the 'packaging' tool, but taking on an entire dependency for a single class seems... | spulec/moto | moto/utilities/distutils_version.py | Python | apache-2.0 | 9,112 |
import logging
import logging.config
import sys
import threading
import os
from amberclient.collision_avoidance.collision_avoidance_proxy import CollisionAvoidanceProxy
from amberclient.common.amber_client import AmberClient
from amberclient.location.location import LocationProxy
from amberclient.roboclaw.roboclaw imp... | showmen15/testEEE | src/amberdriver/drive_to_point/drive_to_point_controller.py | Python | mit | 7,564 |
r"""
The "tests" submodule within the "dstauffman2.games.pentago" module is a full test suite based on
the Python `unittest` library.
Notes
-----
#. Written by David C. Stauffer in January 2016.
"""
#%% Imports
# None
#%% Unit test
if __name__ == '__main__':
pass
| DStauffman/dstauffman2 | dstauffman2/games/pentago/tests/__init__.py | Python | lgpl-3.0 | 272 |
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# 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.... | florianfesti/boxes | boxes/generators/gearbox.py | Python | gpl-3.0 | 3,685 |
##
# Copyright 2009-2016 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | ocaisa/easybuild-easyblocks | easybuild/easyblocks/generic/pythonpackage.py | Python | gpl-2.0 | 22,401 |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | sysadminmatmoz/odoo-clearcorp | TODO-7.0/sneldev_magento/wizard/sneldev_magento_categories_import.py | Python | agpl-3.0 | 1,660 |
# Copyright 2012 the V8 project authors. 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 conditi... | macchina-io/macchina.io | platform/JS/V8/v8/tools/testrunner/local/commands.py | Python | apache-2.0 | 4,703 |
# testing/util.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from ..util import jython, pypy, defaultdict, decorator, py2k
import decimal
import ... | fernandog/Medusa | ext/sqlalchemy/testing/util.py | Python | gpl-3.0 | 7,535 |
##########################################################################
# Copyright (c) 2013, 2014, University of Washington.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Unive... | kishoredbn/barrelfish | tools/harness/machines/uw.py | Python | mit | 6,318 |
# Copyright (C) 2014 BDT Media Automation GmbH
#
# Author: Stefan Hauser <stefan.hauser@bdt.de>
#
# 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... | BDT-GER/SWIFT-TLC | source/Build/install_packages/SWIFT-Tape-Auditor/vs_auditor/vs_diskfile.py | Python | apache-2.0 | 6,438 |
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | MapStory/geonode | geonode/api/tests.py | Python | gpl-3.0 | 12,428 |
# urls.py
from django.conf.urls import url
from events.viewsv2 import *
from events.decorators import *
from events.formsv2 import *
from events.urls import *
from .viewsv2 import *
app_name = 'eventsv2'
urlpatterns = [
url(
r'^training-planner/',
TrainingPlannerListView.as_view(template_name="trainin... | Spoken-tutorial/spoken-website | events/urlsv2.py | Python | gpl-3.0 | 10,900 |
# This plugin should load and run successfully, but do no work.
import pybookwyrm
def find(wanted, bookwyrm):
pass
#FAIL error
| Tmplt/bookwyrm | tests/plugins/success-but-no-work.py | Python | mit | 133 |
# Copyright 2018 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... | ghchinoy/tensorflow | tensorflow/python/estimator/estimator_lib.py | Python | apache-2.0 | 1,305 |
#!/usr/bin/env python3
import random
import numpy as np
import sympy
mod_space = 29
'''
Generate Encryption Key
'''
# In --> size of matrix (n x n)
# Out --> List of lists [[1,2,3],[4,5,6],[7,8,9]]
def generate_encryption_key(size):
determinant = 0
# Need to make sure encryption key is invertible, IE det(k... | jbloom512/Linear_Algebra_Encryption | Generate_Encryption_Key.py | Python | mit | 3,446 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import openerp.modules
import logging
_logger = logging.getLogger(__name__)
def is_initialized(cr):
""" Check if a database has been initialized for the ORM.
The database can be initialized with the 'initializ... | zbqf109/goodo | openerp/modules/db.py | Python | gpl-3.0 | 5,047 |
import sys
import os
from _pydev_bundle import pydev_monkey
sys.path.insert(0, os.path.split(os.path.split(__file__)[0])[0])
from _pydevd_bundle.pydevd_constants import Null
import unittest
try:
import thread
except:
import _thread as thread # @UnresolvedImport
try:
xrange
except:
xrange = range
#=... | hurricup/intellij-community | python/helpers/pydev/tests_pydevd_python/test_additional_thread_info.py | Python | apache-2.0 | 3,874 |
# -*- test-case-name: twisted.python.test.test_htmlizer -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
HTML rendering of Python source.
"""
import tokenize, cgi, keyword
from . import reflect
class TokenPrinter:
currentCol, currentLine = 0, 1
lastIdentifier = parameters = 0
... | Tokyo-Buffalo/tokyosouth | env/lib/python3.6/site-packages/twisted/python/htmlizer.py | Python | mit | 2,729 |
import sys
import os
sys.path.append(os.path.abspath("../md/"))
import base
import media
import time
import threading
class ThreadAction1(threading.Thread):
def __init__(self, host):
super().__init__()
self.dut = media.Telnet(host)
def run(self):
while True:
self.dut.com... | jaeick/ts | modo/gplat/gplat-565.py | Python | apache-2.0 | 2,664 |
import importlib
import inspect
from .job import Job
from .brokers.standard import Standard
from .brokers.eager import Eager
from .connectors.sqs import SQS
from .worker import Worker
import logging
logger = logging.getLogger('sqjobs')
def create_eager_broker():
return Eager()
def create_sqs_broker(access_key... | gnufede/sqjobs | sqjobs/utils.py | Python | bsd-3-clause | 1,138 |
# Copyright 2017, 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... | jonparrott/gcloud-python | securitycenter/noxfile.py | Python | apache-2.0 | 2,586 |
import dateutil.parser
from display import TextDisplay
from plugins import Plugin
__author__ = 'teddydestodes'
'''
Created on Dec 29, 2012
@author: teddydestodes
'''
import requests
import time
import math
import datetime
import pytz
import urllib.parse
def now():
return pytz.utc.localize(datetime.datetime.utcno... | TeddyDesTodes/pyflipdot | pyflipdot/plugins/xively/__init__.py | Python | bsd-3-clause | 3,479 |
from os.path import join
import cobra
from cobra.io import read_sbml_model, write_sbml_model
def test_notes(tmp_path):
"""Testing if model notes are written in SBML"""
path_to_file = join(str(tmp_path), "model_notes.xml")
# making a minimal cobra model to test notes
model = cobra.Model("e_coli_core"... | opencobra/cobrapy | src/cobra/test/test_io/test_notes.py | Python | gpl-2.0 | 1,267 |
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | daniyalzade/polysh | polysh/stdin.py | Python | gpl-2.0 | 9,733 |
from django import forms
from django.conf import settings
from idea.models import Idea
if 'core.taggit' in settings.INSTALLED_APPS:
from core.taggit.utils import add_tags
else:
pass
class IdeaForm(forms.ModelForm):
class Meta:
model = Idea
exclude = ('creator', 'time', 'state', 'voters')... | m3brown/idea-box | src/idea/forms.py | Python | cc0-1.0 | 3,356 |
"""This module implement decorators for wrapping data sources so as to
simplify their construction and attribution of properties.
"""
import functools
def data_source_generator(name=None, **properties):
"""Decorator for applying to a simple data source which directly
returns an iterable/generator with the me... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/newrelic-2.46.0.37/newrelic/samplers/decorators.py | Python | agpl-3.0 | 1,626 |
from __future__ import print_function
# Authors: Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
import os
import os.path as op
from functools import reduce, partial
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
assert_all... | teonlamont/mne-python | mne/io/bti/tests/test_bti.py | Python | bsd-3-clause | 12,138 |
from hk2.types.annotations import ClassAnnotation
#===========================================================
class Contract(ClassAnnotation):
pass
| mikhtonyuk/pyhk2 | hk2/annotations/contract.py | Python | mit | 155 |
import os
base_url = os.environ.get('DP_BASE_URL', '')
base_dir = os.environ.get('DP_APP_ROOT', os.path.dirname(os.path.realpath(__file__)) + '/..')
adapters = {
'core': 'deployer.core',
'aws': 'deployer.aws'
}
session = {
'session.type': 'file',
'session.cookie_expires': False,
'session.data_dir... | filc/python-aws-ecr-deployer | config/application.py | Python | apache-2.0 | 905 |
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin
from django.utils import timezone
from django.db import models
from ckeditor.fields import RichTextField
from datetime import date
class Contact(CMSPlugin):
number = models.CharField(max... | pmutale/www.mutale.nl | themes/models.py | Python | unlicense | 768 |
from unquote import unquote
def parse_query(query, keep_blank_values=0, strict_parsing=0):
"""Parse a URL query string and return the components as a dictionary.
Based on the cgi.parse_qs method. This is a utility function provided
by urlparse so that users need not use the cgi module for
parsing the ... | smurfix/pywsgi | src/pywsgi/util/parse_query.py | Python | gpl-2.0 | 1,859 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack 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
#
... | usc-isi/extra-specs | nova/api/openstack/compute/contrib/consoles.py | Python | apache-2.0 | 2,973 |
"""
FEZ type readers!
"""
from __future__ import print_function
from xnb_parse.type_readers.fez import fez_basic, fez_graphics, fez_level, fez_music
__all__ = ['fez_basic', 'fez_graphics', 'fez_level', 'fez_music']
| fesh0r/xnb_parse | xnb_parse/type_readers/fez/__init__.py | Python | mit | 219 |
'''
Test cases for pyclbr.py
Nick Mathewson
'''
import sys
from types import FunctionType, MethodType, BuiltinFunctionType
import pyclbr
from unittest import TestCase, main as unittest_main
StaticMethodType = type(staticmethod(lambda: None))
ClassMethodType = type(classmethod(lambda c: None))
# Here we test the... | yotchang4s/cafebabepy | src/main/python/test/test_pyclbr.py | Python | bsd-3-clause | 7,112 |
compiler = './icc.py'
mpicompiler = './icc.py'
mpilinker = 'MPICH_CC=gcc mpicc'
scalapack = True
library_dirs += ['/opt/intel/Compiler/11.0/074/mkl/lib/em64t']
libraries = ['mkl_intel_lp64' ,'mkl_sequential' ,'mkl_core',
'mkl_lapack',
'mkl_scalapack_lp64', 'mkl_blacs_intelmpi_lp64',
... | robwarm/gpaw-symm | doc/install/Linux/customize_juropa_icc_libxc.py | Python | gpl-3.0 | 743 |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
# Copyright (c) 2009 Jendrik Seipp
#
# RedNotebook 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 vers... | jendrikseipp/rednotebook-elementary | rednotebook/backup.py | Python | gpl-2.0 | 5,067 |
from mod_base import *
class Calc(Command):
"""Calculate math expressions. e.g. calc 3+4*6"""
def run(self, win, user, data, caller=None):
"""Evaluate a python expression semi-safely."""
if not data:
win.Send("specify what to calculate")
else:
try:
... | richrd/bx | modules/calc.py | Python | apache-2.0 | 706 |
#
# Copyright (c) 2001 - 2015 The SCons Foundation
#
# 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... | stefanklug/mapnik | scons/scons-local-2.3.6/SCons/Tool/mssdk.py | Python | lgpl-2.1 | 1,834 |
from __future__ import absolute_import
from __future__ import print_function
from zerver.lib.test_classes import ZulipTestCase
class CompatibilityTest(ZulipTestCase):
def test_compatibility(self):
# type: () -> None
result = self.client_get("/compatibility", HTTP_USER_AGENT='ZulipMobile/5.0')
... | sonali0901/zulip | zerver/tests/test_compatibility.py | Python | apache-2.0 | 504 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | krafczyk/spack | var/spack/repos/builtin/packages/ncbi-toolkit/package.py | Python | lgpl-2.1 | 2,492 |
#!/usr/bin/env python
#
# Copyright 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-2.0
#
# Unless required by applicable law o... | johnwlockwood/appengine-mapreduce | python/src/mapreduce/base_handler.py | Python | apache-2.0 | 6,390 |
# Standard library imports
import random
# Related third party imports
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_array_equal
from nose.tools import assert_raises_regexp, assert_true
# Local application/library specific imports
import pval_correction as my_crt
def test_correct():... | rphlypo/parietalretreat | test_pval_correction.py | Python | bsd-2-clause | 1,341 |
# -*- coding: utf-8 -*-
"""
httpbin.structures
~~~~~~~~~~~~~~~~~~~
Data structures that power httpbin.
"""
class CaseInsensitiveDict(dict):
"""Case-insensitive Dictionary for headers.
For example, ``headers['content-encoding']`` will return the
value of a ``'Content-Encoding'`` response header.
"""... | cityindex-attic/python-development-flow | src/httpbin/structures.py | Python | apache-2.0 | 670 |
"""
Django settings for inventory project.
Generated by 'django-admin startproject' using Django 1.11.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import ... | ivh/BrewInventory | inventory/settings.py | Python | gpl-3.0 | 3,238 |
#!/usr/bin/env python
"""
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.enums import DBMS
from lib.core.settings import MSSQL_SYSTEM_DBS
from lib.core.unescaper import unescaper
from plugins.dbms.mssqlserver.enumeration import Enumer... | golismero/golismero | tools/sqlmap/plugins/dbms/mssqlserver/__init__.py | Python | gpl-2.0 | 1,081 |
# ----------------------------------------------------------------------------
# Copyright 2014-2016 Nervana Systems 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.apa... | matthijsvk/multimodalSR | code/Experiments/neon-master/neon/callbacks/callbacks.py | Python | mit | 60,510 |
import _plotly_utils.basevalidators
class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bordercolorsrc", parent_name="treemap.hoverlabel", **kwargs
):
super(BordercolorsrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotly/python-api | packages/python/plotly/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py | Python | mit | 484 |
# coding: utf-8
from __future__ import unicode_literals
from model_mommy import mommy
from django.test import TestCase
from cmdbox.snippets.models import Snippet, Review
class SnippetsModelsTests(TestCase):
def setUp(self):
self.snippet = mommy.make(Snippet, slug='test-snippet')
self.review = m... | vitorfs/cmdbox | cmdbox/snippets/tests/test_models.py | Python | mit | 3,560 |
# -*- coding: utf-8 -*-
import logging
import pathlib
from typing import List, Optional
import iotlabcli.auth
from enoslib.api import play_on
from enoslib.objects import Host, Networks, Roles
from enoslib.infra.provider import Provider
from enoslib.infra.enos_iotlab.iotlab_api import IotlabAPI
from enoslib.infra.enos... | BeyondTheClouds/enoslib | enoslib/infra/enos_iotlab/provider.py | Python | gpl-3.0 | 10,746 |
# Copyright 2014 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 agre... | alex/caniusepython3 | caniusepython3/pypi.py | Python | apache-2.0 | 4,699 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('predict', '0006_auto_20160902_1715'),
]
operations = [
migrations.RemoveField(
model_name='predictdatasetfile',
... | IQSS/gentb-site | apps/predict/migrations/0007_auto_20170202_1539.py | Python | agpl-3.0 | 522 |
#coding=utf-8
'''
timer app;
used to scheduler tasks;
'''
import sys
from os import getcwd
from os.path import realpath, dirname, abspath, join
sys.path.insert(
0,
realpath(join(dirname(__file__), '../'))
)
from in_trip.lib.config import Config
from in_trip.lib.utils import parse_args
from in_trip.lib.timer... | seraphlnWu/in_trip | in_trip/in_trip/timer.py | Python | mit | 754 |
from django.apps import AppConfig
class DjangoSloopConfig(AppConfig):
name = "django_sloop"
verbose_name = "Sloop"
| Hipo/django-sloop | django_sloop/apps.py | Python | apache-2.0 | 125 |
## @package position_weighted
# Module caffe2.python.layers.position_weighted
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import numpy as np
from caffe2.python import schema
from caffe2.python.layer... | xzturn/caffe2 | caffe2/python/layers/position_weighted.py | Python | apache-2.0 | 2,261 |
import settings as s
import SettingReader
try:
import Image
except ImportError:
from PIL import Image
import pytesseract
import os
import glob
import csv
import re
import pandas as pd
def extract_data(datasource):
# overall image directory
working_dir = os.path.join(s.input['datalogger_image_dir'], da... | mmmatthew/floodx_data_preprocessing | process_ocr.py | Python | mit | 4,127 |
#!/usr/bin/python
import sys
from socket import *
import struct
import move_pb2
import move_direct_pb2
WATCH_PLAYER = {12884902615, 4294967949, 12884902629}
HOST='127.0.0.1'
PORT=10697
BUFSIZ=1024
ADDR=(HOST, PORT)
client=socket(AF_INET, SOCK_STREAM)
client.connect(ADDR)
last_data = ""
player_list = {}
while True:... | tsdfsetatata/xserver | Server/dump_srv/dump_srv.py | Python | gpl-3.0 | 3,704 |
#!/usr/bin/python
import smbus
# ===========================================================================
# Adafruit_I2C Class
# ===========================================================================
class Adafruit_I2C :
@staticmethod
def getPiRevision():
"Gets the version number of the Raspberry Pi... | RorschachUK/meArmPi | Adafruit_I2C.py | Python | mit | 4,583 |
__author__ = 'y42sora'
import HTTPGetMethod
import UrlListRestApi
class REST(object):
auth = None
def __init__(self, auth=None):
self.auth = auth
def homeTimeline(self):
pass
def publicTimeline(self):
HTTPGetMethod.getMethod(UrlListRestApi.PUBLIC_TIMELINE)
| y42sora/Twitter4Py3 | Rest.py | Python | apache-2.0 | 318 |
import rules
from rules.predicates import is_superuser
from adhocracy4.organisations.predicates import is_initiator
from adhocracy4.organisations.predicates import is_org_group_member
from adhocracy4.organisations.predicates import is_org_member
from .predicates import is_live
from .predicates import is_moderator
fro... | liqd/adhocracy4 | adhocracy4/projects/rules.py | Python | agpl-3.0 | 1,278 |
#
# This file is part of Mapnik (C++/Python mapping toolkit)
# Copyright (C) 2014 Artem Pavlenko
#
# Mapnik 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 any later versi... | garnertb/python-mapnik | mapnik/__init__.py | Python | lgpl-2.1 | 35,734 |
from django.http import HttpResponseNotAllowed, JsonResponse
from django.shortcuts import resolve_url
from django.conf import settings
import mock
from wristband.authentication.views import login_view, logout_view
@mock.patch('wristband.authentication.views.login')
@mock.patch('wristband.authentication.views.authenti... | hmrc/wristband | wristband/authentication/tests/test_views.py | Python | apache-2.0 | 2,014 |
# -*- coding: utf-8 -*-
"""
@author: Jeff Cavner
@contact: jcavner@ku.edu
@license: gpl2
@copyright: Copyright (C) 2014, University of Kansas Center for Research
Lifemapper Project, lifemapper [at] ku [dot] edu,
Biodiversity Institute,
1345 Jayhawk Boulevard, Lawrence, Kansas, 66045, US... | lifemapper/LmQGIS | lifemapperTools/tools/newExperiment.py | Python | gpl-2.0 | 17,776 |
# Copyright (c) 2015 Stefano Guglielmetti - jeko@jeko.net
# https://github.com/amicojeko
#
# 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
# ... | amicojeko/TwitterBlink | streaming.py | Python | mit | 2,742 |
# Copyright (c) 2010, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... | danialbehzadi/Nokia-RM-1013-2.0.0.11 | webkit/Tools/Scripts/webkitpy/common/net/layouttestresults.py | Python | gpl-3.0 | 7,908 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-04 21:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='FiftyDa... | colinmcglone/window-time | marketgrab/migrations/0001_initial.py | Python | mit | 1,748 |
#!/usr/bin/env python3
# https://www.hackerrank.com/challenges/sherlock-and-array
import os
import unittest
from typing import List
def balanced_sums(arr: List[int]) -> str:
left = [0] * len(arr)
right = [0] * len(arr)
for i in range(1, len(arr)):
left[i] = left[i - 1] + arr[i - 1]
right... | altermarkive/Coding-Interviews | algorithm-design/hackerrank/sherlock_and_array/sherlockand_array.py | Python | mit | 1,280 |
def _nucleotidesToNumerals(nucleotides):
nums = []
for nuc in nucleotides:
nums.append(('a','t','c','g').index(nuc.lower()))
return nums
def _baseFourToChar(nums):
val = 0
nums.reverse()
for i in range(4):
val += int(nums[i]) * ( 4 ** i)
return chr(val)
def _charToBaseFour... | omegachysis/biohex | biohex/bitLibrary/functions.py | Python | apache-2.0 | 939 |
##
# Copyright (c) 2013-2014 Apple 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 l... | trevor/calendarserver | txdav/common/idirectoryservice.py | Python | apache-2.0 | 2,527 |
#!/usr/bin/env python2
# Copyright (C) 2011-2012 by Imperial College London
# Copyright (C) 2013 University of Oxford
# Copyright (C) 2014 University of Edinburgh
#
# This program 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... | pf4d/dolfin-adjoint | timestepping/python/timestepping/statics.py | Python | lgpl-3.0 | 3,929 |
"""
Copyright 2015 Zalando SE
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 distrib... | iomedhealth/connexion | connexion/decorators/security.py | Python | apache-2.0 | 3,294 |
import argparse
import os
import pytest
from tests.test_config import load_tests_params, clean_dirs
from data_engine.prepare_data import build_dataset
from nmt_keras.training import train_model
from nmt_keras.apply_model import sample_ensemble, score_corpus
def test_transformer():
params = load_tests_params()
... | lvapeab/nmt-keras | tests/NMT_architectures/unidir_deep_transformer_tied_embeddings.py | Python | mit | 2,901 |
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, absolute_import, unicode_literals
import json
import logging
from os import uname
import sys
import a... | TomasTomecek/osbs | osbs/cli/main.py | Python | bsd-3-clause | 12,432 |
#!/bin/python
import os, subprocess
import logging
from autotest.client import test
from autotest.client.shared import error, software_manager
sm = software_manager.SoftwareManager()
class xorg_x11_fonts(test.test):
"""
Autotest module for testing basic functionality
of xorg_x11_fonts
@author Shoji ... | rajashreer7/autotest-client-tests | linux-tools/xorg_x11_fonts/xorg_x11_fonts.py | Python | gpl-2.0 | 2,125 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.