code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# original code is from openmips gb Team: [OMaClockLcd] Renderer # # Thx to arn354 # import math from Components.Renderer.Renderer import Renderer from skin import parseColor from enigma import eCanvas, eSize, gRGB, eRect class AnalogClockLCD(Renderer): def __init__(self): Renderer.__init__(self) self.fColor = ...
openatv/enigma2
lib/python/Components/Renderer/AnalogClockLCD.py
Python
gpl-2.0
3,177
# coding: utf-8 """ Utilities for database insertion """ import gridfs import json import pymongo import paramiko import os import stat import shutil from monty.json import MSONable class MongoDatabase(MSONable): """ MongoDB database class for access, insertion, update, ... in a MongoDB database """ ...
davidwaroquiers/abiflows
abiflows/fireworks/utils/databases.py
Python
gpl-2.0
10,111
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 later...
inspirehep/invenio-records
invenio_records/signals.py
Python
gpl-2.0
2,474
#python import k3d k3d.check_node_environment(context, "MeshSourceScript") # Construct a cube mesh primitive ... cubes = context.output.primitives().create("cube") matrices = cubes.topology().create("matrices", "k3d::matrix4") materials = cubes.topology().create("materials", "k3d::imaterial*") uniform = cubes.attribu...
barche/k3d
share/k3d/scripts/MeshSourceScript/cubes.py
Python
gpl-2.0
771
# -*- 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 'Collective.slug' db.add_column(u'collectives_collective',...
strikedebt/debtcollective-web
be/proj/collectives/migrations/0003_auto__add_field_collective_slug__add_field_action_slug.py
Python
gpl-2.0
5,792
#!/usr/bin/python # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # Typical usage: # dohtml -r docs/* # - put all files and directories in docs into /usr/share/doc/${PF}/html # dohtml foo.html # - put foo.html into /usr/share/doc/${PF}/html # # # Detailed ...
prometheanfire/portage
bin/dohtml.py
Python
gpl-2.0
6,987
import scipy.io.wavfile from os.path import expanduser import os import array from pylab import * import scipy.signal import scipy import wave import numpy as np import time import sys import math import matplotlib import subprocess # Author: Brian K. Vogel # brian.vogel@gmail.com fft_size = 2048 iterations = 300 hop...
lukas/ml-class
examples/keras-audio/audio_utilities.py
Python
gpl-2.0
13,234
# -*- coding: utf-8 -*- from harpia.model.connectionmodel import ConnectionModel as ConnectionModel from harpia.system import System as System class DiagramModel(object): # ---------------------------------------------------------------------- def __init__(self): self.last_id = 1 # first block is n1...
llgoncalves/harpia
harpia/model/diagrammodel.py
Python
gpl-2.0
854
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE import os from PyQt4 import QtGui, Qt, QtCore from opus_gui.general_manager.views.ui_dependency_viewer import Ui_DependencyViewer class DependencyViewer(QtGui.QDialog, Ui_DependencyViewer): def _...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_gui/general_manager/controllers/dependency_viewer.py
Python
gpl-2.0
1,509
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class WebofknowledgePipeline(object): def process_item(self, item, spider): return item
alabarga/wos-scrapy
webofknowledge/pipelines.py
Python
gpl-2.0
294
# -*- coding: utf-8 -*- """ *************************************************************************** AutoincrementalField.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************...
dracos/QGIS
python/plugins/processing/algs/qgis/AutoincrementalField.py
Python
gpl-2.0
2,809
#!/usr/bin/env python # print_needed_variables.py # # Copyright (C) 2014, 2015 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 # import os import sys if __name__ == '__main__' and __package__ is None: dir_path = os.path.abspath(os.path.join(os.path.dirname(__f...
rcocetta/kano-profile
tools/print_needed_variables.py
Python
gpl-2.0
1,082
#!/usr/bin/python # (c) 2017, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
jimi-c/ansible
lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py
Python
gpl-3.0
13,004
#!/usr/bin/python #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # vim:ft=python
dozzie/yumbootstrap
lib/yumbootstrap/__init__.py
Python
gpl-3.0
194
#!/usr/bin/python # -*- coding: utf-8 -*- ''' PyChess arena tournament script. This script executes a tournament between the engines installed on your system. The script is executed from a terminal with the usual environment. ''' import os import sys ######################################################...
pychess/pychess
utilities/arena.py
Python
gpl-3.0
6,460
"""Generate test data for IDTxl network comparison unit and system tests. Generate test data for IDTxl network comparison unit and system tests. Simulate discrete and continous data from three correlated Gaussian data sets. Perform network inference using bivariate/multivariate mutual information (MI)/transfer entropy...
pwollstadt/IDTxl
test/generate_test_data.py
Python
gpl-3.0
8,187
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
dannyboi104/SickRage
sickbeard/search.py
Python
gpl-3.0
28,682
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/autobahn/wamp/test/test_protocol_peer.py
Python
gpl-3.0
4,497
from service import ccnet_rpc, monitor_rpc, seafserv_rpc, \ seafserv_threaded_rpc, ccnet_threaded_rpc """ WebAccess: string repo_id string obj_id string op string username """ class SeafileAPI(object): def __init__(self): pass # fileserver token def get_fileserver_access_to...
yubobo/seafile
python/seaserv/api.py
Python
gpl-3.0
14,807
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('changeset', '0022_auto_20160222_2358'), ] operations = [ migrations.AddField( model_name='userdetail', ...
batpad/osmcha-django
osmchadjango/changeset/migrations/0023_userdetail_contributor_uid.py
Python
gpl-3.0
441
from core import messages from core.weexceptions import FatalException from mako import template from core.config import sessions_path, sessions_ext from core.loggers import log, stream_handler from core.module import Status import os import yaml import glob import logging import urlparse import atexit import ast prin...
jorik041/weevely3
core/sessions.py
Python
gpl-3.0
7,336
from distutils.core import setup import py2exe opts = { "py2exe": { "compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 1, "packages": ["encodings"], "dist_dir": "dist" } } setup (name = "Gomoz", fullname = "Gomoz web scanner", version = "1.0.1", descript...
eyecatchup/gomoz
win/winsetup.py
Python
gpl-3.0
689
#!/usr/bin/env python # 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 in the hope that ...
dmnfarrell/smallrnaseq
smallrnaseq/config.py
Python
gpl-3.0
4,475
# -*- coding: utf-8 -*- import re import urlparse from ..internal.misc import json from ..internal.XFSAccount import XFSAccount class UptoboxCom(XFSAccount): __name__ = "UptoboxCom" __type__ = "account" __version__ = "0.21" __status__ = "testing" __description__ = """Uptobox.com account plugin"...
Velociraptor85/pyload
module/plugins/accounts/UptoboxCom.py
Python
gpl-3.0
1,110
#!/usr/bin/python3 ## @package domomaster # Master daemon for D3 boxes. # # Developed by GreenLeaf. import sys; import os; import random; import string; from hashlib import sha1 from subprocess import * import socket; sys.path.append("/usr/lib/domoleaf"); from DaemonConfigParser import *; MASTER_CONF_FILE_BKP ...
V-Paranoiaque/Domoleaf
domomaster/usr/bin/domomaster/domomaster_postinst.py
Python
gpl-3.0
4,613
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
kamal-gade/rockstor-core
src/rockstor/storageadmin/views/plugin.py
Python
gpl-3.0
1,928
from django.conf import settings from django.conf.urls import patterns, url from haystack.views import SearchView from elections.forms import ElectionForm from elections.views import ElectionsSearchByTagView, HomeView, ElectionDetailView,\ CandidateDetailView, SoulMateDetailView, FaceToFaceView, AreaDetailView, \ ...
YoQuieroSaber/votainteligente-portal-electoral
elections/urls.py
Python
gpl-3.0
4,564
../../../../../share/pyshared/twisted/python/urlpath.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/twisted/python/urlpath.py
Python
gpl-3.0
55
from couchpotato.core.event import addEvent from couchpotato.core.helpers.variable import tryFloat from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.environment import Env from urlparse import urlparse import re import time log = CPLog(__name__) class Provid...
darren-rogan/CouchPotatoServer
couchpotato/core/providers/base.py
Python
gpl-3.0
2,933
import argparse, requests, sys, configparser, zipfile, os, shutil from urllib.parse import urlparse, parse_qs appname="ConverterUpdater" author="Leo Durrant (2017)" builddate="05/10/17" version="0.1a" release="alpha" filesdelete=['ConUpdate.py', 'Converter.py', 'LBT.py', 'ConverterGUI.py', 'LBTGUI.py'] directoriesdel...
ZanyLeonic/LeonicBinaryTool
ConUpdate.py
Python
gpl-3.0
5,039
import SpaceScript import multiprocessing from multiprocessing import Process, Queue, Pipe, Lock from SpaceScript import frontEnd from SpaceScript import utility from SpaceScript.frontEnd import terminal from SpaceScript.utility import terminalUtility from SpaceScript.terminal import terminal as terminal from SpaceScri...
Sauron754/SpaceScript
old/testEnvironments/SpaceScript/threadingFunctions.py
Python
gpl-3.0
1,480
''' Base module for all of the exceptions classes used internally. Created on 10 Dec 2013 @author: alex ''' class PheException(Exception): ''' This is the top level class that EVERYTHING must be derived from. In particular, this class contains an abstract property called 'phe_return_code'. This property...
phe-bioinformatics/emm-typing-tool
modules/phe_exceptions.py
Python
gpl-3.0
2,133
# coding=utf-8 # Copyright (C) Duncan Macleod (2015) # # This file is part of the GW DetChar python package. # # GW DetChar 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 #...
lscsoft/gwdetchar
gwdetchar/omega/__init__.py
Python
gpl-3.0
1,099
#!/usr/bin/python # -*- coding: utf-8 -*- # # log.py - Copyright (C) 2015 Red Hat, Inc. # Written by Ryan Barry <rbarry@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of...
oVirt/ovirt-node-dbus-backend
src/log.py
Python
gpl-3.0
2,690
import unittest import tqdm from ieml.dictionary.script import Script from ieml.ieml_database import IEMLDatabase, GitInterface from ieml.usl import PolyMorpheme, Lexeme, Word from ieml.usl.decoration.parser.parser import PathParser from ieml.usl.decoration.path import PolymorphemePath, GroupIndex, FlexionPath, Lexem...
IEMLdev/propositions-restful-server
ieml/test/test_path.py
Python
gpl-3.0
8,291
# # Copyright 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. #...
UpYou/relay
usrp_transmit_path.py
Python
gpl-3.0
3,809
#!/usr/bin/env python # This file is part of Py6S. # # Copyright 2012 Robin Wilson and contributors listed in the CONTRIBUTORS file. # # Py6S is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either versi...
dmwelch/Py6S
setup.py
Python
gpl-3.0
2,575
# -*- coding: utf-8 -*- #------------------------------------------------------------ # beta.1 Dailymotion # Version 0.1 (10.12.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www.mimediacenter.in...
iptvgratis/TUPLAY
resources/tools/dailymotion.py
Python
gpl-3.0
4,151
# coding: utf-8 { '!langcode!': 'es', '!langname!': 'Español', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN', '%d days ago'...
Yelrado/evadoc
languages/es.py
Python
gpl-3.0
22,321
# -*- coding: utf-8 -*- # # (c) Copyright 2001-2009 Hewlett-Packard Development Company, L.P. # # 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 opt...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/hplip/ui4/readonlyradiobutton.py
Python
gpl-3.0
1,657
from __future__ import absolute_import import logging import os from flask import Flask from flask_pymongo import PyMongo from raven.contrib.flask import Sentry from heman.api import HemanAPI api = HemanAPI(prefix='/api') """API object """ sentry = Sentry(logging=True, level=logging.ERROR) """Sentry object """ mong...
Som-Energia/heman
heman/config.py
Python
gpl-3.0
2,611
import requests from PIL import Image, ImageEnhance, ImageChops, ImageFilter from io import BytesIO, StringIO import time import sys, os import codecs url = 'http://d1222391-23d7-46de-abef-73cbb63c1862.levels.pathwar.net' imgurl = url + '/captcha.php' headers = { 'Host' : 'd1222391-23d7-46de-abef-73cbb63c1862.levels....
KKfo/captcha_solver
experiment.py
Python
gpl-3.0
7,350
import logging from sqlalchemy import * from kallithea.lib.dbmigrate.migrate import * from kallithea.lib.dbmigrate.migrate.changeset import * from kallithea.model import meta from kallithea.lib.dbmigrate.versions import _reset_base, notify log = logging.getLogger(__name__) def upgrade(migrate_engine): """ ...
zhumengyuan/kallithea
kallithea/lib/dbmigrate/versions/031_version_2_2_3.py
Python
gpl-3.0
977
../../../../../../../../share/pyshared/ubuntuone-control-panel/ubuntuone/controlpanel/gui/gtk/package_manager.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/ubuntuone-control-panel/ubuntuone/controlpanel/gui/gtk/package_manager.py
Python
gpl-3.0
112
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Wei Gao <gaowei3@qq.com> # Copyright: (c) 2018, Ansible Project # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE...
pdellaert/ansible
lib/ansible/modules/cloud/vmware/vmware_host_facts.py
Python
gpl-3.0
12,620
#-*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols...
lootr/netzob
netzob/src/netzob/Model/Vocabulary/Domain/Parser/VariableParserPath.py
Python
gpl-3.0
5,916
# 96. Unique Binary Search Trees My Submissions QuestionEditorial Solution # Total Accepted: 84526 Total Submissions: 224165 Difficulty: Medium # Given n, how many structurally unique BST's (binary search trees) that store values 1...n? # # For example, # Given n = 3, there are a total of 5 unique BST's. # # 1 ...
shawncaojob/LC
QUESTIONS/96_unique_binary_search_trees.py
Python
gpl-3.0
2,402
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext from frappe.utils import flt, cstr, cint from frappe import _ from frappe.model.meta import get_field_precision from erpnext.acco...
Zlash65/erpnext
erpnext/accounts/general_ledger.py
Python
gpl-3.0
9,852
# -*- coding: utf-8 -*- import json from catmaid.models import Message from .common import CatmaidApiTestCase class MessagesApiTests(CatmaidApiTestCase): def test_read_message_error(self): self.fake_authentication() message_id = 5050 response = self.client.post(f'/messages/{message_id}...
catmaid/CATMAID
django/applications/catmaid/tests/apis/test_messages.py
Python
gpl-3.0
3,008
# This file is part of Bioy # # Bioy 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. # # Bioy is distributed in the hope...
nhoffman/bioy
bioy_pkg/subcommands/classify.py
Python
gpl-3.0
17,999
''' Created on Jul 28, 2013 @author: Rob ''' import os, yaml config = { 'names': [ 'NT', 'VGTestServer' ], 'servers':{ 'irc.server.tld': { 'port':6667, 'password':None, 'channels':{ '#vgstati...
mph55/lanstation13
tools/bot/vgstation/common/config.py
Python
gpl-3.0
1,605
try: import traceback import argparse import textwrap import glob import os import logging import datetime import multiprocessing from libs import LasPyConverter except ImportError as err: print('Error {0} import module: {1}'.format(__name__, err)) traceback.print_exc() e...
KAMI911/lactransformer
lactransformer/lasdiff.py
Python
mpl-2.0
6,565
# 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 mock import time import json from nose.tools import eq_, ok_, assert_raises from socorro.submitter.submitter_ap...
adngdb/socorro
socorro/unittest/submitter/test_submitter_app.py
Python
mpl-2.0
16,936
# -*- coding: 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/. #################...
gerv/slic
test/data/identification/test_ws.py
Python
mpl-2.0
941
import logging from django.conf import settings from kombu import (Exchange, Queue) from kombu.mixins import ConsumerMixin from treeherder.etl.common import fetch_json from treeherder.etl.tasks.pulse_tasks import (store_pulse_jobs, store_pulse_resultset...
akhileshpillai/treeherder
treeherder/etl/pulse_consumer.py
Python
mpl-2.0
4,116
# 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisi...
klahnakoski/TestLog-ETL
vendor/jx_sqlite/expressions/number_op.py
Python
mpl-2.0
1,194
""" Test the behavior of split_mongo/MongoConnection """ from __future__ import absolute_import import unittest from mock import patch from xmodule.exceptions import HeartbeatFailure from xmodule.modulestore.split_mongo.mongo_connection import MongoConnection class TestHeartbeatFailureException(unittest.TestCase):...
ESOedX/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py
Python
agpl-3.0
888
""" Tests for wiki views. """ from django.conf import settings from django.test.client import RequestFactory from lms.djangoapps.courseware.tabs import get_course_tab_list from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTes...
eduNEXT/edunext-platform
lms/djangoapps/course_wiki/tests/test_tab.py
Python
agpl-3.0
2,388
#!/usr/bin/python # Copyright 2011, Thomas G. Dimiduk # # This file is part of GroupEng. # # Holopy is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option...
tdimiduk/groupeng
src/__init__.py
Python
agpl-3.0
724
"""Contain the AskViewTests class""" import unittest import os import tempfile import datetime import json import humanize from shutil import copyfile from pyramid import testing from pyramid.paster import get_appsettings from askomics.libaskomics.ParamManager import ParamManager from askomics.libaskomics.TripleStor...
askomics/askomics
askomics/test/askView_test.py
Python
agpl-3.0
35,237
# -*- 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...
addition-it-solutions/project-all
addons/sale_stock/sale_stock.py
Python
agpl-3.0
26,655
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-06-15 06:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0034_auto_20170613_2039'), ] operations = [ migrations.AddField( model_name='siteconfiguration...
edx/ecommerce
ecommerce/core/migrations/0035_siteconfiguration_base_cookie_domain.py
Python
agpl-3.0
562
import re from django.core.management import call_command from django_webtest import WebTest from .auth import TestUserMixin from .settings import SettingsMixin from popolo.models import Person from .uk_examples import UK2015ExamplesMixin class TestSearchView(TestUserMixin, SettingsMixin, UK2015ExamplesMixin, WebT...
mysociety/yournextrepresentative
candidates/tests/test_search.py
Python
agpl-3.0
4,466
import os import django from unipath import Path BASE_DIR = Path(os.path.abspath(__file__)) BOOKTYPE_SITE_NAME = '' BOOKTYPE_SITE_DIR = 'tests' THIS_BOOKTYPE_SERVER = '' BOOKTYPE_URL = '' BOOKTYPE_ROOT = BASE_DIR.parent STATIC_ROOT = BASE_DIR.parent.child("static") STATIC_URL = '{}/static/'.format(BOOKTYPE_URL) DA...
eos87/Booktype
tests/settings.py
Python
agpl-3.0
4,257
"""This module implements functions for querying properties of the operating system or for the specific process the code is running in. """ import os import sys import re import multiprocessing import subprocess try: from subprocess import check_output as _execute_program except ImportError: def _execute_pro...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/newrelic-2.46.0.37/newrelic/common/system_info.py
Python
agpl-3.0
10,108
""" Each store has slightly different semantics wrt draft v published. XML doesn't officially recognize draft but does hold it in a subdir. Old mongo has a virtual but not physical draft for every unit in published state. Split mongo has a physical for every unit in every state. Given that, here's a table of semantics...
xiandiancloud/edxplaltfom-xusong
common/lib/xmodule/xmodule/modulestore/xml_importer.py
Python
agpl-3.0
37,244
""" *2014.09.10 16:10:05 DEPRECATED!!!! please use building.models.search_building and building.models.make_building instead of the make_unit and make_building functions found here... out of date. """ import sys, os, json, codecs, re sys.path.append(os.path.dirname(os.getcwd())) from geopy import geocoders, distan...
City-of-Bloomington/green-rental
scripts/helpers.py
Python
agpl-3.0
22,169
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
shinken-monitoring/mod-perfdata-service
module/module.py
Python
agpl-3.0
5,056
import unittest import re from lxml import etree from zope.testing import doctest, cleanup import zope.component.eventtesting from imagestore.xml import XMLValidationError, local_file class ValidationTests(unittest.TestCase): relaxng = etree.RelaxNG(file=local_file('rng', 'imagestore.rng')) def validat...
idstudiolab/imagestore
src/imagestore/tests.py
Python
lgpl-2.1
4,153
'''Simple utility functions that should really be in a C module''' from math import * from OpenGLContext.arrays import * from OpenGLContext import vectorutilities def rotMatrix( (x,y,z,a) ): """Given rotation as x,y,z,a (a in radians), return rotation matrix Returns a 4x4 rotation matrix for the given rotatio...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGLContext/utilities.py
Python
lgpl-3.0
2,924
# -*- coding: utf-8 -*- """ Stores metadata about images which are built to encorporate changes to subuser images which are required in order to implement various permissions. """ #external imports import os import json #internal imports from subuserlib.classes.userOwnedObject import UserOwnedObject from subuserlib.c...
folti/subuser
logic/subuserlib/classes/subuserSubmodules/run/runtimeCache.py
Python
lgpl-3.0
1,842
""" This configuration file loads environment's specific config settings for the application. It takes precedence over the config located in the boilerplate package. """ import os if os.environ['HTTP_HOST'] == "appengine.beecoss.com": # Load Boilerplate config only in http://appengine.beecoss.com # this code ...
shupelneker/gae_new_structure
config/__init__.py
Python
lgpl-3.0
745
#! /usr/bin/env python3 """The Tab Nanny despises ambiguous indentation. She knows no mercy. tabnanny -- Detection of ambiguous indentation For the time being this module is intended to be called as a script. However it is possible to import it into an IDE and use the function check() described below. Wa...
Orav/kbengine
kbe/src/lib/python/Lib/tabnanny.py
Python
lgpl-3.0
11,731
"""Interactive context using the GLUT API (provides navigation support)""" from OpenGLContext import interactivecontext, glutcontext, context from OpenGLContext.move import viewplatformmixin from OpenGL.GLUT import * class GLUTInteractiveContext ( viewplatformmixin.ViewPlatformMixin, interactivecontext.Intera...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGLContext/glutinteractivecontext.py
Python
lgpl-3.0
828
import numpy as np try: import scipy.optimize as opt except ImportError: pass from ase.optimize.optimize import Optimizer class Converged(Exception): pass class OptimizerConvergenceError(Exception): pass class SciPyOptimizer(Optimizer): """General interface for SciPy optimizers Only the ca...
suttond/MODOI
ase/optimize/sciopt.py
Python
lgpl-3.0
10,601
from h2o.estimators.xgboost import * from h2o.estimators.gbm import * from tests import pyunit_utils def xgboost_vs_gbm_monotone_test(): assert H2OXGBoostEstimator.available() is True monotone_constraints = { "AGE": 1 } xgboost_params = { "tree_method": "exact", "seed": 123, ...
michalkurka/h2o-3
h2o-py/tests/testdir_misc/pyunit_xgboost_gbm_monotone.py
Python
apache-2.0
1,780
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
USGSDenverPychron/pychron
pychron/pipeline/tasks/panes.py
Python
apache-2.0
28,668
from java.lang import Long, Object from clamp import clamp_base, Constant TestBase = clamp_base("org") class ConstSample(TestBase, Object): myConstant = Constant(Long(1234), Long.TYPE)
jythontools/clamp
tests/integ/clamp_samples/const_.py
Python
apache-2.0
191
# Copyright 2016 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 ag...
dhermes/google-cloud-python
spanner/google/cloud/spanner_v1/client.py
Python
apache-2.0
11,355
# Status: ported, except for tests and --abbreviate-paths. # Base revision: 64070 # # Copyright 2001, 2002, 2003 Dave Abrahams # Copyright 2006 Rene Rivera # Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0....
flingone/frameworks_base_cmds_remoted
libs/boost/tools/build/src/build/property.py
Python
apache-2.0
19,263
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
jianajavier/pnc-cli
pnc_cli/swagger_client/models/build_record_set_singleton.py
Python
apache-2.0
2,941
# 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 t...
cernops/keystone
keystone/tests/unit/common/test_manager.py
Python
apache-2.0
1,531
from a10sdk.common.A10BaseClass import A10BaseClass class SslCertKey(A10BaseClass): """ :param action: {"optional": true, "enum": ["create", "import", "export", "copy", "rename", "check", "replace", "delete"], "type": "string", "description": "'create': create; 'import': import; 'export': export; 'copy': ...
amwelch/a10sdk-python
a10sdk/core/A10_file/file_ssl_cert_key.py
Python
apache-2.0
1,981
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import subprocess from typing import Sequence from pants.util.osutil import get_os_name class IdeaNotFoundException(Exception): """Could not find Idea executable.""" cla...
tdyas/pants
src/python/pants/util/desktop.py
Python
apache-2.0
2,880
#!/usr/bin/python """ Copyright 2015 Ericsson AB Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
EricssonResearch/monad
TravelRecommendation/TravelRecommendation_faster.py
Python
apache-2.0
14,541
# 14. print_log('\n14. Issuer (Trust Anchor) is creating a Credential Offer for Prover\n') cred_offer_json = await anoncreds.issuer_create_credential_offer(issuer_wallet_handle, cred_def_id) print_log('Credential Of...
Artemkaaas/indy-sdk
docs/how-tos/issue-credential/python/step4.py
Python
apache-2.0
2,869
# Generated by Django 2.1.7 on 2019-04-07 21:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('data_log', '0008_auto_20190402_2035'), ] operations = [ migrations.AlterModelOptions( name='cra...
PeteAndersen/swarfarm
data_log/migrations/0009_auto_20190407_1443.py
Python
apache-2.0
2,137
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Intel, 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 # # ...
inkerra/cinder
cinder/volume/rpcapi.py
Python
apache-2.0
7,605
# -*- coding:utf-8 -*- """ Description: Issue Transaction Usage: from AntShares.Core.IssueTransaction import IssueTransaction """ from AntShares.Core.AssetType import AssetType from AntShares.Helper import * from AntShares.Core.Transaction import Transaction from AntShares.Core.TransactionType import Transactio...
AntSharesSDK/antshares-python
sdk/AntShares/Core/IssueTransaction.py
Python
apache-2.0
922
from plenum.common.event_bus import InternalBus from plenum.common.startable import Mode from plenum.common.timer import QueueTimer from plenum.common.util import get_utc_epoch from plenum.server.consensus.primary_selector import RoundRobinConstantNodesPrimariesSelector from plenum.server.database_manager import Databa...
evernym/zeno
plenum/test/replica/test_buffers_cleaning.py
Python
apache-2.0
3,313
from distutils.core import setup, Extension module1=Extension('hamsterdb', libraries=['hamsterdb'], include_dirs=['../include'], library_dirs=['../src/.libs'], sources=['src/python.cc']) setup(name='hamsterdb-python', version='2.1.8', author='Christoph Rupp', author_email...
cloudrain21/hamsterdb
python/setup.py
Python
apache-2.0
505
#!/usr/bin/env python # # Copyright 2007 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...
illicitonion/givabit
lib/sdks/google_appengine_1.7.1/google_appengine/google/appengine/ext/appstats/datamodel_pb.py
Python
apache-2.0
81,798
''' Python Homework with Chipotle data https://github.com/TheUpshot/chipotle ''' ''' BASIC LEVEL PART 1: Read in the file with csv.reader() and store it in an object called 'file_nested_list'. Hint: This is a TSV file, and csv.reader() needs to be told how to handle it. https://docs.python.org/2/library/csv.html...
jdweaver/ds_sandbox
homework2/homework_3_chipotle.py
Python
apache-2.0
6,038
# Copyright 2016 Capital One Services, 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 agreed to in...
VeritasOS/cloud-custodian
c7n/resources/iot.py
Python
apache-2.0
1,009
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-17 19:21 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tilecache', '0002_auto_20160317_1519'), ] operations = [ migrations.AlterModelOption...
openconnectome/ocptilecache
tilecache/migrations/0003_auto_20160317_1521.py
Python
apache-2.0
512
# Copyright (C) 2015 The Android Open Source Project # # 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 ...
android-art-intel/Nougat
art-extension/tools/checker/common/archs.py
Python
apache-2.0
663
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_...
spennihana/h2o-3
h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_ascharacter.py
Python
apache-2.0
734
#!/usr/bin/python2.5 # Copyright (C) 2007 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 la...
google/transitfeed
examples/table.py
Python
apache-2.0
6,035
#!/usr/bin/env python """A module with functions for working with GRR packages.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import importlib import inspect import logging import os import sys import pkg_resources from typing import Text from grr_...
dunkhong/grr
grr/core/grr_response_core/lib/package.py
Python
apache-2.0
2,986
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # encoding: utf-8 # Copyright 2014 Orange # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
murat1985/bagpipe-bgp
bagpipe/bgp/bgp_daemon.py
Python
apache-2.0
11,381