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
from settings import * from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.core.paginator import Paginator from django.http import HttpResponse, HttpResponseRedirect from urllib import unquote from mail.models import * from django.core.urlresolvers i...
sunlightlabs/sarahs_inbox
mail_dedupe/views.py
Python
bsd-3-clause
2,307
import json import os from b2.upload_source import UploadSourceBytes from scrapy.utils.project import get_project_settings def get_shub_project_settings(): settings = get_project_settings() shub_settings = json.loads(os.environ.get('SHUB_SETTINGS', '{}')) settings.setdict( shub_settings.get('proj...
shaform/ptt-beauty
ptt_beauty/utils.py
Python
bsd-3-clause
577
#!/usr/bin/env python import rospy import actionlib from flexbe_core import EventState, Logger from vigir_flexbe_states.proxy import ProxyMoveitClient """ Created on 04/13/2014 @author: Philipp Schillinger """ class MoveitPredefinedPoseState(EventState): """ Uses moveit to go to one of the pre-defined poses. -...
team-vigir/vigir_behaviors
vigir_flexbe_states/src/vigir_flexbe_states/moveit_predefined_pose_state.py
Python
bsd-3-clause
13,581
# Copyright 2016 Google LLC # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
googleapis/protoc-java-resource-names-plugin
plugin/templates/resource_name.py
Python
bsd-3-clause
13,100
''' transforming (:mod:`calour.transforming`) ========================================= This module contains functions that transform the data table - :attr:`Experiment.data`. .. warning:: Some of the functions require dense matrix and thus will change ``Experiment.data`` to dense matrix. .. currentmodule:: calour.t...
RNAer/Calour
calour/transforming.py
Python
bsd-3-clause
12,473
# -*- coding: utf-8 -*- # This file is part of Viper - https://github.com/viper-framework/viper # See the file 'LICENSE' for copying permission. from viper.common.out import print_info from viper.common.out import print_error from viper.common.out import print_output from viper.core.plugins import __modules__ from vip...
kevthehermit/viper
viper/common/autorun.py
Python
bsd-3-clause
1,981
from __future__ import annotations import procrunner import pytest @pytest.mark.parametrize("filename", ["image_15799_master.h5", "image_15799.nxs"]) def test_convert_to_cbf(dials_data, filename, tmpdir): result = procrunner.run( ["dials.import", dials_data("vmxi_thaumatin") / filename, "image_range=1,10...
dials/dials
tests/command_line/test_convert_to_cbf.py
Python
bsd-3-clause
696
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------...
biocore/pyqi
pyqi/interfaces/optparse/input_handler.py
Python
bsd-3-clause
561
#!/usr/bin/env python # Copyright (c) 2014 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
CTSRD-SOAAP/chromium-42.0.2311.135
third_party/WebKit/Source/devtools/scripts/check_injected_script_source.py
Python
bsd-3-clause
3,363
""" read_cell_by_cell.py :copyright: (c) 2014-2015 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details This shows how to use **Reader** class to go through a single page spreadsheet, The output is:: 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 """ import os import...
lordakshaya/pyexcel
examples/basics/read_cell_by_cell.py
Python
bsd-3-clause
1,031
from django.core.paginator import Paginator, EmptyPage from django.db.models import Q from django.http import Http404 from django.shortcuts import get_object_or_404, render from .models import Course def list(request): qs = Course.approved.all() course_types = [ct[0] for ct in Course.COURSE_TYPES] searc...
toastdriven/eliteracing
courses/views.py
Python
bsd-3-clause
1,639
from django.conf.urls import include, patterns, url from django.contrib import admin from django.core.exceptions import PermissionDenied from django.shortcuts import redirect from addons.urls import ADDON_ID from amo.urlresolvers import reverse from . import views urlpatterns = patterns('', # AMO stuff. url(...
jinankjain/zamboni
apps/zadmin/urls.py
Python
bsd-3-clause
2,133
from __future__ import division """ Objects for dealing with Qiita studies This module provides the implementation of the Investigation class. Classes ------- - `Investigation` -- A Qiita investigation class """ # ----------------------------------------------------------------------------- # Copyright (c) 2014--, ...
squirrelo/qiita
qiita_db/investigation.py
Python
bsd-3-clause
1,984
# ---------------------------------------------------------------------------- # Copyright (c) 2017-, LabControl development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # -------------------------------------------------...
jdereus/labman
labcontrol/gui/handlers/process_handlers/test/test_gdna_extraction_process.py
Python
bsd-3-clause
2,304
import os import os.path def pytest_configure(config): test_db = os.environ.get('DB', 'sqlite') os.environ['DJANGO_SETTINGS_MODULE'] = 'pytest_django_casperjs.tests.settings' # noqa from django.conf import settings if test_db == 'postgresql': settings.DATABASES['default'].update({ ...
EnTeQuAk/pytest-django-casperjs
conftest.py
Python
bsd-3-clause
1,003
from unittest import TestCase from veritranspay.response import BinResponse class BinsRequestResponseTests(TestCase): def setUp(self): # example response data from # -- self.response_json = { "data": { "country_name": "Indonesia", "country_code...
derekjamescurtis/veritranspay
tests/response_bins_tests.py
Python
bsd-3-clause
911
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from . import Node from . import Edge from collections import deque class Graph: """ Main class which represent a Graph :param na...
hadim/pygraphml
pygraphml/graph.py
Python
bsd-3-clause
6,171
#!/usr/bin/env python import jumeg import os.path raw_fname = "109925_CAU01A_100715_0842_2_c,rfDC-raw.fif" if not os.path.isfile(raw_fname): print "Please find the test file at the below location on the meg_store2 network drive - \ cp /data/meg_store2/fif_data/jumeg_test_data/109925_CAU01A_100715_0842_...
fboers/jumegX
jumeg_test.py
Python
bsd-3-clause
1,802
# schema.py # Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """The schema module provides the building blocks for database metadata. Each element within this ...
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg/sqlalchemy/schema.py
Python
bsd-3-clause
64,162
"""API for open discussions integration""" import logging from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import transaction from open_discussions_api.client import OpenDiscussionsApi from open_discussions_api.constants import ROLE_STAFF from requests.exceptions ...
mitodl/micromasters
discussions/api.py
Python
bsd-3-clause
16,514
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Statistic' db.create_table(u'statistics_statistic', ( (u'id', self.gf('django.db...
gannetson/sportschooldeopenlucht
apps/statistics/migrations/0001_initial.py
Python
bsd-3-clause
1,566
"""Custom exceptions for ExecutionContext package """ from generic_utils.exceptions import GenUtilsException from generic_utils.exceptions import GenUtilsKeyError from generic_utils.exceptions import GenUtilsRuntimeError class ExecutionContextStackEmptyError(GenUtilsException): """Raised when stack is empty and ...
kevinseelbach/generic_utils
src/generic_utils/execution_context/exceptions.py
Python
bsd-3-clause
835
#!/usr/bin/python import yaml import pprint import os import pdb import re import cgi import codecs import sys import cgitb cgitb.enable() if (sys.stdout.encoding is None): print >> sys.stderr, "please set python env PYTHONIOENCODING=UTF-8, example: export PYTHONIOENCODING=UTF-8, when write to stdout." ...
coder0xff/Plange
documentation/syntax-cgi.py
Python
bsd-3-clause
5,936
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.decorators import method_decorator from django.utils.translation import ugettext_noop from corehq import toggles from corehq.apps.domain.views import DomainViewMixin, LoginAndDomainMixin from corehq.apps.hqwebap...
SEL-Columbia/commcare-hq
corehq/apps/dashboard/views.py
Python
bsd-3-clause
1,502
#!/usr/bin/env python # This document is part of Acronym # https://github.com/geowurster/Acronym # =================================================================================== # # # New BSD License # # Copyright (c) 2014, Kevin D. Wurster # All rights reserved. # # Redistribution and use in source and bi...
geowurster/Acronym
acronym/tests/test_vector_transform.py
Python
bsd-3-clause
4,230
from setuptools import setup import re readme = open('README.rst').read() changes = open('CHANGES.txt').read() version_file = 'glaze/__init__.py' version = re.findall("__version__ = '(.*)'", open(version_file).read())[0] try: version = __import__('utile').git_version(version) except ImportError: pass setup( ...
marwano/django-glaze
setup.py
Python
bsd-3-clause
1,285
from StringIO import StringIO from datetime import datetime, timedelta from casexml.apps.case.models import CommCareCase from casexml.apps.case.tests.util import check_xml_line_by_line from casexml.apps.case.xml import V1 from django.core.urlresolvers import reverse from django.test import TestCase from django.test.c...
SEL-Columbia/commcare-hq
corehq/apps/receiverwrapper/tests/test_repeater.py
Python
bsd-3-clause
6,713
from ConfigParser import SafeConfigParser import os.path import pytest import re import textwrap from amazonproduct import utils def pytest_addoption(parser): group = parser.getgroup('amazonproduct', 'custom options for testing python-amazon-product-api') group._addoption('--locale', action='append', ...
prats226/python-amazon-product-api-0.2.8
tests/conftest.py
Python
bsd-3-clause
5,765
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function import frappe import unittest, json, sys import xmlrunner import importlib from frappe.modules import load_doctype_module, get_module_name from frappe.utils impor...
bcornwellmott/frappe
frappe/test_runner.py
Python
mit
9,730
from scipy import * from scipy import linalg from scipy import interpolate import sys import time def log_mesh(om,nom, ntail_,del_nom = 1): """Creates logarithmic mesh on Matsubara axis Takes first istart points from mesh om and the rest of om mesh is replaced by ntail poinst redistribued log...
correlatedmaterialslaboratory/metal_insulator_interface
transition/ftns_Fourier.py
Python
mit
2,953
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'PolygonMapFeature.geo_level' db.add_column(u'maps_polygonmapfeature', 'geo_level', self.gf...
ProvidencePlan/Profiles
communityprofiles/maps/migrations/0009_auto__add_field_polygonmapfeature_geo_level__add_field_linestringmapfe.py
Python
mit
6,613
from django.core.validators import MinLengthValidator, MinValueValidator from django.db import models from model_utils.models import TimeStampedModel class Item(TimeStampedModel): class Kinds(models.TextChoices): BOOKMARK = "bookmark" key = models.CharField(max_length=20, validators=[MinLengthValidat...
rohithpr/bookmark-manager
bookmarks/models.py
Python
mit
1,003
import unittest from conans.client.recorder.search_recorder import SearchRecorder class SearchRecorderTest(unittest.TestCase): def setUp(self): self.recorder = SearchRecorder() def empty_test(self): info = self.recorder.get_info() expected_result = {'error': False, 'results': []} ...
birsoyo/conan
conans/test/functional/search_recorder_test.py
Python
mit
10,512
from django.db import models from microdata.models import Device # Create your models here. class DeviceSettings(models.Model): """ Describes the settings associated with a device. This is what is returned by a REST call to /api/settings-api/{serial}/. """ device = models.OneToOneField(Device) "...
seadsystem/ShR2
Web Stack/farmer/models.py
Python
mit
1,851
from multiprocessing import Pool import h5py as hdf import numpy as np from calc_cluster_props import * from data_handler import mkTruth, mkHalo import os import sys class AsyncFactory: def __init__(self, func, cb_func): self.func = func self.cb_func = cb_func self.pool = Pool() def ca...
boada/desCluster
mkTargeted/legacy/targetedRealistic_async.py
Python
mit
4,107
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
v-iam/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/route_table.py
Python
mit
2,557
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from...
bitcoinxt/bitcoinxt
qa/rpc-tests/maxblocksinflight.py
Python
mit
3,769
#!/usr/bin/env python # # Gaze tracking calibration # - use calibration video heatmap and priors # # AUTHOR : Mike Tyszka # PLACE : Caltech # DATES : 2014-05-15 JMT From scratch # # This file is part of mrgaze. # # mrgaze is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
jmtyszka/mrgaze
mrgaze/calibrate.py
Python
mit
16,369
class Person(object): def __init__(self,pid,name,age,sex): self.pid=pid self.name=name self.age=age self.sex=sex def eating(self): return 'People need to eat!' def sleeping(self): return 'People need to sleep!' def walking(self): return 'People can walk!'
shams169/pythonProject
env/lib/python3.6/site-packages/app/person.py
Python
mit
298
#From codereview.stackexchange.com def partitions(set_): if not set_: yield [] return for i in range(2**len(set_)//2): parts = [set(), set()] for item in set_: parts[i&1].add(item) i >>= 1 for b in partitions(parts[1]): ...
approximata/edx_mit_6.00.2x
pset1/ps1_partition.py
Python
mit
769
from vanilla import * from mechanic.threaded import ThreadedObject from mechanic.extension import Extension from mechanic.registry import Registry from mechanic.ui import progress from mechanic.ui.tabs.base import BaseTab from mechanic.ui.lists.installation import InstallationList class InstallTab(BaseTab, ThreadedO...
moyogo/robofontmechanic
src/lib/mechanic/ui/tabs/install.py
Python
mit
3,390
#!/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...
toomoresuch/pysonengine
parts/google_appengine/google/appengine/api/taskqueue/taskqueue.py
Python
mit
33,902
#### 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/lair/base/shared_poi_all_lair_insecthill_large_fog_gray.iff" result...
anhstudios/swganh
data/scripts/templates/object/tangible/lair/base/shared_poi_all_lair_insecthill_large_fog_gray.py
Python
mit
469
# Generated by Django 1.11.7 on 2017-12-13 09:18 import django.db.models.deletion from django.db import migrations, models import waldur_core.core.fields import waldur_core.core.models import waldur_core.core.validators class Migration(migrations.Migration): dependencies = [ ('waldur_jira', '0002_resour...
opennode/nodeconductor-assembly-waldur
src/waldur_jira/migrations/0003_project_template.py
Python
mit
1,946
#### 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 = Weapon() result.template = "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s6_gen2....
anhstudios/swganh
data/scripts/templates/object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s6_gen2.py
Python
mit
501
import os import cv2 import time drone_output_path_string = "./images/intruder-detection/drone-output/drone-output.png" detected_image_path_string = "./images/intruder-detection/detected/intruder-detected.png" full_body_haar_cascade_path_string = "./node_modules/opencv/data/haarcascade_fullbody.xml" def clear_direct...
CianDuffy/nodecopter-security
python/pedestrian_detect.py
Python
mit
1,228
import datetime from django import template register = template.Library() today = datetime.date.today() @register.simple_tag def get_upcoming_events_count(days=14, featured=False): """ Returns count of upcoming events for a given number of days, either featured or all Usage: {% get_upcoming_events_...
tBaxter/tango-happenings
happenings/templatetags/event_tags.py
Python
mit
3,870
import locale import sys from logging import DEBUG, ERROR, INFO, WARNING from typing import List, Optional, Tuple, Type import pytest from pip._internal.cli.spinners import SpinnerInterface from pip._internal.exceptions import InstallationSubprocessError from pip._internal.utils.logging import VERBOSE from pip._inter...
pradyunsg/pip
tests/unit/test_utils_subprocess.py
Python
mit
13,355
from __future__ import division from __future__ import print_function import time class BatteryLED(object): def __init__(self, led_matrix): """ Handles the battery LED matrix display """ self.led = led_matrix def display(self, value): """ Display a value to the LED matrix """ battled = self.led ...
DFEC-R2D2/r2d2
pygecko/library/battery.py
Python
mit
1,763
class StreamCache: def __init__(self): self.initiated = False self.new_cache = [] self.old_cache = [] def push(self, streams): assert isinstance(streams, list) self.old_cache = self.new_cache self.new_cache = streams if not self.initiated: self.initiated = True def get_all(self): return set(self...
moopie/botologist
plugins/streams/cache.py
Python
mit
445
#### 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/wearables/boots/shared_boots_corsec.iff" result.attribute_template_...
anhstudios/swganh
data/scripts/templates/object/tangible/wearables/boots/shared_boots_corsec.py
Python
mit
459
from dxr.lines import Ref from dxr.utils import search_url class _PythonPluginAttr(object): plugin = 'python' class ClassRef(Ref, _PythonPluginAttr): """A reference attached to a class definition""" def menu_items(self): qualname = self.menu_data yield {'html': 'Find subclasses', ...
bozzmob/dxr
dxr/plugins/python/menus.py
Python
mit
674
from collections import OrderedDict from collections.abc import Mapping import pprint from hail.utils.misc import get_nice_attr_error, get_nice_field_error from hail.typecheck import typecheck, typecheck_method, anytype class Struct(Mapping): """ Nested annotation structure. >>> bar = hl.Struct(**{'foo'...
danking/hail
hail/python/hail/utils/struct.py
Python
mit
4,964
# 03 - Parenting Partening Returns # Scheduling kid activities and domestic necesities is a challenge for a couple # parents of a 3 year old child. They have a list of N activities to take care # during the day, each activity happens during a specified interval in the day. # Thet need to assign each activity to any o...
zubie7a/Algorithms
Google_Code_Jam/2020/Qualifier_Round/03_Parenting_Partnering_Returns.py
Python
mit
4,723
from sea.datatypes import ConstantsObject class ConfigAttribute: """Makes an attribute forward to the config""" def __init__(self, name, get_converter=None): self.__name__ = name self.get_converter = get_converter def __get__(self, obj, type=None): if obj is None: ret...
shanbay/sea
sea/config.py
Python
mit
1,363
#### 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_rebel_3x10_honorguard_deed.iff" result.attri...
anhstudios/swganh
data/scripts/templates/object/tangible/deed/event_perk/shared_rebel_3x10_honorguard_deed.py
Python
mit
487
from __future__ import print_function # Time: O(nlogk) # Space: O(1) # Merge k sorted linked lists and return it as one sorted list. # Analyze and describe its complexity. # Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None def __...
tudennis/LeetCode---kamyu104-11-24-2015
Python/merge-k-sorted-lists.py
Python
mit
3,117
from bluffinmuffin.protocol.enums import BluffinMessageIdEnum from bluffinmuffin.protocol.interfaces import AbstractResponse from .get_user_command import GetUserCommand class GetUserResponse(AbstractResponse): def __init__(self, success, message_id, message, jsonCommand, email, display_name, money): supe...
BluffinMuffin/Protocol
Python/bluffinmuffin/protocol/lobby/registered_mode/get_user_response.py
Python
mit
1,165
#### 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 = Building() result.template = "object/building/poi/shared_dathomir_singingmtnclanpatrol_large2.iff" result.attribu...
anhstudios/swganh
data/scripts/templates/object/building/poi/shared_dathomir_singingmtnclanpatrol_large2.py
Python
mit
467
############################################################################## # # Copyright (c) 2009 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
ankur22/Butler
topia/termextract/interfaces.py
Python
mit
1,701
import re import subprocess import weakref from scrapy.contrib.pipeline.files import FilesPipeline from scrapy.exceptions import DropItem from scrapy.utils.httpobj import urlparse_cached from twisted.internet import threads class SlideDefaults(object): """Set up defaults items.""" def process_item(self, ite...
rolando/scrapy-slidebot
slidebot/pipelines.py
Python
mit
2,428
import os import zipfile import h5py import numpy from PIL import Image from fuel.converters.base import check_exists, progress_bar from fuel.datasets.hdf5 import H5PYDataset TRAIN = 'dogs_vs_cats.train.zip' TEST = 'dogs_vs_cats.test1.zip' @check_exists(required_files=[TRAIN, TEST]) def convert_dogs_vs_cats(direct...
janchorowski/fuel
fuel/converters/dogs_vs_cats.py
Python
mit
4,138
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
SUSE/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/deployment.py
Python
mit
1,018
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ElectionSimulation.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
CSC301H-Fall2013/ElectionSimulation
Code/ElectionSimulationInstaller/ElectionSimulation/manage.py
Python
mit
261
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
SUSE/azure-sdk-for-python
azure-mgmt-iothub/setup.py
Python
mit
2,792
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from lxml import etree from opus_gui.util import common_dialogs import copy from lxml.etree import SubElement from PyQt4 import QtGui, QtCore from opus_gui.util.convenience import create_qt_action fr...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_gui/models_manager/controllers/submodel_editor.py
Python
gpl-2.0
42,990
from meetup.constants import * groups_templates = {"community_member": COMMUNITY_MEMBER, "community_moderator": COMMUNITY_MODERATOR, "community_leader": COMMUNITY_LEADER} community_member_permissions = [ "add_meetup_rsvp", "add_support_request" ] community_moderator_pe...
payal97/portal
systers_portal/meetup/permissions.py
Python
gpl-2.0
880
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Wed Oct 11 11:35:22 2017 @author: agiovann """ import os import numpy as np import caiman as cm import scipy import pylab as pl import cv2 import glob #%% import itertools def grouper(n, iterable, fillvalue=None): "grouper(3, 'ABCDEFG', 'x') --> ABC ...
agiovann/Constrained_NMF
use_cases/CaImAnpaper/edge-cutter/generate_GT_tight_overlap.py
Python
gpl-2.0
16,620
#!/usr/bin/env python # -*- coding: utf-8 -*- # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most...
mitchcapper/mythbox
resources/lib/mysql-connector-python/python3/examples/engines.py
Python
gpl-2.0
1,836
# -*- coding: utf-8 -*- # ShuffleIR的设置文件 #=============================================== # ShuffleMove的安装路径 pathShuffleMove = '../../Shuffle-Move/' # 当前关卡在ShuffleMove中的关卡ID # 例如美梦天梯为 'SP_275', Mega超梦为'150' # 注意要有英文单引号! varStageID = 'SP_275' # 支援精灵列表 # 格式为 listSupport = ('口袋妖怪的NationDex #',...) # 注意要有英文单引号! # 特殊的条目包括...
coeusite/ShuffleIR
config.py
Python
gpl-2.0
1,373
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @Daddy_Blamo wrote this file. As long as you retain this notice you # can do whatever you want wi...
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/en/rarbg.py
Python
gpl-2.0
5,889
# This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # """Hold GenBank data in a straightforward format. classes: - Record - All of the information in a GenBank record. - Reference - hold refere...
updownlife/multipleK
dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/GenBank/Record.py
Python
gpl-2.0
23,027
import os import sys import shutil cwd_path = os.getcwd() sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) # BSP dist function def dist_do_building(BSP_ROOT): from mkdist import bsp_copy_files import rtconfig dist_dir = os.path.join(BSP_ROOT, 'dist', os.path.basename(BSP...
onelife/rt-thread
bsp/at32/tools/sdk_dist.py
Python
gpl-2.0
848
#!/usr/bin/env python # -*- coding: utf-8 -*- # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most...
mitchcapper/mythbox
resources/lib/mysql-connector-python/python2/examples/unicode.py
Python
gpl-2.0
2,921
#!/usr/bin/python3 -u # # # ################################################################################# # Start off by implementing a general purpose event loop for anyones use ################################################################################# import sys import atexit import getopt import os impor...
beaker-project/beaker-core-tasks
virt/install/py3/zrhel5_write_consolelogs.py
Python
gpl-2.0
18,072
# -*- coding: utf-8 -*- ''' Created on 15 Oct 2012 @author: Éric Piel Copyright © 2012-2015 Éric Piel, Delmic This file is part of Odemis. Odemis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Odem...
delmic/odemis
src/odemis/driver/semcomedi.py
Python
gpl-2.0
173,060
from math import * import gui_base keys=gui_base.keys display_str=None display_font_size=14 class SimpleGui: """ The simulation class is responsible for running the Pod World. """ def __init__(self,world,pods,frames_per_sec,title="BraveNewWorld",back_ground=(0,0,0),log_file=None): #: w...
pauljohnleonard/pod-world
pod/gui.py
Python
gpl-2.0
2,156
#!/usr/bin/python2.4 # # Copyright 2010, 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...
rex-xxx/mt6572_x201
sdk/monkeyrunner/jython/test/all_tests.py
Python
gpl-2.0
1,636
#!/usr/bin/env python #-*- coding:utf-8 -*- # # # Autor: Diego Gasch # # Empresa: CMD s.a # # Fecha de generación: 2013-07-03 # # Fecha de ultima modificación: 2013-07-03 # # Ultima modificación: ([quien] + [que]) dgasch creacion del script # # # Objetivo: Enviar un reporte con los errores de envio desde BAC a Liberty...
eldie1984/Scripts
pg/scripts mios/python/ly/errores_cc_ant.py
Python
gpl-2.0
9,892
from os import stat from os.path import isdir, join as pathjoin from Components.config import config from Components.UsageConfig import preferredPath from Screens.LocationBox import defaultInhibitDirs, MovieLocationBox from Screens.MessageBox import MessageBox from Screens.Setup import Setup from Tools.Directories imp...
openatv/enigma2
lib/python/Screens/Recording.py
Python
gpl-2.0
4,584
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- # # Copyright (C) 2007 Austin <austiny@sohu.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, or...
dardevelin/rhythmbox-gnome-fork
plugins/lyrics/WinampcnParser.py
Python
gpl-2.0
3,373
#!/usr/bin/python import sys, os, re, logging import common from autotest.client.shared import logging_manager from autotest.client.virt import virt_utils def destroy_tap(tapfd_list): for tapfd in tapfd_list: try: os.close(tapfd) # File descriptor is already closed except OSEr...
nacc/autotest
client/tools/tapfd_helper.py
Python
gpl-2.0
1,866
# Pyperclip v1.4 # A cross-platform clipboard module for Python. (only handles plain text for now) # By Al Sweigart al@coffeeghost.net # Usage: # import pyperclip # pyperclip.copy('The text to be copied to the clipboard.') # spam = pyperclip.paste() # On Mac, this module makes use of the pbcopy and pbpaste com...
almc/speed_reader
pyperclip.py
Python
gpl-2.0
5,763
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
repotvsupertuga/repo
plugin.video.pancas/resources/lib/libraries/control.py
Python
gpl-2.0
9,795
#!/usr/bin/python import re fi = open("tree8", "r") fo = open("tree8.dot", "wb") fo.write("graph test {\n") fo.write("\nflowexport=text\n") line = fi.readline() line = fi.readline() line = fi.readline() while line!= 0: RouterList = re.sub("[^\w]", " ", line).split() fo.write('%s[\n\tautoack ...
ashishtanwer/DFS
reader.py
Python
gpl-2.0
600
# -*- coding: utf-8 -*- """ *************************************************************************** Gridify.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *****************************...
dracos/QGIS
python/plugins/processing/algs/qgis/GeometryConvert.py
Python
gpl-2.0
9,841
# -*- coding: utf-8 -*- # # PyOmicron documentation build configuration file, created by # sphinx-quickstart on Tue Apr 26 09:12:21 2016. # # 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. # #...
ligovirgo/pyomicron
docs/conf.py
Python
gpl-3.0
9,982
from ert.test import TestRun from ert.test import path_exists from ert.test import SourceEnumerator from ert.test import TestArea , TestAreaContext from ert.test import ErtTestRunner from ert.test import PathContext from ert.test import LintTestCase from ert.test import ImportTestCase from tests import EclTest class...
Statoil/libecl
python/tests/legacy_tests/test_test.py
Python
gpl-3.0
358
# coding=utf-8 import re def sanitize(string, ignore_characters=None, default_characters={'-', ':', '(', ')', '.'}): """Sanitize a string to strip special characters. :param str string: the string to sanitize. :param set ignore_characters: characters to ignore. :return: the sanitized string. :rt...
dantebarba/docker-media-server
plex/Sub-Zero.bundle/Contents/Libraries/Shared/subliminal_patch/utils.py
Python
gpl-3.0
1,901
# 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/fab/tgz.py
Python
gpl-3.0
1,827
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui4/pluginlicensedialog_base.ui' # # Created: Mon May 4 14:30:35 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Dialog(object): def setup...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/hplip/ui4/pluginlicensedialog_base.py
Python
gpl-3.0
5,171
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" __version__ = "0.15" __status__ = "testing" __pattern__ = r'http://(?:www\.)?files...
jansohn/pyload
module/plugins/hoster/FileSharkPl.py
Python
gpl-3.0
3,815
#coding: UTF-8 '''This script would guide the seafile admin to setup seafile with MySQL''' import sys import os import time import re import shutil import glob import subprocess import hashlib import getpass import uuid import warnings import MySQLdb from ConfigParser import ConfigParser try: import readline # ...
raghon1/seafile
docker-suitecrm/scripts/setup-seafile-mysql.py
Python
gpl-3.0
45,788
# -*- coding: utf-8 -*- # vim: ts=8 et sw=4 sts=4 # pylint: skip-file # pylint: disable=too-few-public-methods,modernize-parse-error """ WHY THIS RUNNER EXISTS: For a set of servers, multiple Ceph configurations are possible. Enumerating all of them would generate so many that the useful would be lost in the noise. R...
SUSE/DeepSea
srv/modules/runners/populate.py
Python
gpl-3.0
25,670
#!/usr/bin/env python # # Copyright 2014,2019 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 optio...
awalls-cx18/gnuradio
gr-uhd/examples/python/freq_hopping.py
Python
gpl-3.0
9,480
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para tupornotv # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re import sys import urlparse from core import config...
Hernanarce/pelisalacarta
python/main-classic/channels/tupornotv.py
Python
gpl-3.0
10,969
#!/usr/bin/env python #coding=utf-8 ''' Created on 2010-4-27 GPL License @author: sypxue@gmail.com ''' import urllib,pickle,StringIO from micolog_plugin import * from google.appengine.ext import db from model import OptionSet,Comment,Blog,Entry,Blog from google.appengine.api import urlfetch class akismet(Plugin): d...
Alwnikrotikz/micolog2
plugins/akismet.py
Python
gpl-3.0
8,593
# -*- coding: utf-8 -*- # -- plugin.py # Functions required by every plugin # Copyright © 2010 Eric Bourry & Julien Flaissy # This file is part of PSSI (Python Simple Smartcard Interpreter). # PSSI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
FeitianSmartcardReader/pssi
pssi/plugins/sim/plugin.py
Python
gpl-3.0
1,017
# sensorCompensationSensorStrengthBonusRadar # # Used by: # Skill: Radar Sensor Compensation type = "passive" def handler(fit, container, context): fit.ship.boostItemAttr("scanRadarStrength", container.getModifiedItemAttr("sensorStrengthBonus") * container.level)
Ebag333/Pyfa
eos/effects/sensorcompensationsensorstrengthbonusradar.py
Python
gpl-3.0
270
# -*- coding: utf-8 -*- # # This file is part of the python-chess library. # Copyright (C) 2012-2016 Niklas Fiekas <niklas.fiekas@backscattering.de> # # 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 Foundat...
johncheetham/jcchess
chess/pgn.py
Python
gpl-3.0
32,586