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
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2019 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Invenio-Records-REST configuration.""" from __future__ import absolute_import, pr...
inveniosoftware/invenio-records-rest
invenio_records_rest/config.py
Python
mit
13,214
import unittest2 from google.appengine.ext import testbed from models.account import Account from models.suggestion import Suggestion from helpers.suggestions.suggestion_fetcher import SuggestionFetcher class TestSuggestionFetcher(unittest2.TestCase): def setUp(self): self.testbed = testbed.Testbed() ...
synth3tk/the-blue-alliance
tests/test_suggestion_fetcher.py
Python
mit
965
# # 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 # ...
dragorosson/heat
heat/scaling/template.py
Python
apache-2.0
2,936
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-12 15:44 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Community', '0030_auto_20171112_1025'), ('Community', '0030_auto_20171105_1836'), ] ...
ByrdOfAFeather/AlphaTrion
Community/migrations/0031_merge_20171112_1044.py
Python
mit
342
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \ get_first_day, get_last_day...
rohitwaghchaure/New_Theme_Erp
erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Python
agpl-3.0
24,951
#!/usr/bin/env python # -*- coding: UTF-8 -*- import unittest import pbtest PB_CHROME_QUNIT_TEST_URL = pbtest.PB_EXT_BG_URL_BASE + "tests/index.html" class Test(pbtest.PBSeleniumTest): def test_run_qunit_tests(self): # First load a dummy URL to make sure the extension is activated. # Otherwise,...
cynthiatekwe/privacybadgerchrome
tests/selenium/qunit_test.py
Python
gpl-3.0
1,129
from sympy.vector.coordsysrect import CoordSys3D from sympy.vector.deloperator import Del from sympy.vector.scalar import BaseScalar from sympy.vector.vector import Vector, BaseVector from sympy.vector.operators import gradient, curl, divergence from sympy import diff, integrate, S, simplify from sympy.core import symp...
kaushik94/sympy
sympy/vector/functions.py
Python
bsd-3-clause
15,689
import os,sys import argparse import pickle parser = argparse.ArgumentParser() parser.add_argument('-b','--bed',help='Original bed file of alignments') parser.add_argument('-a','--agp',help='AGP file for the final scaffolds') parser.add_argument('-l','--length',help="Length of input unitigs") args = parser.parse_args...
machinegun/SALSA
alignments2txt.py
Python
mit
4,812
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple command line interface to pyluxafor. """ from __future__ import division, print_function, absolute_import import argparse import sys import logging from pyluxafor import Devices from pyluxafor import Wave, Pattern, Leds from pyluxafor import __version__ __auth...
mais4719/PyLuxafor
pyluxafor/cli.py
Python
gpl-3.0
9,126
import sys import logging import rds_config import pymysql #rds settings rds_host = "mysqlforlambdatest.crrx8guwm61o.us-east-1.rds.amazonaws.com" name = rds_config.db_username password = rds_config.db_password db_name = rds_config.db_name logger = logging.getLogger() logger.setLevel(logging.INFO) try: conn = py...
arunwagle/DemoRepo
AWS/Lambda/python-mysql/app.py
Python
apache-2.0
1,317
# -*- coding: utf-8 -*- """ Abstract interface to bounce windows and moratoria. """ __author__ = 'Jathan McCollum, Mark Thomas, Michael Shields' __maintainer__ = 'Jathan McCollum' __email__ = 'jathan.mccollum@teamaol.com' __copyright__ = 'Copyright 2006-2012, AOL Inc.' # Imports from datetime import datetime, timede...
eludom/trigger
trigger/changemgmt/__init__.py
Python
bsd-3-clause
10,715
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-02 12:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0006_auto_20170413_1923'), ] operations = [ migrations.AddField( ...
NiJeLorg/paratransit_api
paratransit/api/migrations/0007_trips_level_0.py
Python
mit
465
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
qtproject/pyside-pyside
tests/QtWidgets/wrong_return_test.py
Python
lgpl-2.1
1,930
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test descendant package tracking code.""" from test_framework.test_framework import BitcoinTestFramewo...
romanornr/viacoin
test/functional/mempool_packages.py
Python
mit
10,536
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'DiskOffering.available_size_kb' db.add_column(u'physical_...
globocom/database-as-a-service
dbaas/physical/migrations/0025_auto__add_field_diskoffering_available_size_kb.py
Python
bsd-3-clause
11,926
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals import gpg import sys from groups import group_lists # Copyright (C) 2018 Ben McGinnes <ben@gnupg.org> # # This program is free software; you can redistribute it and/or modify it under # the terms of the...
gpg/gpgme
lang/python/examples/howto/encrypt-to-group.py
Python
lgpl-2.1
2,992
# Copyright 2015 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
cp16net/trove
trove/guestagent/datastore/experimental/couchdb/manager.py
Python
apache-2.0
8,342
#!/usr/bin/env python # -*- coding: utf-8 -*- # # tjson_python documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this ...
marioidival/tjson-python
docs/conf.py
Python
mit
8,452
####################################################################### # Copyright 2012 Mark Wolf # # This file is part of OrgWolf. # # OrgWolf 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...
m3wolf/orgwolf
wolfmail/admin.py
Python
gpl-3.0
936
# -*- coding: utf-8 -*- """ Test pelican-gist ================= Test stuff in pelican_gist. """ from __future__ import unicode_literals import os from pelican_gist import plugin as gistplugin from mock import patch import requests.models def test_gist_url(): gist_id = str(3254906) filename = 'brew-update-n...
kura/kura.io
plugins/pelican_gist/test_plugin.py
Python
mit
2,786
# Copyright 2011 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 req...
varunarya10/pycadf
pycadf/openstack/common/fixture/lockutils.py
Python
apache-2.0
1,889
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any...
jmartinm/invenio-records
invenio_records/config.py
Python
gpl-2.0
1,717
# Copyright 2017 The UAI-SDK 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 applicable...
ucloud/uai-sdk
uai/operation/tar/base_tar_op.py
Python
apache-2.0
4,390
import logging from swiftclient.service import SwiftService, SwiftError from sys import argv logging.basicConfig(level=logging.ERROR) logging.getLogger("requests").setLevel(logging.CRITICAL) logging.getLogger("swiftclient").setLevel(logging.CRITICAL) logger = logging.getLogger(__name__) def is_png(obj): return (...
jeseem/python-swiftclient
examples/download.py
Python
apache-2.0
1,242
#!/usr/bin/env python3 # -*- Coding: UTF-8 -*- # --------------------------------------------------------------------------- # Open Asset Import Library (ASSIMP) # --------------------------------------------------------------------------- # # Copyright (c) 2006-2010, ASSIMP Development Team # # All rights reserved. #...
ivansoban/ILEngine
thirdparty/assimp/test/regression/utils.py
Python
mit
4,276
import SimpleHTTPServer import SocketServer from BaseHTTPServer import BaseHTTPRequestHandler from urlparse import urlparse port = 8000 class funHandler(BaseHTTPRequestHandler): # def do_GET(self, function, *args, **kwargs): def do_GET(self): print self.path self.send_response(200) ret...
kevkruemp/HRI_Plant_Monitor
simple_server.py
Python
mit
414
def parse_nick_modes(mode_string): """Parse a nick mode string. The function returns a list of lists with three members: sign, mode and argument. The sign is "+" or "-". The argument is always None. Example: >>> parse_nick_modes("+ab-c") [['+', 'a', None], ['+', 'b', None], ['-', 'c', N...
gordon-/naobot
irc/modes.py
Python
agpl-3.0
2,417
"""Tests for Samsung TV config flow.""" import socket from unittest.mock import Mock, call, patch import pytest from samsungctl.exceptions import AccessDenied, UnhandledResponse from samsungtvws import SamsungTVWS from samsungtvws.exceptions import ConnectionFailure, HttpApiError from websocket import WebSocketExcepti...
rohitranjan1991/home-assistant
tests/components/samsungtv/test_config_flow.py
Python
mit
48,107
"""Uses Newt connector and connects to a remote host and deploys the SREMOTE code and an environment for it. It also installs the QDO library in that environment. An application using SREMOTE should check is SREMOTE is deployed and use a similar code to this to deploy it. It does not require superuser on remote machi...
gonzalorodrigo/qdo_interpreter
bin/installer/do_install_newt.py
Python
bsd-3-clause
998
#---------------------------------------------------------------------- # Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA # and Andrew Kuchling. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
xbmc/atv2
xbmc/lib/libPython/Python/Lib/bsddb/__init__.py
Python
gpl-2.0
12,752
"""Location services.""" import csv import editdistance import json import settings TOWN_CITY = 3 TOWN_LONGITUDE = 6 TOWN_LATITUDE = 5 TOWN_COUNTRY = 1 ALL_TOWN_BUFFER = None class CountryCsvParser(object): """Parse a country CSV row.""" def __init__(self, data): """Parse a single line of CSV.""" ...
CornerstoneLabs/twittermap
search/location.py
Python
mit
7,462
"""Analyse top npm popular packages.""" import bs4 import requests from .base import AnalysesBaseHandler try: import xmlrpclib except ImportError: import xmlrpc.client as xmlrpclib class PythonPopularAnalyses(AnalysesBaseHandler): """Analyse top npm popular packages.""" _URL = 'http://pypi-ranking.i...
fabric8-analytics/fabric8-analytics-jobs
f8a_jobs/handlers/python_popular_analyses.py
Python
apache-2.0
4,111
import errno import os from shlex import quote as shell_quote import string def shell_quote_cmd(cmdlist): return ' '.join(map(shell_quote, cmdlist)) def format_cmdline(args, maxwidth=80): '''Format args into a shell-quoted command line. The result will be wrapped to maxwidth characters where possible, ...
JonathonReinhart/scuba
scuba/utils.py
Python
mit
2,252
import urllib, time, urlparse, random, string, uuid, re from django.db import models from django.conf import settings from django.db.models.signals import post_save, post_delete from django.core.mail import send_mail, mail_admins from localflavor.us.us_states import US_STATES from django.utils.translation import ugette...
aviars/flangio
apps/accounts/models.py
Python
gpl-2.0
9,796
# Copyright (c) 2017, John Skinner import unittest import unittest.mock as mock import bson import pymongo.collection import database.client import batch_analysis.task_manager as manager import batch_analysis.tasks.import_dataset_task as import_dataset_task import batch_analysis.tasks.generate_dataset_task as generate...
jskinn/robot-vision-experiment-framework
batch_analysis/tests/test_task_manager.py
Python
bsd-2-clause
16,573
# -*- coding: utf-8 -*- """ Extract Table of Content ======================== A Pelican plugin to extract table of contents (ToC) from `article.content` and place it in its own `article.toc` variable for use in templates. """ from os import path from bs4 import BeautifulSoup from pelican import signals, readers, cont...
tijptjik/thegodsproject
plugins/extract_toc/extract_toc.py
Python
mit
1,988
from hashlib import sha1 from datetime import datetime import logging import mimetypes import re import urllib from django.db import models from django.db.models import Q from django.contrib.auth.models import User from django.contrib.markup.templatetags import markup from django.contrib.sites.models import Site from ...
hzlf/openbroadcast
website/apps/articles/models.py
Python
gpl-3.0
19,681
# Run this in the Django shell from clinicalsearch.models import ClinicalTrial import csv with open('clinicalsearch/trials_ranked.csv', 'rU') as csvfile: reader = csv.reader(csvfile, delimiter=',') for row in reader: print row t = ClinicalTrial(id=row[0], sponsor=row[1], published=(row[2]=="TRUE"), state=row[3]...
adam2392/clinicaltrials
populatedb.py
Python
apache-2.0
574
#!/usr/bin/env python #File: CMRRestFrameConversion.py #Created: Sat Dec 15 17:03:04 2012 #Last Change: Sat Dec 15 17:03:50 2012 # -*- coding: utf-8 -*- # # Calculates (U-V)z slopes, scatters and intercepts of a given color--magnitude # relation. # Follows the procedure in Appendix II of Mei et al. 2009 (ApJ, 690, 42),...
boada/astLib
examples/CMRRestFrameConversion/CMRRestFrameConversion.py
Python
lgpl-2.1
15,480
#!/usr/local/bin/python # Manaul.py # add per-function documentation to Section_functions.txt in tabular HTML format # extract the comment lines from OINK source files between C-style /* ... */ # invoked by PDFgen.sh when PDF of doc pages is created # Syntax: Manual.py import sys,os,glob,commands,re # mtxt, etc = co...
ravikanthreddy89/MR-MPI
oinkdoc/Manual.py
Python
bsd-3-clause
4,105
# Copyright 2008 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...
280455936/nw.js
test/testpy/__init__.py
Python
mit
6,774
#!/usr/bin/python # -*- coding: utf-8 -*- # Reads the HTML page from ASDA's shopping basket # Writes to an excel spreadsheet in three columns item, quantity, price # TODO: Obtain the HTML page by making a GET request. from html.parser import HTMLParser from optparse import OptionParser import logging from openpyxl i...
tiy1807/PythonUtils
PythonUtils/read_asda_shopping.py
Python
apache-2.0
6,546
# Copyright (C) 2013 Statoil ASA, Norway. # # The file 'time_map.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 ...
Ensembles/ert
python/python/ert/enkf/util/time_map.py
Python
gpl-3.0
7,225
"""Fetch PATH (NJ/NYC) feed.""" from datetime import datetime import logging from bs4 import BeautifulSoup import requests from FeedSource import FeedSource, TIMECHECK_FMT URL = 'http://trilliumtransit.com/transit_feeds/path-nj-us/' FILE_NAME = 'path.zip' LAST_UPDATED_FMT = '%Y-%m-%d %H:%M' LOG = logging.getLogger...
azavea/gtfs-feed-fetcher
feed_sources/Path.py
Python
mit
2,786
# https://leetcode.com/problems/repeated-substring-pattern/ class Solution(object): def repeatedSubstringPattern(self, str): return str in (2 * str)[1:-1]
menghanY/LeetCode-Python
String/RepeatedSubstringPattern.py
Python
mit
168
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from gi.repository import Gst class GLSink: def __init__(self): self.element = Gst.ElementFactory.make("glimagesink", None) self.widget = Gtk.DrawingArea() self.widget.set_double_buffered(True) def xid(self): ...
lubosz/gst-plugins-vr
sphvr/sinks.py
Python
lgpl-2.1
652
# -*- coding: utf-8-*- """ Author: Marco Dinacci <dev@dinointeractive.com> Copyright © 2008-2009 """ from PyQt4.QtCore import * from PyQt4.QtGui import * class MVCLCDNumber(QLCDNumber): def __init__(self, parent=None): super(MVCLCDNumber, self).__init__(parent) self.setSegmentStyle(QLCDNumber.Fla...
mdinacci/rtw
track-editor/src/gui/qt/plugins/mvclcdnumber.py
Python
mit
462
# robotframework-tools # # Python Tools for Robot Framework and Test Libraries. # # Copyright (C) 2013-2016 Stefan Zimmermann <zimmermann.code@gmail.com> # # robotframework-tools 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 Sof...
userzimmermann/robotframework-tools
robottools/utils/__init__.py
Python
gpl-3.0
1,192
""" sentry.plugins.sentry_interface_types.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import six import sentry from sentry.plugins import regist...
ifduyue/sentry
src/sentry/plugins/sentry_interface_types/models.py
Python
bsd-3-clause
998
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
DarkoNikolovski/account-financial-tools
account_default_draft_move/tests/test_account_default_draft_move.py
Python
agpl-3.0
2,861
import core, connect import gplus ##import pubmed ##import pickle import doi from bson import ObjectId import apptree import incoming from datetime import datetime import time import sessioninfo import bulk def destroy_db_and_test(): '''tests progressively building an spnet db starting from a blank slate, addi...
cjlee112/spnet
spnet/test.py
Python
gpl-2.0
14,741
# # commands.py - the GraalVM specific commands # # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free ...
kevinmcain/graal
mx/commands.py
Python
gpl-2.0
58,280
import amino_acid from amino_acid import peptide_to_indices import reduced_alphabet from features import ( make_ngram_dataset, transform_rows, toxin_features ) import iedb import imma2 import calis import toxin import fritsch_neoepitopes
cpcloud/pepdata
pepdata/__init__.py
Python
apache-2.0
242
''' Tests for fpformat module Nick Mathewson ''' from test.test_support import run_unittest, import_module import unittest fpformat = import_module('fpformat', deprecated=True) fix, sci, NotANumber = fpformat.fix, fpformat.sci, fpformat.NotANumber StringType = type('') # Test the old and obsolescent fpformat mo...
leighpauls/k2cro4
third_party/python_26/Lib/test/test_fpformat.py
Python
bsd-3-clause
2,316
from __future__ import print_function import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils from h2o.utils.typechecks import assert_is_type from h2o.frame import H2OFrame def h2o_H2OFrame_ascharacter(): """ Python API test: h2o.frame.H2OFrame.ascharacter() Copied from pyunit_...
h2oai/h2o-3
h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_ascharacter.py
Python
apache-2.0
665
#!/usr/bin/env python #coding:utf-8 # Created: 10.02.2010 # Copyright (C) 2010, Manfred Moitzi # License: MIT License __author__ = "mozman <mozman@gmx.at>" import unittest from dxfwrite.tableentries import Style from dxfwrite import dxfstr, DXFEngine class TestStyleTableEntry(unittest.TestCase): expected = " 0...
sbarton272/AcousticBarcodes-Explorations
barcodes/dxfwrite/tests/test_style.py
Python
mit
978
# 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 ag...
Sorsly/subtle
google-cloud-sdk/lib/surface/topic/__init__.py
Python
mit
1,077
import redis from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from rq import Queue app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) conn = redis.from_url(app.config['REDIS_URL']) q = Queue(connection=conn) import tracker.views
gnarula/fedora-patch-tracker
tracker/__init__.py
Python
gpl-2.0
278
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HUnitR04c_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HUnitR04c_CompleteLHS """ # Flag this instance as compiled now self.is_compiled = True sup...
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/unit_contracts/HUnitR04c_CompleteLHS.py
Python
mit
16,499
# 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): # Deleting field 'ManyToManyValue.object_ids' db.delete_column('philo_manytomanyvalue', 'object_ids') ...
ithinksw/philo
philo/migrations/0008_auto__del_field_manytomanyvalue_object_ids.py
Python
isc
9,212
"""Test providers performance.""" import time import gc import dependency_injector.providers class Tester(object): """Performance tester for provider module implementations.""" def __init__(self, provider_modules, duration_factor): """Initializer.""" self.provider_modules = provider_modules...
ets-labs/python-dependency-injector
tests/performance/test.py
Python
bsd-3-clause
4,662
#!/usr/bin/env python3 VERSION = "beta0.1" AUTHOR = "Daniel Laube <mail@dlaube.de>" import sys import os import gconlib def __main__(args): gcon = gconlib.Gcon(os.path.dirname(os.path.realpath(__file__)) + "/", VERSION) gcon.run() if __name__ == "__main__": __main__(sys.argv)
laubed/gcon
gcon.py
Python
mit
295
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
rmcgibbo/psi4public
psi4/driver/p4util/procutil.py
Python
lgpl-3.0
16,764
import pytest import time from rancher import ApiError from .common import wait_for_template_to_be_created, \ wait_for_template_to_be_deleted, random_str, wait_for_atleast_workload from .conftest import set_server_version, wait_for, DEFAULT_CATALOG def test_catalog(admin_mc, remove_resource): client = admin_m...
cjellick/rancher
tests/integration/suite/test_catalog.py
Python
apache-2.0
16,016
# Natural Language Toolkit: Aligned Sentences # # Copyright (C) 2001-2010 NLTK Project # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT import sys import logging import nltk.metrics from nltk.util import defaultdict class AlignedSent(object): """ Aligned sentence object. Encapsulates...
markgw/jazzparser
lib/nltk/align.py
Python
gpl-3.0
13,500
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-02-02 16:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('statisticscore', '0024_session_session_gender_enabled'), ] operations = [ migrations.AlterField( model_na...
eyp-developers/statistics
statisticscore/migrations/0025_auto_20160202_1742.py
Python
gpl-3.0
456
# -*- coding: utf-8 -*- # Copyright (c) 2014 Google, Inc. # Copyright (c) 2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2015-2016 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Licensed under the GPL: https://www.gnu.org/licenses/old-lice...
axbaretto/beam
sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/test/unittest_checker_logging.py
Python
apache-2.0
2,000
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: ‘wujn‘ @file: orm.py @time: 2017/9/28 11:23 """ import db import time import logging _triggers = frozenset(['pre_insert', 'pre_update', 'pre_delete']) def _gen_sql(table_name, mappings): """ 类 ==> 表时 生成创建表的sql """ p_key = None sql = ['cre...
burgerWhoo/first-webapp
www/transwrap/orm.py
Python
gpl-2.0
13,198
import json from .oauth import OAuth2Test class DigitalOceanOAuthTest(OAuth2Test): backend_path = 'social_core.backends.digitalocean.DigitalOceanOAuth' user_data_url = 'https://api.digitalocean.com/v2/account' expected_username = 'sammy@digitalocean.com' access_token_body = json.dumps({ 'acce...
tobias47n9e/social-core
social_core/tests/backends/test_digitalocean.py
Python
bsd-3-clause
977
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/source_name_v30.py
Python
mit
3,047
from .enkf_field_file_format_enum import EnkfFieldFileFormatEnum from .load_fail_type_enum import LoadFailTypeEnum from .enkf_var_type_enum import EnkfVarType from .enkf_run_enum import EnkfRunType from .enkf_obs_impl_type_enum import EnkfObservationImplementationType from .ert_impl_type_enum import ErtImplType from .e...
Statoil/libres
python/res/enkf/enums/__init__.py
Python
gpl-3.0
1,054
from __future__ import absolute_import, unicode_literals from datetime import datetime from itertools import count from time import time from celery import states from celery.events import Event as _Event from celery.events.state import State, Worker, Task from celery.utils import gen_unique_id from django.test.util...
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/djcelery/tests/test_snapshot.py
Python
bsd-3-clause
9,460
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-05-24 10:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ip', '0030_auto_20170328_1545'), ] operations = [ migrations.AlterModelOptions( name='informationpackage', ...
ESSolutions/ESSArch_Core
ESSArch_Core/ip/migrations/0031_auto_20170524_1222.py
Python
gpl-3.0
818
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
thonkify/thonkify
src/lib/telegram/inputtextmessagecontent.py
Python
mit
1,431
import unittest from main import Solution class SolutionTest(unittest.TestCase): def setUp(self): self.sol = Solution() def test_1(self): self.assertEqual( self.sol.findSubstring( "barfoothefoobarman", ["foo", "bar"] ), [0, 9...
y-usuzumi/survive-the-course
leetcode/30.Substring_with_Concatenation_of_All_Words/test.py
Python
bsd-3-clause
956
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Mon Mar 24 09:28:16 2014 @author: kshmirko """ import netCDF4 as nc import numpy as np DB = '../sage-reader/data/SAGE-II-6.20.nc' Lon0 = 131.9 Lat0 = 43.1 print('Station location: Lon = %5.2f\tLat = %5.2f\n'%(Lon0, Lat0)) Radius = float(input('Enter radius ...
kshmirko/sageII-stat
prepare.py
Python
gpl-2.0
2,551
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK # coding=utf-8 from copy import deepcopy from distutils.spawn import find_executable from getpass import getuser from kvirt.config import Kconfig from kvirt.examples import plandatacreate, vmdatacreate, hostcreate, _list, plancreate, planinfo, productinfo, start from kvirt...
karmab/kcli
kvirt/cli.py
Python
apache-2.0
234,461
# Copyright 2020 Tensorforce Team. 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 la...
reinforceio/tensorforce
tensorforce/core/distributions/beta.py
Python
apache-2.0
11,809
import sys from support import RpgTestCase from rpg.conf import Conf class ConfTest(RpgTestCase): def setUp(self): self.old_argv = sys.argv def tearDown(self): sys.argv = self.old_argv def test_include_dir(self): sys.argv = ["rpg", "--plugin-dir", str(self.test_project_dir / "py...
Shootervm/rpg
tests/test_conf.py
Python
gpl-2.0
889
# pyOCD debugger # Copyright (c) 2015-2019 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
mbedmicro/pyOCD
pyocd/core/memory_map.py
Python
apache-2.0
25,531
# -*- coding: utf-8 -*- """ tipfy.ext.auth.oauth ~~~~~~~~~~~~~~~~~~~~ Implementation of OAuth authentication scheme. Ported from `tornado.auth <http://github.com/facebook/tornado/blob/master/tornado/auth.py>`_. :copyright: 2009 Facebook. :copyright: 2010 tipfy.org. :license: Apache Licens...
Letractively/aha-gae
plugins/aha.plugin.twitteroauth/twitteroauth/oauth.py
Python
bsd-3-clause
10,305
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Gestion-Ressources (<http://www.gestion-ressources.com>). # # This program is free software: you can redistribute it and/or modify # it u...
Endika/connector-sage-50
exportsage50/__openerp__.py
Python
agpl-3.0
6,097
#!/usr/bin/env python # # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # 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 limitati...
miqui/python-hpOneView
examples/scripts/del-logical-interconnect-groups.py
Python
mit
4,322
""" DogStatsApi is a tool for collecting application metrics without hindering performance. It collects metrics in the application thread with very little overhead and allows flushing metrics in process, in a thread or in a greenlet, depending on your application's needs. """ import logging import socket from functool...
DataDog/dogapi
src/dogapi/stats/dog_stats_api.py
Python
bsd-3-clause
11,254
import time from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate from base.utils import meetup_signup, timestamp_to_datetime from base.models import UserInfo class LoginForm(forms.Form): username = forms.CharField() email = forms.EmailField() p...
papaloizouc/producthunthackathon
prh/base/forms.py
Python
mit
2,038
#!/usr/bin/env python print "Content-type:text/html\r\n\r\n" print "<!DOCTYPE html>" print "<html>" print "<head>" print "<title> Wookieware.com</title>" print "<link rel=\"stylesheet\" type\"text/css\" href=\"../../css/corex.css\"/>" print "<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\...
xod442/sample_scripts
test3.py
Python
gpl-2.0
470
# -*- coding: utf-8 -*- """Test configs.""" from tagio.app import create_app from tagio.settings import DevConfig, ProdConfig def test_production_config(): """Production config.""" app = create_app(ProdConfig) assert app.config['ENV'] == 'prod' assert app.config['DEBUG'] is False assert app.config...
makerhanoi/tagio
tests/test_config.py
Python
bsd-3-clause
607
__author__ = 'bcarson' try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'Oversight', 'author': 'Ben Carson', 'url': 'https://github.com/hebenon/oversight', 'download_url': 'https://github.com/hebenon/oversight', 'author_email'...
hebenon/oversight
setup.py
Python
apache-2.0
544
from datetime import datetime, timedelta from pprint import pprint from django import forms from utils.functions import shift_years from .models import ( NfEntrada, PosicaoCarga, ) class NotafiscalChaveForm(forms.Form): chave = forms.CharField( widget=forms.TextInput()) class NotafiscalRelFor...
anselmobd/fo2
src/logistica/forms.py
Python
mit
5,361
#!/usr/bin/python # -*- coding: utf-8 -*- # =========================================================================== # iDevice Para Saber más creado para la FPD por José Ramón Jiménez Reyes # =========================================================================== """ Para Saber mas iDevice """ import logging fr...
luisgg/iteexe
exe/engine/parasabermasfpdidevice.py
Python
gpl-2.0
5,051
#-*- coding: utf-8 -*- #! /usr/bin/env python ''' #------------------------------------------------------------ filename: lab10_runTCcheckReLu_spiraldata.py To check effect of Relu activation function over Deep neural networks. This script wants to see Relu activation can mitigate Gradient Vanishin...
jwkanggist/EveryBodyTensorFlow
lab10_runTFcheckReLu_spiraldata.py
Python
unlicense
14,810
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2014 The ProteinDF development team. # see also AUTHORS and README if provided. # # This file is a part of the ProteinDF software package. # # The ProteinDF is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
ProteinDF/ProteinDF_bridge
proteindf_bridge/bond.py
Python
gpl-3.0
2,693
""" @file @brief Exception raised by the automated documentation """ class HelpGenException(Exception): """ custom exception """ def __init__(self, message, file=None): """ redefines the message sent to an exception @param message message @param file ...
sdpython/pyquickhelper
src/pyquickhelper/helpgen/helpgen_exceptions.py
Python
mit
936
from .util import TestCase, load_json_fixture from babbage.model import Model class ModelTestCase(TestCase): def setUp(self): super(ModelTestCase, self).setUp() self.simple_model_data = load_json_fixture('models/simple_model.json') self.simple_model = Model(self.simple_model_data) de...
zejn/babbage
tests/test_model.py
Python
mit
2,196
from string import ascii_letters import pytest from nex.pydvi.TeXUnit import pt2sp from nex.constants.codes import CatCode from nex.constants.parameters import Parameters from nex.constants.instructions import Instructions from nex.banisher import (Banisher, get_token_representation_integer,...
eddiejessup/nex
tests/test_banisher.py
Python
mit
14,824
# =============================================================================== # Copyright 2019 Jan Hendrickx and Gabriel Parrish # # 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:/...
NMTHydro/Recharge
utils/depletions_modeling/multiply_rasters_with_another_raster.py
Python
apache-2.0
1,726
#!/usr/bin/env python import os import sys import shutil # Magic python path, based on http://djangosnippets.org/snippets/281/ from os.path import abspath, dirname, join parentdir = dirname(dirname(abspath(__file__))) # Insert our parent directory (the one containing the folder metashare/): sys.path.insert(1, parentd...
JuliBakagianni/META-SHARE
misc/tools/migration/import_node_to_3_0_from_2_9_beta.py
Python
bsd-3-clause
13,449
# # 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...
ErnieAllen/qpid-dispatch
tests/run_system_tests.py
Python
apache-2.0
1,880
# Copyright 2012 django-compresshtml authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from compresshtml import compress_html from django.conf import settings class CompressHtmlMiddleware(object): def process_response(self, request...
kamagatos/django-compresshtml
compresshtml/middleware.py
Python
bsd-2-clause
515
#!/usr/bin/env python """ author: Xiaowei Huang """ import numpy as np import math import ast import copy import random import time import multiprocessing import stopit from z3 import * #import display import mnist as mm from scipy import ndimage from configuration import * from basics import * def conv_safety_s...
xiaoweih/DLV
safety_check/conv_safety_solve.py
Python
gpl-3.0
5,068