commit
stringlengths
40
40
subject
stringlengths
1
1.49k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
new_contents
stringlengths
1
29.8k
old_contents
stringlengths
0
9.9k
lang
stringclasses
3 values
proba
float64
0
1
bd5e4dc55341e6ec98bf17211d7c3c6fdb99a3b1
Use country_template in test_extra_params
tests/core/test_extra_params.py
tests/core/test_extra_params.py
# -*- coding: utf-8 -*- from openfisca_core import periods from openfisca_core.columns import IntCol, BoolCol from openfisca_core.periods import MONTH from openfisca_core.variables import Variable from openfisca_country_template import CountryTaxBenefitSystem from openfisca_country_template.entities import Person fro...
# -*- coding: utf-8 -*- from openfisca_core import periods from openfisca_core.columns import IntCol, BoolCol from openfisca_core.periods import MONTH from openfisca_core.variables import Variable import openfisca_dummy_country as dummy_country from openfisca_dummy_country.entities import Individu from openfisca_core...
Python
0.000031
205df82b9eabed709db90c8de3473a883c9c2c1b
reorder tinymce toolbars
wheelcms_axle/settings/settings_tinymce.py
wheelcms_axle/settings/settings_tinymce.py
TINYMCE_DEFAULT_CONFIG = { 'theme': "advanced", 'content_css': '/static/css/wheel_content.css', 'style_formats': [ { 'title': 'Images'}, { 'title': 'Original Size Image', 'selector': 'img', 'attributes': {'class': 'img_content_original' }}, { 'title': 'Thumbnail Image', 'selector': ...
TINYMCE_DEFAULT_CONFIG = { 'theme': "advanced", 'content_css': '/static/css/wheel_content.css', 'style_formats': [ { 'title': 'Images'}, { 'title': 'Original Size Image', 'selector': 'img', 'attributes': {'class': 'img_content_original' }}, { 'title': 'Thumbnail Image', 'selector': ...
Python
0.000001
e9bac7c9d980889cbab098934c392b7514c41a00
remove printall plugin.
plugins/default.py
plugins/default.py
from alebot import Alebot, Hook, Event class ConnectionReadyHook(Hook): """ This is a hook that can be subclassed in case you want to react on a irc connection that is ready for commands. It waits for the end of the motd, or the message that there is no motd. The :func:`match` fun...
from alebot import Alebot, Hook, Event class ConnectionReadyHook(Hook): """ This is a hook that can be subclassed in case you want to react on a irc connection that is ready for commands. It waits for the end of the motd, or the message that there is no motd. The :func:`match` fun...
Python
0
6015cb96e4a35112efcf0ee35e38c88a94a58004
Add API key to headers
cogs/diffusion.py
cogs/diffusion.py
import asyncio import json import backoff from typing import Any, Literal from discord import Embed from discord.ext import commands from aiohttp import ClientResponseError from bot import QTBot from utils.custom_context import CustomContext class DiffusionError(Exception): pass class Diffusion(commands.Cog): ...
import asyncio import backoff from typing import Any, Literal from discord import Embed from discord.ext import commands from aiohttp import ClientResponseError from bot import QTBot from utils.custom_context import CustomContext class DiffusionError(Exception): pass class Diffusion(commands.Cog): INPUT = ...
Python
0
1363a09366594602562bcf34a5368c71299c4755
Add zero in lol-regexp
plugins/lolrate.py
plugins/lolrate.py
from datetime import datetime from toflib import cmd, Plugin import re class TimeSlice(): def __init__(self): t = datetime.now() self.date = t.date() self.hour = t.hour self.kevins = dict() self.count = 0 def __str__(self): return "%s %02dh-%02dh : %d lolz" % (...
from datetime import datetime from toflib import cmd, Plugin import re class TimeSlice(): def __init__(self): t = datetime.now() self.date = t.date() self.hour = t.hour self.kevins = dict() self.count = 0 def __str__(self): return "%s %02dh-%02dh : %d lolz" % (...
Python
0.999315
4d2f3431c587015d6962250fcc4ebcda06f0f988
Update TOKEN_INCORRECT_CVV error in dummy payment
saleor/payment/gateways/dummy/__init__.py
saleor/payment/gateways/dummy/__init__.py
import uuid from typing import Optional from ... import TransactionKind from ...interface import GatewayConfig, GatewayResponse, PaymentData TOKEN_PREAUTHORIZE_SUCCESS = "4111111111111112" TOKEN_PREAUTHORIZE_DECLINE = "4111111111111111" TOKEN_EXPIRED = "4000000000000069" TOKEN_INSUFFICIENT_FUNDS = "4000000000009995" ...
import uuid from typing import Optional from ... import TransactionKind from ...interface import GatewayConfig, GatewayResponse, PaymentData TOKEN_PREAUTHORIZE_SUCCESS = "4111111111111112" TOKEN_PREAUTHORIZE_DECLINE = "4111111111111111" TOKEN_EXPIRED = "4000000000000069" TOKEN_INSUFFICIENT_FUNDS = "4000000000009995" ...
Python
0
7b77d2569b8056c4c1b184503165a81a426df2e9
Allow configuring separator in headeranchor
mdownx/headeranchor.py
mdownx/headeranchor.py
""" mdownx.headeranchor An extension for Python Markdown. Github header anchors MIT license. Copyright (c) 2014 Isaac Muse <isaacmuse@gmail.com> 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 w...
""" mdownx.headeranchor An extension for Python Markdown. Github style tasklists MIT license. Copyright (c) 2014 Isaac Muse <isaacmuse@gmail.com> 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 ...
Python
0
bfb014b65932902f9cc07bc85c3aadfdb320c438
add static config
chapter5/growth_studio/settings.py
chapter5/growth_studio/settings.py
""" Django settings for growth_studio project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ imp...
""" Django settings for growth_studio project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ imp...
Python
0
a9fd9bcecc5d237d767a2fbb773e0780cce7fa99
Add combinations of all the python bins.
tests/functional/test_create.py
tests/functional/test_create.py
import os import sys import pytest import scripttest IS_WINDOWS = ( sys.platform.startswith("win") or (sys.platform == "cli" and os.name == "nt") ) IS_26 = sys.version_info[:2] == (2, 6) PYTHON_BINS = [ "C:\\Python27\\python.exe", "C:\\Python27-x64\\python.exe", "C:\\Python33\\python.exe", "C...
import os import sys import pytest import scripttest is_windows = ( sys.platform.startswith("win") or (sys.platform == "cli" and os.name == "nt") ) is_26 = sys.version_info[:2] == (2, 6) @pytest.yield_fixture def env(request): env = scripttest.TestFileEnvironment() try: yield env finall...
Python
0
c407d023a59b5863b5890836c17a1aa1208244fa
use local_base_url from webfront to compose the API URL
tests/functional/test_webapi.py
tests/functional/test_webapi.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import requests from ava.util.tests import AgentTest SUCCESS = 'success' ERROR = 'error' class TestWebAPI(AgentTest): # api_url = 'http://127.0.0.1:5080/api' api_url = '' @classmethod def se...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import requests from ava.util.tests import AgentTest SUCCESS = 'success' ERROR = 'error' class TestWebAPI(AgentTest): api_url = 'http://127.0.0.1:5080/api' def test_ping(self): r = requests....
Python
0
6028ae4c2c75a29c0a050429f7ab76da129791fd
Improve keosd_auto_launch_test by checking stderr
tests/keosd_auto_launch_test.py
tests/keosd_auto_launch_test.py
#!/usr/bin/env python3 # This script tests that cleos launches keosd automatically when keosd is not # running yet. import subprocess def run_cleos_wallet_command(command: str, no_auto_keosd: bool): """Run the given cleos command and return subprocess.CompletedProcess.""" args = ['./programs/cleos/cleos'] ...
#!/usr/bin/env python3 # This script tests that cleos launches keosd automatically when keosd is not # running yet. import subprocess def run_cleos_wallet_command(command: str, no_auto_keosd: bool): """Run the given cleos command and return subprocess.CompletedProcess.""" args = ['./programs/cleos/cleos'] ...
Python
0.000001
ae1469e450616ba1ac50958262c2c834b75fc77c
store reference type in lowercase
citeproc/source/bibtex/bibparse.py
citeproc/source/bibtex/bibparse.py
#!/usr/bin/python # # Simple, naive bibtex parser # # Vassilios Karakoidas (2008) - vassilios.karakoidas@gmail.com # # bib categories # # @Article{ # @Book{ # @Booklet{ # @InBook{ # @InCollection{ # @InProceedings{ # @Manual{ # @MastersThesis{ # @Misc{ # @PhDThesis{ # @Proceedings{ # @TechReport{ # @Unpublished{ # i...
#!/usr/bin/python # # Simple, naive bibtex parser # # Vassilios Karakoidas (2008) - vassilios.karakoidas@gmail.com # # bib categories # # @Article{ # @Book{ # @Booklet{ # @InBook{ # @InCollection{ # @InProceedings{ # @Manual{ # @MastersThesis{ # @Misc{ # @PhDThesis{ # @Proceedings{ # @TechReport{ # @Unpublished{ # i...
Python
0.000334
d43ddab5908a543236a05860fb15658ec154aa5b
Fix import in test
tests/outputs/gstreamer_test.py
tests/outputs/gstreamer_test.py
import multiprocessing import unittest from mopidy.outputs.gstreamer import GStreamerOutput from mopidy.utils.path import path_to_uri from mopidy.utils.process import pickle_connection from tests import data_folder, SkipTest class GStreamerOutputTest(unittest.TestCase): def setUp(self): self.song_uri = p...
import multiprocessing import unittest from mopidy.outputs.gstreamer import GStreamerOutput from mopidy.process import pickle_connection from mopidy.utils.path import path_to_uri from tests import data_folder, SkipTest class GStreamerOutputTest(unittest.TestCase): def setUp(self): self.song_uri = path_to...
Python
0.000001
010a827abdc891bd79f7474c5ef65b991edf2a1b
Update candidate_party_corrections.py
calaccess_processed/candidate_party_corrections.py
calaccess_processed/candidate_party_corrections.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Includes correct party affiliation for candidate in specific contests. """ corrections = ( # http://elections.cdn.sos.ca.gov/statewide-elections/2014-primary/updated-contact-info.pdf # noqa ('WINSTON, ALMA MARIE', 2014, 'PRIMARY', 'GOVERNOR', 'REPUBLICAN'), ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Includes correct party affiliation for candidate in specific contests. """ corrections = ( # http://elections.cdn.sos.ca.gov/statewide-elections/2014-primary/updated-contact-info.pdf # noqa ('WINSTON, ALMA MARIE', 2014, 'PRIMARY', 'GOVERNOR', 'REPUBLICAN'), ...
Python
0.000001
4674a0ccbba7596cfcfd4cd21e3355b0afaa0c95
Fix l10n history movements
postatus/status.py
postatus/status.py
import requests import sys import time def format_time(t): return time.ctime(t) def format_short_date(t): return time.strftime('%m/%d', time.gmtime(t)) # ./bin/l10n_status.py --app=feedback --type=history --highlight=es,pt_BR,po,hu,de,gr,fr,it,ru,ja,tr,zh_TW,zh_CN https://input.mozilla.org/static/l10n_com...
import requests import sys import time def format_time(t): return time.ctime(t) def format_short_date(t): return time.strftime('%m/%d', time.gmtime(t)) # ./bin/l10n_status.py --app=feedback --type=history --highlight=es,pt_BR,po,hu,de,gr,fr,it,ru,ja,tr,zh_TW,zh_CN https://input.mozilla.org/static/l10n_com...
Python
0.006142
cc13845684230565fe8bb94f2877001af67a170d
Update %%powershell help
powershellmagic.py
powershellmagic.py
"""IPython magics for Windows PowerShell. """ __version__ = '0.1' import atexit import os from subprocess import Popen, PIPE import sys import tempfile from IPython.core.magic import (cell_magic, Magics, magics_class) from IPython.core.magic_arguments import ( argument, magic_arguments, parse_argstring) @magics...
"""IPython magics for Windows PowerShell. """ __version__ = '0.1' import atexit import os from subprocess import Popen, PIPE import sys import tempfile from IPython.core.magic import (cell_magic, Magics, magics_class) from IPython.core.magic_arguments import ( argument, magic_arguments, parse_argstring) @magics...
Python
0
af3ddbf32379ecf96224746eb59d0685be9586ae
Simplify compression
src/mock_vws/_mock_web_query_api.py
src/mock_vws/_mock_web_query_api.py
""" A fake implementation of the Vuforia Web Query API. See https://library.vuforia.com/articles/Solution/How-To-Perform-an-Image-Recognition-Query """ import email.utils import gzip import uuid from typing import Callable, List, Set from requests_mock import POST from requests_mock.request import _RequestObjectProx...
""" A fake implementation of the Vuforia Web Query API. See https://library.vuforia.com/articles/Solution/How-To-Perform-an-Image-Recognition-Query """ import email.utils import gzip import uuid from io import BytesIO from typing import Callable, List, Set from requests_mock import POST from requests_mock.request im...
Python
0.000068
c5ccf36fbeb6b744918e3090422763103b181de8
Fix name (copy paste fail...)
tests/test_tripleStandardize.py
tests/test_tripleStandardize.py
import json from ppp_nlp_classical import Triple, TriplesBucket, computeTree, simplify, buildBucket, DependenciesTree, tripleProduce1, tripleProduce2, tripleProduce3, buildTree from ppp_datamodel import Triple, Resource, Missing import data from unittest import TestCase class StandardTripleTests(TestCase): def ...
import json from ppp_nlp_classical import Triple, TriplesBucket, computeTree, simplify, buildBucket, DependenciesTree, tripleProduce1, tripleProduce2, tripleProduce3, buildTree from ppp_datamodel import Triple, Resource, Missing import data from unittest import TestCase class StandardTripleTests(TestCase): def ...
Python
0
fdd4a88c7a7981e8df1dd7da150b164c8121d4be
Add more youtube and vimeo links for testing
tests/testapp/test_embedding.py
tests/testapp/test_embedding.py
from django.test import TestCase from feincms3 import embedding class EmbeddingTest(TestCase): def test_no_handlers(self): """Embed video without handlers""" self.assertEqual(embedding.embed_video("stuff"), None) def test_youtube(self): """Test a youtube link""" self.assertEq...
from django.test import TestCase from feincms3 import embedding class EmbeddingTest(TestCase): def test_no_handlers(self): """Embed video without handlers""" self.assertEqual(embedding.embed_video("stuff"), None) def test_youtube(self): """Test a youtube link""" self.assertEq...
Python
0
c9d45a96236b822e2a5ca11490afdb02b9a5e699
Drop Py2 and six on tests/unit/states/test_modjk.py
tests/unit/states/test_modjk.py
tests/unit/states/test_modjk.py
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import salt.states.modjk as modjk from tests.support.unit import TestCase LIST_NOT_STR = "workers should be a list not a <class 'str'>" class ModjkTestCase(TestCase): """ Test cases for salt.states.modjk """ # 'worker_stopped' function ...
# -*- coding: utf-8 -*- """ :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Libs import salt.states.modjk as modjk from salt.ext import six # Import Salt Testing Libs from tests.support.unit import T...
Python
0
bfc0b99be74731639bca3536129e96e379281716
Simplify tests of venues POST requests
tests/unit/venues/test_views.py
tests/unit/venues/test_views.py
"""Unit tests for venues.views.""" from django.urls import reverse from mock import MagicMock from app.venues import factories, models, views import pytest def test_venue_list_view(client, mocker): # noqa: D103 # GIVEN a number of venues venues = factories.VenueFactory.build_batch(5) mocker.patch.objec...
"""Unit tests for venues.views.""" from django.urls import reverse from mock import MagicMock from app.venues import factories, models, views import pytest @pytest.mark.parametrize( 'url_name, venue_exists, template_name', [('venues:create', False, 'model_form.html'), ('venues:update', True, 'model_for...
Python
0.000007
0a84c767395bd8cb88711afae8bc94b045d50e78
Remove unused import
tests/utils/test_train_utils.py
tests/utils/test_train_utils.py
from typing import Any, Dict import numpy as np import pytest import rasa.utils.train_utils as train_utils from rasa.nlu.constants import NUMBER_OF_SUB_TOKENS from rasa.nlu.tokenizers.tokenizer import Token from rasa.shared.nlu.constants import ( SPLIT_ENTITIES_BY_COMMA_DEFAULT_VALUE, SPLIT_ENTITIES_BY_COMMA,...
from typing import Any, Dict import numpy as np import pytest import rasa.utils.train_utils as train_utils from rasa.core.policies.ted_policy import TEDPolicy from rasa.nlu.constants import NUMBER_OF_SUB_TOKENS from rasa.nlu.tokenizers.tokenizer import Token from rasa.shared.nlu.constants import ( SPLIT_ENTITIES_...
Python
0.000001
96dbf260a5c7bf9d5f89951f77792cf1c04d5e38
add profiling to perf.py
perf.py
perf.py
import cProfile import time from parinfer import indent_mode, paren_mode def timeProcess(string, options): numlines = len(string.splitlines()) print "Testing file with", numlines, "lines" t = time.clock() indent_mode(string, options) dt = time.clock() - t print "Indent Mode:", dt, "s" t = time.clock() ...
import time from parinfer import indent_mode, paren_mode def timeProcess(string, options): numlines = len(string.splitlines()) print "Testing file with", numlines, "lines" t = time.clock() indent_mode(string, options) dt = time.clock() - t print "Indent Mode:", dt, "s" t = time.clock() paren_mode(str...
Python
0.000001
e8df708d7d926d82a7df13031aabbfb64e7347b4
Change to work with entryparser changes
contrib/plugins/comments/xmlrpcplugins/pingback.py
contrib/plugins/comments/xmlrpcplugins/pingback.py
from config import py from libs.pyblosxom import PyBlosxom from libs.Request import Request from libs import tools import cgi, os, re, sgmllib, time, urllib class parser(sgmllib.SGMLParser): """ Shamelessly grabbed from Sam Ruby from http://www.intertwingly.net/code/mombo/pingback.py """ """ extract t...
from config import py from libs.pyblosxom import PyBlosxom from libs.Request import Request from libs import tools import cgi, os, re, sgmllib, time, urllib class parser(sgmllib.SGMLParser): """ Shamelessly grabbed from Sam Ruby from http://www.intertwingly.net/code/mombo/pingback.py """ """ extract t...
Python
0
dbb6fff417a3beac0db7dec603d4793eabc68a89
bump version but not calling it stable in readme yet
psiturk/version.py
psiturk/version.py
version_number = '2.2.4'
version_number = '2.2.3'
Python
0
e9fd001a21c594f3efd076aab73fdb3fafaa49f0
fix typo
tests/build_utilities/native_config.xpybuild.py
tests/build_utilities/native_config.xpybuild.py
import os, glob, logging from xpybuild.propertysupport import * from xpybuild.buildcommon import * from xpybuild.pathsets import * from xpybuild.utils.compilers import GCC, VisualStudio log = logging.getLogger('xpybuild.tests.native_config') # some basic defaults for recent default compilers for running our t...
import os, glob, logging from xpybuild.propertysupport import * from xpybuild.buildcommon import * from xpybuild.pathsets import * from xpybuild.utils.compilers import GCC, VisualStudio log = logging.getLogger('xpybuild.tests.native_config') # some basic defaults for recent default compilers for running our t...
Python
0.999991
bdaf7b8f30b6a3a493cc5246dd908bdcdff69ab8
Increase test coverage
tests/commands/load/test_load_cnv_report_cmd.py
tests/commands/load/test_load_cnv_report_cmd.py
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
Python
0
a403dff24e33e6b0ef0b31b4342a9b978f9090f2
Improve admin display
src/cerberus_ac/admin.py
src/cerberus_ac/admin.py
# -*- coding: utf-8 -*- """Admin module.""" from django.contrib import admin from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from .apps import AppSettings from .models import ( AccessHistory, PrivilegeHistory, Role...
# -*- coding: utf-8 -*- """Admin module.""" from django.contrib import admin from .models import ( AccessHistory, PrivilegeHistory, Role, RoleHierarchy, RolePrivilege) # class SecurityAdmin(AdminSite): # pass # # # class DataAdmin(AdminSite): # pass # # # class AuditAdmin(AdminSite): # pass # # # s...
Python
0
b7f4696d1384f656df71332055cd4ea87f85e3c9
Bump to v0.2.3.
luminoth/__init__.py
luminoth/__init__.py
__version__ = '0.2.3' __title__ = 'Luminoth' __description__ = 'Computer vision toolkit based on TensorFlow' __uri__ = 'https://luminoth.ai' __doc__ = __description__ + ' <' + __uri__ + '>' __author__ = 'Tryolabs' __email__ = 'luminoth@tryolabs.com' __license__ = 'BSD 3-Clause License' __copyright__ = 'Copyright (c)...
__version__ = '0.2.3dev0' __title__ = 'Luminoth' __description__ = 'Computer vision toolkit based on TensorFlow' __uri__ = 'https://luminoth.ai' __doc__ = __description__ + ' <' + __uri__ + '>' __author__ = 'Tryolabs' __email__ = 'luminoth@tryolabs.com' __license__ = 'BSD 3-Clause License' __copyright__ = 'Copyright...
Python
0
ea5e6ca2e6523f0b2a585112b5fd5f18e9fcf969
add namespace
ds9/library/parser.tac
ds9/library/parser.tac
%{ %} %token INT_ %token REAL_ %token STRING_ %token FOOCMD_ %token EXITCMD_ %token CLOSE_ %token FIT_ %token OPEN_ %token TO_ %% commands : commands command | command ; int : INT_ {set _ $1} ; command : FOOCMD_ foo | EXITCMD_ exit ; numeric : int {set _ $1} | REAL_ {set _ $1} ; foo : STRING_ {puts "STR...
%{ %} %token INT_ %token REAL_ %token STRING_ %token FOOCMD_ %token EXITCMD_ %token CLOSE_ %token FIT_ %token OPEN_ %token TO_ %% commands : commands command | command ; int : INT_ {set _ $1} ; command : FOOCMD_ foo | EXITCMD_ exit ; numeric : int {set _ $1} | REAL_ {set _ $1} ; foo : STRING_ {puts "STR...
Python
0.000015
818d89c897603eeb33caf1ca2cdaeae5c3010880
Use passed directory in mako engine.
engines/mako_engine.py
engines/mako_engine.py
#!/usr/bin/env python """Provide the mako templating engine.""" from __future__ import print_function from mako.template import Template from mako.lookup import TemplateLookup from . import Engine class MakoEngine(Engine): """Mako templating engine.""" handle = 'mako' def __init__(self, template, d...
#!/usr/bin/env python """Provide the mako templating engine.""" from __future__ import print_function from mako.template import Template from mako.lookup import TemplateLookup from . import Engine class MakoEngine(Engine): """Mako templating engine.""" handle = 'mako' def __init__(self, template, t...
Python
0
cb59aaff2d120ffa5f15b822ec21d3137f90184f
Bump logistic_requisition version - fixup
logistic_requisition/__openerp__.py
logistic_requisition/__openerp__.py
# -*- coding: utf-8 -*- # # # Author: Joël Grand-Guillaume, Jacques-Etienne Baudoux, Guewen Baconnier # Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Softw...
# -*- coding: utf-8 -*- # # # Author: Joël Grand-Guillaume, Jacques-Etienne Baudoux, Guewen Baconnier # Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Softw...
Python
0
13260904c6d34d7554eea8152ceaa2ee8601e3e9
Add missing import
pulldb/volumes.py
pulldb/volumes.py
# Copyright 2013 Russell Heilling from datetime import datetime, date import logging from math import ceil import re from google.appengine.api import search from google.appengine.ext import ndb import pycomicvine from pulldb import base from pulldb import publishers from pulldb import subscriptions from pulldb impo...
# Copyright 2013 Russell Heilling from datetime import datetime import logging from math import ceil import re from google.appengine.api import search from google.appengine.ext import ndb import pycomicvine from pulldb import base from pulldb import publishers from pulldb import subscriptions from pulldb import uti...
Python
0.000466
d3057d336332f8315580cc7fa7c6e3d3fb1cbcc8
Use a format-string to build the command
py3status/modules/taskwarrior.py
py3status/modules/taskwarrior.py
# -*- coding: utf-8 -*- """ Display tasks currently running in taskwarrior. Configuration parameters: cache_timeout: refresh interval for this module (default 5) format: display format for this module (default '{task}') filter: arguments passed to the command (default 'start.before:today status:pen...
# -*- coding: utf-8 -*- """ Display tasks currently running in taskwarrior. Configuration parameters: cache_timeout: refresh interval for this module (default 5) format: display format for this module (default '{task}') filter: arguments passed to the command (default 'start.before:today status:pen...
Python
0.00028
ae9b7bf45832b69f6a3ca94e24ed6d2e7d3a384d
Update __init__.py
gemstone/__init__.py
gemstone/__init__.py
""" Build microservices with Python """ from gemstone.core.microservice import MicroService from gemstone.core.decorators import private_api_method, public_method, event_handler from gemstone.core.handlers import TornadoJsonRpcHandler from gemstone.client.remote_service import RemoteService from gemstone.util import ...
""" Build microservices with Python """ from gemstone.core.microservice import MicroService from gemstone.core.decorators import private_api_method, public_method, event_handler from gemstone.core.handlers import TornadoJsonRpcHandler from gemstone.client.remote_service import RemoteService from gemstone.util import ...
Python
0.000072
322d10c8932f160a305fab126401e3f172453e7e
Refactor prototxt generation.
generate_prototxt.py
generate_prototxt.py
#!/usr/bin/python import os import sys caffe_root = os.getenv('CAFFE_ROOT', './') sys.path.insert(0, caffe_root + '/python') import caffe from caffe import layers as L, params as P def lenet(batch_size, phase): n = caffe.NetSpec() # empty layers as placeholders # the resulting prototxt must be edited m...
#!/usr/bin/python import os import sys caffe_root = os.getenv('CAFFE_ROOT', './') sys.path.insert(0, caffe_root + '/python') import caffe from caffe import layers as L, params as P def lenet(): n = caffe.NetSpec() # empty layers as placeholders # the resulting prototxt must be edited manually n.dat...
Python
0
739df1a5be70f5044d7c6be357776e36ae330ce3
Fix a bug in the OpenMP backend.
pyfr/backends/openmp/compiler.py
pyfr/backends/openmp/compiler.py
# -*- coding: utf-8 -*- import os import shutil import subprocess import tempfile import itertools as it from abc import ABCMeta, abstractmethod from ctypes import CDLL import numpy as np from pyfr.ctypesutil import platform_libname from pyfr.nputil import npdtype_to_ctypestype from pyfr.util import memoize, chdir ...
# -*- coding: utf-8 -*- import os import shutil import subprocess import tempfile import itertools as it from abc import ABCMeta, abstractmethod from ctypes import CDLL import numpy as np from pyfr.ctypesutil import platform_libname from pyfr.nputil import npdtype_to_ctypestype from pyfr.util import memoize, chdir ...
Python
0
81d41ceaf89848851d8353021f01f41c724aaae8
Add docstring to PySplunk
pygraphc/misc/splunk/pysplunk.py
pygraphc/misc/splunk/pysplunk.py
from os import system, remove class PySplunk(object): """Get log clustering using Python Splunk API [SplunkDev2016]_. References ---------- .. [SplunkDev2016] Command line examples in the Splunk SDK for Python. http://dev.splunk.com/view/python-sdk/SP-CAAAEFK """ def __...
from os import system, remove class PySplunk(object): def __init__(self, username, source, host, output_mode, tmp_file='/tmp/pysplunk_cluster.csv'): self.username = username self.source = source.replace(' ', '\ ') self.host = host self.output_mode = output_mode self.tmp_fil...
Python
0.000001
c3d856561887c61839a3781251f36929af0e8718
relax bool
pycaffe2/utils.py
pycaffe2/utils.py
from caffe2.proto import caffe2_pb2 from caffe.proto import caffe_pb2 from google.protobuf.message import DecodeError, Message from google.protobuf import text_format import numpy as np def CaffeBlobToNumpyArray(blob): return np.asarray(blob.data, dtype=np.float32).reshape( blob.num, blob.channels, blob.height...
from caffe2.proto import caffe2_pb2 from caffe.proto import caffe_pb2 from google.protobuf.message import DecodeError, Message from google.protobuf import text_format import numpy as np def CaffeBlobToNumpyArray(blob): return np.asarray(blob.data, dtype=np.float32).reshape( blob.num, blob.channels, blob.height...
Python
0.999777
931c016e43402f847c6e58b4679f7f5cf132776f
add DESI_LOGLEVEL environment variable, add doc, define WARNING... in module
py/desispec/log.py
py/desispec/log.py
""" Utility functions to dump log messages We can have something specific for DESI in the future but for now we use the standard python """ import sys import logging import os desi_logger = None # just for convenience to avoid importing logging # we duplicate the logging levels DEBUG=logging.DEBUG # Detailed ...
""" Utility functions to dump log messages We can have something specific for DESI in the future but for now we use the standard python """ import sys import logging desi_logger = None def get_logger(level=logging.DEBUG) : """ returns a default desi logger """ global desi_logger if desi_...
Python
0
c8c2785b156523204e530cd78268686886ce2a37
Fix incorrect module publics
py/oldfart/make.py
py/oldfart/make.py
import os import re import subprocess __all__ = ['NOTHING_DONE', 'SUCCESS', 'NO_RULE', 'FAILURE', 'Maker'] NOTHING_DONE = 1 SUCCESS = 2 NO_RULE = 3 FAILURE = 4 class Maker(object): def __init__(self, project_dir='.', makefile='Makefile'): self.project_dir = os.path.abspath(project_dir) self.m...
import os import re import subprocess __all__ = ['NOOP', 'SUCCESS', 'FAIL', 'Maker'] NOTHING_DONE = 1 SUCCESS = 2 NO_RULE = 3 FAILURE = 4 class Maker(object): def __init__(self, project_dir='.', makefile='Makefile'): self.project_dir = os.path.abspath(project_dir) self.makefile = os.path.absp...
Python
0.000025
89c2e367e4d691e83ccf92055c1dc8be59e05497
use list comprehensions for legibility
pynder/session.py
pynder/session.py
from . import api from . import models class Session(object): def __init__(self, facebook_id, facebook_token): self._api = api.TinderAPI() # perform authentication self._api.auth(facebook_id, facebook_token) self.profile = models.Profile(self._api.profile(), self) def nearby_...
from . import api from . import models class Session(object): def __init__(self, facebook_id, facebook_token): self._api = api.TinderAPI() # perform authentication self._api.auth(facebook_id, facebook_token) self.profile = models.Profile(self._api.profile(), self) def nearby_...
Python
0.000001
042c32cbeca30da82239e7f6b9d83e88a2391dce
Fix name mangling to also replace : with _
pybindgen/utils.py
pybindgen/utils.py
import sys from typehandlers.codesink import CodeSink from typehandlers.base import TypeConfigurationError, CodeGenerationError import version import settings def write_preamble(code_sink, min_python_version=(2, 3)): """ Write a preamble, containing includes, #define's and typedef's necessary to correctly...
import sys from typehandlers.codesink import CodeSink from typehandlers.base import TypeConfigurationError, CodeGenerationError import version import settings def write_preamble(code_sink, min_python_version=(2, 3)): """ Write a preamble, containing includes, #define's and typedef's necessary to correctly...
Python
0.000022
f2a83197d9e0eaf04a3c062aa9a16c197ffd3c4d
add error logging
pyroute2/proxy.py
pyroute2/proxy.py
''' Netlink proxy engine ''' import errno import struct import logging import traceback import threading class NetlinkProxy(object): ''' Proxy schemes:: User -> NetlinkProxy -> Kernel | <---------+ User <- NetlinkProxy <- Kernel ''' def __init__(...
''' Netlink proxy engine ''' import errno import struct import threading class NetlinkProxy(object): ''' Proxy schemes:: User -> NetlinkProxy -> Kernel | <---------+ User <- NetlinkProxy <- Kernel ''' def __init__(self, policy='forward', nl=None,...
Python
0.000004
82379ddc145673cca008127099e4bdc2e0aa503b
make sure we won't traverse 'None' object
pyswagger/scan.py
pyswagger/scan.py
from __future__ import absolute_import from .base import BaseObj from .utils import scope_compose import six def default_tree_traversal(root): """ default tree traversal """ objs = [(None, None, root)] while len(objs) > 0: scope, name, obj = objs.pop() # get children new_scope = s...
from __future__ import absolute_import from .base import BaseObj from .utils import scope_compose import six def default_tree_traversal(root): """ default tree traversal """ objs = [(None, None, root)] while len(objs) > 0: scope, name, obj = objs.pop() # get children new_scope = s...
Python
0.99859
060f7400f27f0452eb4ed11ffed07aab16230126
Update cts link
pynayzr/streams.py
pynayzr/streams.py
# -*- coding: utf-8 -*- import os import asyncio import subprocess import tempfile from PIL import Image support_news = { 'ttv': 'https://www.youtube.com/watch?v=yk2CUjbyyQY', 'ctv': 'https://www.youtube.com/watch?v=hVNbIZYi1nI', 'cts': 'https://www.youtube.com/watch?v=TL8mmew3jb8', 'pts': 'https://ww...
# -*- coding: utf-8 -*- import os import asyncio import subprocess import tempfile from PIL import Image support_news = { 'ttv': 'https://www.youtube.com/watch?v=yk2CUjbyyQY', 'ctv': 'https://www.youtube.com/watch?v=XBne4oJGEhE', 'cts': 'https://www.youtube.com/watch?v=TL8mmew3jb8', 'pts': 'https://ww...
Python
0
1aa687b70aea9074ae28d1154ae0db4364add26e
Rewrite example.py.
pyoommf/example.py
pyoommf/example.py
from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange ene...
import sim, mesh # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange energy constant (J/m) H = (1e6, 0, 0) # external magnetic field (A/m) m_init = (0, 0, 1) # initial magneti...
Python
0.000003
50ae1d3fb7e14fec94831a4c6667c7b1ba2e073b
add python script
python/python2.py
python/python2.py
#!/usr/bin/python2 # -*- coding: UTF-8 -*- # install # sudo pip install pymongo # sudo pip install MySQL-python # sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Library/Python/2.7/site-packages/_mysql.so # sudo pip install requests # sudo pip install threadpool # s...
#!/usr/bin/python2 # -*- coding: UTF-8 -*- # install # sudo pip install pymongo # sudo pip install MySQL-python # sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Library/Python/2.7/site-packages/_mysql.so # sudo pip install requests # sudo pip install threadpool # s...
Python
0.000019
c0cbc2458c42bfb116c0d631c837f042f66d33a8
Add explanatory comments to Python varargs script
python/varargs.py
python/varargs.py
def f(x, y=1000, *z): print('x={} y={} z={}'.format(x,y,z)) f(0) # x=0, y=1000, z=() f(0,1) # x=0, y=1, z=() f(0,1,2) # x=0, y=1, z=(2,) f(0,1,2,3) # x=0, y=1, z=(2,3) f(0,1,2,3,4) # x=0, y=1, z=(2,3,4) f(*[i for i in rang...
def f(x, y=1000, *z): print('x={} y={} z={}'.format(x,y,z)) f(0) f(0,1) f(0,1,2) f(0,1,2,3) f(0,1,2,3,4) f(*[i for i in range(6)]) f(*range(7))
Python
0
04c3cac3054626773bc0434453378cb295f7e38c
Add handling of invalid values
pytus2000/read.py
pytus2000/read.py
import pandas as pd from .datadicts import diary def read_diary_file(path_to_file): return pd.read_csv( path_to_file, delimiter='\t', converters=_column_name_to_type_mapping(diary), low_memory=False # some columns seem to have mixed types ) def _column_name_to_type_mapping(m...
import pandas as pd from .datadicts import diary def read_diary_file(path_to_file): return pd.read_csv( path_to_file, delimiter='\t', nrows=50, converters=_column_name_to_type_mapping(diary), low_memory=False # some columns seem to have mixed types ) def _column_name...
Python
0.000007
fd421a4c5f7cdacdc98aa049b4650c9d1d62267a
Fix some issues with open.
grit/command/Open.py
grit/command/Open.py
from __future__ import absolute_import, division, print_function, unicode_literals import os import platform import random from grit import Call from grit import Git from grit import GitRoot from grit import Settings from grit.String import startswith HELP = """ grit open [filename] Open the filename as a Github...
from __future__ import absolute_import, division, print_function, unicode_literals import os import platform import random from grit import Call from grit import Git from grit import GitRoot from grit import Settings from grit.String import startswith HELP = """ grit open [filename] Open the filename as a Github...
Python
0
ace38408875e31e1dfc8e6b1f2e2bf956fffc761
- message type 'groupchat' is valid
pyxmpp/message.py
pyxmpp/message.py
# # (C) Copyright 2003 Jacek Konieczny <jajcus@bnet.pl> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, #...
# # (C) Copyright 2003 Jacek Konieczny <jajcus@bnet.pl> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, #...
Python
0.998913
dbde102d14632bbaef7d6319d0742ac2819d6e38
Implement the given spec.
mlab-ns-simulator/mlabsim/update.py
mlab-ns-simulator/mlabsim/update.py
""" This approximates the mlab-ns slice information gathering. The actual system uses nagios and we're not certain about the details. This much simplified version is just a web URL anyone may PUT data into. Warning: This doesn't have any security properties! We need a way to prevent the addition of malicious entrie...
""" This approximates the mlab-ns slice information gathering. The actual system uses nagios and we're not certain about the details. This much simplified version is just a web URL anyone may PUT data into. Warning: This doesn't have any security properties! We need a way to prevent the addition of malicious entrie...
Python
0.000495
b8fc002fbc8a83486567c232d62678c3b4bb39b8
Update new path
hassio/addons/git.py
hassio/addons/git.py
"""Init file for HassIO addons git.""" import asyncio import logging from pathlib import Path import shutil import git from .util import get_hash_from_repository from ..const import URL_HASSIO_ADDONS _LOGGER = logging.getLogger(__name__) class AddonsRepo(object): """Manage addons git repo.""" def __init__...
"""Init file for HassIO addons git.""" import asyncio import logging from pathlib import Path import shutil import git from .util import get_hash_from_repository from ..const import URL_HASSIO_ADDONS _LOGGER = logging.getLogger(__name__) class AddonsRepo(object): """Manage addons git repo.""" def __init__...
Python
0.000001
3ab50fb563a89449af94af0d870c6a6153afdb98
reformat as pep8
helper/listConcat.py
helper/listConcat.py
#!/usr/bin/env python # -*- coding: utf-8 -*- class listConcat: lists = None def add(self, listToAdd): if self.lists == None: self.lists = [listToAdd] return for i, l in enumerate(self.lists): if l[0] == listToAdd[-1]: self.lists[i] = listToA...
#!/usr/bin/env python # -*- coding: utf-8 -*- class listConcat: lists = None def add(self, listToAdd): if self.lists == None: self.lists = [listToAdd] return for i, l in enumerate(self.lists): if l[0] == listToAdd[-1]: self.lists[i] = listToAdd[:-1] + l return elif l[-1] == listToAdd[0]: ...
Python
0.999999
c52bb5699cc77d41095516c26ff909d856af8bd1
Add TODOs
src/cloud/firebase_io.py
src/cloud/firebase_io.py
import json from pyrebase import pyrebase from utils import TimeUtils class FirebaseIO(): def __init__(self): # pyrebase_config.json is of format # { # "apiKey": "xxx", # "authDomain": "xxx", # "databaseURL": "xxx", # "storageBucket": "xxx", ...
import json from pyrebase import pyrebase from utils import TimeUtils class FirebaseIO(): def __init__(self): # pyrebase_config.json is of format # { # "apiKey": "xxx", # "authDomain": "xxx", # "databaseURL": "xxx", # "storageBucket": "xxx", ...
Python
0.000001
e4be9429e050dae6b1c9e988fa3da3c3e9d1d417
Add bots root directory to parent.py
test/common/parent.py
test/common/parent.py
import os import sys TEST_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BOTS_DIR = os.path.join(os.path.dirname(TEST_DIR), "bots") sys.path.append(os.path.join(BOTS_DIR)) # for lib sys.path.append(os.path.join(BOTS_DIR, "machine")) sys.path.append(os.path.join(TEST_DIR, "common"))
import os import sys TEST_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BOTS_DIR = os.path.join(os.path.dirname(TEST_DIR), "bots") sys.path.append(os.path.join(BOTS_DIR, "machine")) sys.path.append(os.path.join(TEST_DIR, "common"))
Python
0
826f23f0fc7eea4c72dcc26f637f3752bee51b47
Allow tests to be called from parent directory of "test"
test/ctypesgentest.py
test/ctypesgentest.py
import optparse, sys, StringIO sys.path.append(".") # Allow tests to be called from parent directory with Python 2.6 sys.path.append("..") import ctypesgencore """ctypesgentest is a simple module for testing ctypesgen on various C constructs. It consists of a single function, test(). test() takes a string that repres...
import optparse, sys, StringIO sys.path.append("..") import ctypesgencore """ctypesgentest is a simple module for testing ctypesgen on various C constructs. It consists of a single function, test(). test() takes a string that represents a C header file, along with some keyword arguments representing options. It proces...
Python
0.000001
bd7a1f8fe5237efc0de9fd60ddc035cc4be620ca
Update path_helper.py
unintended_ml_bias/new_madlibber/path_helper.py
unintended_ml_bias/new_madlibber/path_helper.py
import os class PathHelper(object): def __init__(self, word_file, sentence_template_file, output_file): if not os.path.exists(word_file): raise IOError("Input word file '{}' does not exist!".format(word_file)) if not os.path.isfile(word_file): raise IOError("Input word file '{}' is not a file!"...
import os class PathHelper(object): def __init__(self, word_file, sentence_template_file, output_file): if not os.path.exists(word_file): raise IOError("Input word file '{}' does not exist!".format(word_file)) if not os.path.isfile(word_file): raise IOError("Input word file '{}' is not a file!".f...
Python
0.000004
3d4afd579bdd690c9fba94ee96e52257bf4d79d2
copy production procfile
reactive/huginn.py
reactive/huginn.py
from charms.reactive import ( hook, when, only_once, is_state ) import os.path as path from charmhelpers.core import hookenv, host from charmhelpers.core.templating import render from charmhelpers.fetch import apt_install from shell import shell # ./lib/nginxlib import nginxlib # ./lib/rubylib from r...
from charms.reactive import ( hook, when, only_once, is_state ) import os.path as path from charmhelpers.core import hookenv, host from charmhelpers.core.templating import render from charmhelpers.fetch import apt_install from shell import shell # ./lib/nginxlib import nginxlib # ./lib/rubylib from r...
Python
0
86216b39365a7877103dfe075bf8e08a8ce696d0
bump version
radar/__init__.py
radar/__init__.py
__version__ = '2.47.23'
__version__ = '2.47.22'
Python
0
3bfcc096acd5f3ed0cda2427bdc5177bd3e55dd7
bump version
radar/__init__.py
radar/__init__.py
__version__ = '2.46.26'
__version__ = '2.46.25'
Python
0
d94e862d5775ecedf49fb0e15820b4744573c24c
bump to 1.1.1
radon/__init__.py
radon/__init__.py
'''This module contains the main() function, which is the entry point for the command line interface.''' __version__ = '1.1.1' def main(): '''The entry point for Setuptools.''' import sys from radon.cli import program, log_error if not sys.argv[1:]: sys.argv.append('-h') try: pro...
'''This module contains the main() function, which is the entry point for the command line interface.''' __version__ = '1.1' def main(): '''The entry point for Setuptools.''' import sys from radon.cli import program, log_error if not sys.argv[1:]: sys.argv.append('-h') try: progr...
Python
0.000001
4d167d2b8ed024d1ea11f6f9ab0743601bddc8f5
word_count
examples/word_count/insert_data.py
examples/word_count/insert_data.py
import sys, os, logging import pymongo import bson import datetime config = { "db_name": "test", "collection_name": "wc", "input_uri": "mongodb://localhost/test.wc", "create_input_splits": True, "split_key": {'_id' : 1}, } if __name__ == '__main__': conn = pymongo.C...
import sys, os, logging import pymongo import bson import datetime config = { "db_name": "test", "collection_name": "wc", "input_uri": "mongodb://localhost/test.wc", "create_input_splits": True, "split_key": {'_id' : 1}, } if __name__ == '__main__': conn = pymongo.C...
Python
0.998596
370d58420c48ed5291fb3291a3f89449b2fb5230
Add description to update-production script
docker/update-production.py
docker/update-production.py
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser(description='Update production server to latest Docker image.') args = parser.parse_args() def _info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() def _run_tutum(args): tr...
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def _info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() def _run_tutum(args): try: subprocess.check_call(['tutum',] + args, stdout=sub...
Python
0
f4a8121bf38cdd8dea4a828316dc1c117c5ea0f3
update West Devon import script for parl.2017-06-08 (closes #902)
polling_stations/apps/data_collection/management/commands/import_west_devon.py
polling_stations/apps/data_collection/management/commands/import_west_devon.py
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E07000047' addresses_name = 'parl.2017-06-08/Version 2/merged.tsv' stations_name = 'parl.2017-06-08/Version 2/merged.tsv' elections = ['parl.2017-06-08'] ...
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E07000047' addresses_name = 'Democracy_Club__04May2017 - west devon.TSV' stations_name = 'Democracy_Club__04May2017 - west devon.TSV' elections = [ ...
Python
0
4686448c2de3a49f4c1d4593327e1072de9644f7
Return result of the exec runner.
dockermap/map/runner/cmd.py
dockermap/map/runner/cmd.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from ..action import ContainerUtilAction from ..input import ItemType log = logging.getLogger(__name__) class ExecMixin(object): """ Utility mixin for executing configured commands inside containers. """ action_method_na...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from ..action import ContainerUtilAction from ..input import ItemType log = logging.getLogger(__name__) class ExecMixin(object): """ Utility mixin for executing configured commands inside containers. """ action_method_na...
Python
0
7b1871b311aae41d699a41da7c6553b45a588313
purge wip about cassandra metrics (not-the-right-place)
feedly/storage/cassandra/models.py
feedly/storage/cassandra/models.py
from cqlengine import columns from cqlengine.models import Model from cqlengine.exceptions import ValidationError class VarInt(columns.Column): db_type = 'varint' def validate(self, value): val = super(VarInt, self).validate(value) if val is None: return try: r...
from cqlengine import columns from cqlengine.models import Model from cqlengine.exceptions import ValidationError class VarInt(columns.Column): db_type = 'varint' def validate(self, value): val = super(VarInt, self).validate(value) if val is None: return try: r...
Python
0
f7fc6556e3ef552ed570ad56db7dc3a19b3e75fd
Load config from site
fix-broken-double-redirect/edit.py
fix-broken-double-redirect/edit.py
# -*- coding: utf-8 -*- import argparse import json import os import re os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__)) import pywikibot from config import config_page_name # pylint: disable=E0611,W0614 parser = argparse.ArgumentParser() parser.add_argument('-c', '--check', action='store_t...
# -*- coding: utf-8 -*- import argparse import os import re os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__)) import pywikibot parser = argparse.ArgumentParser() parser.add_argument('-c', '--check', action='store_true', dest='check') parser.set_defaults(check=False) args = parser.parse_args()...
Python
0.000001
5ec45f9d8a7b4c54ecca0ad48f244c2ab0b8d532
remove no longer necessary package declaration
src/zeit/content/cp/blocks/tests.py
src/zeit/content/cp/blocks/tests.py
# -*- coding: utf-8 -*- # Copyright (c) 2009 gocept gmbh & co. kg # See also LICENSE.txt import zeit.content.cp.blocks import zeit.content.cp.testing def test_suite(): return zeit.content.cp.testing.FunctionalDocFileSuite( 'teaser.txt', 'xml.txt')
# -*- coding: utf-8 -*- # Copyright (c) 2009 gocept gmbh & co. kg # See also LICENSE.txt import zeit.content.cp.blocks import zeit.content.cp.testing def test_suite(): return zeit.content.cp.testing.FunctionalDocFileSuite( 'teaser.txt', 'xml.txt', package=zeit.content.cp.blocks)
Python
0
69eafa95df4bdeb143d40c321f0a312d06efff1f
Add __all__ to segmentation package
skimage/segmentation/__init__.py
skimage/segmentation/__init__.py
from .random_walker_segmentation import random_walker from ._felzenszwalb import felzenszwalb from ._slic import slic from ._quickshift import quickshift from .boundaries import find_boundaries, visualize_boundaries, mark_boundaries from ._clear_border import clear_border from ._join import join_segmentations, relabel_...
from .random_walker_segmentation import random_walker from ._felzenszwalb import felzenszwalb from ._slic import slic from ._quickshift import quickshift from .boundaries import find_boundaries, visualize_boundaries, mark_boundaries from ._clear_border import clear_border from ._join import join_segmentations, relabel_...
Python
0.000919
d59f3259875ffac49668ffb3ce34ca511385ebb7
Fix USE_X_FORWARDED_FOR for proxied environments
rated/settings.py
rated/settings.py
from django.conf import settings DEFAULT_REALM = getattr(settings, 'RATED_DEFAULT_REALM', 'default') DEFAULT_LIMIT = getattr(settings, 'RATED_DEFAULT_LIMIT', 100) DEFAULT_DURATION = getattr(settings, 'RATED_DEFAULT_DURATION', 60 * 60) RESPONSE_CODE = getattr(settings, 'RATED_RESPONSE_CODE', 429) RESPONSE_MESSAGE = g...
from django.conf import settings DEFAULT_REALM = getattr(settings, 'RATED_DEFAULT_REALM', 'default') DEFAULT_LIMIT = getattr(settings, 'RATED_DEFAULT_LIMIT', 100) DEFAULT_DURATION = getattr(settings, 'RATED_DEFAULT_DURATION', 60 * 60) RESPONSE_CODE = getattr(settings, 'RATED_RESPONSE_CODE', 429) RESPONSE_MESSAGE = g...
Python
0
b613ecdb3e543a4c39c5bd80359c81e504c1da33
add -mlong-calls to gcc compile parameter
examples/module/rtconfig_lm3s.py
examples/module/rtconfig_lm3s.py
# bsp name BSP = 'lm3s8962' # toolchains EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' PREFIX = 'arm-none-eabi-' CC = PREFIX + 'gcc' CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' LINK = PREFIX + 'gcc' TARGET_EXT = 'so' SIZE = PREFIX + 'size' OBJDUMP = PREFIX + 'objdump' ...
# bsp name BSP = 'lm3s8962' # toolchains EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' PREFIX = 'arm-none-eabi-' CC = PREFIX + 'gcc' CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' LINK = PREFIX + 'gcc' TARGET_EXT = 'so' SIZE = PREFIX + 'size' OBJDUMP = PREFIX + 'objdump' ...
Python
0.000002
ce869c128d728af4c296eb96ecae0db6f30996a7
Make brnn_ptb_test write checkpoints to temp directory
sonnet/examples/brnn_ptb_test.py
sonnet/examples/brnn_ptb_test.py
# Copyright 2017 The Sonnet Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright 2017 The Sonnet Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Python
0
88a1cb9001b19f769f8be5dcde5d87be67c61a2f
comment out 1.6
streams/inference/back_integrate.py
streams/inference/back_integrate.py
# coding: utf-8 """ Contains likelihood function specific to back-integration and the Rewinder """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys # Third-party import numpy as np import astropy.units as u # Project from ..coordin...
# coding: utf-8 """ Contains likelihood function specific to back-integration and the Rewinder """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys # Third-party import numpy as np import astropy.units as u # Project from ..coordin...
Python
0
c2a3443bd129b51df82826806829d50d6c01ee69
remove password
demo.py
demo.py
import chineseseg string = "蘇迪勒颱風造成土石崩塌,供應台北市用水的南勢溪挾帶大量泥沙,原水濁度一度飆高。" ckip = chineseseg.Ckip("myaccount", "mypassword") stanford = chineseseg.stanford("/home/wlzhuang/stanford-segmenter-2015-04-20/stanford-segmenter-3.5.2.jar", debug=True) print( "stanford:", stanford.segment(string) ) print( "ckip:", ckip.segm...
import chineseseg string = "蘇迪勒颱風造成土石崩塌,供應台北市用水的南勢溪挾帶大量泥沙,原水濁度一度飆高。" ckip = chineseseg.Ckip("wlzhuang", "xxxxaaaackip") stanford = chineseseg.stanford("/home/wlzhuang/stanford-segmenter-2015-04-20/stanford-segmenter-3.5.2.jar", debug=True) print( "stanford:", stanford.segment(string) ) print( "ckip:", ckip.seg...
Python
0.000449
c1ae43fd33cd0f8eb3e270907a8ed7e728d1e268
Add captured_at timestamp to POST payload
server.py
server.py
import evdev import requests import json import datetime import yaml def main(): config = load_config() dev = evdev.InputDevice(config['device_path']) output_line('Initialized - Capturing device: ' + str(dev)) for event in dev.read_loop(): if event.type == evdev.ecodes.EV_KEY: output_line(event) ...
import evdev import requests import json import datetime import yaml def main(): config = load_config() dev = evdev.InputDevice(config['device_path']) output_line('Initialized - Capturing device: ' + str(dev)) for event in dev.read_loop(): if event.type == evdev.ecodes.EV_KEY: event = evdev.categor...
Python
0.000076
13b6e289f3ced59068d91dff2b2ef12a7805fabe
Create test definitions.
test/test_cronquot.py
test/test_cronquot.py
import unittest import os from cronquot.cronquot import has_directory class CronquotTest(unittest.TestCase): def test_has_directory(self): sample_dir = os.path.join( os.path.dirname(__file__), 'crontab') self.assertTrue(has_directory(sample_dir)) def test_parse_command(self):...
import unittest import os from cronquot.cronquot import has_directory class CronquotTest(unittest.TestCase): def test_has_directory(self): sample_dir = os.path.join( os.path.dirname(__file__), 'crontab') self.assertTrue(has_directory(sample_dir)) if __name__ == '__main__': un...
Python
0
e20cdd293a045dfca1829eed522cb941da2fb558
remove cruft
server.py
server.py
import json import os from bottle import get, run, post, request, HTTPError, response from requests import Session from requests import post as request_post # ---------------------------------------------------------------------------- # Settings # --------------------------------------------------------------------...
import json import os from bottle import get, run, post, request, HTTPError, response from requests import Session from requests import post as request_post # ---------------------------------------------------------------------------- # Settings # --------------------------------------------------------------------...
Python
0
5e4d3c0b28104c1e98ed3e426dab9fc5d4d5a960
Add more comments to loadfail test
test/test_loadfail.py
test/test_loadfail.py
#!bin/env python import subprocess import os.path import unittest, re class TestSaveLoad(unittest.TestCase): @classmethod def setUpClass(self): # ensure we start with a clean slate, just in case subprocess.call('rm -rf remote local 2>> /dev/null', shell=True) # Initialize "remote" ...
#!bin/env python import subprocess import os.path import unittest, re class TestSaveLoad(unittest.TestCase): @classmethod def setUpClass(self): subprocess.call('rm -rf remote local 2>> /dev/null', shell=True) subprocess.call('mkdir remote; mkdir local', shell=True) subprocess.call(...
Python
0
c138182451d1e3937cf5f923c9b927dc97a97f38
Fix the logger fix
mycroft/util/signal.py
mycroft/util/signal.py
import os import os.path import tempfile import mycroft import time from mycroft.util.log import getLogger LOG = getLogger(__name__) def get_ipc_directory(domain=None): """Get the directory used for Inter Process Communication Files in this folder can be accessed by different processes on the machine. ...
import os import os.path import tempfile import mycroft import time from mycroft.util.logging import getLogger LOG = getLogger(__name__) def get_ipc_directory(domain=None): """Get the directory used for Inter Process Communication Files in this folder can be accessed by different processes on the machin...
Python
0
38b078eb13a42bf65d1f55141a69fcd8819a1f00
add models
mysite/polls/models.py
mysite/polls/models.py
from django.db import models class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') class Choice(models.Model): question = models.ForeignKey(Question, on_delete=models.CASCADE) choice_text = models.CharField(max_length=200) ...
from django.db import models # Create your models here.
Python
0
bd2d7fe62361594c7a659c2a38938521b6346dba
Text means no encode()
server.py
server.py
#!/usr/bin/env python3 # coding: utf-8 from aiohttp import web import aiohttp_jinja2 import asyncio import functools import jinja2 import os import sys import time import webbrowser from pypi_top_packages_async import get_packages_info from pypi_create_index_html import build_template_values START_TIME = time.time() ...
#!/usr/bin/env python3 # coding: utf-8 from aiohttp import web import aiohttp_jinja2 import asyncio import functools import jinja2 import os import sys import time import webbrowser from pypi_top_packages_async import get_packages_info from pypi_create_index_html import build_template_values START_TIME = time.time() ...
Python
0.998498
29835c78d1ddfd934aa552f4c68117a32379c5ea
add lmsd.sqlite
mzos/tests/__init__.py
mzos/tests/__init__.py
from __future__ import absolute_import import zipfile import os.path as op import os import shutil import logging class WithHMDBMixin(object): @staticmethod def unzip_hmdb(): """ Utility to unzip hmdb for test purposes :param self: :return: """ z = zipfile.ZipF...
from __future__ import absolute_import import zipfile import os.path as op import os import shutil import logging class WithHMDBMixin(object): @staticmethod def unzip_hmdb(): """ Utility to unzip hmdb for test purposes :param self: :return: """ abspath = op.abs...
Python
0.000001
3ffd045be41d226bcf1b533c3f5abf95a932eac0
Remove duplicate test
webcomix/scrapy/tests/test_crawler_worker.py
webcomix/scrapy/tests/test_crawler_worker.py
import pytest from webcomix.exceptions import NextLinkNotFound from webcomix.scrapy.crawler_worker import CrawlerWorker from webcomix.scrapy.verification.verification_spider import VerificationSpider from webcomix.tests.fake_websites.fixture import one_webpage_uri def test_spider_raising_error_gets_raised_by_crawler...
import pytest from webcomix.exceptions import NextLinkNotFound from webcomix.scrapy.crawler_worker import CrawlerWorker from webcomix.scrapy.verification.verification_spider import VerificationSpider from webcomix.tests.fake_websites.fixture import one_webpage_uri def test_spider_raising_error_gets_raised_by_crawler...
Python
0.000014
47ce98960cdfcd4c25109845047ad7fc6db2084b
Set serial default timeout to None
nanpy/serialmanager.py
nanpy/serialmanager.py
from nanpy.memo import memoized import fnmatch import logging import serial import sys import time DEFAULT_BAUDRATE = 115200 log = logging.getLogger(__name__) PY3 = sys.version_info[0] == 3 class SerialManagerError(Exception): pass def _auto_detect_serial_unix(preferred_list=['*']): import glob glist...
from nanpy.memo import memoized import fnmatch import logging import serial import sys import time DEFAULT_BAUDRATE = 115200 log = logging.getLogger(__name__) PY3 = sys.version_info[0] == 3 class SerialManagerError(Exception): pass def _auto_detect_serial_unix(preferred_list=['*']): import glob glist...
Python
0.999346
ceb7b806c838a12d3447d0fd9bccc5aae49832d5
Use a new session so that server will not receive signals
garage/multiprocessing/__init__.py
garage/multiprocessing/__init__.py
__all__ = [ 'RpcConnectionError', 'RpcError', 'python', ] import contextlib import logging import os import os.path import random import shutil import subprocess import tempfile import time import garage.multiprocessing.server from garage.multiprocessing.client import Connector from garage.multiprocessin...
__all__ = [ 'RpcConnectionError', 'RpcError', 'python', ] import contextlib import logging import os import os.path import random import shutil import subprocess import tempfile import time import garage.multiprocessing.server from garage.multiprocessing.client import Connector from garage.multiprocessin...
Python
0
8b23c91b83982a85fe8a711c587d7db50e0bc14a
take 4
server.py
server.py
from flask import Flask, request import json import bot, setup app = Flask(__name__) PAT = '***REMOVED***' PASSWORD = '***REMOVED***' setup.create_persistent_menu(PAT) mr_bot = bot.Bot(PAT) @app.route('/', methods=['GET']) def handle_verification(): print "Handling Verification" if request.args.get('hub....
from flask import Flask, request import json import bot, setup app = Flask(__name__) PAT = '***REMOVED***' PASSWORD = '***REMOVED***' setup.create_persistent_menu(PAT) mr_bot = create_bot(PAT) def create_bot(token): return bot.Bot(token) @app.route('/', methods=['GET']) def handle_verification(): print ...
Python
0.99946
05d2421668e663bf9e98ec51ec1d8977ffe8c1b3
Add static folder
server.py
server.py
import os from flask import Flask from flask import send_from_directory from flask_cors import CORS from igc.controller.controller_register import register_controllers from igc.util import cache app = Flask(__name__, static_url_path='html') CORS(app) app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('database_uri', ...
import os from flask import Flask from flask import send_from_directory from flask_cors import CORS from igc.controller.controller_register import register_controllers from igc.util import cache app = Flask(__name__) CORS(app) app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('database_uri', 'sqlite:///./sqllite.db'...
Python
0.000001
11e5ce0369250f7c979dc0fe9ea59f25cf12c1e7
Fix after Python 3.11 deprecation of test methods returning values
test/test_toplevel.py
test/test_toplevel.py
import mpi4py import unittest import warnings import os class TestRC(unittest.TestCase): @staticmethod def newrc(): rc = type(mpi4py.rc)() rc(initialize = rc.initialize) rc(threads = rc.threads) rc(thread_level = rc.thread_level) rc(finalize = rc.finalize) ...
import mpi4py import unittest import warnings import os class TestRC(unittest.TestCase): def testCall(self): rc = type(mpi4py.rc)() rc(initialize = rc.initialize) rc(threads = rc.threads) rc(thread_level = rc.thread_level) rc(finalize = rc.finalize) rc(f...
Python
0.000026
d3f8922394ca2e18d624f1d542f2fc13a18475d3
Make sorting links reset pagination
wnpp_debian_net/templatetags/sorting_urls.py
wnpp_debian_net/templatetags/sorting_urls.py
# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org> # Licensed under GNU Affero GPL v3 or later from django import template from ..url_tools import url_with_query register = template.Library() INTERNAL_DIRECTION_PREFIX_ASCENDING = '' INTERNAL_DIRECTION_PREFIX_DESCENDING = '-' EXTERNAL_DIRECTION_SUFFIX_A...
# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org> # Licensed under GNU Affero GPL v3 or later from django import template from ..url_tools import url_with_query register = template.Library() INTERNAL_DIRECTION_PREFIX_ASCENDING = '' INTERNAL_DIRECTION_PREFIX_DESCENDING = '-' EXTERNAL_DIRECTION_SUFFIX_A...
Python
0
300e1461174107f1c2f8523ce105739d42d71803
Write EMAIL_HOST to settings only if specified
fab_bundle/templates/settings.py
fab_bundle/templates/settings.py
from {{ base_settings }} import * DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ({% for admin in admins %} ('{{ admin.name }}', '{{ admin.email }}'),{% endfor %} ) MANAGERS = ADMINS SEND_BROKEN_LINK_EMAILS = True SECRET_KEY = '{{ secret_key }}' BASE_URL = 'http{% if ssl_cert %}s{% endif %}://{{ http_host }}' ME...
from {{ base_settings }} import * DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ({% for admin in admins %} ('{{ admin.name }}', '{{ admin.email }}'),{% endfor %} ) MANAGERS = ADMINS SEND_BROKEN_LINK_EMAILS = True SECRET_KEY = '{{ secret_key }}' BASE_URL = 'http{% if ssl_cert %}s{% endif %}://{{ http_host }}' ME...
Python
0
5db8338ceb258bbe086d3314b5f50a9b6da5cd28
Make import of _constant be absolute import for py3.x; See #388
wrappers/Python/generate_constants_module.py
wrappers/Python/generate_constants_module.py
from __future__ import print_function import os,shutil """ A little module to wrap the params enum for use in Cython code Ian Bell, May 2014 """ def params_constants(enum_key): fName = os.path.join('..','..','include','DataStructures.h') contents = open(fName,'r').read() left = contents.fin...
from __future__ import print_function import os,shutil """ A little module to wrap the params enum for use in Cython code Ian Bell, May 2014 """ def params_constants(enum_key): fName = os.path.join('..','..','include','DataStructures.h') contents = open(fName,'r').read() left = contents.fin...
Python
0
891a911b0523ce9ed42916c60934f52ba7dbedcb
Fix up 'limit' and 'expire' options for digest plugin.
flexget/plugins/plugin_digest.py
flexget/plugins/plugin_digest.py
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, Unicode, PickleType, Integer, DateTime from flexget import plugin from flexget.db_schema import versioned_base from flexget.entry import Entry from flexget.event import event ...
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, Unicode, PickleType, Integer, DateTime from flexget import plugin from flexget.db_schema import versioned_base from flexget.entry import Entry from flexget.event import event ...
Python
0
9694d5d0cbdcca874b791e6616dda831f8961373
Add a little debugging to the Papilio target
flipsyfat/targets/papilio_pro.py
flipsyfat/targets/papilio_pro.py
#!/usr/bin/env python3 import argparse from migen import * from flipsyfat.cores.sd_emulator import SDEmulator from flipsyfat.cores.sd_trigger import SDTrigger from misoc.targets.papilio_pro import BaseSoC from migen.build.generic_platform import * from misoc.integration.soc_sdram import * from misoc.integration.build...
#!/usr/bin/env python3 import argparse from migen import * from flipsyfat.cores.sd_emulator import SDEmulator from flipsyfat.cores.sd_trigger import SDTrigger from misoc.targets.papilio_pro import BaseSoC from migen.build.generic_platform import * from misoc.integration.soc_sdram import * from misoc.integration.build...
Python
0.000001
177bd7546faea56750a182c46a8fd6a892ff5d6a
Update State turns, those aren't game attributes
game.py
game.py
import datetime import json import map_loader import queue import state import utils class GAME_STATUS(object): """ Game status constants. """ lobby = 'lobby' # In matchmaking lobby, waiting for all players playing = 'playing' # In game mode, waiting for turns complete = 'complete' # Game finished...
import datetime import json import map_loader import queue import state import utils class GAME_STATUS(object): """ Game status constants. """ lobby = 'lobby' # In matchmaking lobby, waiting for all players playing = 'playing' # In game mode, waiting for turns complete = 'complete' # Game finished...
Python
0
2a696cd458ab2f67df5a6cfce0fe2016a8106eb4
add default channels
gbot.py
gbot.py
#!/usr/bin/env python # ============================================================================= # file = gbot.py # description = IRC bot # author = GR <https://github.com/shortdudey123> # create_date = 2014-07-09 # mod_date = 2014-07-09 # version = 0.1 # usage = called as a class # notes = # python_ver = 2.7.6 # ...
#!/usr/bin/env python # ============================================================================= # file = gbot.py # description = IRC bot # author = GR <https://github.com/shortdudey123> # create_date = 2014-07-09 # mod_date = 2014-07-09 # version = 0.1 # usage = called as a class # notes = # python_ver = 2.7.6 # ...
Python
0.000001
40ae754565f52c7631798823d13332b37f52e0c5
fix misuse of msg_split
nethud/proto/telnet.py
nethud/proto/telnet.py
from __future__ import print_function from twisted.internet import reactor, protocol, threads, defer from twisted.protocols.basic import LineReceiver from nethud.proto.client import NethackFactory class TelnetConnection(LineReceiver): def __init__(self, users): self.users = users self.uname = ''...
from __future__ import print_function from twisted.internet import reactor, protocol, threads, defer from twisted.protocols.basic import LineReceiver from nethud.proto.client import NethackFactory class TelnetConnection(LineReceiver): def __init__(self, users): self.users = users self.uname = ''...
Python
0.000016
d81276c19d3f4d8a81750b52feb2d54cff5fa7e3
Update Strava sample response in tests
social_core/tests/backends/test_strava.py
social_core/tests/backends/test_strava.py
import json from .oauth import OAuth2Test class StravaOAuthTest(OAuth2Test): backend_path = 'social_core.backends.strava.StravaOAuth' user_data_url = 'https://www.strava.com/api/v3/athlete' expected_username = 'marianne_v' access_token_body = json.dumps({ "token_type": "Bearer", "expi...
import json from .oauth import OAuth2Test class StravaOAuthTest(OAuth2Test): backend_path = 'social_core.backends.strava.StravaOAuth' user_data_url = 'https://www.strava.com/api/v3/athlete' expected_username = '227615' access_token_body = json.dumps({ "access_token": "83ebeabdec09f6670863766f79...
Python
0
a1c572b557b6fe5b94186763210f3bfa15f3e660
quick start
marsi/io/__init__.py
marsi/io/__init__.py
# Copyright 2016 Chr. Hansen A/S and The Novo Nordisk Foundation Center for Biosustainability, DTU. # 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....
# Copyright 2016 Chr. Hansen A/S and The Novo Nordisk Foundation Center for Biosustainability, DTU. # 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....
Python
0.999421