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
def extractBijinsans(item): """ """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None if 'Benkyou no Kamisama wa Hitomishiri' in item['tags']: return buildReleaseMessageWithType(item, 'Benkyou no Kamisama wa...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractBijinsans.py
Python
bsd-3-clause
387
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import kong_admin try: from setuptools import setup except ImportError: from distutils.core import setup version = kong_admin.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') os.system('python setu...
peterayeni/django-kong-admin
setup.py
Python
bsd-3-clause
1,630
import sys from collections import OrderedDict def get_identifiers(obj): """ Given a BeautifulSoup object, find all of the annotations of type "is" (rather than e.g. "isDerivedFrom", or "isHomologTo") """ identifiers = set() if not obj.find("annotation"): return identifiers for a...
jamesscottbrown/sbml-diff
sbml_diff/miriam.py
Python
bsd-3-clause
4,701
import pytest import galena @pytest.fixture def game(): return galena.Game() @pytest.fixture def entity(game): return game.create_entity() @pytest.fixture def entity2(game): return game.create_entity() @pytest.fixture def entity3(game): return game.create_entity()
Remolten/galena
tests/conftest.py
Python
bsd-3-clause
290
from collections import defaultdict class InitialPointGenerator(object): def generate(self, dimensions, n_samples, random_state=None): raise NotImplemented def set_params(self, **params): """ Set the parameters of this initial point generator. Parameters ---------- ...
scikit-optimize/scikit-optimize
skopt/sampler/base.py
Python
bsd-3-clause
689
identifier = 'edu.cmu.sv.componentGraph' name = 'Component Graph' version = '1.0.0' def menu_items(): """menu_items() -> tuple of (str,function) It returns a list of pairs containing text for the menu and a callback function that will be executed when that menu item is selected. """ from test_for...
CMUSV-VisTrails/WorkflowRecommendation
vistrails/packages/componentGraph/__init__.py
Python
bsd-3-clause
1,248
# -*- coding: utf-8 -*- """ pyClanSphere.utils.support ~~~~~~~~~~~~~~~~~~~~~~~~~~ A support module. Provides various support methods and helpers. :copyright: (c) 2009 - 2010 by the pyClanSphere Team, (c) 2009 by Plurk Inc., see AUTHORS for more details. :license: B...
jokey2k/pyClanSphere
pyClanSphere/utils/support.py
Python
bsd-3-clause
1,485
#!/usr/bin/env python ''' A feature to download a file. It requires no previous steps. It provides the 'download_seturl' and 'download' steps ''' import os from waflib.TaskGen import feature import waflib.Logs as msg from orch.util import urlopen import orch.features orch.features.register_defaults( 'download'...
hwaf/hwaf
py-hwaftools/orch/features/feature_download.py
Python
bsd-3-clause
2,298
import io from unittest.mock import ANY, patch, PropertyMock from django.core.management.base import CommandError import pytest from pontoon.base.models import Project from pontoon.base.tests import ProjectFactory, TestCase from pontoon.base.utils import aware_datetime from pontoon.sync.management.commands import sy...
jotes/pontoon
pontoon/sync/tests/test_sync_projects.py
Python
bsd-3-clause
4,440
# Copyright 2010 Google Inc. All Rights Reserved. """Utilities for OAuth. Utilities for making it easier to work with OAuth. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import copy import httplib2 import logging import oauth2 as oauth import urllib import urlparse from anyjson import simplejson try: ...
motord/Motorcycle-Diaries
lib/apiclient/oauth.py
Python
bsd-3-clause
9,765
# -*- coding: utf-8 -*- # # dit documentation build configuration file, created by # sphinx-quickstart on Thu Oct 31 02:07:43 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All con...
Autoplectic/dit
docs/conf.py
Python
bsd-3-clause
11,712
# -*- coding: utf-8 -*- from models import * from django.contrib import admin from django.utils.html import format_html from django.utils.translation import ugettext_lazy as _ class ProjectAdmin(admin.ModelAdmin): fieldsets = [ (_(u"Проект"), {"fields": [ "name", "description", "logo", "user"...
ChaoticEvil/AtomicNote
apps/tasks/admin.py
Python
bsd-3-clause
2,956
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
zasdfgbnm/qutip
qutip/tests/test_wigner.py
Python
bsd-3-clause
6,312
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-06-18 14:57 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('testapp', '0001_initial'), ] operations = [ migrations.AlterField( ...
Kemaweyan/django-content-gallery
content_gallery_testapp/testapp/migrations/0002_auto_20170618_1457.py
Python
bsd-3-clause
475
""" Created on 19/mag/2013 @author: Marco Pompili """ from django.conf.urls import patterns, url from django.views.generic import ListView from .models import Gallery urlpatterns = patterns('', url(r'^$', ListView.as_view( queryset=Gallery.objects.all()[:], ...
marcopompili/django-galleries
django_galleries/urls.py
Python
bsd-3-clause
571
# -*- coding: utf-8 -*- """This code is a part of Hydra Toolkit .. module:: hydratk.translation.lib.network.email.client.en.messages :platform: Unix :synopsis: English language translation for EMAIL client messages .. moduleauthor:: Petr Rašek <bowman@hydratk.org> """ language = { 'name': 'English', '...
hydratk/hydratk-lib-network
src/hydratk/translation/lib/network/email/client/en/messages.py
Python
bsd-3-clause
1,250
#!/usr/bin/env python # -*- coding: utf-8 -*- import abc class Task(object): """ represents work to do """ __metaclass__ = abc.ABCMeta _is_done = False def __init__(self): """ constructor """ pass def run(self): self._is_done = True return self._run() ...
bjorskog/majordomo
majordomo/task.py
Python
bsd-3-clause
578
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 5, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 0);
antoinecarme/pyaf
tests/artificial/transf_Quantization/trend_LinearTrend/cycle_5/ar_/test_artificial_128_Quantization_LinearTrend_5__100.py
Python
bsd-3-clause
270
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contenttypes', '0002_remove_content_type_...
pydanny/django-admin2
djadmin2/migrations/0001_initial.py
Python
bsd-3-clause
1,700
# Create your views here. from django.apps import apps from functools import reduce get_model = apps.get_model from django.db import models from django.shortcuts import render_to_response from django.conf import settings from dojango.util import to_dojo_data, json_encode from dojango.decorators import json_response fr...
ofirr/dojango
dojango/views.py
Python
bsd-3-clause
14,326
import os INSTALLED_APPS = ( "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sitemaps", "django.contrib.admin", "django.contrib.staticfiles", "django.contrib.messages", "feincms", "feincms.module.medialibrary", "testapp", "el...
feincms/feincms-elephantblog
tests/testapp/settings.py
Python
bsd-3-clause
2,354
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import from django.conf import settings from django.core.management import execute_from_command_line import sys if not settings.configured: test_runners_args = {} settings.configure( DATABASES={ ...
climapulse/dj-labeler
runtests.py
Python
bsd-3-clause
999
DEVICES = { "iPhone": { "iOS-3.5-in": { "resize": (852, 1136), "crop": (212, 176) }, "iOS-4-in": { "resize": (852, 1136), "crop": (212, 0) }, "iOS-4.7-in": { "resize": (1000, 1334), "crop": (250, 0) ...
frankdilo/cropper-python
cropper/devices.py
Python
bsd-3-clause
715
# proxy module from __future__ import absolute_import from chaco.array_plot_data import *
enthought/etsproxy
enthought/chaco/array_plot_data.py
Python
bsd-3-clause
90
from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get get_bool = config.get_bool
mikeboers/siteconfig
siteconfig/__init__.py
Python
bsd-3-clause
208
__all__ = ["skeletonizer", "skeleton_analyser"] __version__ = "1.8.6" from . import skeleton_analyser from .skeleton_analyser import SkeletonAnalyser from .skeletonizer import skelet3d
mjirik/skelet3d
skelet3d/__init__.py
Python
bsd-3-clause
187
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('myhpom', '0012_auto_20180718_1140'), ] operations = [ migrations.AlterModelOptions( name='staterequirement', ...
ResearchSoftwareInstitute/MyHPOM
myhpom/migrations/0013_auto_20180720_0942.py
Python
bsd-3-clause
643
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('sistema', '0015_aporte'), ] operations = [ migrations.RenameField( ...
gabrielf10/webAmpunc
sistema/migrations/0016_auto_20161024_1447.py
Python
bsd-3-clause
1,903
import Decimal_pb2 import Log_pb2 import uRPC_pb2 import client import server
npalko/uRPC
python/urpc/__init__.py
Python
bsd-3-clause
78
# -*- coding: utf-8 -*- from django.http import Http404 from django.shortcuts import render from brigitte.repositories.decorators import repository_view @repository_view() def commits(request, repo, branchtag): count = 10 try: page = int(request.GET.get('page', 1)) except ValueError: pag...
stephrdev/brigitte
brigitte/commits/views.py
Python
bsd-3-clause
1,495
from django.apps import AppConfig from django.contrib import admin from django.contrib.admin.sites import AdminSite import session_csrf from session_csrf import anonymous_csrf class BaseConfig(AppConfig): name = 'pontoon.base' verbose_name = 'Base' _has_patched = False def ready(self): supe...
yfdyh000/pontoon
pontoon/base/apps.py
Python
bsd-3-clause
1,388
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-28 14:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Employee'...
Avinash-Raj/appengine-django-skeleton
todo/migrations/0001_initial.py
Python
bsd-3-clause
599
from ctypes import POINTER from ctypes import c_long from ctypes import c_uint32 from ctypes import c_void_p CFIndex = c_long CFStringEncoding = c_uint32 CFString = c_void_p CFArray = c_void_p CFDictionary = c_void_p CFError = c_void_p CFType = c_void_p CFAllocatorRef = c_void_p CFStringRef = POINTER(CFString) CFArra...
vasily-v-ryabov/ui-automation-course
1_Lyalyushkin/objc_constants.py
Python
bsd-3-clause
588
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
CMUSV-VisTrails/WorkflowRecommendation
vistrails/packages/persistence_exp/__init__.py
Python
bsd-3-clause
2,337
import json from PySide import QtCore, QtGui from ..fe import FE from ..widget_factory import EditorFactory from ..base_editor import BaseValueEditor from ..core.value_controller import MemberController class NestedEditor(BaseValueEditor): def __init__(self, valueController, parent=None): super(NestedEd...
goshow-jp/Kraken
Python/kraken/ui/HAppkit_Editors/editor_widgets/nested_editor.py
Python
bsd-3-clause
3,053
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 12, transform = "Difference", sigma = 0.0, exog_count = 100, ar_order = 12);
antoinecarme/pyaf
tests/artificial/transf_Difference/trend_MovingAverage/cycle_12/ar_12/test_artificial_1024_Difference_MovingAverage_12_12_100.py
Python
bsd-3-clause
273
from django.test import TestCase, Client from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from rest_framework import status from nose.tools import assert_equals class LogoutTest(TestCase): def setUp(self): self.client = Client() def test_unauthenticated_us...
SanaMobile/sana.protocol_builder
src-django/authentication/tests/test_logout.py
Python
bsd-3-clause
1,015
# -*- coding: utf-8 -*- from __future__ import unicode_literals import itertools import re from importlib import import_module from django.apps import apps from django.conf import settings from django.contrib.admin.models import LogEntry from django.contrib.auth import REDIRECT_FIELD_NAME, SESSION_KEY from django.con...
52ai/django-ccsds
tests/auth_tests/test_views.py
Python
bsd-3-clause
40,812
from mezzanine.pages.admin import PageAdmin from django.contrib.gis import admin from .models import * from dublincore.models import QualifiedDublinCoreElement class InlineDublinCoreMetadata(generic.GenericTabularInline): model = QualifiedDublinCoreElement class InlineResourceFiles(generic.GenericTabularInline): ...
hydroshare/hydroshare_temp
hs_core/admin.py
Python
bsd-3-clause
527
from webtest import TestApp as Client from .fixtures import ( template, template_inheritance, override_template, override_template_inheritance, ) def test_template(): c = Client(template.App()) response = c.get("/persons/world") assert ( response.body == b"""\ <html> <body...
morepath/more.jinja2
more/jinja2/tests/test_jinja2.py
Python
bsd-3-clause
1,589
from setuptools import setup, find_packages import sys, os version = '0.0' setup(name='PickleRPC', version=version, description="RPC using pickle", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='', auth...
Shea690901/mudrpc
python/lib/PickleRPC/setup.py
Python
isc
690
from urllib import urlencode import json import os from geomancer.app_config import MANCER_KEYS from geomancer.helpers import encoded_dict from geomancer.mancers.geotype import State, StateFIPS from geomancer.mancers.base import BaseMancer, MancerError from string import punctuation import re from urlparse import urlpa...
datamade/geomancer
geomancer/mancers/bea.py
Python
mit
5,355
from event import Event class FocusEvent(Event): FOCUS_IN = "focusIn" FOCUS_OUT = "focusOut" KEY_FOCUS_CHANGE = "keyFocusChange" MOUSE_FOCUS_CHANGE = "mouseFocusChange" def __init__(self, etype, bubbles=True, cancelable=False, relatedObject=None, shiftKey=None, keyCode=0, ...
wannaphongcom/flappy
flappy/events/focusevent.py
Python
mit
1,029
import unittest from extensions.banking.balance import BankingBalanceExtension class BankBalanceExtensionTests(unittest.TestCase): def setUp(self): self.bot = None self.clientid = "testid" def test_balance(self): balance = BankingBalanceExtension() self.assertIsNotNone(balan...
CHT5/program-y
bots/y-bot/src/test/extensions/banking/test_balance.py
Python
mit
467
#!/usr/bin/python # -*- coding: utf-8 -*- import lxml.html from mock import Mock from preggy import expect from holmes.config import Config from holmes.reviewer import Reviewer from holmes.facters.head import HeadFacter from tests.unit.base import FacterTestCase from tests.fixtures import PageFactory class TestHead...
marcelometal/holmes-api
tests/unit/facters/test_head.py
Python
mit
2,889
#!/usr/bin/env python """ Test rate-limiter lib """ import logging import sys import time import unittest from google.appengine.api import memcache from google.appengine.ext import testbed from lib import Limiter, QuotaKey class Events: USER_READ = 1 USER_WRITE = 2 RATE_LIMIT_SPEC = { Events.USER_READ: ...
peterjliu/rate_limit
test_lib.py
Python
mit
2,134
# external imports import unittest # local imports import nautilus from nautilus.api.endpoints import GraphQLRequestHandler from ..util import Mock class TestUtil(unittest.TestCase): def setUp(self): # create a service without an explict name class MyService(nautilus.Service): pass # save ...
aaivazis/nautilus
tests/services/test_service.py
Python
mit
2,991
#### 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/creature/npc/droid/crafted/shared_it_o_interrogator_advanced.iff" result.att...
anhstudios/swganh
data/scripts/templates/object/creature/npc/droid/crafted/shared_it_o_interrogator_advanced.py
Python
mit
492
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-24 18:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nomi', '0093_userprofile_user_img'), ] operations = [ migrations.RemoveFiel...
SummerCamp17/Gymkhana-Nominations
nomi/migrations/0094_auto_20170624_1845.py
Python
mit
691
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'django', 'USER': 'django', 'PASSWORD': 'PUTPASSWORDHERE', 'HOST': '127.0.0.1', 'PORT': '5432', } }
makiwara/onemoretime
settings/db_settings_sample.py
Python
mit
267
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-02 05:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
mtzirkel/leakyskiff
quiz/multichoice/migrations/0001_initial.py
Python
mit
1,525
#!/usr/bin/python """ PunkMoney 0.2 :: graph.py Calculates karma as PageRank in the thank-you graph. """ # Create a graph import networkx as nx from networkx.exception import NetworkXError from mysql import Connection from pprint import pprint import math import operator class Karma(Connection): def __init_...
webisteme/punkmoney
tracker/utils/graph.py
Python
mit
1,913
import django django.setup() from django.contrib.auth.models import User users = User.objects.all().order_by("last_name") program = None exports = [] for user in users: try: apps = user.profile.applications.all() except: apps = None if apps: for a in apps: #print a ...
carthage-college/django-djspace
djspace/bin/applications.py
Python
mit
543
# This file is autogenerated by the get_windows_info.py script # Do not edit. win_tz = { 'AUS Central Standard Time': 'Australia/Darwin', 'AUS Eastern Standard Time': 'Australia/Sydney', 'Afghanistan Standard Time': 'Asia/Kabul', 'Alaskan Standard Time': 'America/Anchorage', 'Arab Standard Time': 'A...
immanetize/nikola
nikola/packages/tzlocal/windows_tz.py
Python
mit
26,452
from kervi.hal.gpio import IGPIODeviceDriver class GPIODriver(IGPIODeviceDriver): def __init__(self, gpio_id="generic_gpio"): IGPIODeviceDriver.__init__(self, gpio_id) pass def _get_channel_type(self, channel): from kervi.hal.gpio import CHANNEL_TYPE_GPIO, CHANNEL_TYPE_ANALOG_IN, CHA...
kervi/kervi
kervi-hal-win/kervi/platforms/windows/gpio.py
Python
mit
1,575
# -*- coding: utf-8 -*- import asyncio from aiohttp import wsgi from irc3 import plugin import json @plugin class Webapp: requires = ['irc3.plugins.userlist'] def __init__(self, bot): def server(): return wsgi.WSGIServerHttpProtocol(self.wsgi) self.bot = bot loop = asynci...
gawel/irc3
examples/wsgiapp.py
Python
mit
726
from __future__ import unicode_literals try: from django.urls import re_path except ImportError: from django.conf.urls import url as re_path from django.shortcuts import render from django.views.decorators.http import require_GET from paypal.standard.pdt.views import process_pdt @require_GET def pdt(request...
spookylukey/django-paypal
paypal/standard/pdt/tests/test_urls.py
Python
mit
755
# -*- coding: utf-8 -*- # This file is part of the pymfony package. # # (c) Alexandre Quercia <alquerci@email.com> # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. from __future__ import absolute_import; import os.path; import re; from pick...
pymfony/pymfony
src/pymfony/component/config/resource.py
Python
mit
5,243
from db_connector import RevisionDB import datetime class QueryHandler(object): data={} #function which get the quantity of revisions #tested @classmethod def filter_by_user(self,values): #values is a list composed by 1 value, the user name to filter by data={'user':values[0]} ...
frankjdelgado/wiki-history-extractor
query_handler/query_handler.py
Python
mit
8,093
# author: Fei Gao # # Unique Paths # # A robot is located at the top-left corner of a m x n grid (marked 'Start' in # the diagram below). # The robot can only move either down or right at any point in time. The robot # is trying to reach the bottom-right corner of the grid (marked 'Finish' in # the diagram below). # Ho...
feigaochn/leetcode
p62_unique_paths.py
Python
mit
892
class Solution: def postorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ if root is None: return [] else: return list(self.postorderTraversalGen(root)) def postorderTraversalGen(self, node): i...
xiao0720/leetcode
145/Solution.py
Python
mit
597
from datetime import date, timedelta from django.db import models from django.contrib.sites.models import Site from django.core.validators import MinValueValidator from clubdata.models import Club def range_date_inclusive(start_date, end_date): for n in range((end_date - start_date).days+1): yield start_da...
InfoSec-CSUSB/club-websystem
src/events/models.py
Python
mit
10,430
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_namespace_patch.py
Python
mit
1,536
from unittest import TestCase from similarityPy.algorithms.find_nearest import FindNearest from tests import test_logger __author__ = 'cenk' class FindNearestTest(TestCase): def setUp(self): pass def test_algorithm(self): test_logger.debug("FindNearestTest - test_algorithm Starts") ...
pombredanne/similarityPy
tests/algorihtm_tests/find_nearest_test.py
Python
mit
651
if __name__ == '__main__': import sys print(sys.modules) print(list(sys.modules.keys())) print(sys) print(sys.modules['sys']) print(sys.builtin_module_names)
ordinary-developer/lin_education
books/techno/python/programming_python_4_ed_m_lutz/code/chapter_2/08_the_loaded_modules_table/main.py
Python
mit
183
#!/usr/bin/env python ''' Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework. This module contains the core framework classes that form the basis of specific test cases and suites (TestCase, TestSuite etc.), and also a text-based utility class for running the...
ai-ku/langvis
jython-2.1/Lib/unittest.py
Python
mit
25,555
"""SCons.Tool.jar Tool-specific initialization for jar. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to...
engineer0x47/SCONS
engine/SCons/Tool/jar.py
Python
mit
4,116
''' Copyright (c) 2010 Brookhaven National Laboratory All rights reserved. Use is subject to license terms and conditions. Created on Jan 10, 2013 @author: shroffk ''' from setuptools import setup setup(name='pyOlog', version='0.3.0', description='Python Olog Client Lib', author='Kunal Shroff', ...
tacaswell/pyOlog
setup.py
Python
mit
640
import unittest from biokbase.narrative.contents.manager_util import base_model class ManagerUtilTestCase(unittest.TestCase): def test_base_model(self): name = "foo" path = "bar" model = base_model(name, path) self.assertIn("name", model) self.assertEqual(model["name"], nam...
kbase/narrative
src/biokbase/narrative/tests/test_content_manager_util.py
Python
mit
1,027
"""Support for Blockchain.com sensors.""" from __future__ import annotations from datetime import timedelta import logging from pyblockchain import get_balance, validate_address import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import ATTR_ATT...
rohitranjan1991/home-assistant
homeassistant/components/blockchain/sensor.py
Python
mit
1,990
from django.contrib import admin from .models import Post class PostAdmin(admin.ModelAdmin): list_display = ('user', 'mood', 'mood_positive', 'mood_negative', 'mood_neutral', 'created') list_filter = ('mood', 'created') admin.site.register(Post, PostAdmin)
pavlenko-volodymyr/codingmood
codemood/social/admin.py
Python
mit
270
# -*- coding: utf-8 -*- # Copyright © 2012-2015 Roberto Alsina and others. # 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 t...
immanetize/nikola
nikola/plugins/command/deploy.py
Python
mit
6,002
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2019 The Starwels developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Starwels test fr...
starwels/starwels
test/functional/test_framework/messages.py
Python
mit
39,514
from rest_framework import status, viewsets from rest_framework.response import Response from crowdsourcing.serializers.project import * from crowdsourcing.serializers.task import TaskWorkerSerializer from rest_framework.decorators import detail_route, list_route from crowdsourcing.models import Module, Category, Proje...
tanujs22/crowdsource-platform
crowdsourcing/viewsets/project.py
Python
mit
18,897
# ------------------------------------------------------------------------------ # class Attributes (object) : # FIXME: add method sigs # -------------------------------------------------------------------------- # def __init__ (self, vals={}) : raise Exception ("%s is not implemented" % se...
JensTimmerman/radical.pilot
docs/architecture/api_draft/attributes.py
Python
mit
430
#### 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/dna/shared_dna_template_brackaset.iff" result.attribute_t...
anhstudios/swganh
data/scripts/templates/object/tangible/component/dna/shared_dna_template_brackaset.py
Python
mit
485
import copy import cPickle import json import logging import os import sys from nltk.corpus import stopwords as nltk_stopwords from pymachine.definition_parser import read_defs from pymachine.machine import Machine from pymachine.control import ConceptControl from pymachine.utils import MachineGraph, MachineTraverser ...
kornai/4lang
src/fourlang/lexicon.py
Python
mit
15,540
import copy from datetime import datetime import mock try: import unittest2 as unittest except ImportError: import unittest from testrail.helper import TestRailError from testrail.milestone import Milestone from testrail.project import Project class TestCaseType(unittest.TestCase): def setUp(self): ...
travispavek/testrail-python
tests/test_milestone.py
Python
mit
8,332
n = int(input()) grid = [[int(c) for c in input()] for i in range (0, n)] cavities = [] for i in range(0, n): if i > 0 and i < n - 1: for j in range(0, n): if j > 0 and j < n - 1: v = grid[i][j] if grid[i - 1][j] < v and grid[i + 1][j] < v and grid[i][j - 1] <...
amol9/hackerearth
hackerrank/practice/cavity_map/solution.py
Python
mit
500
"""Convert between larger integers and chunks of smaller integers and booleans. Note: chunks have little-endian bit-order like gmpy2.(un)pack, but reverse of numpy.(un)packbits """ from itertools import compress, zip_longest __all__ = ['chunkreverse', 'pack', 'unpack', 'packbools', 'unpackbools'] NBITS = {'B'...
xflr6/bitsets
bitsets/transform.py
Python
mit
2,607
#### 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_weaponsmith_trainer_02.iff" result.attribute_template_...
anhstudios/swganh
data/scripts/templates/object/mobile/shared_dressed_weaponsmith_trainer_02.py
Python
mit
455
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # dramavis by frank fischer (@umblaetterer) & christopher kittel (@chris_kittel) import networkx as nx import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import os import math import numpy as np from tqdm import tqdm def plot_superposter(corpus, ou...
chreman/dramavis
superposter.py
Python
mit
8,984
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitsend Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test ZMQ interface # from test_framework.test_framework import BitsendTestFramework from test_framew...
madzebra/BitSend
qa/rpc-tests/zmq_test.py
Python
mit
3,224
# -*- coding: utf-8 -*- """ This file is covered by the LICENSING file in the root of this project. """ import os # "javascript" section for javascript. see @app.route('/config.js') in app/views.py # NOTE: all following key/secrets for test purpose. ENDPOINT_WEB = os.getenv("ENDPOINT_WEB", "http://localhost") # host ...
juniwang/open-hackathon
open-hackathon-client/src/client/config_docker.py
Python
mit
7,716
# -*- coding: utf-8 -*- """ Test the "backup" function, which saves sheet data to file. """ import sheetsync import time, os CLIENT_ID = os.environ['SHEETSYNC_CLIENT_ID'] CLIENT_SECRET = os.environ['SHEETSYNC_CLIENT_SECRET'] TESTS_FOLDER_KEY = os.environ.get("SHEETSYNC_FOLDER_KEY") SHEET_TO_BE_BACKED_UP = "1-HpLBDv...
blakehawkins/SheetSync
tests/test_backup.py
Python
mit
1,701
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The official Beta Wiki. class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'fon' self.langs = { 'en': None, } def hostname(self, code): re...
pywikibot/core-migration-example
pywikibot/families/fon_family.py
Python
mit
455
import fnmatch from rosbridge_library.capability import Capability class UnadvertiseService(Capability): # unadvertise_service_msg_fields = [(True, "service", (str, unicode))] services_glob = None def __init__(self, protocol): # Call superclass constructor Capability.__init__(self, prot...
hcrlab/access_teleop
rosbridge_suite/rosbridge_library/src/rosbridge_library/capabilities/unadvertise_service.py
Python
mit
2,016
'''Tools for working with files in the samtools pileup -c format.''' import collections import pysam PileupSubstitution = collections.namedtuple("PileupSubstitution", " ".join(( "chromosome", ...
kyleabeauchamp/pysam
pysam/Pileup.py
Python
mit
8,975
# Copyright 2017 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
martbhell/wasthereannhlgamelastnight
src/lib/google/api_core/datetime_helpers.py
Python
mit
8,995
import requests import re,time import xbmc,xbmcaddon from ..scraper import Scraper from ..common import clean_title,clean_search,send_log,error_log dev_log = xbmcaddon.Addon('script.module.universalscrapers').getSetting("dev_log") requests.packages.urllib3.disable_warnings() s = requests.session() User_Age...
repotvsupertuga/tvsupertuga.repository
script.module.universalscrapers/lib/universalscrapers/scraperplugins/unsure/filmapik.py
Python
gpl-2.0
5,801
# -*- coding: utf-8 -*- # B2SHARE2.api.py from __future__ import absolute_import # The current user is implicitly used throughout the API from flask.login import current_user # TODO: # - versioning of community, schema, records: # - schemas change to new schemas with new ids # - records change to new v...
nharraud/b2share
invenio/b2share/b2share_api.py
Python
gpl-2.0
10,207
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
inspirehep/invenio
modules/bibcheck/lib/plugins/rename_subfield.py
Python
gpl-2.0
1,062
# -*- coding: utf-8 -*- # Copyright (C) 2003 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.net> # # 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 ...
bks/veusz
veusz/windows/mainwindow.py
Python
gpl-2.0
53,469
import datetime import logging import json from pylons import request, response, session, tmpl_context as c from zkpylons.lib.helpers import redirect_to from pylons.controllers.util import Response, redirect from pylons.decorators import validate, jsonify from pylons.decorators.rest import dispatch_on from formenco...
neillc/zookeepr
zkpylons/controllers/invoice.py
Python
gpl-2.0
16,775
from rest_framework.test import APITestCase from rest_framework.test import APIRequestFactory, APIClient, \ force_authenticate from api.views import TripleStoreList from api.tests.common import setup_user class TestTripleStoresView(APITestCase): def setUp(self): self.factory = APIRequestFactory() ...
geolinkedata/geolod-api
api/tests/test_triplestores.py
Python
gpl-2.0
1,415
# Welcome spoke classes # # Copyright (C) 2011-2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distribute...
marmarek/anaconda
pyanaconda/ui/gui/spokes/welcome.py
Python
gpl-2.0
15,586
#!/usr/bin/env python """ A simple interface to download Sentinel-1 and Sentinel-2 datasets from the COPERNICUS Sentinel Hub. """ from functools import partial import hashlib import os import datetime import sys import xml.etree.cElementTree as ET import re import requests from concurrent import futures import loggin...
jgomezdans/grabba_grabba_hey
grabba_grabba_hey/sentinel3_downloader.py
Python
gpl-2.0
9,042
""" KeepNote Listener (Observer) pattern """ # # 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 GNU General Public License as published by # the Free Softw...
brotchie/keepnote
keepnote/listening.py
Python
gpl-2.0
2,204
################################################################################ # $Id: output.py 2552 2007-02-08 21:40:46Z b4rt $ # $Date: 2007-02-08 15:40:46 -0600 (Thu, 08 Feb 2007) $ # $Revision: 2552 $ ################################################################################ # ...
sulaweyo/torrentflux-b4rt-php7
html/bin/clients/fluazu/fluazu/output.py
Python
gpl-2.0
3,408
""" Utility classes and functions to handle Virtual Machine creation using libvirt. :copyright: 2011 Red Hat Inc. """ import time import string import os import logging import fcntl import re import shutil import tempfile import platform import aexpect from avocado.utils import process from avocado.utils import cryp...
CongLi/avocado-vt
virttest/libvirt_vm.py
Python
gpl-2.0
106,547