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
import os from django.http import FileResponse from wsgiref.util import FileWrapper from settings.static import MEDIA_URL # from django.core.servers.basehttp import FileWrapper from django.views.generic import TemplateView from django.shortcuts import render_to_response, render, redirect, get_object_or_404 from django....
skylifewww/pangolin-fog
pangolinfog/views.py
Python
mit
4,937
# -*- coding: utf-8 -*- # # Moonstone is platform for processing of medical images (DICOM). # Copyright (C) 2009-2011 by Neppo Tecnologia da Informação LTDA # and Aevum Softwares LTDA # # This file is part of Moonstone. # # Moonstone is free software: you can redistribute it and/or modify # it under the terms of the GN...
aevum/moonstone
src/moonstone/ilsa/base.py
Python
lgpl-3.0
2,901
#!/usr/bin/python # Copyright 2012 William Yu # wyu@ateneo.edu # # This file is part of POX. # # POX 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 l...
kulawczukmarcin/mypox
pox/misc/flow_stats_differnet_version.py
Python
apache-2.0
5,602
import os from django.conf import settings IXPMGR_VERSION = os.environ["IXPMGR_VERSION"] SECRET_KEY = "test-secret-key" INSTALLED_APPS = [ "django_ixpmgr.IxpManagerAppConfig", "django.contrib.auth", "django.contrib.contenttypes", ]
20c/django-ixpmgr
src/django_ixpmgr/tests/django_settings.py
Python
apache-2.0
245
''' Created on 11/07/2013 @author: Mads M. Pedersen (mmpe@dtu.dk) ''' from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import range from builtins import int from future import standard_library standard_lib...
madsmpedersen/MMPE
cython_compile/examples/examples.py
Python
gpl-3.0
1,398
# # Advene: Annotate Digital Videos, Exchange on the NEt # Copyright (C) 2008-2017 Olivier Aubert <contact@olivieraubert.net> # # Advene 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 ...
oaubert/advene
lib/advene/model/tal/context.py
Python
gpl-2.0
12,208
import h2o_nodes from h2o_test import dump_json, verboseprint import h2o_util import h2o_print as h2p from h2o_test import OutputObj #************************************************************************ def runStoreView(node=None, **kwargs): if not node: node = h2o_nodes.nodes[0] print "\nStoreView:" ...
bikash/h2o-dev
py2/h2o_cmd.py
Python
apache-2.0
16,424
#!/usr/bin/env python # -*- coding: utf-8 -*- from multiprocessing import Process, Pipe import time from time import sleep import random import uuid import logging from tornado.websocket import websocket_connect from tornado.ioloop import PeriodicCallback from tornado.ioloop import IOLoop from tornado.httpclient impo...
RecNes/zo-test_proj
robot.py
Python
gpl-2.0
8,293
# -*- coding: utf-8 -*- # Copyright (c) 2014, 2015 Metaswitch Networks # 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/licens...
alexhersh/calico
calico/felix/config.py
Python
apache-2.0
23,990
# Copyright (c) 2017 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # 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. ...
gnumdk/lollypop
lollypop/helper_dbus.py
Python
gpl-3.0
2,279
#!/afs/bx.psu.edu/project/pythons/py2.7-linux-x86_64-ucs4/bin/python2.7 """ Print the number of bases in a nib file. usage: %prog nib_file """ from bx.seq import nib as seq_nib import sys nib = seq_nib.NibFile( file( sys.argv[1] ) ) print nib.length
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/bx_python-0.7.2-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/nib_length.py
Python
gpl-3.0
254
import os from os import environ import dj_database_url from boto.mturk import qualification import otree.settings BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # the environment variable OTREE_PRODUCTION controls whether Django runs in # DEBUG mode. If OTREE_PRODUCTION==1, then DEBUG=False if environ.get(...
anthropo-lab/XP
XP Expurgement/settings.py
Python
gpl-3.0
5,367
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s -train CORPUS -output VECTORS -size SIZE -window WINDOW -cbow CBOW -sample SAMPLE -hs HS -negative NEGATIVE -threads THREADS -iter ITER -min_count MIN-COUNT -alpha ALPHA -b...
TaddyLab/gensim
gensim/scripts/word2vec_standalone.py
Python
gpl-3.0
5,951
import random from stocker.SSP.investors.base_investor import BaseInvestor from stocker.common.events import EventStockOrderNew, EventStockTransaction from stocker.common.orders import OrderBuy, OrderSell """ Sample XML <Investor module="stocker.SSP.investors.random_investor" class="RandomInvestor"> <init_cash ty...
donpiekarz/Stocker
stocker/SSP/investors/random_investor.py
Python
gpl-3.0
2,212
import os import sys import re import locale import mimetypes import psutil import time import base64 from Crypto.Cipher import AES from Crypto import Random from nxdrive.logging_config import get_logger NUXEO_DRIVE_FOLDER_NAME = 'Nuxeo Drive' log = get_logger(__name__) WIN32_SUFFIX = os.path.join('library.zip', 'nx...
IsaacYangSLA/nuxeo-drive
nuxeo-drive-client/nxdrive/utils.py
Python
lgpl-2.1
14,052
#This script is used to create a timer when making a video in the Blender VSE. #When executed, the script grabs every marker on the timeline and groups them #in pairs by name. Markers should be named in the pattern <sectionname>.Start #and <sectionname>.End and there can be no more than two markers per section. #Every ...
grimlock-/batscriptcrazy
py/blender/TimerScript.py
Python
mit
1,598
''' Author: Juan Jose Conti <jjconti@gmail.com> This module can parse Python files looking for uses of the % operator. The % operator is mainly used for string formatting operations. Use: python wrapstrings.py file.py funcName ''' import ast class RewriteMod(ast.NodeTransformer): def visit_BinOp(self,...
jjconti/taint-mode-py
wrapstrings/wrapstrings.py
Python
gpl-3.0
1,189
""" Created on 06 Nov 2020 @author: Jade Page (jade.page@southcoastscience.com) """ from collections import OrderedDict from scs_core.data.json import PersistentJSONable # -------------------------------------------------------------------------------------------------------------------- class UptimeList(Persist...
south-coast-science/scs_core
src/scs_core/aws/data/uptime_list.py
Python
mit
1,793
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
XeCycle/indico
indico/MaKaC/webinterface/rh/fileAccess.py
Python
gpl-3.0
2,592
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Kongsea/tensorflow
tensorflow/contrib/distributions/python/ops/poisson_lognormal.py
Python
apache-2.0
12,323
""" Support for inheritance of fields down an XBlock hierarchy. """ from __future__ import absolute_import from datetime import datetime from django.conf import settings from pytz import UTC from xmodule.partitions.partitions import UserPartition from xblock.fields import Scope, Boolean, String, Float, XBlockMixin, D...
hamzehd/edx-platform
common/lib/xmodule/xmodule/modulestore/inheritance.py
Python
agpl-3.0
13,415
#QLinearGradient myGradient; #QPen myPen; #QPolygonF myPolygon; #QPainterPath myPath; #myPath.addPolygon(myPolygon); #QPainter painter(this); #painter.setBrush(myGradient); #painter.setPen(myPen); #painter.drawPath(myPath); import math from PyQt5 import QtCore, QtGui, QtWidgets class ArrowItem(QtWidgets....
chiamingyen/PythonCAD_py3
Interface/Entity/arrowitem.py
Python
gpl-2.0
1,388
from plugininterface import basePlugin class test_plugin(basePlugin): def plugin_init(self): # The Constructor of the plugin pass def plugin_loaded(self): # This function will be called if all plugins are loaded. pass def plugin_exploit_modes...
crunchsec/fimap
src/plugins/test_plugin/test_plugin.py
Python
gpl-2.0
2,173
# Copyright 2012 Nicira Networks, 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...
savi-dev/quantum
quantum/plugins/nicira/nicira_nvp_plugin/tests/test_check.py
Python
apache-2.0
1,232
# $Id$ # # Copyright (C) 2003-2006 Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # import os import unittest from rdkit im...
AlexanderSavelyev/rdkit
rdkit/Chem/UnitTestCatalog.py
Python
bsd-3-clause
8,988
# vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2017 Andrew Ziem # https://www.bleachbit.org # # 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 # ...
brahmastra2016/bleachbit
bleachbit/Cleaner.py
Python
gpl-3.0
41,217
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
eaplatanios/tensorflow
tensorflow/python/estimator/canned/dnn_linear_combined.py
Python
apache-2.0
24,368
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License GPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo.tests.common import TransactionCase from psycopg2 import IntegrityError class TestMedicalDrugRoute(TransactionCase): def setUp(self): super(TestMedicalDrugRoute, self).setU...
laslabs/vertical-medical
medical_medicament/tests/test_medical_drug_route.py
Python
agpl-3.0
909
"""Edit details of an image.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import helpers @click.command() @click.argument('identifier') @click.option('--add/--remove', default=True, help="To add or remove Datac...
softlayer/softlayer-python
SoftLayer/CLI/image/datacenter.py
Python
mit
793
import pyknow
cfernandezmanci/tfi-SistemasExpertos
testpyknow.py
Python
unlicense
14
# IMPORTANT: don't change the "currentScriptVerison" variable name or version format. The Travis script depends on it looking like this # (major, minor, revision, development) # example dev version: (1, 2, 3, "beta.4") # example release version: (2, 3, 4) currentScriptVersion = (2, 1, 1) legacyScriptVersion = (2, 0, 2,...
neverhood311/Stop-motion-OBJ
src/version.py
Python
gpl-3.0
331
# 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 types import re import random from configman import Namespace, RequiredConfig from collector.lib.ver_tools impo...
willkg/socorro-collector
collector/throttler.py
Python
mpl-2.0
7,973
# ravencollectd - ravencollectd.py # # 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; only version 2 of the License is applicable. # # This program is distributed in the hope that it will be usef...
rub-a-dub-dub/raven-collectd
ravencollectd.py
Python
gpl-2.0
6,152
#!/usr/bin/env python # -*- coding: utf-8 -*- """ use leaf alogrithm to remove redundancy this algorithm is published in this following paper 1. Bull, S. C., Muldoon, M. R. & Doig, A. J. Maximising the Size of Non-Redundant Protein Datasets Using Graph Theory. PLoS One 8, (2013). Simon Bull gives an implementation for ...
lituan/tools
leaf/leaf.py
Python
cc0-1.0
6,618
# Copyright (C) 2015 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class StealthWebHistory(Signature): name = "stealth_webhistory" description = ...
lixiangning888/whole_project
modules/signatures_orginal_20151110/stealth_webhistory.py
Python
lgpl-3.0
1,097
""" Universe Release Versioning - Version Information """ import functools import sys from universe.dev import DevelopmentMetadata @functools.total_ordering class VersionInfo(tuple): """Provide information about a version This subclasses a tuple to be compliant with other expectations of ``__version_in...
Alphadelta14/universe
universe/info.py
Python
mit
2,927
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme.common.provider import cleanup_vm from cfme.services.catalogs import cloud_catalog_item as cct from cfme.automate.service_dialogs import ServiceDialog from cfme.services.catalogs.catalog import Catalog from cfme.services.catalogs.service_catalogs impor...
thom-at-redhat/cfme_tests
cfme/tests/services/test_cloud_service_catalogs.py
Python
gpl-2.0
4,272
import math import operator as op class ColumnExpression: def __init__(self, *args): if len(args) < 1: raise ValueError elif len(args) == 1: self.operator = None self.args = args[0] else: self.operator = args[0] self.args = args[...
DGrady/dataframe
dataframe/column_expression.py
Python
mit
4,428
# -*- coding: utf-8 -*- # Copyright 2011 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 require...
catapult-project/catapult
third_party/gsutil/gslib/no_op_auth_plugin.py
Python
bsd-3-clause
1,217
# pylint: disable=too-many-arguments # pylint: disable=too-many-locals # pylint: disable=too-many-statements # pylint: disable=no-self-use # pylint: disable=too-few-public-methods from caffe.proto import caffe_pb2 from caffe import Net from google.protobuf import text_format # pylint: disable=invalid-name # pylint: ...
wasidennis/ObjectFlow
caffe-cedn-dev/python/generate_rnn.py
Python
mit
22,308
# This file is part of fedmsg. # Copyright (C) 2012 - 2014 Red Hat, Inc. # # fedmsg 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 # version 2.1 of the License, or (at your option) any later ver...
cicku/fedmsg
fedmsg/tests/fedmsg-test-config.py
Python
lgpl-2.1
3,504
#! /usr/bin/env python3 # Copyright (c) 2015 - thewisenerd <thewisenerd@protonmail.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; either version 2 of the License, or # (at your optio...
thewisenerd/pymoviedb
src/pymoviedb/__main__.py
Python
gpl-2.0
2,130
# Copyright 2015 Cloudbase Solutions Srl # 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 r...
cloudbase/os-windows
os_windows/tests/utils/test_hostutilsv2.py
Python
apache-2.0
1,056
# -*- coding: utf-8 -*- """Fake data generator. To use: 1. Install fake-factory. pip install fake-factory 2. Create your OSF user account 3. Run the script, passing in your username (email). :: python3 -m scripts.create_fakes --user fred@cos.io This will create 3 fake public projects, each with 3 fake co...
Johnetordoff/osf.io
scripts/create_fakes.py
Python
apache-2.0
19,763
import sys import os from os.path import dirname, join from flask import Flask, request, abort app = Flask(__name__) config = { 'working_directory': os.getcwd(), 'always_regenerate': True} @app.route('/') def provide_briefcast(): from briefscaster import briefcast url_root = request.url_root ...
robmadole/briefs-caster
src/briefscaster/__init__.py
Python
bsd-3-clause
1,980
#!/usr/bin/env python # MIT License # # Copyright (c) 2017 Francesco Evangelista # # 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 right...
psi4/psi4
psi4/share/psi4/scripts/vmd_cube.py
Python
lgpl-3.0
16,500
## # Copyright 2012-2015 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://vscentrum.be/nl/en), # the Hercules foundation (htt...
pneerincx/easybuild-framework
easybuild/toolchains/linalg/__init__.py
Python
gpl-2.0
1,340
# URL extractor # Copyright 2004, Paul McGuire from pyparsing import Literal,Suppress,CharsNotIn,CaselessLiteral,\ Word,dblQuotedString,alphanums,SkipTo import urllib.request, urllib.parse, urllib.error import pprint # Define the pyparsing grammar for a URL, that is: # URLlink ::= <a href= URL>linkT...
miguelalexanderdiaz/lenguajes_project
pyparsing-2.0.2/examples/urlExtractor.py
Python
gpl-2.0
1,794
# -*- coding: utf-8 -*- GIORNI_SETTIMANA = ['LU', 'MA', 'ME', 'GI', 'VE', 'SA', 'DO'] GIORNI_SETTIMANA_FULL = ['lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato', 'domenica'] TIME_TOLERANCE_MIN = 5 # show also rides scheduled 5 min ago MAX_FERMATE_NEAR_LOCATION = 5 MAX_PERCORSI = 8 PATH_FERMATA_PROXIMIT...
kercos/PickMeUp
params.py
Python
apache-2.0
1,293
#!/usr/bin/env python2 #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:unlicense (http://unlicense.org/) """ urllib2 caching handler Modified from http://code.activestate.com/recipes/491261/ """ from __future__ import with_statement __author__ = "dbr/Ben" __versio...
badloop/SickRage
lib/tvdb_api/tvdb_cache.py
Python
gpl-3.0
7,781
#!/usr/bin/env python2 # Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. import argparse # Find the best implementation available try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import lmdb import logging import numpy as np import os import PIL.Image imp...
winnerineast/Origae-6
origae/tools/create_generic_db.py
Python
gpl-3.0
17,266
#!/usr/bin/python class PWMObject(): def __init__(self, pwm, channel): self.pwm = pwm self.channel = channel def pwm_on(self, time_on): self.pwm.setPWM(self.channel, 0, time_on) def pwm_on_advanced(self, time_off, time_on): self.pwm.setPWM(self.channel, time_off, time_on...
crtgregoric/RPi-Robot
pwm_objects/pwm_object.py
Python
gpl-3.0
389
import pickle import bpy from mathutils import * def create_camera_path(filename, camname='Camera'): cam = bpy.data.objects[camname] # Get first camera cam.scale = Vector((1,1,1)) mat = cam.matrix_world #### with open(filename, 'rb') as infile: X,Y,T,O = pickle.load(infile) me...
ginkgo/micropolis
tools/blender_graph.py
Python
gpl-3.0
1,455
# Generated by Django 2.2.24 on 2021-10-02 14:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('products', '0072_product_order_index'), ] operations = [ migrations.RemoveField( model_name='product', name='order_index', ...
flavoi/diventi
diventi/products/migrations/0073_remove_product_order_index.py
Python
apache-2.0
337
#!/usr/bin/env python """ Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). However, you may not engage in multiple tra...
weixsong/algorithm
leetcode/122.py
Python
mit
1,001
# # Documentation build configuration file, created by sphinx-quickstart # # This file is execfile()d with the current directory set to its containing dir # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented ...
hmgaudecker/econ-project-templates
docs/bld/example/python/python_example/src/documentation/conf.py
Python
bsd-3-clause
7,153
""" Django settings for life project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # Buil...
sehgalvibhor/my_story
life/life/settings.py
Python
mit
3,205
from .constants import * from .validators import * from .protofeed import * from .main import * __version__ = "2.2.0"
araichev/make_gtfs
make_gtfs/__init__.py
Python
mit
119
"""Manipulate differences, differentials and characteristics."""
ranea/ArxPy
arxpy/differential/__init__.py
Python
mit
65
# -*- coding: utf-8 -*- from datetime import datetime from django.db import models from django.conf import settings from django.contrib.auth.models import User # use Django-tagging for tags. If Django-tagging cannot be found, create our own # I did not author this little snippet, I found it somewhere on the web, # ...
andrewebdev/django-video
src/videostream/models.py
Python
bsd-3-clause
5,986
# -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Anima Istanbul # # This module is part of anima-tools and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause from sqlalchemy import distinct from stalker import db, Version class RepresentationManager(object): """Manages Task/V...
sergeneren/anima
anima/repr.py
Python
bsd-2-clause
6,665
class SampleSource(object): pass
akloster/pysiology
pysiology/sample_source.py
Python
bsd-2-clause
38
# This is a randomized test that generates different pathnames every # time it is invoked, and tests the encoding of those pathnames. # # It uses a simple probabilistic model to generate valid pathnames # that have proven likely to expose bugs and divergent behaviour in # different encoding implementations. from mercu...
iaddict/mercurial.rb
vendor/mercurial/tests/test-pathencode.py
Python
mit
6,431
import json import unittest from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.auth import get_user_model from django.core import exceptions from django.core.urlresolvers import reverse from django_dynamic_fixtur...
ic-labs/django-icekit
icekit/plugins/location/tests.py
Python
mit
8,271
__author__ = 'sebastians' # The function provided here can be used if you get no image output with cmd.png (can be no or a black picture). # Can be also used if you experience segmentation faults with cmd.ray from pymol import cmd import os def png_workaround(filepath, width=1024, height=768): """Workaround for...
ssalentin/pymol-animations
special-topics/workaround-png.py
Python
mit
923
# -*- coding: utf8 -*- #!/usr/bin/python # # This is derived from a cadquery script for generating QFP/GullWings models in X3D format. # # from https://bitbucket.org/hyOzd/freecad-macros # author hyOzd # # Dimensions are from Jedec MS-026D document. ## file of parametric definitions import collections from collectio...
poeschlr/kicad-3d-models-in-freecad
cadquery/FCAD_script_generator/Altech/cq_parameters.py
Python
gpl-2.0
2,670
"""empty message Revision ID: fccffb2e4db6 Revises: 0745219a2583 Create Date: 2018-03-05 15:32:55.741303 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'fccffb2e4db6' down_revision = '0745219a2583' branch_labels = None...
WildflowerSchools/sensei
migrations/versions/fccffb2e4db6_.py
Python
mit
934
import sys import pickle import math import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np from subprocess import Popen, PIPE from collections import defaultdict def tree(): return defaultdict(tree) def run_command_with_params_and_get_output(command, args): # Compile first ...
pxinghao/dimmwitted
graph_cuts/run_full_benchmark.py
Python
apache-2.0
25,455
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2008-2016, Andrei Korostelev <andrei at korostelev dot net> # # Before using this product in any way please read the license agreement. # If you do not agree to the terms in this agreement you are not allowed # to use this product or parts of it. You...
kindkaktus/CcPy
tst/ccpyconfparsertest.py
Python
bsd-3-clause
9,126
import unittest import os from sqltxt.table import Table from sqltxt.column import Column, ColumnName, AmbiguousColumnNameError from sqltxt.expression import Expression class TableTest(unittest.TestCase): def setUp(self): self.data_path = os.path.join(os.path.dirname(__file__), '../data') table...
shahin/sqltxt
tests/unit/table_test.py
Python
mit
5,179
#!/usr/bin/env python3 import argparse import datetime import json import re from copy import deepcopy from gocddash.analysis import data_access, go_client, domain from gocddash.util import app_config from gocddash.console_parsers.junit_report_parser import JunitConsoleParser from gocddash.console_parsers.determine_p...
magnus-lycka/gocddash
gocddash/gocddash_sync.py
Python
mit
16,101
import unittest from datetime import datetime, timedelta from automover.test.helpers import * from automover.remover import handle_remove class TestRemover(unittest.TestCase): def setUp(self): self.client = client = DummyClient() self.torrents = [ DummyTorrent(client, '1', datetime.no...
JohnDoee/rtorrent-automover
automover/test/test_remover.py
Python
bsd-3-clause
2,175
#!/usr/bin/env python # -*- coding: utf-8 -*- import os try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :cha...
pedrobaeza/openupgradelib
setup.py
Python
agpl-3.0
1,718
from random import randrange as rand import pygame, sys cell_size = 18 cols = 10 rows = 22 maxfps = 30 colors = [ (0, 0, 0 ), (255, 85, 85), (100, 200, 115), (120, 108, 245), (255, 140, 50 ), (50, 120, 52 ), (146, 202, 73 ), (150, 161, 218 ), (35, 35, 35) ] tetris_shapes = [ [[1, 1, 1], [0, 1, 0]], ...
saintdragon2/python-3-lecture-2015
sinsojae_mid_final/nobless/tetris.py
Python
mit
6,787
#------------------------------------------------------------------------------ # Copyright (c) 2007, Riverbank Computing Limited # All rights reserved. # # This software is provided without warranty under the terms of the BSD license. # However, when used with the GPL version of PyQt the additional terms described in ...
enthought/etsproxy
enthought/traits/ui/qt4/__init__.py
Python
bsd-3-clause
1,028
''' Unit tests for folder summary_json ''' import os from time import time import pytest from pytest_mock import mocker import shutil import jsonpickle import folder from folder._os import Stat from ..base_test import setup_tmp_dir, touch class TestFolderSummary(object): def setup_method(self, method): ...
praveenram/sync_folders
tests/folder/test_folder_summary.py
Python
mit
3,345
#!/usr/bin/python # Copyright: (c) 2015, Google Inc. All Rights Reserved. # 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', ...
hryamzik/ansible
lib/ansible/modules/clustering/k8s/_kubernetes.py
Python
gpl-3.0
16,555
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
Phil-LiDAR2-Geonode/pl2-geonode
geonode/catalogue/backends/geonetwork.py
Python
gpl-3.0
1,161
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
centaurialpha/ninja-ide
ninja_ide/gui/explorer/explorer_container.py
Python
gpl-3.0
8,986
""" fullEval.py DO NOT MODIFY ANY CODES IN THIS FILE OTHERWISE YOUR RESULTS MAY BE INCORRECTLY EVALUATED! @author: John See, 2017 For questions or bug reporting, please send an email to johnsee@mmu.edu.my """ import os import cv2 import numpy as np import pickle import sys, getopt import matplotlib.pyplot as plt fr...
jackwong95/MMURandomStuff
TDS3651 - Visual Information Processing/Assignment/Part 2/SIFT/fullEval.py
Python
apache-2.0
4,031
from io_processing.result_interpreter.abst_result_interpreter import AbstractInterpreter, \ InterpreterOptions from io_processing.surveillance_handler import CanBusHandler import csv from math import floor from tools.ecu_logging import ECULogger from config import can_registration import logging class CanBusInte...
PhilippMundhenk/IVNS
ECUSimulation/io_processing/result_interpreter/can_bus_interpreter.py
Python
mit
10,769
#!/usr/bin/env python3 import unittest import amulet class TestDeploy(unittest.TestCase): """ Trivial deployment test for Apache Hadoop NameNode. This charm cannot do anything useful by itself, so integration testing is done in the bundle. """ def test_deploy(self): self.d = amulet....
c0s/juju-apache-bigtop-namenode
tests/01-basic-deployment.py
Python
apache-2.0
578
#! /usr/bin/env python3 import re __all__ = ["AnsiFormatter"] class AnsiFormatter: # RegExp detecting blank-only and single-char blocks blankBlock = re.compile( "^([^\t\S]+|[^\t])$" ) # Messages msg = { 'wiked-diff-empty': '(No difference)', 'wiked-diff-same': '=', 'wiked-...
lahwaacz/python-wikeddiff
WikEdDiff/AnsiFormatter.py
Python
gpl-3.0
10,367
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
Metaswitch/calico-nova
nova/virt/vmwareapi/vmops.py
Python
apache-2.0
81,484
# Copyright 2013 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
FNST-OpenStack/horizon
openstack_dashboard/api/network_base.py
Python
apache-2.0
7,722
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django class Migration(migrations.Migration): dependencies = [ ("tests", "0024_tableblockstreampage"), ] operations = [ migrations.CreateModel( name="AdvertWithCus...
wagtail/wagtail
wagtail/tests/testapp/migrations/0025_advertwithcustomprimarykey.py
Python
bsd-3-clause
1,505
#! /usr/bin/python # Copyright 2019 The ANGLE Project Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # gen_overlay_widgets.py: # Code generation for overlay widgets. Should be run when the widgets declaration file, # overlay_widg...
endlessm/chromium-browser
third_party/angle/src/libANGLE/gen_overlay_widgets.py
Python
bsd-3-clause
11,216
import collections import math class Solution: def updateMatrix(self, matrix: List[List[int]]) -> List[List[int]]: m, n = len(matrix), len(matrix[0]) dist = [[math.inf] * n for _ in range(m)] Q = collections.deque() for i in range(m): for j in range(n): if...
jiadaizhao/LeetCode
0501-0600/0542-01 Matrix/0542-01 Matrix.py
Python
mit
1,632
# -*- coding: utf-8 -*- """ solace.views.themes ~~~~~~~~~~~~~~~~~~~ Implements support for the themes. :copyright: (c) 2010 by the Solace Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import mimetypes from werkzeug import Response, wrap_file from we...
mitsuhiko/solace
solace/views/themes.py
Python
bsd-3-clause
892
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division import gzip import bz2 import zipfile from tempfile import NamedTemporaryFile from petl.compat import PY2 from petl.test.helpers import ieq, eq_ import petl as etl from petl.io.sources import MemorySource, PopenSource, ZipSourc...
psnj/petl
petl/test/io/test_sources.py
Python
mit
3,696
from server_group import ServerGroup # NOQA
cloudpassage-community/halo_api_examples
app/halo_api_examples/server_group/__init__.py
Python
bsd-2-clause
44
# 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...
NeCTAR-RC/horizon
openstack_dashboard/dashboards/admin/snapshots/views.py
Python
apache-2.0
6,201
# -*- coding: utf-8 -*- # MDclt.primary.raw.py # # Copyright (C) 2012-2015 Karl T Debiec # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. """ Classes for transfer of data from raw text files to h5 .. todo: - L...
KarlTDebiec/MDclt
primary/raw.py
Python
bsd-3-clause
7,794
try: from PyMca import Plugin1DBase except ImportError: from . import Plugin1DBase try: from PyMca import SortPlotsWindow except ImportError: print("SortPlotsWindow importing from somewhere else") import SortPlotsWindow from platform import node as gethostname DEBUG = True class SortPlots...
tonnrueter/pymca_devel
PyMca/PyMcaPlugins/SortPlotsPlugin.py
Python
gpl-2.0
4,051
# Copyright (c) 2017 Civic Knowledge. This file is licensed under the terms of the # MIT, included in this distribution as LICENSE """Base class for file URLs, URLs on a local file system. These are URLs that can be opened and read""" from rowgenerators.appurl.url import Url from rowgenerators.appurl.util import ensu...
CivicKnowledge/rowgenerators
rowgenerators/appurl/file/file.py
Python
mit
4,910
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from ureport.sql import InstallSQL class Migration(migrations.Migration): dependencies = [ ('polls', '0036_auto_20160331_1527'), ] operations = [ InstallSQL('polls_0037') ]
xkmato/ureport
ureport/polls/migrations/0037_install_poll_results_count_triggers.py
Python
agpl-3.0
315
"""Open an arbitrary URL. See the following document for more info on URLs: "Names and Addresses, URIs, URLs, URNs, URCs", at http://www.w3.org/pub/WWW/Addressing/Overview.html See also the HTTP spec (from which the error codes are derived): "HTTP - Hypertext Transfer Protocol", at http://www.w3.org/pub/WWW/Protocols...
HiSPARC/station-software
user/python/Lib/urllib.py
Python
gpl-3.0
59,990
#! /usr/bin/python3 # -*- coding: utf8 -*- # The logger module for nv-middlebox. # # Every file must use logger module to log the information. __author__ = "Sugesh Chandran" __copyright__ = "Copyright (C) The neoview team." __license__ = "GNU Lesser General Public License" __version__ = "1.0" import logging from src....
sugchand/neoview-middle-box
src/nv_logger.py
Python
lgpl-2.1
1,831
# -*- coding: utf-8 -*- """ Created on Mon Oct 3 02:10:23 2011 @author: IxxI @version: v1.0 """ import sys import logging from optparse import OptionParser from commands import Commands, CLIENT, SERVER from mcp import getchangedsrc_side def main(): parser = OptionParser(version='MCP %s' % Commands.fullversion...
mviitanen/marsmod
mcp/runtime/getchangedsrc.py
Python
gpl-2.0
1,420
""" PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net) Copyright (C) 2004-2020 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved, Johann Rohwer (jrohwer@users.sourceforge.net) Triple-J Group for Molecular Cell Physiology Stellenbosch University, South Africa. Permission to use...
bgoli/pysces
pysces/PyscesParScan.py
Python
bsd-3-clause
13,323