commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
a8791229ee7e54224f112f2bbdf529a20bafbafb
Fix automatic author list generation for Read The Docs
blab/nextstrain-augur,nextstrain/augur,nextstrain/augur,nextstrain/augur
docs/conf.py
docs/conf.py
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
agpl-3.0
Python
63803a449d519c2bdc817574539322293b05c6ef
fix cape breton post_id
opencivicdata/scrapers-ca,opencivicdata/scrapers-ca
ca_ns_cape_breton/people.py
ca_ns_cape_breton/people.py
from pupa.scrape import Scraper, Legislator from utils import lxmlize import re COUNCIL_PAGE = 'http://www.cbrm.ns.ca/councillors.html' class CapeBretonPersonScraper(Scraper): # @todo Need to scrape Mayor def get_people(self): page = lxmlize(COUNCIL_PAGE) councillors = page.xpath('//table[@class="tab...
from pupa.scrape import Scraper, Legislator from utils import lxmlize import re COUNCIL_PAGE = 'http://www.cbrm.ns.ca/councillors.html' class CapeBretonPersonScraper(Scraper): # @todo Need to scrape Mayor def get_people(self): page = lxmlize(COUNCIL_PAGE) councillors = page.xpath('//table[@class="tab...
mit
Python
c79cedf826a3b6ee89e6186954185ef3217dd901
Add the minimum scalar value to the result of the InvertOperator
OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,mathturtle/tomviz
tomviz/python/InvertData.py
tomviz/python/InvertData.py
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
bsd-3-clause
Python
4978f7ad6b87672d7fc1df7a836e2b8931bca1c9
Fix missing relations pool for new proposals
liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,...
src/adhocracy_core/adhocracy_core/resources/proposal.py
src/adhocracy_core/adhocracy_core/resources/proposal.py
"""Proposal resource types.""" from adhocracy_core.interfaces import IItem from adhocracy_core.interfaces import IItemVersion from adhocracy_core.resources import add_resource_type_to_registry from adhocracy_core.resources.badge import add_badge_assignments_service from adhocracy_core.resources.comment import add_comme...
"""Proposal resource types.""" from adhocracy_core.interfaces import IItem from adhocracy_core.interfaces import IItemVersion from adhocracy_core.resources import add_resource_type_to_registry from adhocracy_core.resources.badge import add_badge_assignments_service from adhocracy_core.resources.comment import add_comme...
agpl-3.0
Python
ea3ff403ef98f730a5509d735e5e4ab699bff2c0
change the time to 2 minutes
elixirhub/events-portal-scraping-scripts
ScheduleAddData.py
ScheduleAddData.py
__author__ = 'chuqiao' from apscheduler.schedulers.blocking import BlockingScheduler import EventsPortal import sys import logging def logger(): """ Function that initialises logging system """ global logger # create logger with 'syncsolr' logger = logging.getLogger('scheduleAddData') ...
__author__ = 'chuqiao' from apscheduler.schedulers.blocking import BlockingScheduler import EventsPortal import sys import logging def logger(): """ Function that initialises logging system """ global logger # create logger with 'syncsolr' logger = logging.getLogger('scheduleAddData') ...
mit
Python
491b1ce982ccfe7aac352d794b7d882efbaa0c1d
Update reconstruct-itinerary.py
jaredkoontz/leetcode,kamyu104/LeetCode,yiwen-luo/LeetCode,jaredkoontz/leetcode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,githubutilities/LeetCode,githubutilities/LeetCode,jaredkoontz/leetcode,yiwen-luo/LeetCode,yiwen-luo/LeetCode,yiwen-luo/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-20...
Python/reconstruct-itinerary.py
Python/reconstruct-itinerary.py
# Time: O(t! / (n1! * n2! * ... nk!)), t is the total number of tickets, ni is the number of ticket which from is node i # Space: O(t) # Given a list of airline tickets represented by pairs of departure # and arrival airports [from, to], reconstruct the itinerary in order. # All of the tickets belong to a man who dep...
# Time: O(n!) # Space: O(1) # Given a list of airline tickets represented by pairs of departure # and arrival airports [from, to], reconstruct the itinerary in order. # All of the tickets belong to a man who departs from JFK. # Thus, the itinerary must begin with JFK. # # Note: # If there are multiple valid itinerari...
mit
Python
38ea9f7ec5aaaf4175602f353a6ec551e133b8f3
move the constraint from a comment to executable code
ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms
src/zeit/cms/relation/relation.py
src/zeit/cms/relation/relation.py
# Copyright (c) 2008-2009 gocept gmbh & co. kg # See also LICENSE.txt import BTrees import persistent import zc.relation.catalog import zc.relation.interfaces import zeit.cms.relation.interfaces import zope.interface class Relations(persistent.Persistent): """Handles relations between content.""" zope.inter...
# Copyright (c) 2008-2009 gocept gmbh & co. kg # See also LICENSE.txt import BTrees import persistent import zc.relation.catalog import zc.relation.interfaces import zeit.cms.relation.interfaces import zope.interface class Relations(persistent.Persistent): """Handles relations between content.""" zope.inter...
bsd-3-clause
Python
457a3ff74c37b641b53261f8eecbc4aee0d30f04
Return all breakers to API
Somsubhra/Simplify,Somsubhra/Simplify,Somsubhra/Simplify
src/syntax/breaker.py
src/syntax/breaker.py
__author__ = 's7a' # All imports from appositions import Appositions from relative_clauses import RelativeClauses from prefix_subordination import PrefixSubordination from infix_subordination import InfixSubordination from infix_coordination import InfixCoordination # Constructor for the breaker class class Breaker:...
__author__ = 's7a' # All imports from appositions import Appositions from relative_clauses import RelativeClauses from prefix_subordination import PrefixSubordination from infix_subordination import InfixSubordination from infix_coordination import InfixCoordination # Constructor for the breaker class class Breaker:...
mit
Python
898fe6057e6381c23fa75d2a707e709ab93ffe53
add demo about reference count of object
ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study
reading-notes/PythonRef/src/ch03/main.py
reading-notes/PythonRef/src/ch03/main.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2015 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2015 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright...
bsd-2-clause
Python
afe526d0193ee82d74e41acac26baacdc1aabc62
Update ratio2circos.py
mvdbeek/tools-iuc,Delphine-L/tools-iuc,mblue9/tools-iuc,ieguinoa/tools-iuc,pavanvidem/tools-iuc,galaxyproject/tools-iuc,mblue9/tools-iuc,abretaud/tools-iuc,gregvonkuster/tools-iuc,pavanvidem/tools-iuc,martenson/tools-iuc,nsoranzo/tools-iuc,galaxyproject/tools-iuc,nsoranzo/tools-iuc,loraine-gueguen/tools-iuc,blankenberg...
tools/freec/ratio2circos.py
tools/freec/ratio2circos.py
import math import sys ploidy = int(sys.argv[1]) with open("./output/sample.bam_ratio.BedGraph") as bed: with open("./output/sample.bam_ratio_log2_circos.txt", "w+") as olog2r: for line in bed.readlines(): ls = line.split() if ls[0] != "track" and float(ls[3]) > 0: ...
import math import sys ploidy = int(sys.argv[1]) with open("./output/sample.bam_ratio.BedGraph") as bed: with open("./output/sample.bam_ratio_log2_circos.txt", "a") as olog2r: for line in bed.readlines(): ls = line.split() if ls[0] != "track" and float(ls[3]) > 0: l...
mit
Python
53aa9e61087b909a55d6ce2d7b16381e14c8304f
Add functions coloring
BrickText/BrickText
redactor/coloring/Coloring.py
redactor/coloring/Coloring.py
import re from coloring.config_tags import config_tags class Coloring: def __init__(self, text_editor, language): self.root = text_editor.get_root() self.text_widget = text_editor.get_text_panel() self.keywords = config_tags(self.text_widget, language) self.pattern = r"\w+\(|\w+" ...
import re from coloring.config_tags import config_tags class Coloring: def __init__(self, text_editor, language): self.root = text_editor.get_root() self.text_widget = text_editor.get_text_panel() self.keywords = config_tags(self.text_widget, language) self.pattern = r"\w+" d...
mit
Python
369f8f0b323f8d326f6a4b66af427364f805ffb5
fix a bug in scale
pfnet/chainercv,yuyu2172/chainercv,chainer/chainercv,yuyu2172/chainercv,chainer/chainercv
chainercv/transforms/image/scale.py
chainercv/transforms/image/scale.py
from chainercv.transforms import resize def scale(img, size, fit_short=True): """Rescales the input image to the given "size". When :obj:`fit_short == True`, the input image will be resized so that the shorter edge will be scaled to length :obj:`size` after resizing. For example, if the height of the...
from chainercv.transforms import resize def scale(img, size, fit_short=True): """Rescales the input image to the given "size". When :obj:`fit_short == True`, the input image will be resized so that the shorter edge will be scaled to length :obj:`size` after resizing. For example, if the height of the...
mit
Python
19dd9465efa0cde5efcd41f895a3ecd9e2e60174
comment autodoc typehints
diyclassics/cltk,kylepjohnson/cltk,D-K-E/cltk,cltk/cltk
docs/conf.py
docs/conf.py
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
mit
Python
e98ed15ba3a94d5a39609a6f78918982ca0db1ea
add columns width check
faneshion/MatchZoo,faneshion/MatchZoo
matchzoo/datapack.py
matchzoo/datapack.py
"""Matchzoo DataPack, pair-wise tuple (feature) and context as input.""" import typing import pandas as pd class DataPack(pd.DataFrame): """ Matchzoo DataPack data structure, store dataframe and context. Example: >>> # features, context generate by processors. >>> features = [([1,3], [2,...
"""Matchzoo DataPack, paiir-wise tuple (feature) and context as input.""" import typing import pandas as pd class DataPack(pd.DataFrame): """ Matchzoo DataPack data structure, store dataframe and context. Example: >>> # features, context generate by processors. >>> features = [([1,3], [2...
apache-2.0
Python
a2b664c89e60985a0c67db5d1f18bc20b34ad5c6
remove unused command
rr-/dotfiles,rr-/dotfiles,rr-/dotfiles
cfg/bubblesub/scripts/cc.py
cfg/bubblesub/scripts/cc.py
import re from PyQt5 import QtWidgets from bubblesub.api.cmd import BaseCommand from bubblesub.cfg.menu import MenuCommand from bubblesub.fmt.ass.event import AssEvent from bubblesub.ui.util import load_dialog try: import pysubs2 except ImportError as ex: raise CommandUnavailable(f"{ex.name} is not installed...
import re from PyQt5 import QtWidgets from bubblesub.api.cmd import BaseCommand from bubblesub.cfg.menu import MenuCommand from bubblesub.fmt.ass.event import AssEvent from bubblesub.ui.util import load_dialog try: import pysubs2 except ImportError as ex: raise CommandUnavailable(f"{ex.name} is not installed...
mit
Python
725f019451f827e7d565d721001ef31d40254b2e
Exclude README documents in _themes folder
crsmithdev/arrow
docs/conf.py
docs/conf.py
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
apache-2.0
Python
001ba693dda4f11a3b7bff4634a0336b8905728f
Support list in conversion
OTL/jps
jps/utils.py
jps/utils.py
import json from .publisher import Publisher from .common import DEFAULT_PUB_PORT from .common import DEFAULT_HOST from .env import get_master_host class JsonMultiplePublisher(object): '''publish multiple topics by one json message Example: >>> p = JsonMultiplePublisher() >>> p.publish('{"topic1":...
import json from .publisher import Publisher from .common import DEFAULT_PUB_PORT from .common import DEFAULT_HOST from .env import get_master_host class JsonMultiplePublisher(object): '''publish multiple topics by one json message Example: >>> p = JsonMultiplePublisher() >>> p.publish('{"topic1":...
apache-2.0
Python
d73bc854c5cf34f57916ebfd4b1d51c21701d48a
Update paths for TravisCI
JamesPHoughton/pysd
tests/unit_test_xmile2py.py
tests/unit_test_xmile2py.py
import os import unittest import tempfile from io import StringIO from pysd.py_backend.xmile.xmile2py import translate_xmile TARGET_STMX_FILE = 'test-models/tests/game/test_game.stmx' class TestXmileConversion(unittest.TestCase): def test_python_file_creation(self): with open(TARGET_STMX_FILE, 'r') as...
import os import unittest import tempfile from io import StringIO from pysd.py_backend.xmile.xmile2py import translate_xmile class TestXmileConversion(unittest.TestCase): def test_python_file_creation(self): with open('tests/test-models/tests/game/test_game.stmx', 'r') as stmx: contents = s...
mit
Python
47053a42b9053755aad052159dac845b34195297
Use common testHarness in derived projects
CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang
config/test/__init__.py
config/test/__init__.py
from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executab...
lgpl-2.1
Python
5075fc57126ccec2ae7e993705e323fc5c75e965
fix module babymonitoringcontroller
k-team/KHome,k-team/KHome,k-team/KHome
modules/baby_monitoring_controller/local_module.py
modules/baby_monitoring_controller/local_module.py
import module from module import use_module import fields import logging class BabyMonitoringController(module.Base): update_rate = 10 sound_sensor = use_module('SoundSensor') alarm_actuator = use_module('AlarmActuator') class controller(fields.Base): def __init__(self): self.deci...
import module from module import use_module import fields class BabyMonitoringController(module.Base): update_rate = 10 sound_sensor = use_module('SoundSensor') alarm_actuator = use_module('AlarmActuator') class controller(fields.Base): def __init__(self): self.decibel_value = 97 ...
mit
Python
343c840835f688ae109093ea61357302cd78d9bf
Use relative import
synw/django-chartflo,synw/django-chartflo,synw/django-chartflo
chartflo/views.py
chartflo/views.py
# -*- coding: utf-8 -*- from django.views.generic import TemplateView from .factory import ChartDataPack class ChartsView(TemplateView): template_name = 'chartflo/charts.html' chart_type = "pie" title = "" engine = "amcharts" def get_data(self): return {} def get_context_data(self, ...
# -*- coding: utf-8 -*- from django.views.generic import TemplateView from chartflo.factory import ChartDataPack class ChartsView(TemplateView): template_name = 'chartflo/charts.html' chart_type = "pie" title = "" engine = "amcharts" def get_data(self): return {} def get_context_dat...
mit
Python
37831f549eddc014ab89cc7dba3616a133c774a2
Add create_app method to __init__.py
patlub/BucketListAPI,patlub/BucketListAPI
api/BucketListAPI.py
api/BucketListAPI.py
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import create_app, db app = create_app('DevelopmentEnv') @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return respon...
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import app, db @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return response if __name__ == '__main__': app.run...
mit
Python
061ebe64e96966149d66ee2e61792980dccbfe92
test set and get
martinkirch/tofbot,soulaklabs/tofbot,soulaklabs/tofbot,p0nce/tofbot,p0nce/tofbot,martinkirch/tofbot,chmduquesne/tofbot,tofbot/tofbot,tofbot/tofbot
testbot.py
testbot.py
from bot import Tofbot import unittest from collections import namedtuple def print_resp(msg): print (" -> %s" % msg) class TestTofbot(Tofbot): def __init__(self, nick, name, chan, origin): chans = [chan] Tofbot.__init__(self, nick, name, chans, debug=False) self.chan = chan ...
from bot import Tofbot import unittest def print_resp(msg): print (" -> %s" % msg) class TestTofbot(Tofbot): def __init__(self, nick, name, chan, origin): chans = [chan] Tofbot.__init__(self, nick, name, chans, debug=False) self.chan = chan self.origin = origin self....
bsd-2-clause
Python
6b36bdff8393834cfb9890b88fa03ab5ba3acb6e
Support JSON and arrays in JavaScript action in Mistral
StackStorm/mistral,openstack/mistral,StackStorm/mistral,openstack/mistral
mistral/utils/javascript.py
mistral/utils/javascript.py
# Copyright 2015 - Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# Copyright 2015 - Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
Python
353643c612414e4292d419f373c551029af93b90
add tests for default serve behavior for new static application
kezabelle/clastic,kezabelle/clastic
clastic/tests/test_serve.py
clastic/tests/test_serve.py
from __future__ import unicode_literals from nose.tools import ok_, eq_ import os from werkzeug.test import Client from clastic import Application, default_response, Response from clastic.session import CookieSessionMiddleware from common import session_hello_world _CUR_DIR = os.path.dirname(os.path.abspath(__file...
from __future__ import unicode_literals from nose.tools import ok_ from clastic import Application, default_response from clastic.session import CookieSessionMiddleware from common import session_hello_world def test_serve(): cookie_session = CookieSessionMiddleware() app = Application([('/', session_hello_...
bsd-3-clause
Python
ffa8f79fe15621081acbb220a2a4dfd3d4d6d500
Correct env_key input argument default value
Neurita/galton
galton/utils/logger.py
galton/utils/logger.py
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
bsd-3-clause
Python
64b4e175d59f3f7c06ef009c0e0ff2cbf07e8e1e
fix flake8
he7d3r/revscoring,wiki-ai/revscoring
revscoring/datasources/meta/tests/test_vectorizers.py
revscoring/datasources/meta/tests/test_vectorizers.py
from .. import vectorizers from revscoring.datasources import revision_oriented as ro from revscoring.dependencies import solve from revscoring.features import wikitext test_vectors = {'a': [1] * 200, 'b': [1] * 200, 'c': [1] * 200} def test_vectorize(): wv = vectorizers.word2vec...
import numpy as np from .. import vectorizers from revscoring.datasources import revision_oriented as ro from revscoring.dependencies import solve from revscoring.features import wikitext test_vectors = {'a': [1]*200, 'b': [1]*200, 'c': [1]*200} def test_vectorize(): wv = vectori...
mit
Python
1eb809e15347b89d61077a4f4be9a3d0d005bc77
修改BUG:创建的用户都是超级用户
ZhangXiaoyu-Chief/sandwich,ZhangXiaoyu-Chief/sandwich,ZhangXiaoyu-Chief/sandwich,ZhangXiaoyu-Chief/sandwich,ZhangXiaoyu-Chief/sandwich
api/views/account.py
api/views/account.py
from django.shortcuts import render, HttpResponse from api.libs.base import CoreView from account.models import UserProfile from django.contrib.auth.models import User # Create your views here. class Account(CoreView): """ 用户相关接口 """ def get_list(self): """ 获取用户列表接口 :return: ...
from django.shortcuts import render, HttpResponse from api.libs.base import CoreView from account.models import UserProfile from django.contrib.auth.models import User # Create your views here. class Account(CoreView): """ 用户相关接口 """ def get_list(self): """ 获取用户列表接口 :return: ...
apache-2.0
Python
b3cbc33e9cd43e22500a484599010146fbb7f012
add missing description field to PolicyForm
dpausp/arguments,dpausp/arguments,dpausp/arguments,dpausp/arguments
src/ekklesia_portal/concepts/policy/policy_contracts.py
src/ekklesia_portal/concepts/policy/policy_contracts.py
from colander import Length from deform.widget import SelectWidget, TextAreaWidget from ekklesia_portal.enums import Majority, VotingSystem from ekklesia_portal.helper.contract import Schema, Form, decimal_property, int_property, string_property, enum_property from ekklesia_portal.helper.translation import _ class Po...
from colander import Length from deform.widget import SelectWidget from ekklesia_portal.enums import Majority, VotingSystem from ekklesia_portal.helper.contract import Schema, Form, decimal_property, int_property, string_property, enum_property from ekklesia_portal.helper.translation import _ class PolicySchema(Schem...
agpl-3.0
Python
618ad9ef667dfe269fd4d9bf926e4b7e22913d18
Update russianroulette.py
kallerdaller/Cogs-Yorkfield
russianroulette/russianroulette.py
russianroulette/russianroulette.py
import discord from discord.ext import commands import os from .utils.dataIO import dataIO import time import asyncio class Russianroulette: """Russian Roulette""" def __init__(self, bot): self.bot = bot self.file_path = "data/russianroulette/russianroulette.json" self.json_data = ...
import discord from discord.ext import commands import os from .utils.dataIO import dataIO import time import asyncio class Russianroulette: """Russian Roulette""" def __init__(self, bot): self.bot = bot self.file_path = "data/russianroulette/russianroulette.json" self.json_data = ...
mit
Python
86b3e67c507cbc0360a93776b61b177dd201e48e
Read JSOn data attempt 2
kallerdaller/Cogs-Yorkfield
russianroulette/russianroulette.py
russianroulette/russianroulette.py
import discord from discord.ext import commands import os from .utils.dataIO import dataIO import time import asyncio class Russianroulette: """Russian Roulette""" def __init__(self, bot): self.bot = bot self.file_path = "data/russianroulette/russianroulette.json" self.json_data = ...
import discord from discord.ext import commands import os from .utils.dataIO import dataIO import time import asyncio class Russianroulette: """Russian Roulette""" def __init__(self, bot): self.bot = bot self.file_path = "data/russianroulette/russianroulette.json" self.json_data = ...
mit
Python
7df447bf561ca5148c9397d1621f81f4de6da5ad
Remove hello command
novafloss/populous
populous/cli.py
populous/cli.py
import click @click.group() @click.version_option() def cli(): pass
import click @click.group() @click.version_option() def cli(): pass @cli.command() def hello(): click.echo("Hello World!")
mit
Python
b28e67a541e39b687a6484ea71a40efdbb4ebbf3
Bump to 0.9.5
czpython/aldryn-newsblog,czpython/aldryn-newsblog,czpython/aldryn-newsblog,czpython/aldryn-newsblog
aldryn_newsblog/__init__.py
aldryn_newsblog/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals __version__ = '0.9.5'
# -*- coding: utf-8 -*- from __future__ import unicode_literals __version__ = '0.9.4.1'
bsd-3-clause
Python
848530a53838a6ce47b0023670444e6773bf3e27
Make the transaction admin a bit more usable
gregplaysguitar/django-dps,takeflight/django-dps
dps/admin.py
dps/admin.py
from dps.models import Transaction from django.contrib import admin from django.contrib.contenttypes import generic class TransactionAdmin(admin.ModelAdmin): list_display = ('amount', 'status', 'transaction_type', 'content_object', 'created',) search_fields = ('secret', ) class Transacti...
from dps.models import Transaction from django.contrib import admin from django.contrib.contenttypes import generic class TransactionAdmin(admin.ModelAdmin): pass class TransactionInlineAdmin(generic.GenericTabularInline): model = Transaction def has_add_permission(self, request): return False ...
bsd-2-clause
Python
bab5a9c6e6d1ceead96e33b9a48618c29c14ed3e
Remove yocto forward in status
amm0nite/unicornclient,amm0nite/unicornclient
unicornclient/routines/status.py
unicornclient/routines/status.py
from unicornclient import spy from unicornclient import routine from unicornclient import message class Routine(routine.Routine): def __init__(self): routine.Routine.__init__(self) def process(self, data): self.send_status() def send_status(self): status = self.get_status() ...
from unicornclient import spy from unicornclient import routine from unicornclient import message class Routine(routine.Routine): def __init__(self): routine.Routine.__init__(self) def process(self, data): self.send_status() def send_status(self): status = self.get_status() ...
mit
Python
b3ccb1d6a8525f2fe699c07e1d7c20bf10974522
Remove unused var
DemocracyClub/EveryElection,DemocracyClub/EveryElection,DemocracyClub/EveryElection
every_election/apps/elections/query_helpers.py
every_election/apps/elections/query_helpers.py
import requests from django.contrib.gis.geos import Point class PostcodeError(Exception): pass class BasePostcodeLookup: def __init__(self, postcode): self.postcode = postcode.replace(' ', '') @property def point(self): raise NotImplementedError class MaPitPostcodeLookup(BasePost...
import requests from django.contrib.gis.geos import Point class PostcodeError(Exception): pass class BasePostcodeLookup: def __init__(self, postcode): self.postcode = postcode.replace(' ', '') @property def point(self): raise NotImplementedError class MaPitPostcodeLookup(BasePost...
bsd-3-clause
Python
69102f560eced438838f0377fe351adc7b542c1e
Change version.
Kami/python-yubico-client
yubico/__init__.py
yubico/__init__.py
__version__ = (1, 6, 3)
__version__ = (1, 6, 3, 'dev')
bsd-3-clause
Python
9de9c50ee2c166efd42f88a730973c7ebd9b108b
add csv
RaphaelLapierre/INF4215
TP3/RiskAI/Main.py
TP3/RiskAI/Main.py
import signal from Controller import * from RandomAI import * from CarreRougeAi import CarreRougeAI import csv finish = False def signal_handler(signal, frame): global finish print "Arret demande" finish = True signal.signal(signal.SIGINT, signal_handler) ai1 = RandomAI() # agent adverse sans apprentiss...
import signal from Controller import * from RandomAI import * from CarreRougeAi import CarreRougeAI finish = False def signal_handler(signal, frame): global finish print "Arret demande" finish = True signal.signal(signal.SIGINT, signal_handler) ai1 = RandomAI() # agent adverse sans apprentissage machine ...
mit
Python
47671cfcf7900d66fc320c24772f73888b777a95
update to remove old whitenoise setup
bcgov/gwells,SethGreylyn/gwells,rstens/gwells,SethGreylyn/gwells,rstens/gwells,bcgov/gwells,rstens/gwells,SethGreylyn/gwells,rstens/gwells,bcgov/gwells,SethGreylyn/gwells,bcgov/gwells
project/wsgi.py
project/wsgi.py
""" WSGI config for project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
""" WSGI config for project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
apache-2.0
Python
554572f327e4b9c920f65b416bfc6a3a5b549846
Reset the num threads to the env variable, not the default
numba/numba,stonebig/numba,cpcloud/numba,gmarkall/numba,sklam/numba,stuartarchibald/numba,seibert/numba,seibert/numba,cpcloud/numba,numba/numba,sklam/numba,IntelLabs/numba,stuartarchibald/numba,IntelLabs/numba,IntelLabs/numba,gmarkall/numba,cpcloud/numba,seibert/numba,stuartarchibald/numba,numba/numba,sklam/numba,seibe...
numba/tests/npyufunc/test_parallel_env_variable.py
numba/tests/npyufunc/test_parallel_env_variable.py
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
bsd-2-clause
Python
4ebc539f77f7b0dc0d32b79edb34c651cf5e5b97
Update index path
WesleyyC/DT-In-The-House
generate-from-model.py
generate-from-model.py
import sys import numpy import pickle from keras.models import Sequential from keras.layers import Dense from keras.layers import Dropout from keras.layers import LSTM from keras.callbacks import ModelCheckpoint from keras.utils import np_utils from scipy.misc import logsumexp # create mapping of unique chars to inte...
import sys import numpy import pickle from keras.models import Sequential from keras.layers import Dense from keras.layers import Dropout from keras.layers import LSTM from keras.callbacks import ModelCheckpoint from keras.utils import np_utils from scipy.misc import logsumexp # create mapping of unique chars to inte...
mit
Python
a425898865166813c8d64311ec10b23ac8625882
add validation for validating than file is ignored file
faycheng/tpl,faycheng/tpl
tpl/tpl.py
tpl/tpl.py
# -*- coding:utf-8 -*- import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import jinja2 from tpl import path from tpl import errors class Template(object): IGNORE_FILES = [ 'construct.sh', 'construct.py' ] def __init__(self, tpl_dir): ...
# -*- coding:utf-8 -*- import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import jinja2 from tpl import path from tpl import errors class Template(object): IGNORE_FILES = [ 'construct.sh', 'construct.py' ] def __init__(self, tpl_dir): ...
mit
Python
cb52303c74a76bfaf8f3017b9be78f3620b00483
Add pragma: no cover to migration data unload
OpenVolunteeringPlatform/django-ovp-core,OpenVolunteeringPlatform/django-ovp-core
ovp_core/migrations/0004_load_skills_and_causes.py
ovp_core/migrations/0004_load_skills_and_causes.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-25 01:14 from __future__ import unicode_literals from django.db import migrations skills = ['Arts/Handcrafting', 'Communication', 'Dance/Music', 'Law', 'Education', 'Sports', 'Cooking', 'Management', 'Idioms', 'Computers/Technology', 'Health', 'Others'] ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-25 01:14 from __future__ import unicode_literals from django.db import migrations skills = ['Arts/Handcrafting', 'Communication', 'Dance/Music', 'Law', 'Education', 'Sports', 'Cooking', 'Management', 'Idioms', 'Computers/Technology', 'Health', 'Others'] ...
agpl-3.0
Python
35a0a42b4311828ded6d4d614cc50d4da6a60b8c
Use context with file
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
src/utils/playbook.py
src/utils/playbook.py
from django.conf import settings from ansible.models import Playbook import os def content_loader(pk, slug): playbook = Playbook.query_set.get(pk=pk) playbook_dir = playbook.directory # TODO: for now assume without validation playbook_file = os.path.join(playbook_dir, slug + '.yml') with open(pla...
from django.conf import settings from ansible.models import Playbook import os def content_loader(pk, slug): playbook = Playbook.query_set.get(pk=pk) playbook_dir = playbook.directory # TODO: for now assume without validation playbook_file = os.path.join(playbook_dir, slug + '.yml') return playboo...
bsd-3-clause
Python
3ae6787d1e5fdfc746f1ec92409a75b397d702e9
Bump version to 2.1.1-dev
pferreir/indico,ThiefMaster/indico,indico/indico,mic4ael/indico,mvidalgarcia/indico,mic4ael/indico,mvidalgarcia/indico,mic4ael/indico,pferreir/indico,DirkHoffmann/indico,pferreir/indico,DirkHoffmann/indico,OmeGak/indico,OmeGak/indico,DirkHoffmann/indico,mvidalgarcia/indico,ThiefMaster/indico,indico/indico,mvidalgarcia/...
indico/__init__.py
indico/__init__.py
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
mit
Python
f57fc2abd861e7eb9f1ce698c05b87b66cd0e408
Update UploadedTo.py
pyblub/pyload,vuolter/pyload,vuolter/pyload,pyblub/pyload,vuolter/pyload
module/plugins/accounts/UploadedTo.py
module/plugins/accounts/UploadedTo.py
# -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in...
# -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in...
agpl-3.0
Python
4b5dd61607c9692bb330f89545d5f76d7a1ed221
Fix linkage in the RSS feed
jomoore/threepins,jomoore/threepins,jomoore/threepins
puzzle/feeds.py
puzzle/feeds.py
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
mit
Python
8f3b57fade88a596aa5fec95342e074c00367997
remove test code
Willyham/tchannel-python,Willyham/tchannel-python,uber/tchannel-python,uber/tchannel-python
tchannel/messages/call_request.py
tchannel/messages/call_request.py
from __future__ import absolute_import from .base import BaseMessage from .types import Types from .. import rw from . import common class CallRequestMessage(BaseMessage): """Initiate an RPC call.""" message_type = Types.CALL_REQ __slots__ = ( 'flags', 'ttl', 'tracing', ...
from __future__ import absolute_import from .base import BaseMessage from .types import Types from .. import rw from . import common class CallRequestMessage(BaseMessage): """Initiate an RPC call.""" message_type = Types.CALL_REQ __slots__ = ( 'flags', 'ttl', 'tracing', ...
mit
Python
be08bbd5249e31345dc42140558a3a3f4720e71d
add coverage sanitizer option (#6171)
skia-dev/oss-fuzz,robertswiecki/oss-fuzz,skia-dev/oss-fuzz,googlefonts/oss-fuzz,googlefonts/oss-fuzz,google/oss-fuzz,googlefonts/oss-fuzz,robertswiecki/oss-fuzz,skia-dev/oss-fuzz,google/oss-fuzz,google/oss-fuzz,robertswiecki/oss-fuzz,skia-dev/oss-fuzz,skia-dev/oss-fuzz,google/oss-fuzz,skia-dev/oss-fuzz,google/oss-fuzz,...
infra/constants.py
infra/constants.py
# Copyright 2021 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, ...
# Copyright 2021 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, ...
apache-2.0
Python
852349276fcd1aa79ba1a31ab77637db64d9ddae
Mark safe statics
djangoer/django-selectize,djangoer/django-selectize
selectize/templatetags/selectize_tags.py
selectize/templatetags/selectize_tags.py
from django import template # from django.templatetags.static import static # see stackoverflow :http://stackoverflow.com/questions/11721818 from django.contrib.staticfiles.templatetags.staticfiles import static from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def selec...
from django import template # from django.templatetags.static import static # see stackoverflow :http://stackoverflow.com/questions/11721818 from django.contrib.staticfiles.templatetags.staticfiles import static register = template.Library() @register.simple_tag def selectize_tags_media(media_type='css',name=''): "...
apache-2.0
Python
ee214c1be54af5a1e7ae0892dba8f2569a79828e
Fix logging.conf loading
hammerlab/isovar,hammerlab/isovar
script/isovar-variant-sequences.py
script/isovar-variant-sequences.py
#!/usr/bin/env python # Copyright (c) 2016. Mount Sinai School of Medicine # # 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 requi...
#!/usr/bin/env python # Copyright (c) 2016. Mount Sinai School of Medicine # # 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 requi...
apache-2.0
Python
37a85a8fdac4a08400ff4859a52647a8513dd591
Allow no collections...
OpenTreeOfLife/peyotl,OpenTreeOfLife/peyotl,mtholder/peyotl,mtholder/peyotl
scripts/concatenate_collections.py
scripts/concatenate_collections.py
#!/usr/bin/env python from peyotl import concatenate_collections, read_as_json, write_as_json if __name__ == '__main__': import argparse import sys import os description = 'Takes a list of collections and writes a collection that is a concatenation of their decisions' parser = argparse.ArgumentPars...
#!/usr/bin/env python from peyotl import concatenate_collections, read_as_json, write_as_json if __name__ == '__main__': import argparse import sys import os description = 'Takes a list of collections and writes a collection that is a concatenation of their decisions' parser = argparse.ArgumentPars...
bsd-2-clause
Python
0a7eeffd5632032630ae1c1ed99c105f7700fde4
fix TypeError url = '\r\n'.join([url])
zatuper/pywebstepic,ztp99/pyweb,ztp99/pyweb,ztp99/pyweb,zatuper/pywebstepic,zatuper/pywebstepic
etc/hello.py
etc/hello.py
CONFIG = { 'mode': 'wsgi', 'working_dir': '/path/to/my/app', 'python': '/usr/bin/python', 'args': ( '--bind=127.0.0.1:8080', '--workers=16', '--timeout=60', 'app.module', ), } def application(env, start_response): # url = [] start_response('200 OK', [('Conten...
CONFIG = { 'mode': 'wsgi', 'working_dir': '/path/to/my/app', 'python': '/usr/bin/python', 'args': ( '--bind=127.0.0.1:8080', '--workers=16', '--timeout=60', 'app.module', ), } def application(env, start_response): # url = [] start_response('200 OK', [('Conten...
apache-2.0
Python
86263496d5e541876f4b1f10525b4318a4fa6798
Remove unnecessary code from treeview
almeidapaulopt/frappe,adityahase/frappe,StrellaGroup/frappe,yashodhank/frappe,StrellaGroup/frappe,almeidapaulopt/frappe,saurabh6790/frappe,frappe/frappe,mhbu50/frappe,yashodhank/frappe,saurabh6790/frappe,mhbu50/frappe,saurabh6790/frappe,mhbu50/frappe,frappe/frappe,frappe/frappe,adityahase/frappe,yashodhank/frappe,almei...
frappe/desk/treeview.py
frappe/desk/treeview.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ @frappe.whitelist() def get_all_nodes(doctype, parent, tree_method, **filters): '''Recursively gets all data from t...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ @frappe.whitelist() def get_all_nodes(doctype, parent, tree_method, **filters): '''Recursively gets all data from t...
mit
Python
0c1e2b8261415227bf4c0ffa61e8e1fa62317620
Update __init__.py
tensorflow/similarity
tensorflow_similarity/__init__.py
tensorflow_similarity/__init__.py
"""Tensorflow Similarity ![TensorFlow Similarity Overview](../assets/images/tfsim_overview.png) TensorFlow Similiarity, as visible in the diagram above, offers the following components to help research, train, evaluate and serve metric models: - **`SimilarityModel()`**: This class subclasses the `tf.keras.model` cla...
"""Tensorflow Similarity ![TensorFlow Similarity Overview](../assets/images/tfsim_overview.png) TensorFlow Similiarity, as visible in the diagram above, offers the following components to help research, train, evaluate and serve metric models: - **`SimilarityModel()`**: This class subclasses the `tf.keras.model` cla...
apache-2.0
Python
f1a3aeb97486c1e02906d1e96b758ed58d1bb252
fix typo in write_cache
mvyskocil/pyckle
pyckle/cache.py
pyckle/cache.py
# caching support for pyckle # # ... based on pickle # import errno import imp import os import pickle import tokenize from py_compile import wr_long from . import load MAGIC=b'pyckle\x00\x00' def cache_path(filename): if hasattr(imp, "cache_from_source"): return imp.cache_from_source(filename) + "kle...
# caching support for pyckle # # ... based on pickle # import errno import imp import os import pickle import tokenize from py_compile import wr_long from . import load MAGIC=b'pyckle\x00\x00' def cache_path(filename): if hasattr(imp, "cache_from_source"): return imp.cache_from_source(filename) + "kle...
mit
Python
95d3c1151d84a6b8c4770881e75ebbd7dfe111dd
correct issue with version.
tutorcruncher/pydf,tutorcruncher/pydf,samuelcolvin/pydf
pydf/version.py
pydf/version.py
from distutils.version import StrictVersion VERSION = StrictVersion('0.30.0')
from distutils.version import StrictVersion VERSION = StrictVersion('0.3.0')
mit
Python
a0ceb84519d1bf735979b3afdfdb8b17621d308b
Fix overwriting resolution with empty text
stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide
froide/problem/admin.py
froide/problem/admin.py
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
mit
Python
57dc66d43f6b9afe1729b326ac5bd7587c276a85
add flag to disable cdep website encoding hack
mgax/mptracker,mgax/mptracker,mgax/mptracker,mgax/mptracker
mptracker/scraper/common.py
mptracker/scraper/common.py
from urllib.parse import urlencode, urlparse, parse_qs from path import path import requests from pyquery import PyQuery as pq project_root = path(__file__).abspath().parent.parent.parent class Scraper(object): def __init__(self, session=None, use_cdep_opener=True): self.session = session or requests.S...
from urllib.parse import urlencode, urlparse, parse_qs from path import path import requests from pyquery import PyQuery as pq project_root = path(__file__).abspath().parent.parent.parent class Scraper(object): def __init__(self, session=None): self.session = session or requests.Session() def fetc...
mit
Python
14c11c9a5c34db08cd797a1a13833974d96ac888
Remove preceedig newlines (unneeded)
ayushin78/coala,NalinG/coala,arush0311/coala,rimacone/testing2,refeed/coala,jayvdb/coala,meetmangukiya/coala,karansingh1559/coala,JohnS-01/coala,Asalle/coala,impmihai/coala,shreyans800755/coala,sagark123/coala,sophiavanvalkenburg/coala,Shade5/coala,karansingh1559/coala,NalinG/coala,coala-analyzer/coala,mr-karan/coala,k...
coalib/misc/Annotations.py
coalib/misc/Annotations.py
def typechain(*args): """ Returns function which applies the first transformation it can from args and returns transformed value, or the value itself if it is in args. >>> function = typechain(int, 'a', ord, None) >>> function("10") 10 >>> function("b") 98 >>> function("a") 'a' ...
def typechain(*args): """ Returns function which applies the first transformation it can from args and returns transformed value, or the value itself if it is in args. >>> function = typechain(int, 'a', ord, None) >>> function("10") 10 >>> function("b") 98 >>> function("a") 'a...
agpl-3.0
Python
1171ade137c54c778a284ef32fdbdcd9e5c1d828
Add __repr__() and __str__() to Result
wylee/runcommands,wylee/runcommands
runcommands/runners/result.py
runcommands/runners/result.py
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
mit
Python
34ad33bfcb67dcb972670ea8453b734851528e44
fix in reconciliation patch
rohitwaghchaure/erpnext-receipher,rohitwaghchaure/digitales_erpnext,Tejal011089/trufil-erpnext,suyashphadtare/gd-erp,geekroot/erpnext,gangadharkadam/saloon_erp,gangadharkadam/v6_erp,gangadharkadam/contributionerp,gangadhar-kadam/verve_erp,gangadharkadam/v6_erp,njmube/erpnext,mbauskar/omnitech-erpnext,gmarke/erpnext,mba...
patches/january_2013/stock_reconciliation_patch.py
patches/january_2013/stock_reconciliation_patch.py
import webnotes def execute(): webnotes.reload_doc("stock", "doctype", "stock_ledger_entry") rename_fields() move_remarks_to_comments() store_stock_reco_json() def rename_fields(): args = [["Stock Ledger Entry", "bin_aqat", "qty_after_transaction"], ["Stock Ledger Entry", "fcfs_stack", "stock_queue"]] for...
import webnotes def execute(): webnotes.reload_doc("stock", "doctype", "stock_ledger_entry") rename_fields() move_remarks_to_comments() store_stock_reco_json() def rename_fields(): args = [["Stock Ledger Entry", "bin_aqat", "qty_after_transaction"], ["Stock Ledger Entry", "fcfs_stack", "stock_queue"]] for...
agpl-3.0
Python
cf44965ab0743e358817255cc4c6714cbb550223
use asyncio.subprocess in shell cmd
lnmds/jose,Mstrodl/jose,Mstrodl/jose
ext/admin.py
ext/admin.py
import traceback import asyncio import logging from discord.ext import commands from .common import Cog log = logging.getLogger(__name__) class Admin(Cog): @commands.command(hidden=True) @commands.is_owner() async def shutdown(self, ctx): await ctx.send("dude rip") #await self.bot.sess...
import traceback import subprocess import logging from discord.ext import commands from .common import Cog log = logging.getLogger(__name__) class Admin(Cog): @commands.command(hidden=True) @commands.is_owner() async def shutdown(self, ctx): await ctx.send("dude rip") #await self.bot.s...
mit
Python
0dbbb0cb70208a8f0cab62b5e96fd867db880899
Prepare release number for 18.2.0
linuxipho/mycroft-core,forslund/mycroft-core,forslund/mycroft-core,MycroftAI/mycroft-core,Dark5ide/mycroft-core,linuxipho/mycroft-core,Dark5ide/mycroft-core,MycroftAI/mycroft-core
mycroft/version/__init__.py
mycroft/version/__init__.py
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
Python
7de3c5999001c1acd60df193f3bd0029a40af963
Declare dependency on Tensorflow>=2.0.0a0. It is already available on PyPI (2.0.0 is not available yet).
google/riegeli,google/riegeli,google/riegeli,google/riegeli
python/setup.py
python/setup.py
# Copyright 2019 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, ...
# Copyright 2019 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, ...
apache-2.0
Python
54a47c67172bfaf0f01168d7ffa5d113fe1291d2
Make executable
Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed
uniname.py
uniname.py
#!/usr/bin/env python3 import sys, unicodedata for ch in sys.argv[1]: print(ascii(ch), unicodedata.name(ch))
import sys, unicodedata for ch in sys.argv[1]: print(ascii(ch), unicodedata.name(ch))
mit
Python
56611198e486bde21e4eff954b8c16f00713d8fc
add spacing around operators
newville/scikit-image,keflavich/scikit-image,SamHames/scikit-image,Midafi/scikit-image,almarklein/scikit-image,newville/scikit-image,oew1v07/scikit-image,michaelaye/scikit-image,blink1073/scikit-image,youprofit/scikit-image,vighneshbirodkar/scikit-image,emmanuelle/scikits.image,GaZ3ll3/scikit-image,bennlich/scikit-imag...
skimage/detection/tests/test_template.py
skimage/detection/tests/test_template.py
import numpy as np from skimage.detection import match_template from numpy.random import randn def test_template(): size = 100 image = np.zeros((400, 400), dtype=np.float32) target = np.tri(size) + np.tri(size)[::-1] target = target.astype(np.float32) target_positions = [(50, 50), (200, 200)] f...
import numpy as np from skimage.detection import match_template from numpy.random import randn def test_template(): size = 100 image = np.zeros((400, 400), dtype=np.float32) target = np.tri(size) + np.tri(size)[::-1] target = target.astype(np.float32) target_positions = [(50, 50), (200, 200)] f...
bsd-3-clause
Python
f044a7baec91922ee85de91c0a6fe4d475ea49ae
fix TypeError
wathsalav/xos,cboling/xos,opencord/xos,xmaruto/mcord,zdw/xos,open-cloud/xos,wathsalav/xos,wathsalav/xos,wathsalav/xos,zdw/xos,jermowery/xos,cboling/xos,xmaruto/mcord,xmaruto/mcord,xmaruto/mcord,opencord/xos,cboling/xos,jermowery/xos,zdw/xos,jermowery/xos,jermowery/xos,zdw/xos,open-cloud/xos,opencord/xos,open-cloud/xos,...
planetstack/observer/steps/sync_external_routes.py
planetstack/observer/steps/sync_external_routes.py
import os import base64 from planetstack.config import Config from observer.openstacksyncstep import OpenStackSyncStep class SyncExternalRoutes(OpenStackSyncStep): # XXX what does this provide? provides=[] requested_interval = 86400 # This step is slow like a pig. Let's run it infrequently def call(se...
import os import base64 from planetstack.config import Config from observer.openstacksyncstep import OpenStackSyncStep class SyncExternalRoutes(OpenStackSyncStep): # XXX what does this provide? provides=[] requested_interval = 86400 # This step is slow like a pig. Let's run it infrequently def __init_...
apache-2.0
Python
c33addf039dab34d1fdb1a8c0c16213f5f7c384e
consolidate does who knows what?
Tiger66639/new-csx-extractor,Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,SeerLabs/new-csx-extractor,Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor
extractor.py
extractor.py
from extraction.core import ExtractionRunner from extraction.runnables import Extractor, RunnableError, Filter import extraction.utils as utils import subprocess32 as subprocess import os import requests import re class GrobidExtractor(Extractor): def extract(self, data, dep_results): files = {'input': data}...
from extraction.core import ExtractionRunner from extraction.runnables import Extractor, RunnableError, Filter import extraction.utils as utils import subprocess32 as subprocess import os import requests import re class GrobidExtractor(Extractor): def extract(self, data, dep_results): files = {'input': data}...
apache-2.0
Python
38f01ab7e63e40f3c2f6abe5747e89e9f3d13330
Add pallette test code
barry-scott/scm-workbench,barry-scott/git-workbench,barry-scott/scm-workbench,barry-scott/scm-workbench,barry-scott/git-workbench
Source/Scm/Experiment/palette.py
Source/Scm/Experiment/palette.py
import sys from PyQt5 import QtWidgets from PyQt5 import QtCore app = QtWidgets.QApplication(sys.argv) #app.setStyle('fusion') palette = app.palette() print( 'desktopSettingsAware: %r' % (app.desktopSettingsAware(),) ) def colorAsString( brush ): color = brush.color() grey = (color.redF() * 0.3) + (color....
import sys from PyQt5 import QtWidgets from PyQt5 import QtCore app = QtWidgets.QApplication(sys.argv) palette = app.palette() def colorAsString( brush ): color = brush.color() grey = (color.redF() * 0.3) + (color.greenF() * 0.59) + (color.blueF() * 0.11) return '%.2f,%.2f,%.2f,%.2f %.2f %.2f' % (color....
apache-2.0
Python
6abcf430d026fec949a08f2059448e357d3491d9
Increase serialized_project performance
akvo/akvo-rsr,akvo/akvo-rsr,akvo/akvo-rsr,akvo/akvo-rsr
akvo/rest/cache.py
akvo/rest/cache.py
#!/usr/bin/env python3 from akvo.cache import cache_with_key, delete_cache_data from akvo.rest.serializers import ProjectDirectorySerializer from akvo.rsr.models.project import Project, project_directory_cache_key PROJECT_DIRECTORY_CACHE = 'database' # NOTE: The data doesn't timeout, since we expect the data to be ...
#!/usr/bin/env python3 from akvo.cache import cache_with_key, delete_cache_data from akvo.rest.serializers import ProjectDirectorySerializer from akvo.rsr.models.project import Project, project_directory_cache_key PROJECT_DIRECTORY_CACHE = 'database' # NOTE: The data doesn't timeout, since we expect the data to be ...
agpl-3.0
Python
2bccad88152272af36c13973098695efd52a6bdd
Fix incorrect matcher test
spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,recognai/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,honnibal/s...
spacy/tests/regression/test_issue1450.py
spacy/tests/regression/test_issue1450.py
from __future__ import unicode_literals import pytest from ...matcher import Matcher from ...tokens import Doc from ...vocab import Vocab @pytest.mark.parametrize( 'string,start,end', [ ('a', 0, 1), ('a b', 0, 2), ('a c', 0, 1), ('a b c', 0, 2), ('a b b c', 0, 3), ...
from __future__ import unicode_literals import pytest from ...matcher import Matcher from ...tokens import Doc from ...vocab import Vocab @pytest.mark.parametrize( 'string,start,end', [ ('a', 0, 1), ('a b', 0, 2), ('a c', 0, 1), ('a b c', 0, 2), ('a b b c', 0, 2), ...
mit
Python
f172df0a255d49a4a0d389089e4a1f7cc16b7a29
Configure logging of output so that it is tied with the debug flag
jdgwartney/boundary-plugin-shell,jdgwartney/boundary-plugin-shell,boundary/boundary-plugin-shell,boundary/boundary-plugin-shell
exec_proc.py
exec_proc.py
#!/usr/bin/env python # Copyright 2014 Boundary, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
#!/usr/bin/env python # Copyright 2014 Boundary, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
Python
91087bd04ae10a01c6042aba6f89982da24c0e9f
add decorator with arguments
helloTC/LearnPython
new_usage/decorator_suppress_error.py
new_usage/decorator_suppress_error.py
#!/usr/bin/env python # coding=utf-8 import functools def suppress_errors_raw(func): """ Automatically silence errors that occur within a function """ @functools.wraps(func) def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except Exception: pa...
#!/usr/bin/env python # coding=utf-8 import functools def suppress_errors(func): """ Automatically silence errors that occur within a function """ @functools.wraps(func) def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except Exception: pass ...
mit
Python
91fb8f3825f521c52bed82fbfe1969bda5b22534
Test Cases
bw8932/inf1340_2015_asst1
exercise2.py
exercise2.py
#!/usr/bin/env python """ Assignment 1, Exercise 2, INF1340, Fall, 2015. Name that shape. This module contains one function name_that_shape(). It prompts the user to input the number of sides in a shape and outputs the name of the shape. """ __author__ = 'Susan Sim' __email__ = "ses@drsusansim.org" __copyright__ = ...
#!/usr/bin/env python """ Assignment 1, Exercise 2, INF1340, Fall, 2015. Name that shape. This module contains one function name_that_shape(). It prompts the user to input the number of sides in a shape and outputs the name of the shape. """ __author__ = 'Susan Sim' __email__ = "ses@drsusansim.org" __copyright__ = ...
mit
Python
c83688e4081197d8f381535d51af41b79d1aee23
Fix incorrect reference to function in same module
djc/runa,djc/runa,djc/runa,djc/runa
runac/util.py
runac/util.py
import os, sys BASE = os.path.dirname(os.path.dirname(__file__)) CORE_DIR = os.path.join(BASE, 'core') IGNORE = {'pos'} if sys.version_info[0] < 3: def keys(d): return d.iterkeys() def values(d): return d.itervalues() def items(d): return d.iteritems() else: def keys(d): return d.keys() def values(d): ...
import os, sys BASE = os.path.dirname(os.path.dirname(__file__)) CORE_DIR = os.path.join(BASE, 'core') IGNORE = {'pos'} if sys.version_info[0] < 3: def keys(d): return d.iterkeys() def values(d): return d.itervalues() def items(d): return d.iteritems() else: def keys(d): return d.keys() def values(d): ...
mit
Python
4f47691b876b74e8763a68981d22ceedf2889f9c
Revise doc string and add time complexity
bowen0701/algorithms_data_structures
alg_bubble_sort.py
alg_bubble_sort.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def bubble_sort(a_list): """Bubble Sort algortihm. Time complexity: O(n^2). """ for pass_num in reversed(range(len(a_list))): for i in range(pass_num): if a_list[i] > a_li...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def bubble_sort(a_list): """Bubble Sort algortihm. Concept: - Start from the item at the 1st slot to check if it is bigger than the next one. If yes, swap these two items. - Then ...
bsd-2-clause
Python
0acdaffa94f47a0e7f03e6bfe599a65858a13b3e
remove enabled from Provider admin
iXioN/django-all-access,iXioN/django-all-access
allaccess/admin.py
allaccess/admin.py
from django.contrib import admin from .models import Provider, AccountAccess class ProviderAdmin(admin.ModelAdmin): "Admin customization for OAuth providers." list_display = ('name', 'enabled', 'site',) list_filter = ('name', 'site', ) class AccountAccessAdmin(admin.ModelAdmin): "Admin customiza...
from django.contrib import admin from .models import Provider, AccountAccess class ProviderAdmin(admin.ModelAdmin): "Admin customization for OAuth providers." list_display = ('name', 'enabled', 'site',) list_filter = ('name', 'enabled', 'site', ) class AccountAccessAdmin(admin.ModelAdmin): "Admi...
bsd-2-clause
Python
98cd06e56d05c23c69cc6abfda2c90c31f45a328
remove debug-print
ChristianKniep/docker-terminal,ChristianKniep/docker-terminal
usr/local/bin/qnib-setup.py
usr/local/bin/qnib-setup.py
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Setup a qnib/terminal container Usage: qnib-setup.py [options] qnib-setup.py (-h | --help) qnib-setup.py --version Options: -h --help Show this screen. --version Show version. --loglevel, -L=<str> Loglevel ...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Setup a qnib/terminal container Usage: qnib-setup.py [options] qnib-setup.py (-h | --help) qnib-setup.py --version Options: -h --help Show this screen. --version Show version. --loglevel, -L=<str> Loglevel ...
mit
Python
2eeae8c7173a158bee3fd26d453728b603e7ba85
Update location_timestamp in AmbulanceUpdateView.
EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient
ambulance/forms.py
ambulance/forms.py
from django import forms from django.contrib.gis.forms import PointField from django.utils import timezone from emstrack.forms import LeafletPointWidget from .models import Ambulance, Call class AmbulanceCreateForm(forms.ModelForm): location = PointField( widget = LeafletPointWidget(attrs...
from django import forms from django.contrib.gis.forms import PointField from django.utils import timezone from emstrack.forms import LeafletPointWidget from .models import Ambulance, Call class AmbulanceCreateForm(forms.ModelForm): location = PointField( widget = LeafletPointWidget(attrs...
bsd-3-clause
Python
ed45c8201977aecde226b2e9b060820a8fd677c3
Remove test for deprecated createmultsig option
guncoin/guncoin,AkioNak/bitcoin,tjps/bitcoin,myriadteam/myriadcoin,tjps/bitcoin,tecnovert/particl-core,vmp32k/litecoin,jamesob/bitcoin,achow101/bitcoin,jtimon/bitcoin,particl/particl-core,DigitalPandacoin/pandacoin,MarcoFalke/bitcoin,kazcw/bitcoin,cdecker/bitcoin,andreaskern/bitcoin,paveljanik/bitcoin,Kogser/bitcoin,an...
test/functional/rpc_deprecated.py
test/functional/rpc_deprecated.py
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework class Depr...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
mit
Python
488edda7c20f00dbca36e477d1d400655eb37f9d
increment version
RasaHQ/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu
rasa/version.py
rasa/version.py
__version__ = "1.3.1a1"
__version__ = "1.3"
apache-2.0
Python
23719083123110afb864c9d7cbbf33ae5503f667
Fix ADMX template format for Windows Server 2008
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
tools/grit/grit/format/policy_templates/writer_configuration.py
tools/grit/grit/format/policy_templates/writer_configuration.py
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. def GetConfigurationForBuild(defines): '''Returns a configuration dictionary for the given build that contains build-specific settings and informati...
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. def GetConfigurationForBuild(defines): '''Returns a configuration dictionary for the given build that contains build-specific settings and informati...
bsd-3-clause
Python
2716ae180cb3a3f14678bac5f27e4d1514feb965
fix version
thestick613/python-thundercache
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', 'sphinx.ext.ifconfig', 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', 'sphinx.ext.ifconfig', 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext...
bsd-2-clause
Python
f024362b28280353b56e011190ed700190311f43
Update copyright
jaraco/jaraco.itertools
docs/conf.py
docs/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import subprocess import datetime if 'check_output' not in dir(subprocess): import subprocess32 as subprocess extensions = [ 'sphinx.ext.autodoc', 'rst.linker', ] # General information about the project. root = os.path.join(os.path.dirnam...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import subprocess import datetime if 'check_output' not in dir(subprocess): import subprocess32 as subprocess extensions = [ 'sphinx.ext.autodoc', 'rst.linker', ] # General information about the project. root = os.path.join(os.path.dirnam...
mit
Python
5a13c6e39e877c31acf34e51f8b268ee9b945665
add google analytics
davidtsadler/ebay-sdk-php
docs/conf.py
docs/conf.py
import sys import os import shlex from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer lexers['php'] = PhpLexer(startinline=True, linenos=1) lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) primary_domain = 'php' project = u'eBay SDK for PHP' version = '1.x' copyright = u'2...
import sys import os import shlex from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer lexers['php'] = PhpLexer(startinline=True, linenos=1) lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) primary_domain = 'php' project = u'eBay SDK for PHP' version = '1.x' copyright = u'2...
apache-2.0
Python
e22f770ae7590f664b39552ae76a06b3631284c6
update copyright date on docs
rdhyee/waterbutler,TomBaxter/waterbutler,RCOSDP/waterbutler,Johnetordoff/waterbutler,felliott/waterbutler,CenterForOpenScience/waterbutler
docs/conf.py
docs/conf.py
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys sys.path.insert(0, os.path.abspath("..")) import waterbutler # noqa import waterbutler.server # noqa # import waterbutler.providers # noqa master_doc = "index" project = "WaterButler" copyright = "2016, Center For...
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys sys.path.insert(0, os.path.abspath("..")) import waterbutler # noqa import waterbutler.server # noqa # import waterbutler.providers # noqa master_doc = "index" project = "WaterButler" copyright = "2014, Center For...
apache-2.0
Python
412bf0d7ea04671e2aed7861bccaa240418af74b
remove user profile by default
mgpepe/django-heroku-15,mgpepe/django-heroku-15
DjMainApp/models.py
DjMainApp/models.py
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save """ # Uncomment those lines after you have synced your database to get user profile functionality ############################################################## # Create your models here. class Us...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save # Create your models here. class UserProfile(models.Model): user = models.OneToOneField(User, related_name="profile") pass_reset_code = models.CharField(max_length=200, null=True, blank=True, defau...
apache-2.0
Python
f8c22c35088293f899da263db0f7e74955101281
Apply black to conf.py.
aaugustin/django-sesame,aaugustin/django-sesame
docs/conf.py
docs/conf.py
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html import datetime # -- Project information --------------------------------------------...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html import datetime # -- Project information --------------------------------------------...
bsd-3-clause
Python
09c3b752154478b15a45d11f08d46a5003f174ec
Revert keyword optimization for current release
codeforeurope/Change-By-Us,watchcat/cbu-rotterdam,codeforeurope/Change-By-Us,codeforeurope/Change-By-Us,codeforeurope/Change-By-Us,watchcat/cbu-rotterdam,localprojects/Change-By-Us,watchcat/cbu-rotterdam,watchcat/cbu-rotterdam,watchcat/cbu-rotterdam,localprojects/Change-By-Us,localprojects/Change-By-Us,localprojects/Ch...
giveaminute/keywords.py
giveaminute/keywords.py
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ # find keywords in a string def getKeywords(db, s): sql = "select keyword from keyword" data = list(db.query(sql)) words = [] for d in data: if (d.keywor...
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ from framework.controller import log # find keywords in a string def getKeywords(db, s): """Get all matches for passed in string in keyword tables :param db: database handle ...
agpl-3.0
Python
441e9e378a467cc69af96c8c465a1a351e667326
Fix Python 2.7 failures
stscieisenhamer/glue,saimn/glue,saimn/glue,stscieisenhamer/glue
glue/_plugin_helpers.py
glue/_plugin_helpers.py
# The following funtion is a thin wrapper around iter_entry_points. The reason it # is in this separate file is that when making the Mac app, py2app doesn't # support entry points, so we replace this function with a version that has the # entry points we want hardcoded. If this function was in glue/main.py, the # refer...
# The following funtion is a thin wrapper around iter_entry_points. The reason it # is in this separate file is that when making the Mac app, py2app doesn't # support entry points, so we replace this function with a version that has the # entry points we want hardcoded. If this function was in glue/main.py, the # refer...
bsd-3-clause
Python
d7001ccab0879e17308bf2dc945b5fd3b726be27
Write the critical multiplier or the range when the damage gets converted into a String
bkittelmann/statblock
statblock/dice.py
statblock/dice.py
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
mit
Python
67cbb212675057266686736c060fc617ca8644b2
Fix UserMessage.id sequence calculation in 0240.
zulip/zulip,zulip/zulip,zulip/zulip,zulip/zulip,zulip/zulip,zulip/zulip,zulip/zulip
zerver/migrations/0240_usermessage_migrate_bigint_id_into_id.py
zerver/migrations/0240_usermessage_migrate_bigint_id_into_id.py
# Generated by Django 1.11.23 on 2019-08-23 21:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("zerver", "0239_usermessage_copy_id_to_bigint_id"), ] operations = [ migrations.RunSQL( """ DROP TRIGGER zerver_use...
# Generated by Django 1.11.23 on 2019-08-23 21:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("zerver", "0239_usermessage_copy_id_to_bigint_id"), ] operations = [ migrations.RunSQL( """ DROP TRIGGER zerver_use...
apache-2.0
Python
1df5bf573bf36b94a2bafbd16870053805a80e6e
set complex example as default
firemark/pixelopolis,firemark/pixelopolis,firemark/pixelopolis,firemark/pixelopolis
web/web.py
web/web.py
from flask import Flask, request, render_template, url_for from subprocess import run, TimeoutExpired, PIPE from base64 import b64encode app = Flask(__name__) FILES = { 'Cube': 'examples/cube.css', 'Pyramid': 'examples/pyramid.css', 'Triangle': 'examples/triangle.css', 'Fillers': 'examples/fillers.css...
from flask import Flask, request, render_template, url_for from subprocess import run, TimeoutExpired, PIPE from base64 import b64encode app = Flask(__name__) FILES = { 'Cube': 'examples/cube.css', 'Pyramid': 'examples/pyramid.css', 'Triangle': 'examples/triangle.css', 'Fillers': 'examples/fillers.css...
mit
Python
25ed1e5f6a263fcd61e6d5fcb67220f72664efc6
remove final blank line.
eReuse/grd,eReuse/grd
grd/tests/test_event.py
grd/tests/test_event.py
from django.test import TestCase from grd.models import Event class EventTest(TestCase): fixtures = ['agents.json', 'devices.json', 'events.json', 'users.json'] def test_event_representation(self): for event in Event.objects.all(): self.assertIsNotNone(repr(event))
from django.test import TestCase from grd.models import Event class EventTest(TestCase): fixtures = ['agents.json', 'devices.json', 'events.json', 'users.json'] def test_event_representation(self): for event in Event.objects.all(): self.assertIsNotNone(repr(event))
agpl-3.0
Python
95f7c6cba7c4077053899e3ca01c8ffd3172873c
Add view mixin for working with filters in templates
stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten
grouprise/core/views.py
grouprise/core/views.py
import json import django from django_filters.views import FilterMixin from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class TemplateFilterMixin(FilterMixin): ...
import json import django from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class AppConfig: def __init__(self): self._settings = {} self._defaul...
agpl-3.0
Python
4173a7f4db268e9370484cf93fee2d9f0e913d6e
Update deprecated --auth usage instructions. #146
denmojo/pygrow,grow/grow,denmojo/pygrow,grow/pygrow,grow/grow,denmojo/pygrow,grow/pygrow,denmojo/pygrow,grow/pygrow,grow/grow,grow/grow
grow/commands/deploy.py
grow/commands/deploy.py
from grow.common import utils from grow.deployments.destinations import base from grow.deployments.stats import stats from grow.pods import pods from grow.pods import storage import click import os @click.command() @click.argument('deployment_name', required=False, default='default') @click.argument('pod_path', defau...
from grow.common import utils from grow.deployments.destinations import base from grow.deployments.stats import stats from grow.pods import pods from grow.pods import storage import click import os @click.command() @click.argument('deployment_name', required=False, default='default') @click.argument('pod_path', defau...
mit
Python
d7190980ad5edecd3625af4ba6d8a7bdbb66b810
Change start page text.
talavis/kimenu
flask_app.py
flask_app.py
from flask import Flask from flask_caching import Cache import main from flask import Flask from flask_caching import Cache import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) @app.route('/') def display_available(): content = ('<html>' + '<head>' + ...
from flask import Flask from flask_caching import Cache import main from flask import Flask from flask_caching import Cache import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) @app.route('/') def display_available(): content = ('<html>' + '<head>' + ...
bsd-3-clause
Python
a53941e1eee016acbddf9db3096b2b3e42953276
Update HexStats.py
Vlek/plugins
HexChat/HexStats.py
HexChat/HexStats.py
import hexchat #Based on Weechat's Weestats: https://weechat.org/scripts/source/weestats.py.html/ #By Filip H.F. 'FiXato' Slagter <fixato [at] gmail [dot] com> __module_name__ = 'HexStats' __module_version__ = '0.0.1' __module_description__ = 'Displays HexChat Wide User Statistics' __module_author__ = 'Vlek' def st...
import hexchat #Based on Weechat's Weestats: https://weechat.org/scripts/source/weestats.py.html/ #By Filip H.F. 'FiXato' Slagter <fixato [at] gmail [dot] com> __module_name__ = 'HexStats' __module_version__ = '0.0.1' __module_description__ = 'Displays HexChat Wide User Statistics' __module_author__ = 'Vlek' def st...
mit
Python
e4ef6d13caa70f91c51c2cb30462754f117e8ddf
Correct mixer.set_volume() docstring
rawdlite/mopidy,dbrgn/mopidy,glogiotatidis/mopidy,bencevans/mopidy,diandiankan/mopidy,ali/mopidy,quartz55/mopidy,jmarsik/mopidy,vrs01/mopidy,pacificIT/mopidy,diandiankan/mopidy,tkem/mopidy,quartz55/mopidy,hkariti/mopidy,ali/mopidy,tkem/mopidy,mokieyue/mopidy,adamcik/mopidy,ZenithDK/mopidy,dbrgn/mopidy,swak/mopidy,glogi...
mopidy/core/mixer.py
mopidy/core/mixer.py
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer def get_volume(self): """Get the volume. Integer in range [0..10...
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer def get_volume(self): """Get the volume. Integer in range [0..10...
apache-2.0
Python