code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/env python # coding=utf-8 ## @package biopredyn ## Copyright: [2012-2019] Cosmo Tech, All Rights Reserved ## License: BSD 3-Clause import libsbml import libsedml from sympy import * import variable, parameter ## Data generation class, used for creating outputs from task results in a ## SED-ML work flow. c...
TheCoSMoCompany/biopredyn
Prototype/python/biopredyn/datagenerator.py
Python
bsd-3-clause
7,444
import director.vtkAll as vtk from director import vtkNumpy as vnp from director.shallowCopy import shallowCopy import numpy as np class DebugData(object): def __init__(self): self.append = vtk.vtkAppendPolyData() def write(self, filename): writer = vtk.vtkXMLPolyDataWriter() writer....
patmarion/director
src/python/director/debugVis.py
Python
bsd-3-clause
8,815
#!/usr/bin/env python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Makes sure that files include headers from allowed directories. Checks DEPS files in the source tree for rules, and applie...
endlessm/chromium-browser
native_client/tools/checkdeps/checkdeps.py
Python
bsd-3-clause
17,715
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2013-2014, Martín Gaitán # Copyright (c) 2012-2013, Alexander Jung-Loddenkemper # This file is part of Waliki (http://waliki.nqnwebs.com/) # License: BSD (https://github.com/mgaitan/waliki/blob/master/LICENSE) #============================================...
mgaitan/waliki_flask
waliki/extensions/uploads.py
Python
bsd-3-clause
4,692
def extractWataboutMe(item): ''' Parser for 'watabout.me' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Ben-To', 'Ben-To', 'translated'), ('PRC', 'PRC', ...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractWataboutMe.py
Python
bsd-3-clause
597
from django.contrib import messages from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ from django.views.generic import ListView, CreateView, UpdateView from .models import Article class ArticleListView(ListView): """ View to list all the articles ""...
andresgz/zshoes
zshoes/articles/views.py
Python
bsd-3-clause
1,444
import django from django.db import models from django.db.models.sql.query import LOOKUP_SEP from django.db.models.deletion import Collector # from django.db.models.related import RelatedObject from django.db.models.fields.related import ForeignObjectRel as RelatedObject from django.forms.forms import pretty_name from ...
pobear/django-xadmin
xadmin/util.py
Python
bsd-3-clause
19,558
import re import unicodedata from htmlentitydefs import name2codepoint from StringIO import StringIO try: from django.utils.encoding import smart_unicode except ImportError: def smart_unicode(s): return s from django import forms from django.core.files.uploadedfile import SimpleUploadedFile # From ht...
paulcwatts/1hph
gonzo/utils/__init__.py
Python
bsd-3-clause
2,240
def extractLimostnWordpressCom(item): ''' Parser for 'limostn.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None if "The Outcast" in item['tags']: return buildReleaseMessageWithType(item, "The Ou...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractLimostnWordpressCom.py
Python
bsd-3-clause
380
# apis_v1/documentation_source/organizations_followed_retrieve_doc.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- def organizations_followed_retrieve_doc_template_values(url_root): """ Show documentation about organizationsFollowedRetrieve """ required_query_parameter_list = [ ...
wevote/WebAppPublic
apis_v1/documentation_source/organizations_followed_retrieve_doc.py
Python
bsd-3-clause
3,459
# The Computer Language Benchmarks Game # http://shootout.alioth.debian.org/ # # modified by Ian Osgood # modified again by Heinrich Acker # modified by Justin Peel # modified by Mariano Chouza # 2to3 import sys, bisect, array import time bb = bisect.bisect alu = ( 'GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG' '...
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/fasta3t.py
Python
bsd-3-clause
2,864
from itertools import chain from operator import attrgetter __all__ = ("Contents", "contents_for_items", "contents_for_item") class Contents: def __init__(self, regions): self.regions = regions self._sorted = False self._contents = {region.key: [] for region in self.regions} self...
matthiask/django-content-editor
content_editor/contents.py
Python
bsd-3-clause
2,812
PLUGINS = ('actions', 'filters', 'bookmark', 'export', 'layout', 'refresh', 'sortable', 'details', 'editable', 'relate', 'chart', 'ajax', 'relfield', 'inline', 'topnav', 'portal', 'quickform', 'wizard', 'images', 'auth', 'multiselect', 'themes', 'aggregation', 'mobile', 'passwords', 'sitemenu', 'language',...
pobear/django-xadmin
xadmin/plugins/__init__.py
Python
bsd-3-clause
659
# -*- coding: utf-8 -*- import datetime as dt from tradenews.database import ( Column, db, Model, SurrogatePK, ) class NewsCluster(SurrogatePK, Model): __tablename__ = 'newscluster' # id = Column(db.Integer(), nullable=False, primary_key=True) date = Column(db.Text(), nullable=False, def...
morreene/tradenews
tradenews/newscluster/models.py
Python
bsd-3-clause
533
import os import tempfile from wsgiref.util import FileWrapper import zipfile from django.http import HttpResponse from django.views.generic import View from corehq.util.view_utils import set_file_download def make_zip_tempfile(files, compress=True): compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP...
SEL-Columbia/commcare-hq
corehq/util/zip_utils.py
Python
bsd-3-clause
1,577
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Ship() result.template = "object/ship/shared_droid_fighter_tier2.iff" result.attribute_template_id = -1 result.s...
anhstudios/swganh
data/scripts/templates/object/ship/shared_droid_fighter_tier2.py
Python
mit
416
from django.db import models # Create your models here. class Course(models.Model): year = models.SmallIntegerField(verbose_name = 'Course Year') course_code = models.CharField(verbose_name = 'Course Code', max_length = 7, primary_key = True) name = models.CharField(verbose_name = 'Course Name', max_lengt...
EngTurtle/skule_tutors2
course_manage/models.py
Python
mit
945
"""create table for hierarchy of accounts Revision ID: 17fb1559a5cd Revises: 3b7de32aebed Create Date: 2015-09-16 14:20:30.972593 """ # revision identifiers, used by Alembic. revision = '17fb1559a5cd' down_revision = '3b7de32aebed' branch_labels = None depends_on = None from alembic import op, context import sqlalc...
Geoportail-Luxembourg/geoportailv3
geoportal/LUX_alembic/versions/17fb1559a5cd_create_table_for_hierarchy_of_accounts.py
Python
mit
2,012
from django.db import transaction from waldur_core.logging import tasks def process_hook(sender, instance, created=False, **kwargs): transaction.on_commit(lambda: tasks.process_event.delay(instance.pk))
opennode/nodeconductor-assembly-waldur
src/waldur_core/logging/handlers.py
Python
mit
210
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from six import iteritems, string_types """build query for doclistview and return results""" import frappe, json, copy, re import frappe.defaults import frappe.share import fra...
tundebabzy/frappe
frappe/model/db_query.py
Python
mit
21,717
import click import inflection import os def default(txt): return click.style(txt, fg="white", bold=True) def prompt(txt): return click.style(txt, fg="green") @click.command() @click.argument("name") @click.option("--description", prompt=prompt("Description"), default=default("N/A")) @click.option( "-...
aleontiev/django-cli
djay/blueprints/init/context.py
Python
mit
1,263
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
datalogics/scons
test/option/srcdir.py
Python
mit
1,950
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from import_export.admin import ImportExportModelAdmin from backend.api_v3.models import Result class TempoListFilter(admin.SimpleListFilter): # Human-readable title which will be displayed in the # right admin sidebar ju...
AstroMatt/esa-time-perception
backend/api_v3/admin.py
Python
mit
3,822
from __future__ import unicode_literals from django.contrib.auth.models import Permission, User from django.utils import six from djblets.avatars.services.gravatar import GravatarService from djblets.testing.decorators import add_fixtures from djblets.webapi.testing.decorators import webapi_test_template from kgb impo...
brennie/reviewboard
reviewboard/webapi/tests/test_user.py
Python
mit
14,393
""" A collection of Gradient Boosting type classifier models. .. autoclass:: revscoring.scoring.models.GradientBoosting :members: :member-order: """ import logging from sklearn.ensemble import GradientBoostingClassifier from .sklearn import ProbabilityClassifier logger = logging.getLogger(__name__) class ...
wiki-ai/revscoring
revscoring/scoring/models/gradient_boosting.py
Python
mit
462
import re import six from six import BytesIO import gzip def gzip_decompress(data): if six.PY2: in_io = BytesIO() in_io.write(data.read()) in_io.seek(0) return BytesIO(gzip.GzipFile(fileobj=in_io, mode='rb').read()) else: return BytesIO(gzip.decompress(data.read())) ...
ayemos/osho
akagi/utils.py
Python
mit
414
# -*- coding: utf-8 -*- from warnings import warn import numpy as np import matplotlib.pyplot as plt from ....lib.utilities import isSignal, isContainer from ....lib.globals import FdpWarning from ...fft import Fft def fft(obj, *args, **kwargs): """ Calculate FFT(s) for signal or container. Return Fft ...
drsmith48/fdp
fdp/methods/nstxu/bes/fft.py
Python
mit
3,236
import notify2 import os from time import * start_time = time() notify2.init('') r = notify2.Notification('', '') while True: for i in [ ('TO DO', 'Write JavaScript'), ('TO DO', 'Write Python'), ('Thought of the Day', 'Support Open Source'), ('Learn. . .', 'Use Linux...
OpenC-IIIT/scriptonia
notif.py
Python
mit
695
import math import sys from functools import lru_cache from typing import Optional, Union # noqa import urwid from mitmproxy import contentviews from mitmproxy import http from mitmproxy.tools.console import common from mitmproxy.tools.console import layoutwidget from mitmproxy.tools.console import flowdetailview fr...
cortesi/mitmproxy
mitmproxy/tools/console/flowview.py
Python
mit
8,005
# -*- coding:utf-8 -*- """ Module provides zookeeper abstraction """ from .host import Host from .cluster import Cluster from .exceptions import HostBaseError, HostConnectionTimeout, HostSetTimeoutTypeError from .exceptions import HostSetTimeoutValueError, HostInvalidInfo, ZkBaseError from .exceptions import ClusterHos...
kAlmAcetA/zookeeper_monitor
zookeeper_monitor/zk/__init__.py
Python
mit
668
""" This module provides a direct client interface for managing an IRC connection. If you are trying to build a bot, :class:`ircutils.bot.SimpleBot` inherits from :class:`SimpleClient` so it has the methods listed below. """ import collections from . import connection from . import ctcp from . import events from . ...
Mortal/eggpy
ircutils/client.py
Python
mit
13,186
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_liberation_patriot_rodian_female_01.iff" result.attrib...
anhstudios/swganh
data/scripts/templates/object/mobile/shared_dressed_liberation_patriot_rodian_female_01.py
Python
mit
471
# -*- coding: iso-8859-1 -*- """ MoinMoin - cli show script @copyright: 2006 MoinMoin:ThomasWaldmann @license: GNU GPL, see COPYING for details. """ from MoinMoin.script import MoinScript from MoinMoin.wsgiapp import run class PluginScript(MoinScript): """\ Purpose: ======== Just run a CLI request...
Glottotopia/aagd
moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/script/cli/show.py
Python
mit
723
# -*- coding: utf-8 -*- # pylint:disable=redefined-outer-name,unused-argument from __future__ import absolute_import from __future__ import unicode_literals import os import shutil from pytest import yield_fixture as fixture TOP = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @fixture def in_example_...
chriskuehl/pgctl
tests/conftest.py
Python
mit
653
# -*- coding: utf-8 -*- # Authors: Y. Jia <ytjia.zju@gmail.com> """ Given a collection of intervals, merge all overlapping intervals. https://leetcode.com/problems/merge-intervals/description/ """ # Definition for an interval. class Interval(object): def __init__(self, s=0, e=0): self.start = s ...
ytjia/coding-practice
algorithms/python/leetcode/MergeIntervals.py
Python
mit
1,167
# This script created a queue # # Author - Paul Doyle Nov 2015 # # import httplib import boto.sqs import boto.sqs.queue from boto.sqs.message import Message from boto.sqs.connection import SQSConnection from boto.exception import SQSError import sys keys = httplib.HTTPConnection("ec2-52-30-7-5.eu-west-1.compute.amazon...
chdonncha/Cloud-Computing-Labs-AmazonServer
Lab11/read-aws-queue.py
Python
mit
965
from rpython.jit.backend.ppc.test.support import JitPPCMixin from rpython.jit.metainterp.test.test_dict import DictTests class TestDict(JitPPCMixin, DictTests): # for the individual tests see # ====> ../../../metainterp/test/test_dict.py pass
oblique-labs/pyVM
rpython/jit/backend/ppc/test/test_dict.py
Python
mit
258
import requests from allauth.socialaccount import app_settings from allauth.socialaccount.providers.oauth2.client import ( OAuth2Client, OAuth2Error, ) from .provider import UntappdProvider class UntappdOAuth2Client(OAuth2Client): """ Custom client because Untappd: * uses redirect_url instea...
pennersr/django-allauth
allauth/socialaccount/providers/untappd/client.py
Python
mit
1,640
import math import numpy as N # note: we run emcee as if it was multinest, by remapping parameter ranges to [0,1] # if we didn't, the logPL function could just be # # prior = p0.prior(xs) # return -N.inf if not prior else math.log(prior) + ll.loglike(xs) # # and the initialization would be # #...
jellis18/libstempo
libstempo/emcee.py
Python
mit
2,045
# content processor functions import datetime from django.conf import settings from django.contrib.auth.models import User from userprofile.models import Profile import pymongo from pymongo import MongoClient from pymongo import ASCENDING, DESCENDING client = MongoClient(settings.MONGO_HOST, settings.MONGO_PORT) ...
ProjectCloudly/cloudly
cloudly/context_processors.py
Python
mit
2,445
"""passlib.exc -- exceptions & warnings raised by passlib""" #============================================================================= # exceptions #============================================================================= class MissingBackendError(RuntimeError): """Error raised if multi-backend handl...
Glottotopia/aagd
moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/support/passlib/exc.py
Python
mit
7,667
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/component/chemistry/shared_infection_amplifier.iff" result.attribut...
anhstudios/swganh
data/scripts/templates/object/tangible/component/chemistry/shared_infection_amplifier.py
Python
mit
491
# This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. from ranger.gui.colorscheme import ColorScheme from ranger.gui.color import * color = {'blue': 27} class Default(ColorScheme): progress_bar_color = color['blue'] def use(self, context):...
j4ve1in/dotfiles
src/.config/ranger/colorschemes/abyss.py
Python
mit
4,804
__author__ = 'anass' def path_to_property(obj, props, id_tag='id'): """ Get the property value from a path""" if isinstance(obj, list): # If it is a list it means we need the id to return the value # add if value equal nan ==> no resource found if len(props) is 1: res = [o ...
neiyk/JSONMock.py
jsonmock/utils.py
Python
mit
925
import numpy as np # Loading and existing file arr = np.loadtxt('somefile.txt') # Saving a new file np.savetxt('somenewfile.txt', arr) # Opening an existing file with the append option f = open('existingfile.txt', 'a') # Creating some random data to append to the existing file data2append = np.random.rand(100) # W...
ebressert/ScipyNumpy_book_examples
python_examples/numpy_231_ex2.py
Python
mit
420
###### # # HX-2014-08: # for Python code translated from ATS # ###### ###### #beg of [string_cats.py] ###### ###### from ats2pypre_basics_cats import * ###### ############################################ def atspre_strlen(x): return (x.__len__()) ############################################ def ats2pypre_string_g...
master-q/ATS-Postiats-contrib
contrib/libatscc/libatscc2py/CATS/string_cats.py
Python
mit
791
# Copyright (C) 2015 – 2021 Noa-Emil Nissinen (4shadoww) from core.hakkuframework import * import os import subprocess import time conf = { "name": "bluetooth_pod", "version": "1.0", "shortdesc": "bluetooth ping of death", "github": "4shadoww", "author": "4shadoww", "email": "4shadoww0@gmail.c...
4shadoww/usploit
modules/bluetooth_pod.py
Python
mit
1,294
import logging from ftmstore import get_dataset log = logging.getLogger(__name__) MODEL_ORIGIN = "model" def get_aggregator_name(collection): return "collection_%s" % collection.id def get_aggregator(collection, origin="aleph"): """Connect to a followthemoney dataset.""" dataset = get_aggregator_name(c...
pudo/aleph
aleph/logic/aggregator.py
Python
mit
378
#!/usr/bin/env python """ Copyright (c) 2012, Aaron Meier All rights reserved. See LICENSE for more information. """ from distutils.core import setup import os from gitgate import __version__ setup(name='gitgate', version = __version__, description = 'Dead simple gatekeeping code review for Git', long_de...
webgovernor/gitgate
setup.py
Python
mit
856
import os import numpy as np import MMTK class Grid: """ Class to read and write alchemical grids. Data is a dictionary with spacing - the grid spacing, in Angstroms. counts - the number of points in each dimension. vals - the values. All are numpy arrays. """ def __init__(self): pass def r...
luizcieslak/AlGDock
AlGDock/IO.py
Python
mit
14,740
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/intangible/pet/shared_mouse_droid.iff" result.attribute_template_id = -1 ...
anhstudios/swganh
data/scripts/templates/object/intangible/pet/shared_mouse_droid.py
Python
mit
424
#!/usr/bin/env python from setuptools import setup, find_packages setup( name = 'spotter', version = '1.7', url = "http://github.com/borntyping/spotter", author = "Sam Clements", author_email = "sam@borntyping.co.uk", description = "A comm...
haiyangd/spotter
setup.py
Python
mit
1,250
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/deed/event_perk/shared_pavillion_2_static_deed.iff" result.attribut...
anhstudios/swganh
data/scripts/templates/object/tangible/deed/event_perk/shared_pavillion_2_static_deed.py
Python
mit
481
#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages from b2tob3 import VERSION with open('README.rst') as f: README = f.read() with open('LICENSE') as f: LICENSE = f.read() setup( name='b2tob3', version=VERSION, packages=find_packages(), long_description=README,...
metrey/b2tob3
setup.py
Python
mit
935
# -*- coding:utf-8 -*- # from __future__ import unicode_literals def clean_up_double_spaces(line): while line.find(' ') >-1: line = line.replace(' ',' ') return line # in future will be gettext function def _(x): return x
kostyll/usb-flash-network-monitor
server/utils.py
Python
mit
246
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring import logging from datetime import datetime from sqlalchemy import Column, DateTime from flexget import db_schema, plugin from flexg...
tobinjt/Flexget
flexget/plugins/operate/version_checker.py
Python
mit
3,855
import os import sys from subprocess import PIPE import subprocess import json from .io import puts, indent, readuntil, readbytes from .event_loop import add_reader, remove_reader from .path import relative def start(task): puts("Starting job in {}".format(task.job_dir)) indent("worker: {}".format(task.worker_pat...
mozilla/leisure
leisure/worker.py
Python
mit
2,830
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource) from neuralnilm.source import (standardise, discretize, fdiff, power_and_fdiff, ...
mmottahedi/neuralnilm_prototype
scripts/e572.py
Python
mit
15,490
#!/usr/bin/python # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progra...
0vercl0k/rp
src/third_party/beaengine/tests/0f41.py
Python
mit
2,850
#!/usr/bin/env python3 """SSH into a running appliance and install VMware VDDK. """ import argparse import sys from urllib.parse import urlparse from cfme.utils.appliance import get_or_create_current_appliance from cfme.utils.appliance import IPAppliance def log(message): print(f"[VDDK-INSTALL] {message}") def...
ManageIQ/integration_tests
scripts/install_vddk.py
Python
gpl-2.0
1,303
# Copyright (C) 2005-2011 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distribute...
stewartsmith/bzr
bzrlib/tests/test_diff.py
Python
gpl-2.0
65,261
# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is dis...
stewartsmith/bzr
bzrlib/tests/per_tree/test_get_file_with_stat.py
Python
gpl-2.0
2,105
# -*- coding: utf-8 -*- # This file is part of the Horus Project __author__ = 'Jesús Arroyo Torrens <jesus.arroyo@bq.com>' __copyright__ = 'Copyright (C) 2014-2016 Mundo Reader S.L.' __license__ = 'GNU General Public License v2 http://www.gnu.org/licenses/gpl2.html' from horus.util import profile from horus.gui.engi...
bq/horus
src/horus/gui/workbench/calibration/main.py
Python
gpl-2.0
9,466
#Script to calculate the free energy change # upon removing a set of host-guest distance # restraints and applying standard state conditions # @authors: Stefano Bosisio and Julien Michel import os,sys, random import math from math import pi, cos, sin from Sire.Tools.OpenMMMD import * from Sire.Tools import Parameter, ...
chryswoods/Sire
wrapper/Tools/StandardState.py
Python
gpl-2.0
17,579
#python import k3d import testing setup = testing.setup_mesh_writer_test(["PolyCube", "TriangulateFaces", "STLMeshWriter"], "STLMeshReader", "mesh.sink.STLMeshWriter.stl") setup.modifier.mesh_selection = k3d.geometry.selection.create(1) testing.require_valid_mesh(setup.document, setup.reader.get_property("output_mes...
barche/k3d
tests/mesh/mesh.sink.STLMeshWriter.py
Python
gpl-2.0
442
# Copyright (C) 2011-2012, Luis Pedro Coelho <luis@luispedro.org> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # License: MIT (see COPYING file) import numpy as np def _get_output(array, out, fname, dtype=None, output=None): ''' output = _get_output(array, out, fname, dtype=None, output=None) Imple...
fabianvaccaro/pygums
pythonLibs/mahotas-1.1.0/mahotas/internal.py
Python
gpl-2.0
5,299
# -*- coding: utf-8 -*- """ *************************************************************************** sieve.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************************...
mhugent/Quantum-GIS
python/plugins/processing/algs/gdal/sieve.py
Python
gpl-2.0
3,202
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ServicePosition import ServicePositionGauge from Components.ActionMap import HelpableActionMap from Components.MultiContent import MultiContentEntryText from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase...
IanSav/enigma2
lib/python/Plugins/Extensions/CutListEditor/ui.py
Python
gpl-2.0
15,154
# Copyright (C) 2014 Johnny Vestergaard <jkv@unixcluster.dk> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This ...
mushorg/conpot
conpot/core/attack_session.py
Python
gpl-2.0
2,606
# -*- coding: utf-8 -*- """ Distance IR Plugin Copyright (C) 2011 Olaf Lüke <olaf@tinkerforge.com> __init__.py: package initialization 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 ...
Tinkerforge/brickv
src/brickv/plugin_system/plugins/distance_ir/__init__.py
Python
gpl-2.0
922
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from variable_functions import my_attribute_label from numpy import ma from numpy import float32 class total_improvement_value_per_residentia...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/gridcell/total_improvement_value_per_residential_unit_within_walking_distance.py
Python
gpl-2.0
2,680
""" XmlObject This module allows concise definitions of XML file formats for python objects. """ # # KeepNote # Copyright (c) 2008-2009 Matt Rasmussen # Author: Matt Rasmussen <rasmus@alum.mit.edu> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GN...
brotchie/keepnote
keepnote/compat/xmlobject_v3.py
Python
gpl-2.0
13,706
#!/usr/bin/env python import os import sys import glob import argparse import logging import rpy2.robjects as robjects import utils rscript = '' R = robjects.r def run_rscript(command=None): """Run R command, log it, append to rscript""" global rscript if not command: return logging.debug(com...
vimalkvn/riboseqr_wrapper
riboseqr/ribosome_profile.py
Python
gpl-2.0
4,816
# -*- mode: python; indent-tabs-mode: nil; tab-width: 3 -*- # vim: set tabstop=3 shiftwidth=3 expandtab: # # Copyright (C) 2003 Karl MacMillan # # 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; e...
playingaround2017/test123
gamera/confidence.py
Python
gpl-2.0
7,363
## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # # Copyright:: Copyright 2012-2013 Cyprus Institute / CaSToRC, University of Luxembourg / LCSB, Ghent University # Authors:: George Tsouloupas <g.tsouloupas@cyi.ac.cy>, Fotis Georgatos <fotis.georgatos@uni.lu>, Kenneth Hoste # License...
geimer/easybuild-easyblocks
easybuild/easyblocks/c/cuda.py
Python
gpl-2.0
4,288
#!/usr/bin/python import csv import json import datetime import time from utils import dateToISOString ############################# ############################# # This file normalizes incoming # data from the morph.io API # to conform with the Mongo # data model. ############################# ####################...
IPIDataLab/PPP_Loader
python/data_norm.py
Python
gpl-2.0
12,915
MLHD_DATA_PATH = '/data/mlhd'
metabrainz/listenbrainz-server
listenbrainz_spark/mlhd/__init__.py
Python
gpl-2.0
30
# -*- coding: utf-8 -*- """ *************************************************************************** FixedDistanceBuffer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
nirvn/QGIS
python/plugins/processing/algs/qgis/FixedDistanceBuffer.py
Python
gpl-2.0
5,246
# Copyright (C) 2007, One Laptop Per Child # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distrib...
tchx84/sugar
src/jarabe/frame/clipboardmenu.py
Python
gpl-2.0
8,876
# -*- coding: utf-8 -*- ''' Definitions of the grid. ''' from __future__ import (absolute_import, division, print_function) import numpy as np import functions import gll class OneDimensionalGrid(object): """Contains the grid properties""" def __init__(self, param): """Init""" self.param =...
geodynamics/specfem1d
Python_version/grid.py
Python
gpl-2.0
2,988
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2008 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## 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 Foundati...
andrebellafronte/stoq
stoqlib/gui/test/test_search.py
Python
gpl-2.0
12,901
# qgis-ol3 Creates OpenLayers map from QGIS layers # Copyright (C) 2014 Victor Olaya (volayaf@gmail.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 # (...
timlinux/qgis2web
olwriter.py
Python
gpl-2.0
18,993
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 versio...
tfroehlich82/EventGhost
plugins/EventGhost/ShowOSD.py
Python
gpl-2.0
17,182
from django.core.management.base import BaseCommand from django.db.migrations import recorder from django.db.migrations import loader import os import importlib def delete_migration_file(file_name): try: message = "Deleting file %s.py" % file_name print(message) os.remove("%s.py" % file_na...
arun6582/django-manage-reset-migrations
reinit_migrations/management/commands/reinit_migrations.py
Python
gpl-3.0
1,880
# -*- coding: utf-8 -*- # Copyright (c) 2002 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Package implementing an interface to the pyunit unittest package. The package consist of a single dialog, which may be called as a standalone version using the eric6_unittest script or from within the eric6 IDE. If ...
testmana2/test
PyUnit/__init__.py
Python
gpl-3.0
429
# Copyright 2008, Jeffrey Regier, jeff [at] stat [dot] berkeley [dot] edu # This file is part of Author-Dedupe. # # Author-Dedupe 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 3 of the...
viveksck/author-dedupe
src/flln_partition.py
Python
gpl-3.0
4,607
#!/usr/bin/python # Copyright 2012, 2013 Andrew Lamoureux # # This file is a part of FunChess # # FunChess 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...
lwerdna/chess
Sjeng.py
Python
gpl-3.0
3,014
# coding=utf-8 """ Class used for representing tActivity of BPMN 2.0 graph """ import graph.classes.flow_node_type as flow_node class Activity(flow_node.FlowNode): """ Class used for representing tActivity of BPMN 2.0 graph Fields (except inherited): - default: ID of default flow of gateway. Must be e...
krisss2121/bpmn-python
bpmn_python/graph/classes/activities/activity_type.py
Python
gpl-3.0
1,224
import sys print("Hello, World!")
bikoheke/hacktoberfest
scripts/hello_world_amlaanb.py
Python
gpl-3.0
34
import unittest from wpull.url import URLInfo from wpull.urlrewrite import URLRewriter, strip_path_session_id, \ strip_query_session_id class TestURLRewrite(unittest.TestCase): def test_rewriter(self): rewriter = URLRewriter(hash_fragment=True, session_id=True) self.assertEquals( ...
chfoo/wpull
wpull/urlrewrite_test.py
Python
gpl-3.0
6,269
""" """ import os import sysconfig import pkg_resources import Orange # Entry point for main Orange categories/widgets discovery def widget_discovery(discovery): dist = pkg_resources.get_distribution("Orange") pkgs = [ "Orange.widgets.data", "Orange.widgets.visualize", "Orange.widge...
hugobuddel/orange3
Orange/widgets/__init__.py
Python
gpl-3.0
791
# Copyright 2012 Lee Verberne <lee@blarg.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. # # This program is dis...
kafana/ubik
lib/ubik/hats/helper.py
Python
gpl-3.0
3,040
""" Functions for mappings FunctionNodes to strings """ from LOTlib.FunctionNode import isFunctionNode, BVUseFunctionNode, BVAddFunctionNode import re percent_s_regex = re.compile(r"%s") def schemestring(x, d=0, bv_names=None): """Outputs a scheme string in (lambda (x) (+ x 3)) format. Arguments: ...
piantado/LOTlib
LOTlib/Legacy/Visualization/Stringification.py
Python
gpl-3.0
6,858
# -*- coding: utf-8 -*- # # Copyright (C) 2011-2018 GRNET S.A. # # 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. # # Thi...
grnet/snf-image-creator
image_creator/distro/netbsd.py
Python
gpl-3.0
1,608
../../../../share/pyshared/PIL/ImageChops.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/PIL/ImageChops.py
Python
gpl-3.0
44
#*************************************************************************** # Copyright Jaime Machuca #*************************************************************************** # Title : sc_SonyQX1.py # # Description : This file contains a class to use the Sony QX range of cams # ...
squilter/MAVProxy
MAVProxy/modules/mavproxy_smartcamera/sc_SonyQX1.py
Python
gpl-3.0
27,861
# 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/reviewingAssignContributions.py
Python
gpl-3.0
2,181
# -*- coding: utf-8 -*- # Copyright 2016 Fachrizal Oktavian # This file is part of CManager. # # CManager 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) ...
fachrioktavian/DracOS-Connection-Manager
cmanager/cmanager.py
Python
gpl-3.0
1,219
import lib.result_functions_file as RFF import lib.maglib as MSG import os #这个库是统计各个词语的出现次数,并显示 #这是tieba-zhuaqu项目的用户端基本插件 def satisticWord(word,datalist): os.system('cls') print('>>>>>开始统计【',word,'】出现次数....') sum=1 mlist=[] for item in datalist: if item.find(word) != -1: sum+=1...
ankanch/tieba-zhuaqu
user-application/KCrawlerControal/Debug/plugins/trash/singleword.py
Python
gpl-3.0
978
"Base classes for lookup creation." from __future__ import unicode_literals import json import operator import re from functools import reduce from django.conf import settings from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.core.urlresolvers import reverse from django.core.serializers....
hzlf/openbroadcast
website/tools/selectable/base.py
Python
gpl-3.0
5,321