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
1172f085b4f4182cc8bbe13d382a8234afd56c04
Bump version
natgeo/django-broadcasts,natgeo/django-broadcasts,Natgeoed/django-broadcasts,Natgeoed/django-broadcasts,Natgeoed/django-broadcasts,natgeo/django-broadcasts
broadcasts/__init__.py
broadcasts/__init__.py
# -*- coding: utf-8 -*- """ A small Django app that displays configurable broadcast messages across whole or part of a site. """ __version_info__ = { 'major': 0, 'minor': 10, 'micro': 0, 'releaselevel': 'final', 'serial': 1 } def get_version(short=False): assert __version_info__['releaselevel'...
# -*- coding: utf-8 -*- """ A small Django app that displays configurable broadcast messages across whole or part of a site. """ __version_info__ = { 'major': 0, 'minor': 9, 'micro': 0, 'releaselevel': 'final', 'serial': 1 } def get_version(short=False): assert __version_info__['releaselevel']...
mit
Python
7641d1193e4d83eb1b2277d3afb9745df7499d12
add back ability to restart with a restorefile
sassoftware/mirrorball,sassoftware/mirrorball
scripts/order_update.py
scripts/order_update.py
#!/usr/bin/python # # Copyright (c) 2009-2010 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://w...
#!/usr/bin/python # # Copyright (c) 2009-2010 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://w...
apache-2.0
Python
605d4118e9afda5c539b8df5eee4e4bfbe3994f9
Speed up left pointer moving
bowen0701/algorithms_data_structures
lc1004_max_consecutive_ones_iii.py
lc1004_max_consecutive_ones_iii.py
"""Leetcode 1004. Max Consecutive Ones III Medium URL: https://leetcode.com/problems/max-consecutive-ones-iii/ Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the longest (contiguous) subarray that contains only 1s. Example 1: Input: A = [1,1,1,0,0,0,1,1,1,1,0], K = 2 ...
"""Leetcode 1004. Max Consecutive Ones III Medium URL: https://leetcode.com/problems/max-consecutive-ones-iii/ Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the longest (contiguous) subarray that contains only 1s. Example 1: Input: A = [1,1,1,0,0,0,1,1,1,1,0], K = 2 ...
bsd-2-clause
Python
6c82b9363c46f01850907c8fdb2e3970f87a2bfc
Complete naive sol: TLE
bowen0701/algorithms_data_structures
lc287_find_the_duplicate_number.py
lc287_find_the_duplicate_number.py
"""Leetcode 287. Find the Duplicate Number Medium URL: https://leetcode.com/problems/find-the-duplicate-number/ Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find ...
"""Leetcode 287. Find the Duplicate Number Medium URL: https://leetcode.com/problems/find-the-duplicate-number/ Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find ...
bsd-2-clause
Python
13a8c3f745d6bae6a3191cf17e77c5f6dc5a7de8
Add source reference
G07cha/FMForBlind
keylogger.py
keylogger.py
import termios, sys, os TERMIOS = termios # Source: http://python4fun.blogspot.com/2008/06/get-key-press-in-python.html def getkey(): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new[3] = new[3] & ~TERMIOS.ICANON & ~TERMIOS.ECHO new[6][TERMIOS.VMIN] = 1 new[6][TERMIOS.VTIME] =...
import termios, sys, os TERMIOS = termios def getkey(): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new[3] = new[3] & ~TERMIOS.ICANON & ~TERMIOS.ECHO new[6][TERMIOS.VMIN] = 1 new[6][TERMIOS.VTIME] = 0 termios.tcsetattr(fd, TERMIOS.TCSANOW, new) c = None try: c = os.read(f...
mit
Python
05972e0b65fcf950f0a681be256423c85b4ff323
Update news
JohnSounder/AP-API,kuastw/AP-API,JohnSounder/AP-API,kuastw/AP-API
kuas/news.py
kuas/news.py
# -*- coding: utf-8 -*- import random ENABLE = 1 NEWS_ID = 26 NEWS_TITLE = "" NEWS_IMAGE = "http://i.imgur.com/NAxVxbV.jpg" NEWS_URL = "http://goo.gl/Yh1iIF" NEWS_CONTENT = """ """ def random_news(): news_list = [ { "news_title": "企管系 BOSS 競賽", "news_image": "http://i.imgur.com/V...
# -*- coding: utf-8 -*- import random ENABLE = 1 NEWS_ID = 26 NEWS_TITLE = "" NEWS_IMAGE = "http://i.imgur.com/NAxVxbV.jpg" NEWS_URL = "http://goo.gl/Yh1iIF" NEWS_CONTENT = """ """ def random_news(): news_list = [ #{ # "news_title": "高應盃籃球錦標賽", # "news_image": "http://i.imgur.com/N...
mit
Python
ef80b142f0cd7129a7ff21dff41a9fc56d7fb5dd
Fix fuzzy-date output for times between 1 and 2 hours ago.
ralic/GitSavvy,jmanuel1/GitSavvy,divmain/GitSavvy,asfaltboy/GitSavvy,dreki/GitSavvy,stoivo/GitSavvy,ddevlin/GitSavvy,ypersyntelykos/GitSavvy,ddevlin/GitSavvy,ypersyntelykos/GitSavvy,divmain/GitSavvy,theiviaxx/GitSavvy,theiviaxx/GitSavvy,stoivo/GitSavvy,ddevlin/GitSavvy,dvcrn/GitSavvy,asfaltboy/GitSavvy,dvcrn/GitSavvy,d...
common/util/dates.py
common/util/dates.py
from datetime import datetime TEN_MINS = 600 ONE_HOUR = 3600 TWO_HOURS = 7200 ONE_DAY = 86400 def fuzzy(event, base=None): if not base: base = datetime.now() if type(event) == str: event = datetime.fromtimestamp(int(event)) elif type(event) == int: event = datetime.fromtimestamp(...
from datetime import datetime TEN_MINS = 600 ONE_HOUR = 3600 TWO_HOURS = 7200 ONE_DAY = 86400 def fuzzy(event, base=None): if not base: base = datetime.now() if type(event) == str: event = datetime.fromtimestamp(int(event)) elif type(event) == int: event = datetime.fromtimestamp(...
mit
Python
f37e52eba92e549bcbf919499fbda8be20ba3d5a
work around apparent matrix_product bug
MSeifert04/astropy,saimn/astropy,DougBurke/astropy,pllim/astropy,MSeifert04/astropy,astropy/astropy,lpsinger/astropy,saimn/astropy,StuartLittlefair/astropy,larrybradley/astropy,dhomeier/astropy,MSeifert04/astropy,stargaser/astropy,AustereCuriosity/astropy,StuartLittlefair/astropy,dhomeier/astropy,mhvk/astropy,AustereCu...
astropy/coordinates/velocities.py
astropy/coordinates/velocities.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tools for computing velocities and velocity corrections using Astropy coordinates and related machinery. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from .. import units as u from ....
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tools for computing velocities and velocity corrections using Astropy coordinates and related machinery. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from .. import units as u from ....
bsd-3-clause
Python
8d46a0acf27be284959babdb0464eadcb21b894b
stop inadvertent switch from bytes to unicode in baseheaders
gratipay/aspen.py,gratipay/aspen.py
aspen/http/baseheaders.py
aspen/http/baseheaders.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from aspen.backcompat import CookieError, SimpleCookie from aspen.exceptions import CRLFInjection from aspen.http.mapping import CaseInsensitiveMapping from aspen.utils...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from aspen.backcompat import CookieError, SimpleCookie from aspen.exceptions import CRLFInjection from aspen.http.mapping import CaseInsensitiveMapping from aspen.utils...
mit
Python
4666849791cad70ae1bb907a2dcc35ccfc0b7de4
Update dimkarakostas population with alignmentalphabet
esarafianou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/ruptu...
backend/populate_dimkarakostas.py
backend/populate_dimkarakostas.py
from string import ascii_lowercase import django import os import string os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from breach.models import Target, Victim endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s' prefix = 'imper' alphabet = ascii_lowercase secretlength ...
from string import ascii_lowercase import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from breach.models import Target, Victim endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s' prefix = 'imper' alphabet = ascii_lowercase secretlength = 9 target_1 ...
mit
Python
daec8c343c6cce584802b80b14a90e188e326555
add resources
ziirish/burp-ui,ziirish/burp-ui,ziirish/burp-ui,ziirish/burp-ui
burpui/api/settings.py
burpui/api/settings.py
# -*- coding: utf8 -*- from burpui import app, bui, login_manager from burpui.api import api from flask.ext.restful import reqparse, abort, Resource from flask.ext.login import current_user, login_required from flask import request, render_template, jsonify @api.resource('/api/server-config', '/api/<server>/server-co...
# -*- coding: utf8 -*- from burpui import app, bui, login_manager from flask.ext.restful import reqparse, abort, Resource from flask.ext.login import current_user, login_required from flask import request, render_template, jsonify class ServerSettings(Resource): @login_required def get(self, server=None)...
bsd-3-clause
Python
25d72d045676108d23180213f3916fb4563f9d46
Update test description
kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix
Testing/Unit/Python/sitkTransformixImageFilterTest.py
Testing/Unit/Python/sitkTransformixImageFilterTest.py
from __future__ import print_function import sys import unittest import SimpleITK as sitk class TransformixImageFilterTest(unittest.TestCase): """Test the deformation field api""" def setUp(self): pass def test_TransformixImageFilter_GetDeformationField(self): fixedImage = sitk.Image( 4...
from __future__ import print_function import sys import unittest import SimpleITK as sitk class TransformixImageFilterTest(unittest.TestCase): """Test the SimpleITK Process Object and related Command classes""" def setUp(self): pass def test_TransformixImageFilter_GetDeformationField(self): ...
apache-2.0
Python
1b74dc0288d1f3349e5045f6791c8495435c961d
Fix bug - error page could display message now
cardmaster/makeclub,cardmaster/makeclub,cardmaster/makeclub
controlers/errors.py
controlers/errors.py
'''Copyright(C): Leaf Johnson 2011 This file is part of makeclub. makeclub 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 versi...
'''Copyright(C): Leaf Johnson 2011 This file is part of makeclub. makeclub 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 versi...
agpl-3.0
Python
27a53d46b041fc3fb012ee6a68263511e278026f
check for the interpreted parameter type for positional args.
pearsontechnology/st2contrib,pidah/st2contrib,armab/st2contrib,tonybaloney/st2contrib,tonybaloney/st2contrib,StackStorm/st2contrib,tonybaloney/st2contrib,pidah/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,pearsontechnology/st2contrib,pidah/st2contrib,StackStorm/st2contrib,armab/st2contrib,armab/st2cont...
packs/salt/tests/test_action_local.py
packs/salt/tests/test_action_local.py
from st2tests.base import BaseActionTestCase from local import SaltLocal import requests_mock from requests_mock.contrib import fixture import testtools __all__ = [ 'SaltLocalActionTestCase' ] no_args = { 'module': 'this.something', 'target': '*', 'expr_form': 'glob', 'args': [] } one_arg = { ...
from st2tests.base import BaseActionTestCase from local import SaltLocal import requests_mock from requests_mock.contrib import fixture import testtools __all__ = [ 'SaltLocalActionTestCase' ] no_args = { 'module': 'this.something', 'target': '*', 'expr_form': 'glob', 'args': [] } one_arg = { ...
apache-2.0
Python
c83a11894c7d83a62170cb1a2efc25f017082835
Update to version 0.7.6
vkosuri/ChatterBot,gunthercox/ChatterBot
chatterbot/__init__.py
chatterbot/__init__.py
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.7.6' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', )
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.7.5' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', )
bsd-3-clause
Python
8abdce9c60c9d2ead839e0065d35128ec16a82a1
Add commad line utility to find NLTK data
gunthercox/ChatterBot,vkosuri/ChatterBot
chatterbot/__main__.py
chatterbot/__main__.py
import sys if __name__ == '__main__': import chatterbot if '--version' in sys.argv: print(chatterbot.__version__) if 'list_nltk_data' in sys.argv: import os import nltk.data data_directories = [] # Find each data directory in the NLTK path that has content ...
import sys if __name__ == '__main__': import chatterbot if '--version' in sys.argv: print(chatterbot.__version__) if 'list_nltk_data' in sys.argv: import nltk.data print('\n'.join(nltk.data.path))
bsd-3-clause
Python
405c3f800f85051d04922fb6de08550cd720ce09
fix double requests
fnatalucci/NSAEQGRPFortinetVerify
check_fortinet_vuln.py
check_fortinet_vuln.py
#!/usr/bin/env python import sys, getopt, os.path, os, urllib3 import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) #verifico se esiste il file EGBL.config def usage(): print "" print "######## Fortinet NSA ...
#!/usr/bin/env python import sys, getopt, os.path, os, urllib3 import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) #verifico se esiste il file EGBL.config def usage(): print "" print "######## Fortinet NSA ...
mit
Python
5f9a7eda45db0207fe4a9c8f5b5b926280b09306
Fix EOF
klipstein/dojango,ofirr/dojango,ricard33/dojango,william-gr/dojango,william-gr/dojango,ricard33/dojango,klipstein/dojango,ofirr/dojango,william-gr/dojango,ricard33/dojango,ofirr/dojango
dojango/__init__.py
dojango/__init__.py
# following PEP 386 __version__ = "0.5.7-alpha"
# following PEP 386 __version__ = "0.5.7-alpha"
bsd-3-clause
Python
3c546d6b85045b1eb9d6556fdff48cb7d56708e3
Update imports for workflow package __init__
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
blockbuster/workflows/__init__.py
blockbuster/workflows/__init__.py
__author__ = 'matt' import command_start import command_help
__author__ = 'matt' import block import start import command_help
mit
Python
210c7b7fb421a7c083b9d292370b15c0ece17fa7
Correct handler reference variable name and add convenient accessors.
4degrees/mill,4degrees/sawmill
source/bark/__init__.py
source/bark/__init__.py
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from .handler.distribute import Distribute #: Top level handler responsible for relaying all logs to other handlers. handler = Distribute() handlers = handler.handlers handle = handler.handle
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from .handler.distribute import Distribute #: Top level handler responsible for relaying all logs to other handlers. handle = Distribute()
apache-2.0
Python
bc6e5bbcdddf4f145c752f17b6eeb1364243f64d
Add test for shipping address with empty name
microcom/partner-contact,microcom/partner-contact,brain-tec/partner-contact,brain-tec/partner-contact
partner_firstname/tests/test_empty.py
partner_firstname/tests/test_empty.py
# -*- coding: utf-8 -*- # © 2014-2015 Grupo ESOC <www.grupoesoc.es> # © 2016 Yannick Vaucher (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """Test situations where names are empty. To have more accurate results, remove the ``mail`` module before testing. """ from openerp.tests.commo...
# -*- coding: utf-8 -*- # © 2014-2015 Grupo ESOC <www.grupoesoc.es> # © 2016 Yannick Vaucher (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """Test situations where names are empty. To have more accurate results, remove the ``mail`` module before testing. """ from openerp.tests.commo...
agpl-3.0
Python
2c7bc6b168284795ab35748bfe784b362348e008
fix exception with str(Variable.Undefined())
dgk/django-business-logic,dgk/django-business-logic,vlfedotov/django-business-logic,dgk/django-business-logic,vlfedotov/django-business-logic,vlfedotov/django-business-logic,dgk/django-business-logic,vlfedotov/django-business-logic,vlfedotov/django-business-logic,dgk/django-business-logic
business_logic/models/variable.py
business_logic/models/variable.py
# -*- coding: utf-8 -*- from django.db import models from django.utils.encoding import python_2_unicode_compatible, smart_text from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class VariableDefinition(models.Model): name = models.TextField(_('Variable name'), blank=False, null...
# -*- coding: utf-8 -*- from django.db import models from django.utils.encoding import python_2_unicode_compatible, smart_text from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class VariableDefinition(models.Model): name = models.TextField(_('Variable name'), blank=False, null...
mit
Python
5321408299211b5eabff4e4324fd6e95488b0dc4
modify module info of Deagle
sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec
benchexec/tools/deagle.py
benchexec/tools/deagle.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
apache-2.0
Python
9a4a5d07dd4fb8af21236e3aaf3227c0c71db18e
remove unnecessary import
kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenamida/ToolsForAtCoder,kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenamida/atcoder-tools,kyuridenam...
benchmark/overall_test.py
benchmark/overall_test.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys sys.path.append("../core") sys.path.append("..") from AtCoder import AtCoder import AccountInformation import FormatAnalyzer import FormatPredictor class NoPatternFoundError(Exception) : pass if __name__ == "__main__": atcoder = AtCoder(AccountInform...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys sys.path.append("../core") sys.path.append("..") from AtCoder import AtCoder import AccountInformation import FormatAnalyzer import FormatPredictor import CppCodeGenerator class NoPatternFoundError(Exception) : pass if __name__ == "__main__": atcode...
mit
Python
c1f7544138990dc6dbb05090711d57e6fea36fb4
Create all.py to run all tests
laffra/pava,laffra/pava
pava/implementation/tests/__init__.py
pava/implementation/tests/__init__.py
import unittest import arrays ArrayTest = arrays.ArrayTest class PavaTest(unittest.TestCase): def test_general(self): pass if __name__ == "__main__": unittest.main()
mit
Python
5165189e9cead956fed3e5fc0a6f070b5195ffef
Undo the sh stuff for now
ariscop/cpp-coveralls,ariscop/cpp-coveralls,ariscop/cpp-coveralls
coveralls/gitrepo.py
coveralls/gitrepo.py
import os from sh import git def gitrepo(self): """Return hash of Git data that can be used to display more information to users. Example: "git": { "head": { "id": "5e837ce92220be64821128a70f6093f836dd2c05", "author_name": "Wil Gieseler", ...
import locale import os import subprocess def gitrepo(self): """Return hash of Git data that can be used to display more information to users. Example: "git": { "head": { "id": "5e837ce92220be64821128a70f6093f836dd2c05", "author_name": "Wil Gieseler", ...
apache-2.0
Python
0491b008febd429051ace80649203b44ec0d6438
fix package import for py3.x
pombredanne/drf-pdf,drgarcia1986/drf-pdf
drf_pdf/response.py
drf_pdf/response.py
# encoding: utf-8 import codecs import os from rest_framework.response import Response from .exceptions import PDFFileNotFound class PDFResponse(Response): """ DRF Response to render data as a PDF File. kwargs: - pdf (byte array). The PDF file content. - file_name (string). The default d...
# encoding: utf-8 import codecs import os from rest_framework.response import Response from exceptions import PDFFileNotFound class PDFResponse(Response): """ DRF Response to render data as a PDF File. kwargs: - pdf (byte array). The PDF file content. - file_name (string). The default do...
mit
Python
e1d9e0bf4113fb9ed1ac0a4feba613abae28e50e
Remove default value from argParser
cmol/punchVPN
punchVPN.py
punchVPN.py
#!/usr/bin/python3 import punchVPN import socket from random import randint from punchVPN.udpKnock import udpKnock from punchVPN.WebConnect import WebConnect import argparse parser = argparse.ArgumentParser(prog='punchVPN.py', formatter_class=argparse.ArgumentDefaultsHelpFormatter, ...
#!/usr/bin/python3 import punchVPN import socket from random import randint from punchVPN.udpKnock import udpKnock from punchVPN.WebConnect import WebConnect import argparse parser = argparse.ArgumentParser(prog='snake.py', formatter_class=argparse.ArgumentDefaultsHelpFormatter, ...
mit
Python
3ee1a7b75c57122685e99fb7a30e7469e5678329
add eval for semantic segmentation to __init__
yuyu2172/chainercv,chainer/chainercv,pfnet/chainercv,yuyu2172/chainercv,chainer/chainercv
chainercv/evaluations/__init__.py
chainercv/evaluations/__init__.py
from chainercv.evaluations.eval_pck import eval_pck # NOQA from chainercv.evaluations.eval_semantic_segmentation import label_accuracy_score # NOQA
from chainercv.evaluations.eval_pck import eval_pck # NOQA
mit
Python
bc1800f20942625c4a424247bc207e2bd2a441d7
check result is none.
Kjwon15/autotweet
autotweet/app.py
autotweet/app.py
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/') def form(): atm = app.config['atm'] count = len(atm) return render_template('form.html', count=count) @app.route('/query/') def result(): atm = app.config['atm'] query = request.args['query'] re...
from flask import Flask, jsonify, render_template, request app = Flask(__name__) @app.route('/') def form(): atm = app.config['atm'] count = len(atm) return render_template('form.html', count=count) @app.route('/query/') def result(): atm = app.config['atm'] query = request.args['query'] an...
mit
Python
c8c520cb60121a5f6613ef76dae08c48c5daa98e
Update __init__.py
danforthcenter/plantcv,stiphyMT/plantcv,stiphyMT/plantcv,danforthcenter/plantcv,stiphyMT/plantcv,danforthcenter/plantcv
plantcv/plantcv/transform/__init__.py
plantcv/plantcv/transform/__init__.py
from plantcv.plantcv.transform.color_correction import get_color_matrix from plantcv.plantcv.transform.color_correction import get_matrix_m from plantcv.plantcv.transform.color_correction import calc_transformation_matrix from plantcv.plantcv.transform.color_correction import apply_transformation_matrix from plantcv.pl...
from plantcv.plantcv.transform.color_correction import get_color_matrix from plantcv.plantcv.transform.color_correction import get_matrix_m from plantcv.plantcv.transform.color_correction import calc_transformation_matrix from plantcv.plantcv.transform.color_correction import apply_transformation_matrix from plantcv.pl...
mit
Python
b43e42d74e8bd6473d926498492300a1f9d88650
Extend to versioneer versions
fnielsen/cvrminer,fnielsen/cvrminer,fnielsen/cvrminer
cvrminer/__init__.py
cvrminer/__init__.py
"""CVR Miner.""" from ._version import get_versions __version__ = get_versions()['version'] del get_versions
"""CVR Miner."""
apache-2.0
Python
d2bc43a5e2c6023d0483c2b7837c90e35d68d16f
Stop building for vivid
mit-athena/build-system
dabuildsys/config.py
dabuildsys/config.py
#!/usr/bin/python """ Shared configuration-level variables. """ from glob import glob import os import os.path debian_releases = ['wheezy', 'jessie'] ubuntu_releases = ['precise', 'trusty', 'wily'] releases = debian_releases + ubuntu_releases debian_tags = { 'wheezy' : 'debian7.0', 'jessie' : 'debian8.0~0.2' } ubun...
#!/usr/bin/python """ Shared configuration-level variables. """ from glob import glob import os import os.path debian_releases = ['wheezy', 'jessie'] ubuntu_releases = ['precise', 'trusty', 'vivid', 'wily'] releases = debian_releases + ubuntu_releases debian_tags = { 'wheezy' : 'debian7.0', 'jessie' : 'debian8.0~0....
mit
Python
3d6a8ea61d2ced5cde85875613e816ff446cc644
Correct test string
ayushin78/coala,tushar-rishav/coala,AdeshAtole/coala,Shade5/coala,NalinG/coala,d6e/coala,SanketDG/coala,Tanmay28/coala,kartikeys98/coala,Uran198/coala,abhiroyg/coala,stevemontana1980/coala,Balaji2198/coala,damngamerz/coala,Tanmay28/coala,AbdealiJK/coala,NalinG/coala,djkonro/coala,meetmangukiya/coala,Balaji2198/coala,yl...
coalib/tests/parsing/StringProcessing/UnescapeTest.py
coalib/tests/parsing/StringProcessing/UnescapeTest.py
import sys import unittest sys.path.insert(0, ".") from coalib.tests.parsing.StringProcessing.StringProcessingTestBase import ( StringProcessingTestBase) from coalib.parsing.StringProcessing import unescape class UnescapeTest(StringProcessingTestBase): # Test the unescape() function. def test_basic(self)...
import sys import unittest sys.path.insert(0, ".") from coalib.tests.parsing.StringProcessing.StringProcessingTestBase import ( StringProcessingTestBase) from coalib.parsing.StringProcessing import unescape class UnescapeTest(StringProcessingTestBase): # Test the unescape() function. def test_basic(self)...
agpl-3.0
Python
b0f01f276a38418a7b7d179d297f28a176d66ada
Update cronjob location to be in prod instead of local
googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks
project/services/data_updater/main.py
project/services/data_updater/main.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 # # https://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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
Python
696a79069ad1db1caee4d6da0c3c48dbd79f9157
Modify to avoid excessive logger initialization
thombashi/sqliteschema
sqliteschema/_logger.py
sqliteschema/_logger.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import from __future__ import unicode_literals import logbook import pytablewriter import simplesqlite logger = logbook.Logger("sqliteschema") logger.disable() def set_logger(is_enable): if is_en...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import from __future__ import unicode_literals import logbook import pytablewriter import simplesqlite logger = logbook.Logger("sqliteschema") logger.disable() def set_logger(is_enable): pytablew...
mit
Python
ad97f95085e4c24c68b0d10b3648fd88b581ffb7
sort of refine code
datalib/libextract,datalib/libextract
libextract/prototypes/prototype.py
libextract/prototypes/prototype.py
from functools import wraps from statscounter import stats from ..formatters import table_json, get_table_rows, chunks def processes(*tags): tags = set(tags) def decorator(fn): @wraps(fn) def reducer(nodes): for n in nodes: #yield fn(n) if n.tag in tags else n ...
from functools import wraps from statscounter import stats from ..formatters import table_json def processes(*tags): tags = set(tag for tag in tags) def decorator(fn): @wraps(fn) def reducer(nodes): for n in nodes: #yield fn(n) if n.tag in tags else n ...
mit
Python
ea2aecf37c5a3dbdd8a18a35d94555a8bd9ba727
Fix test gmsh (#504)
erdc/proteus,erdc/proteus,erdc/proteus,erdc/proteus
proteus/tests/test_gmsh_generation.py
proteus/tests/test_gmsh_generation.py
import unittest import numpy.testing as npt import numpy as np from subprocess import check_call from proteus.Profiling import logEvent from proteus import Comm, Profiling from proteus import Domain from proteus import MeshTools comm = Comm.init() Profiling.procID = comm.rank() logEvent("Testing Gmsh Mesh Conversion")...
import unittest import numpy.testing as npt import numpy as np from subprocess import check_call from proteus.Profiling import logEvent from proteus import Comm, Profiling from proteus import Domain from proteus import MeshTools comm = Comm.init() Profiling.procID = comm.rank() logEvent("Testing Gmsh Mesh Conversion")...
mit
Python
c822589c0f7ef71a0a898f7c4b5a7de153b233ce
Add missing comma
HERA-Team/librarian,HERA-Team/librarian,HERA-Team/librarian
librarian_packages/server/setup.py
librarian_packages/server/setup.py
from setuptools import setup package_name = "librarian_server" __version__ = '0.1.7a0' setup( name=package_name, version=__version__, author='HERA Team', author_email='hera@lists.berkeley.edu', url='https://github.com/HERA-Team/librarian/', license='BSD', description='A server for the ...
from setuptools import setup package_name = "librarian_server" __version__ = '0.1.7a0' setup( name=package_name, version=__version__, author='HERA Team', author_email='hera@lists.berkeley.edu', url='https://github.com/HERA-Team/librarian/', license='BSD', description='A server for the ...
bsd-2-clause
Python
a919b9531c2aaeddc0444e39c744940ff23f574f
Update test for cradmin_test_css_class.
appressoas/django_cradmin,appressoas/django_cradmin,appressoas/django_cradmin
django_cradmin/tests/test_viewhelpers/test_delete.py
django_cradmin/tests/test_viewhelpers/test_delete.py
import htmls from django.test import TestCase from django.test.client import RequestFactory from django_cradmin.python2_compatibility import mock from django_cradmin.viewhelpers import formview class TestDelete(TestCase): def setUp(self): self.factory = RequestFactory() def test_get(self): cl...
import htmls from django.test import TestCase from django.test.client import RequestFactory from django_cradmin.python2_compatibility import mock from django_cradmin.viewhelpers import formview class TestDelete(TestCase): def setUp(self): self.factory = RequestFactory() def test_get(self): cl...
bsd-3-clause
Python
59c974e1d52f232dda1f73665fc364cc25d2110b
Update withdraw-from-one-exchange-to-another.py
ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt
examples/py/withdraw-from-one-exchange-to-another.py
examples/py/withdraw-from-one-exchange-to-another.py
import ccxt import sys from pprint import pprint print('python', sys.version) print('CCXT Version:', ccxt.__version__) binance = ccxt.binance({ "apiKey": 'YOUR_BINANCE_API_KEY', "secret": 'YOUR_BINANCE_SECRET', 'options': { 'fetchCurrencies': True, }, }) binance.verbose = True kucoin = ccxt.k...
import ccxt import sys from pprint import pprint print('python', sys.version) print('CCXT Version:', ccxt.__version__) binance = ccxt.binance({ "apiKey": 'YOUR_BINANCE_API_KEY', "secret": 'YOUR_BINANCE_SECRET', 'options': { 'fetchCurrencies': True, }, }) binance.verbose = True kucoin = ccxt.k...
mit
Python
6d13f704a8e976dd2b498216371ac1f0dc843ef2
support .py extension in cython_freeze
bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu
bin/cython_freeze.py
bin/cython_freeze.py
#!/usr/bin/env python """ Create a C file for embedding one or more Cython source files. Requires Cython 0.11.2 (or perhaps newer). See README.rst for more details. """ import sys if len(sys.argv) < 2: print >>sys.stderr, "USAGE: %s module [module ...]" % sys.argv[0] sys.exit(1) def format_modname(name): ...
#!/usr/bin/env python """ Create a C file for embedding one or more Cython source files. Requires Cython 0.11.2 (or perhaps newer). See README.rst for more details. """ import sys if len(sys.argv) < 2: print >>sys.stderr, "USAGE: %s module [module ...]" % sys.argv[0] sys.exit(1) def format_modname(name): ...
apache-2.0
Python
94e3da85cddf0a10fb2381afa041c56dad7d74d8
allow multiple bank admin in mail.admin field, comma separated
horkko/biomaj,horkko/biomaj,genouest/biomaj,genouest/biomaj
biomaj/notify.py
biomaj/notify.py
from builtins import str from builtins import object import smtplib import email.utils from biomaj.workflow import Workflow import logging import sys if sys.version < '3': from email.MIMEText import MIMEText else: from email.mime.text import MIMEText class Notify(object): """ Send notifications ""...
from builtins import str from builtins import object import smtplib import email.utils from biomaj.workflow import Workflow import logging import sys if sys.version < '3': from email.MIMEText import MIMEText else: from email.mime.text import MIMEText class Notify(object): """ Send notifications ""...
agpl-3.0
Python
79fdf106019c29710234c3aa84caf9cbafe438e3
save dict
nayriz/miscellaneous
bits_and_bobs.py
bits_and_bobs.py
import os ############################################################################### def create_dir(path): if not os.path.isdir(path): os.makedirs(path) ############################################################################### dict_ = {} import json with open(os.path.join('name.json'), 'w') as...
############################################################################### def create_dir(path): if not os.path.isdir(path): os.makedirs(path) ###############################################################################
mit
Python
7b311b9b5ec2a429ce3229887b83757f5c78fa21
simplify Dataset
nkhuyu/blaze,jcrist/blaze,nkhuyu/blaze,caseyclements/blaze,dwillmer/blaze,caseyclements/blaze,LiaoPan/blaze,cpcloud/blaze,cpcloud/blaze,scls19fr/blaze,jdmcbr/blaze,mrocklin/blaze,jdmcbr/blaze,alexmojaki/blaze,LiaoPan/blaze,maxalbert/blaze,mrocklin/blaze,ContinuumIO/blaze,xlhtc007/blaze,ChinaQuants/blaze,maxalbert/blaze...
blaze/dataset.py
blaze/dataset.py
from datashape import dshape, discover from datashape.predicates import isscalar, isrecord, iscollection import numpy as np import pandas as pd from .dispatch import dispatch from .expr import Expr, Field, symbol, ndim from .compute import compute from collections import Iterator from into import into class Dataset(o...
from datashape import dshape, discover from datashape.predicates import isscalar, isrecord, iscollection import numpy as np import pandas as pd from .dispatch import dispatch from .expr import Expr, Field, symbol, ndim from .compute import compute from collections import Iterator from into import into class Dataset(o...
bsd-3-clause
Python
5b4e2467b7060a780b5e251d9d2753f49b873b3c
Change all tags to be lowercase while parsing
hackebrot/cibopath
cibopath/readme_parser.py
cibopath/readme_parser.py
# -*- coding: utf-8 -*- import re from html.parser import HTMLParser START = r'^' SLASH = r'/' GITHUB_BASE = r'https://github\.com' GITHUB_USER = r'(?P<user>[a-zA-Z0-9]+(-[a-zA-Z0-9]+)?)' GITHUB_REPO = r'(?P<repo>[\w-]+)' END = r'$' GITHUB_LINK = re.compile( START + GITHUB_BASE + SLASH + GITHUB_USER + SLASH ...
# -*- coding: utf-8 -*- import re from html.parser import HTMLParser START = r'^' SLASH = r'/' GITHUB_BASE = r'https://github\.com' GITHUB_USER = r'(?P<user>[a-zA-Z0-9]+(-[a-zA-Z0-9]+)?)' GITHUB_REPO = r'(?P<repo>[\w-]+)' END = r'$' GITHUB_LINK = re.compile( START + GITHUB_BASE + SLASH + GITHUB_USER + SLASH ...
bsd-3-clause
Python
1a07943692977e522c515ccdf9c4b9796aa491a1
add default get from config
AppGeo/ckanext-agsview,AppGeo/ckanext-agsview,AppGeo/ckanext-agsview,AppGeo/ckanext-agsview
ckanext/agsview/plugin.py
ckanext/agsview/plugin.py
# encoding: utf-8 import logging import ckan.plugins as p from ckan.common import c log = logging.getLogger(__name__) ignore_empty = p.toolkit.get_validator('ignore_empty') ignore_missing = p.toolkit.get_validator('ignore_missing') DEFAULT_AGS_FORMATS = ['ags'] class AGSFSView(p.SingletonPlugin): '''This plug...
# encoding: utf-8 import logging import ckan.plugins as p import ckan.lib.helpers as h log = logging.getLogger(__name__) ignore_empty = p.toolkit.get_validator('ignore_empty') ignore_missing = p.toolkit.get_validator('ignore_missing') DEFAULT_AGS_FORMATS = ['ags'] class AGSFSView(p.SingletonPlugin): '''This ...
mit
Python
dfa24b22b11e80fce725b589c2b02e927a030e73
Add ffmpeg external muxer, still a WIP
endrift/bmdstream
bmdstream/outputs.py
bmdstream/outputs.py
from gi.repository import Gst import os import subprocess output_registry = {} def make_output(config, output): output_type = output_registry[output['type']]() for name, prop in output.items(): if name in ['type', 'pipe']: continue output_type.set_property(name, prop) return output_type class AudioDisplay...
from gi.repository import Gst output_registry = {} def make_output(config, output): output_type = output_registry[output['type']]() for name, prop in output.items(): if name in ['type', 'pipe']: continue output_type.set_property(name, prop) return output_type class AudioDisplay(Gst.Bin): def __init__(self...
mit
Python
5910f10e8661f95860a6cab008bd5948f6d4e580
Fix join node
muddyfish/PYKE,muddyfish/PYKE
node/join.py
node/join.py
#!/usr/bin/env python from nodes import Node class Join(Node): char = "J" args = 2 results = 1 contents = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" def prepare(self, stack): try: if isinstance(stack[0], (list,tuple)): if not hasat...
#!/usr/bin/env python from nodes import Node class Join(Node): char = "J" args = 2 results = 1 contents = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" def prepare(self, stack): try: if isinstance(stack[0], (list,tuple)): if not hasat...
mit
Python
e9c9ceff312e3e6373b7b527f152f647554fa736
add absolute import from __future__
dleehr/cwltool,dleehr/cwltool,dleehr/cwltool,common-workflow-language/cwltool,common-workflow-language/cwltool,common-workflow-language/cwltool,dleehr/cwltool
cwlref-runner/setup.py
cwlref-runner/setup.py
#!/usr/bin/env python from __future__ import absolute_import import os from setuptools import setup, find_packages SETUP_DIR = os.path.dirname(__file__) README = os.path.join(SETUP_DIR, 'README') setup(name='cwlref-runner', version='1.0', description='Common workflow language reference implementation', ...
#!/usr/bin/env python import os from setuptools import setup, find_packages SETUP_DIR = os.path.dirname(__file__) README = os.path.join(SETUP_DIR, 'README') setup(name='cwlref-runner', version='1.0', description='Common workflow language reference implementation', long_description=open(README).rea...
apache-2.0
Python
1c78dfa0e0d1905910476b4052e42de287a70b74
Update to the run tests script to force database deletion if the test database exists.
jtakayama/makahiki-draft,jtakayama/ics691-setupbooster,csdl/makahiki,yongwen/makahiki,yongwen/makahiki,jtakayama/makahiki-draft,yongwen/makahiki,justinslee/Wai-Not-Makahiki,csdl/makahiki,jtakayama/makahiki-draft,yongwen/makahiki,csdl/makahiki,csdl/makahiki,jtakayama/makahiki-draft,jtakayama/ics691-setupbooster,jtakayam...
runtests.py
runtests.py
#!/usr/bin/env python import os import sys import string def main(): """ Executes the tests. Requires the CherryPy live server to be installed. """ command = "python manage.py test" options = "--exe --with-selenium --with-selenium-fixtures --with-cherrypyliveserver --noinput" apps = [] if len(sys.argv)...
#!/usr/bin/env python import os import sys import string def main(): """ Executes the tests. Requires the CherryPy live server to be installed. """ command = "python manage.py test" options = "--exe --with-selenium --with-selenium-fixtures --with-cherrypyliveserver" apps = [] if len(sys.argv) > 1: ...
mit
Python
c53c2e2630771da1f0a0d5d7384a3cb37fc75186
Remove deprecated test runner for Django 1.8
luzfcb/django-simple-history,treyhunner/django-simple-history,pombredanne/django-simple-history,luzfcb/django-simple-history,treyhunner/django-simple-history,emergence/django-simple-history,emergence/django-simple-history,pombredanne/django-simple-history
runtests.py
runtests.py
#!/usr/bin/env python import sys from shutil import rmtree from os.path import abspath, dirname, join import django from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) media_root = join(abspath(dirname(__file__)), 'test_files') rmtree(media_root, ignore_errors=True) installed_apps = ( ...
#!/usr/bin/env python import sys from shutil import rmtree from os.path import abspath, dirname, join import django from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) media_root = join(abspath(dirname(__file__)), 'test_files') rmtree(media_root, ignore_errors=True) installed_apps = ( ...
bsd-3-clause
Python
a2ee8512c553f20155f01255236987bc4f09e938
Update project description, fix redefinition of import
joke2k/django-environ
environ/__init__.py
environ/__init__.py
# This file is part of the django-environ. # # Copyright (c) 2021, Serghei Iakovlev <egrep@protonmail.ch> # Copyright (c) 2013-2021, Daniele Faraglia <daniele.faraglia@gmail.com> # # For the full copyright and license information, please view # the LICENSE.txt file that was distributed with this source code. """The to...
# This file is part of the django-environ. # # Copyright (c) 2021, Serghei Iakovlev <egrep@protonmail.ch> # Copyright (c) 2013-2021, Daniele Faraglia <daniele.faraglia@gmail.com> # # For the full copyright and license information, please view # the LICENSE.txt file that was distributed with this source code. """The to...
mit
Python
d54a6bbe3c4602386fc29473da1ffd1cfd41de4f
Clean formatting
XLSForm/pyxform,XLSForm/pyxform
pyxform/tests_v1/test_set_geopoint.py
pyxform/tests_v1/test_set_geopoint.py
# -*- coding: utf-8 -*- """ Test setgeopoint widget. """ from pyxform.tests_v1.pyxform_test_case import PyxformTestCase class SetGeopointTest(PyxformTestCase): """Test setgeopoint widget class.""" def test_setgeopoint(self): self.assertPyxformXform( name="data", md=""" ...
# -*- coding: utf-8 -*- """ Test setgeopoint widget. """ from pyxform.tests_v1.pyxform_test_case import PyxformTestCase class SetGeopointTest(PyxformTestCase): """Test setgeopoint widget class.""" def test_setgeopoint(self): self.assertPyxformXform( name="data", md=""" ...
bsd-2-clause
Python
5edac988eea7d1c2e91a95b77edab6dc3b04873e
Fix admin messagelog interface
peterayeni/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,catalpainternational/rapidsms,lsgunth/rapidsms,catalpainternational/rapidsms,peterayeni/rapidsms,peterayeni/rapidsms,lsgunth/rapidsms,catalpainternational/rapidsms,catalpainternational/rapidsms
rapidsms/contrib/messagelog/models.py
rapidsms/contrib/messagelog/models.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from django.core.exceptions import ValidationError from django.db import models from rapidsms.models import Contact, Connection class Message(models.Model): INCOMING = "I" OUTGOING = "O" DIRECTION_CHOICES = ( (INCOMING, "Incoming"), (OUTG...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from django.core.exceptions import ValidationError from django.db import models from rapidsms.models import Contact, Connection class Message(models.Model): INCOMING = "I" OUTGOING = "O" DIRECTION_CHOICES = ( (INCOMING, "Incoming"), (OUTG...
bsd-3-clause
Python
04d0b1e1a13887375d3ea0407789c1706b34201b
Fix a syntax error
sixninetynine/not
notpy/cmd.py
notpy/cmd.py
#!/usr/bin/env python ''' command module for Not provides the `not` executable hint: 'f' always refers to the temp file 'n' is the evernote api wrapper "notpy.Note()" ''' import argparse import hashlib import tempfile import re from datetime import date from subprocess import call from notpy import NotClient, con...
#!/usr/bin/env python ''' command module for Not provides the `not` executable hint: 'f' always refers to the temp file 'n' is the evernote api wrapper "notpy.Note()" ''' import argparse import hashlib import tempfile import re from datetime import date from subprocess import call from notpy import NotClient, con...
mit
Python
e2f251ffa2a73c84469a889b99cf6e8dde2f8c3a
Add convenient aliases for vote reactions
Arcensoth/cogbot,0-0-1/cogbot
cogbot/extensions/vote.py
cogbot/extensions/vote.py
import logging from discord.ext import commands from discord.ext.commands import CommandError, Context log = logging.getLogger(__name__) class Vote: DEFAULT_REACTIONS = u'✔ ✖' ALIAS_MAP = {c: r for c, r in zip('abcdefghijklmnopqrstuvwxyz', '🇦🇧🇨🇩🇪🇫🇬🇭🇮🇯🇰🇱🇲🇳🇴🇵🇶🇷🇸🇹🇺🇻🇼🇽🇾🇿')} def __...
import logging from discord.ext import commands from discord.ext.commands import CommandError, Context log = logging.getLogger(__name__) class Vote: DEFAULT_REACTIONS = u'✔ ✖' def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) async def vote(self, ctx: Context, *,...
mit
Python
20124d599c6305889315847c15329c02efdd2b8c
Make sure email_access_validated_at is not null after being populated
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0313_email_access_validated_at.py
migrations/versions/0313_email_access_validated_at.py
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
mit
Python
d09fb55bd49e266901305b9126077f44f7a1301e
Set default for get_config to None.
skorokithakis/django-annoying,artscoop/django-annoying,kabakchey/django-annoying,skorokithakis/django-annoying,kabakchey/django-annoying,YPCrumble/django-annoying,JshWright/django-annoying
annoying/functions.py
annoying/functions.py
from django.shortcuts import _get_queryset from django.conf import settings def get_object_or_None(klass, *args, **kwargs): """ Uses get() to return an object or None if the object does not exist. klass may be a Model, Manager, or QuerySet object. All other passed arguments and keyword arguments are ...
from django.shortcuts import _get_queryset from django.conf import settings def get_object_or_None(klass, *args, **kwargs): """ Uses get() to return an object or None if the object does not exist. klass may be a Model, Manager, or QuerySet object. All other passed arguments and keyword arguments are ...
bsd-3-clause
Python
91c92ecb39a39d6897512ee2b555f84ca3b3bff9
prepare for 0.0.3.1
pmquang/python-anyconfig,ssato/python-anyconfig,pmquang/python-anyconfig,ssato/python-anyconfig
anyconfig/__init__.py
anyconfig/__init__.py
"""Generic interface to loaders and parsers for various config file formats. Instead of import json, yaml jd = json.load(open("foo.json")) yd = yaml.load(open("bar.yaml")) use import anyconfig as ac jd = ac.load("foo.json") yd = ac.load("bar.yaml") The returned object is an anyconfig.Bunch ...
"""Generic interface to loaders and parsers for various config file formats. Instead of import json, yaml jd = json.load(open("foo.json")) yd = yaml.load(open("bar.yaml")) use import anyconfig as ac jd = ac.load("foo.json") yd = ac.load("bar.yaml") The returned object is an anyconfig.Bunch ...
mit
Python
16719d3264085008bc52bdebf0635782b8886e83
fix removeReadonly
muchu1983/104_cameo,muchu1983/104_cameo
cameo/cleaner.py
cameo/cleaner.py
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ import shutil import os import stat """ 清理不需要的資料 """ class CleanerForINDIEGOGO: def __init__(self): self.strBased...
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ import shutil import os import stat """ 清理不需要的資料 """ class CleanerForINDIEGOGO: def __init__(self): self.strBased...
bsd-3-clause
Python
78b2978c3e0e56c4c75a3a6b532e02c995ca69ed
Remove unused import and redundant comment
mbareta/edx-platform-ft,mbareta/edx-platform-ft,mbareta/edx-platform-ft,mbareta/edx-platform-ft
openedx/core/djangoapps/user_api/permissions/views.py
openedx/core/djangoapps/user_api/permissions/views.py
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from openedx.core.lib.api.authentication import ( SessionAuthenticationAllowInactiveUser, OAuth2AuthenticationAllowInactiveUser, ) from openedx.core.lib.api.parsers import MergePatchParser fr...
""" NOTE: this API is WIP and has not yet been approved. Do not use this API without talking to Christina or Andy. For more information, see: https://openedx.atlassian.net/wiki/display/TNL/User+API """ from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import stat...
agpl-3.0
Python
4cfed9f3379077e3bd3c3b369491b4233eada433
Exclude preprints from admin app > user groups selection.
adlius/osf.io,adlius/osf.io,saradbowman/osf.io,cslzchen/osf.io,mattclark/osf.io,aaxelb/osf.io,cslzchen/osf.io,mfraezz/osf.io,Johnetordoff/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,adlius/osf.io,saradbowman/osf.io,brianjgeiger/osf.io,felliott/osf.io,Johnetordoff/osf.io,aaxelb/osf.io,pattisdr/osf.io,brianjgeiger/osf.io,...
osf/admin.py
osf/admin.py
from django.contrib import admin from django_extensions.admin import ForeignKeyAutocompleteAdmin from django.contrib.auth.models import Group from osf.models import * # noqa def list_displayable_fields(cls): return [x.name for x in cls._meta.fields if x.editable and not x.is_relation and not x.primary_key] clas...
from django.contrib import admin from django_extensions.admin import ForeignKeyAutocompleteAdmin from osf.models import * # noqa def list_displayable_fields(cls): return [x.name for x in cls._meta.fields if x.editable and not x.is_relation and not x.primary_key] class NodeAdmin(ForeignKeyAutocompleteAdmin): ...
apache-2.0
Python
e529c9721acb19f2120fdf614e3ef05aa55edb20
Bump version
jbasko/configmanager
configmanager/__init__.py
configmanager/__init__.py
__version__ = '0.0.13' from .base import not_set, ConfigItem, ConfigManager from .exceptions import UnknownConfigItem, ConfigValueNotSet, UnsupportedOperation
__version__ = '0.0.12' from .base import not_set, ConfigItem, ConfigManager from .exceptions import UnknownConfigItem, ConfigValueNotSet, UnsupportedOperation
mit
Python
e107048f511557f1e535292b4fdd8fe7b10bd6eb
Make our binaries not depend on vcruntime140.dll, since they're already statically linking it.
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
deps/udis86/udis86.gyp
deps/udis86/udis86.gyp
{ 'targets': [ { 'target_name': 'libudis86', 'type': 'static_library', 'sources': [ 'libudis86/decode.c', 'libudis86/itab.c', 'libudis86/syn.c', 'libudis86/syn-att.c', 'libudis86/syn-intel.c', 'libudis86/udis86.c', # headers 'udis86...
{ 'targets': [ { 'target_name': 'libudis86', 'type': 'static_library', 'sources': [ 'libudis86/decode.c', 'libudis86/itab.c', 'libudis86/syn.c', 'libudis86/syn-att.c', 'libudis86/syn-intel.c', 'libudis86/udis86.c', # headers 'udis86...
mit
Python
9e2bcf0bc8f70b8a6b0b17f716db4d2022611101
Bump connector version
OCA/connector,OCA/connector
connector/__manifest__.py
connector/__manifest__.py
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.2.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
agpl-3.0
Python
926fdb9f433315425076cff57659f307b03cb480
Rename variable, remove redundant lines
pradyunsg/Py2C,pradyunsg/Py2C
dev-tools/run_tests.py
dev-tools/run_tests.py
#!/usr/bin/env python3 """Run tests. Whether run from the terminal (by developer or CI) or from the editor, this file makes sure the tests are run in a similar manner every-time. """ # Standard library import sys from os.path import join, realpath, dirname # Third Party modules import nose import coverage # NOTE:: ...
#!/usr/bin/env python3 """Run tests. Whether run from the terminal (by developer or CI) or from the editor, this file makes sure the tests are run in a similar manner every-time. """ # Standard library import sys from os.path import join, realpath, dirname # Third Party modules import nose import coverage # NOTE:: ...
bsd-3-clause
Python
6345579b0d015ed537c5119542e4a9b17fff86b5
update shuffling
dssg/wikienergy,dssg/wikienergy,dssg/wikienergy,dssg/wikienergy,dssg/wikienergy
disaggregator/utils.py
disaggregator/utils.py
import appliance import pandas as pd import numpy as np import os import pickle def aggregate_instances(instances, metadata, how="strict"): ''' Given a list of temporally aligned instances, aggregate them into a single signal. ''' if how == "strict": traces = [instance.traces for instance i...
import appliance import pandas as pd import numpy as np import os import pickle def concatenate_traces(traces, metadata=None, how="strict"): ''' Given a list of appliance traces, returns a single concatenated trace. With how="strict" option, must be sampled at the same rate and consecutive, without ove...
mit
Python
4229bc901cb32db9545f7318d67c4f27cef22fd0
Change statsd_host config type
stackforge/monasca-log-api,openstack/monasca-log-api,stackforge/monasca-log-api,openstack/monasca-log-api,openstack/monasca-log-api,stackforge/monasca-log-api
monasca_log_api/conf/monitoring.py
monasca_log_api/conf/monitoring.py
# Copyright 2017 FUJITSU LIMITED # # 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 writ...
# Copyright 2017 FUJITSU LIMITED # # 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 writ...
apache-2.0
Python
03758fa98ce92b059231a3fafa4af2db8670f4db
Bump to 0.0.29
cogniteev/docido-python-sdk
docido_sdk/__init__.py
docido_sdk/__init__.py
__version__ = '0.0.29' version_info = tuple([int(d) for d in __version__.split("-")[0].split(".")])
__version__ = '0.0.28' version_info = tuple([int(d) for d in __version__.split("-")[0].split(".")])
apache-2.0
Python
0ca3584df581d38d38c925c5fb2761f185223097
fix issue with the DEBUG variable
kushaldas/autocloud,kushaldas/autocloud,kushaldas/autocloud,maxamillion/autocloud,kushaldas/autocloud,maxamillion/autocloud,maxamillion/autocloud,maxamillion/autocloud
autocloud/__init__.py
autocloud/__init__.py
# -*- coding: utf-8 -*- import ConfigParser import os PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__)) config = ConfigParser.RawConfigParser() name = "{PROJECT_ROOT}/config/autocloud.cfg".format( PROJECT_ROOT=PROJECT_ROOT) if not os.path.exists(name): name = '/etc/autocloud/autocloud.cfg' conf...
# -*- coding: utf-8 -*- import ConfigParser import os DEBUG = False PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__)) config = ConfigParser.RawConfigParser() name = "{PROJECT_ROOT}/config/autocloud.cfg".format( PROJECT_ROOT=PROJECT_ROOT) if not os.path.exists(name): name = '/etc/autocloud/autocl...
agpl-3.0
Python
ccbbe024b81bb73b0acc0943742831d8888aa941
Bump version number.
lmaurits/BEASTling
beastling/__init__.py
beastling/__init__.py
__version__ = "1.3.0"
__version__ = "develop"
bsd-2-clause
Python
7d2c0ca72cf4558f0cd28d34dd482771ff3ad5b6
Upgrade chromedriver version
google/clusterfuzz,google/clusterfuzz,google/clusterfuzz,google/clusterfuzz,google/clusterfuzz,google/clusterfuzz,google/clusterfuzz,google/clusterfuzz
src/local/butler/constants.py
src/local/butler/constants.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
6a78b63654128443375f442479e3738ba23802fa
Update load_tracking_logs_to_mongo.py
McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research,andyzsf/edx_data_research,andyzsf/edx_data_research
parsing/tracking_logs/load_tracking_logs_to_mongo.py
parsing/tracking_logs/load_tracking_logs_to_mongo.py
''' Load tracking logs to mongodb. Since tracking logs will be generated daily, we will load all logs to a master tracking_logs database in a master collection In this way, there will only one main collection of all tracking logs and this will be used to extract course specific tracking logs to the coure specific trac...
''' Load tracking logs to mongodb. Since tracking logs will be generated daily, we will load all logs to a master tracking_logs database in a master collection In this way, there will only one main collection of all tracking logs and this will be used to extract course specific tracking logs to the coure specific trac...
mit
Python
45fd518ed02e79bde071ec921afeba9063e761a2
fix appraisal patch for rerun
indictranstech/osmosis-erpnext,indictranstech/vestasi-erpnext,SPKian/Testing2,gangadhar-kadam/verve_test_erp,gangadhar-kadam/sapphire_app,Tejal011089/med2-app,gangadhar-kadam/mic-erpnext,saurabh6790/medsyn-app,hatwar/focal-erpnext,saurabh6790/medsyn-app1,hernad/erpnext,gangadharkadam/sterp,gangadharkadam/contributioner...
patches/november_2012/reset_appraisal_permissions.py
patches/november_2012/reset_appraisal_permissions.py
import webnotes def execute(): webnotes.conn.sql("""delete from tabDocPerm where parent='Appraisal'""") from webnotes.model.sync import sync sync("hr", "appraisal", force=True)
import webnotes def execute(): webnotes.conn.sql("""delete from tabDocPerm where parent='Appraisal'""")
agpl-3.0
Python
df77ba1492dc00065d436b6e2a34ef5cb08e914c
Fix issue #3 Try to init database when app is running
zqqf16/clipboard
clipboard/app.py
clipboard/app.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.httpserver import model from handler import * class App(tornado.web.Application): def __init__(self): #Init databas model.init() handlers = [ (r'/', IndexHandler),...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.httpserver from handler import * class App(tornado.web.Application): def __init__(self): handlers = [ (r'/', IndexHandler), (r'/c[/]?', MainHandler), (r'/c/...
mit
Python
c250d224c06bf51da53563b2d073e8ca3dac3328
fix merge conflict in GLCM constructor
Radiomics/pyradiomics,Radiomics/pyradiomics,Radiomics/pyradiomics,Radiomics/pyradiomics
bin/helloRadiomics.py
bin/helloRadiomics.py
from radiomics import firstorder, glcm, preprocessing, shape, rlgl import SimpleITK as sitk import sys, os #imageName = sys.argv[1] #maskName = sys.argv[2] testBinWidth = 25 #testResampledPixelSpacing = (3,3,3) no resampling for now. dataDir = os.path.dirname(os.path.abspath(__file__)) + os.path.sep + ".." + os.path...
from radiomics import firstorder, glcm, preprocessing, shape, rlgl import SimpleITK as sitk import sys, os #imageName = sys.argv[1] #maskName = sys.argv[2] testBinWidth = 25 #testResampledPixelSpacing = (3,3,3) no resampling for now. dataDir = os.path.dirname(os.path.abspath(__file__)) + os.path.sep + ".." + os.path...
bsd-3-clause
Python
ca7f61b157c7138fa97dc6798a24f9785f16f423
fix survey suplication error (#1504)
avanzosc/odoo-addons,avanzosc/odoo-addons
slide_channel_survey/models/survey.py
slide_channel_survey/models/survey.py
from odoo import fields, models import werkzeug class SurveySurvey(models.Model): _inherit = 'survey.survey' responsible_user_ids = fields.Many2one( 'res.users', 'Input responsibles') def create(self, vals): res = super(SurveySurvey, self).create(vals) res._compute_responsible_u...
from odoo import fields, models import werkzeug class SurveySurvey(models.Model): _inherit = 'survey.survey' responsible_user_ids = fields.Many2one( 'res.users', 'Input responsibles') def create(self, vals): res = self.super().create(self, vals) res._compute_responsible_users() ...
agpl-3.0
Python
b4fc31330519a6f1001cab16533077ace6d3d3a4
fix pin logic
nzjoel1234/sprinkler,nzjoel1234/sprinkler,nzjoel1234/sprinkler,nzjoel1234/sprinkler
driver/zone_service.py
driver/zone_service.py
VCC = 19 PIN_BY_ZONE = {} PIN_BY_ZONE[1] = 6 PIN_BY_ZONE[2] = 13 PIN_BY_ZONE[3] = 12 PIN_BY_ZONE[4] = 16 ALL_PINS = [VCC] + PIN_BY_ZONE.values() class ZoneService(object): def __init__(self, gpio): self._gpio = gpio self._gpio.setmode(gpio.BCM) self._gpio.setup(ALL_PINS, self._gpio.OUT)...
VCC = 19 PIN_BY_ZONE = {} PIN_BY_ZONE[1] = 6 PIN_BY_ZONE[2] = 13 PIN_BY_ZONE[3] = 12 PIN_BY_ZONE[4] = 16 ALL_PINS = [VCC] + PIN_BY_ZONE.values() class ZoneService(object): def __init__(self, gpio): self._gpio = gpio self._gpio.setmode(gpio.BCM) self._gpio.setup(ALL_PINS, self._gpio.OUT)...
mit
Python
3fb5f9293d18a6a605eecd77ae9da4b577935a4d
Update version to 0.7.5 for release
ayust/evelink
evelink/__init__.py
evelink/__init__.py
"""EVELink - Python bindings for the EVE API.""" import logging from evelink import account from evelink import api from evelink import char from evelink import constants from evelink import corp from evelink import eve from evelink import map from evelink import server __version__ = "0.7.5" # Implement NullHandler...
"""EVELink - Python bindings for the EVE API.""" import logging from evelink import account from evelink import api from evelink import char from evelink import constants from evelink import corp from evelink import eve from evelink import map from evelink import server __version__ = "0.7.4" # Implement NullHandler...
mit
Python
96f51d4f66e612777a50aa5958cab0a5d777d5a0
Add @write to process_email task (#3740)
wagnerand/addons-server,mozilla/olympia,kumar303/addons-server,wagnerand/olympia,harry-7/addons-server,diox/olympia,lavish205/olympia,eviljeff/olympia,mozilla/olympia,kumar303/olympia,eviljeff/olympia,eviljeff/olympia,Revanth47/addons-server,mstriemer/olympia,wagnerand/olympia,lavish205/olympia,mozilla/olympia,kumar303...
src/olympia/activity/tasks.py
src/olympia/activity/tasks.py
import commonware.log from olympia.amo.celery import task from olympia.amo.decorators import write from olympia.activity.utils import add_email_to_activity_log_wrapper log = commonware.log.getLogger('z.amo.activity') @task @write def process_email(message, **kwargs): """Parse emails and save activity log entry....
import commonware.log from olympia.amo.celery import task from olympia.activity.utils import add_email_to_activity_log_wrapper log = commonware.log.getLogger('z.amo.activity') @task def process_email(message, **kwargs): """Parse emails and save activity log entry.""" res = add_email_to_activity_log_wrapper(...
bsd-3-clause
Python
7b7abe834c8dcff1f4c4b014cfefa7644f77cd8f
Improve example
danbob123/oi,walkr/oi
example/programd.py
example/programd.py
import oi def main(): program = oi.Program('my program', 'ipc:///tmp/programd.sock') program.add_command( 'ping', lambda: 'pong') program.add_command( 'state', lambda: program.state, 'show program state') program.add_command( 'store', lambda key, val: setattr(program.state, ...
import oi def main(): program = oi.Program('my program', 'ipc:///tmp/programd.sock') program.add_command( 'ping', lambda: 'pong') program.add_command( 'state', lambda: program.state, 'show program state') program.add_command( 'touch', lambda: setattr(program.state, 'touch', Tr...
mit
Python
a81abc935bd69494f10aee68260b3feecea86daa
tidy example
willmcgugan/rich
examples/columns.py
examples/columns.py
import json from urllib.request import urlopen from rich import print from rich.columns import Columns from rich.panel import Panel def get_content(user): """Extract text from user dict.""" country = user["location"]["country"] name = f"{user['name']['first']} {user['name']['last']}" return f"[b]{nam...
import json from urllib.request import urlopen from rich import print from rich.columns import Columns from rich.panel import Panel users = json.loads(urlopen("https://randomuser.me/api/?results=30").read())["results"] print(users) def get_content(user): country = user["location"]["country"] name = f"{user...
mit
Python
795a9ed412c3b73943a7b5e85f1025f2c0eff9a4
remove silly test
regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations
examples/driving.py
examples/driving.py
import os import math import pyglet.window from pyglet.window.event import * from pyglet.window.key import * import pyglet.clock from pyglet.scene2d import * w = pyglet.window.Window(width=640, height=512) # load the map and car and set up the scene and view dirname = os.path.dirname(__file__) m = RectMap.load_xml(o...
import os import math import pyglet.window from pyglet.window.event import * from pyglet.window.key import * import pyglet.clock from pyglet.scene2d import * w = pyglet.window.Window(width=640, height=512) # load the map and car and set up the scene and view dirname = os.path.dirname(__file__) m = RectMap.load_xml(o...
bsd-3-clause
Python
cadee051a462de765bab59ac42d6b372fa49c033
Fix bug where the service was added as a destination one time too many.
iffy/eliot,ClusterHQ/eliot,ScatterHQ/eliot,ScatterHQ/eliot,ScatterHQ/eliot
examples/logfile.py
examples/logfile.py
""" Output an Eliot message to a log file using the threaded log writer. """ from __future__ import unicode_literals, print_function from twisted.internet.task import react from eliot.logwriter import ThreadedFileWriter from eliot import Message, Logger _logger = Logger() def main(reactor): print("Logging to...
""" Output an Eliot message to a log file using the threaded log writer. """ from __future__ import unicode_literals, print_function from twisted.internet.task import react from eliot.logwriter import ThreadedFileWriter from eliot import Message, Logger, addDestination _logger = Logger() def main(reactor): p...
apache-2.0
Python
8db120f98567082ac37ae8ef8b666948e821a0d9
Update simple3.py (#663)
plamere/spotipy
examples/simple3.py
examples/simple3.py
#Shows the name of the artist/band and their image by giving a link import sys from spotipy.oauth2 import SpotifyClientCredentials import spotipy sp = spotipy.Spotify(client_credentials_manager=SpotifyClientCredentials()) if len(sys.argv) > 1: name = ' '.join(sys.argv[1:]) else: name = 'Radiohead' results =...
import sys from spotipy.oauth2 import SpotifyClientCredentials import spotipy sp = spotipy.Spotify(client_credentials_manager=SpotifyClientCredentials()) if len(sys.argv) > 1: name = ' '.join(sys.argv[1:]) else: name = 'Radiohead' results = sp.search(q='artist:' + name, type='artist') items = results['artis...
mit
Python
6791a4b3e347526fa3bdc89efceae1227e74a8fa
update version
zkbt/exopop
exoatlas/version.py
exoatlas/version.py
__version__ = '0.2.11'
__version__ = '0.2.10'
mit
Python
458c1aea2a67d448564c4e5387e473a7e00e96ac
Add note.
francisleunggie/openface,nhzandi/openface,Alexx-G/openface,nmabhi/Webface,xinfang/face-recognize,Alexx-G/openface,nhzandi/openface,cmusatyalab/openface,francisleunggie/openface,cmusatyalab/openface,francisleunggie/openface,Alexx-G/openface,sumsuddinshojib/openface,sumsuddinshojib/openface,nmabhi/Webface,sumsuddinshojib...
facenet/__init__.py
facenet/__init__.py
# Copyright 2015 Carnegie Mellon University # # 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 ...
# Copyright 2015 Carnegie Mellon University # # 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 ...
apache-2.0
Python
0456486c936c3c1900d79192319773b44ee94eb4
Prepare v1.2.460.dev
OmgOhnoes/Flexget,qvazzler/Flexget,Pretagonist/Flexget,cvium/Flexget,sean797/Flexget,sean797/Flexget,Danfocus/Flexget,qk4l/Flexget,jacobmetrick/Flexget,poulpito/Flexget,LynxyssCZ/Flexget,Flexget/Flexget,LynxyssCZ/Flexget,JorisDeRieck/Flexget,tarzasai/Flexget,cvium/Flexget,qvazzler/Flexget,malkavi/Flexget,jawilson/Flexg...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
1d57b172662fbf6df5df30c2854108589a637dcf
Prepare v2.13.2.dev
Danfocus/Flexget,ianstalk/Flexget,tobinjt/Flexget,LynxyssCZ/Flexget,LynxyssCZ/Flexget,JorisDeRieck/Flexget,malkavi/Flexget,ianstalk/Flexget,Flexget/Flexget,crawln45/Flexget,tobinjt/Flexget,malkavi/Flexget,gazpachoking/Flexget,Danfocus/Flexget,JorisDeRieck/Flexget,jawilson/Flexget,Flexget/Flexget,malkavi/Flexget,jawilso...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
421304ce0130a89441459c5c3bc3ddc05a1b50d8
Prepare v1.2.333.dev
thalamus/Flexget,oxc/Flexget,sean797/Flexget,qvazzler/Flexget,dsemi/Flexget,drwyrm/Flexget,Danfocus/Flexget,oxc/Flexget,malkavi/Flexget,thalamus/Flexget,tsnoam/Flexget,crawln45/Flexget,ZefQ/Flexget,qk4l/Flexget,cvium/Flexget,crawln45/Flexget,spencerjanssen/Flexget,tsnoam/Flexget,drwyrm/Flexget,tarzasai/Flexget,antivirt...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
b97c44d558f4cef8b7b9158d18144699007cdf83
Prepare v2.17.18.dev
JorisDeRieck/Flexget,tobinjt/Flexget,crawln45/Flexget,ianstalk/Flexget,Danfocus/Flexget,Flexget/Flexget,Danfocus/Flexget,gazpachoking/Flexget,JorisDeRieck/Flexget,JorisDeRieck/Flexget,malkavi/Flexget,malkavi/Flexget,gazpachoking/Flexget,Danfocus/Flexget,tobinjt/Flexget,Flexget/Flexget,malkavi/Flexget,ianstalk/Flexget,m...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
75c9c497271685a330af867da094f7cd543c2080
Prepare v1.2.456.dev
jacobmetrick/Flexget,tobinjt/Flexget,oxc/Flexget,cvium/Flexget,LynxyssCZ/Flexget,OmgOhnoes/Flexget,jawilson/Flexget,dsemi/Flexget,Danfocus/Flexget,LynxyssCZ/Flexget,oxc/Flexget,Flexget/Flexget,gazpachoking/Flexget,Flexget/Flexget,crawln45/Flexget,crawln45/Flexget,drwyrm/Flexget,JorisDeRieck/Flexget,ianstalk/Flexget,sea...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
1a21705e49a0103db5ba0fd617746aad191704a9
Prepare v1.2.246.dev
tobinjt/Flexget,tsnoam/Flexget,malkavi/Flexget,OmgOhnoes/Flexget,jawilson/Flexget,lildadou/Flexget,antivirtel/Flexget,Flexget/Flexget,malkavi/Flexget,cvium/Flexget,oxc/Flexget,ibrahimkarahan/Flexget,poulpito/Flexget,OmgOhnoes/Flexget,Danfocus/Flexget,vfrc2/Flexget,dsemi/Flexget,ZefQ/Flexget,Flexget/Flexget,qvazzler/Fle...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
a8435c5125f013f3cde751fb8f643f723ce77278
Prepare v2.19.5.dev
Flexget/Flexget,Danfocus/Flexget,malkavi/Flexget,crawln45/Flexget,tobinjt/Flexget,Danfocus/Flexget,JorisDeRieck/Flexget,JorisDeRieck/Flexget,malkavi/Flexget,gazpachoking/Flexget,JorisDeRieck/Flexget,ianstalk/Flexget,Flexget/Flexget,tobinjt/Flexget,Danfocus/Flexget,malkavi/Flexget,malkavi/Flexget,Flexget/Flexget,ianstal...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
13ea409763a11e387b390540bc168a99ea56f3f5
deal with `~` paths in *nix environments
printedheart/micropsi2,ianupright/micropsi2,ianupright/micropsi2,printedheart/micropsi2,ianupright/micropsi2,printedheart/micropsi2
configuration.py
configuration.py
#!/usr/local/bin/python # -*- coding: utf-8 -*- """ Contains basic configuration information, especially path names to resource files """ __author__ = 'joscha' __date__ = '03.12.12' import os import configparser import warnings try: config = configparser.ConfigParser() config.read_file(open('config.ini')) e...
#!/usr/local/bin/python # -*- coding: utf-8 -*- """ Contains basic configuration information, especially path names to resource files """ __author__ = 'joscha' __date__ = '03.12.12' import os import configparser import warnings try: config = configparser.ConfigParser() config.read_file(open('config.ini')) e...
mit
Python
46a6699c36cc171b76334ca7bfbfe48fd1f31ec3
configure ssl: commit2
infinite-Joy/websphere
configure_ssl.py
configure_ssl.py
""" This script will configure the JVM SSL outbound certificate Configuration """ import sys import java global AdminConfig # set the JKS key store path JKSKeyStorePath = "/path/to/JKS" keyPassword = ""
""" This script will configure the JVM SSL outbound certificate Configuration """ import sys import java global AdminConfig # set the JKS key store path JKSKeyStorePath = "/path/to/JKS"
mit
Python
9f10dbdabe61ed841c0def319f021a4735f39217
Add provisional (needs to be replaced with pkg_resources entry point discovery) template registry
mneagul/scape-cloud-toolkit,mneagul/scape-cloud-toolkit,mneagul/scape-cloud-toolkit
src/sct/templates/__init__.py
src/sct/templates/__init__.py
# -*- coding: utf-8 -*- """ Copyright 2014 Universitatea de Vest din Timișoara 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 appli...
# -*- coding: utf-8 -*- ''' Copyright 2014 Universitatea de Vest din Timișoara 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 appli...
apache-2.0
Python
6e3a6ca458eeffc9ac3f59bcc7df77862f5188fc
fix regex that looks for access log fields, print more info if they aren't found
trawick/ct-httpd,trawick/ct-httpd,tomrittervg/ct-httpd,tomrittervg/ct-httpd,trawick/ct-httpd,tomrittervg/ct-httpd
src/proto1/smoketest.py
src/proto1/smoketest.py
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
apache-2.0
Python
a9a794384c6f4c153768cf609f3d8dc657f59daf
Add base logic for finding Give Forward campaigns by query that are almost funded
lorenanicole/almost_funded,lorenanicole/almost_funded,lorenanicole/almost_funded
campaigns/scrapers.py
campaigns/scrapers.py
import requests import json from bs4 import BeautifulSoup class KickstarterScraper(object): # TODO: get list of all categories from projects for rendering possible list on main view base_url = "https://www.kickstarter.com/" projects_query_path = "projects/search.json?search={0}&term={1}" @classmeth...
import requests import json class KickstarterScraper(object): # TODO: get list of all categories from projects for rendering possible list on main view base_url = "https://www.kickstarter.com/" projects_query_path = "projects/search.json?search={0}&term={1}" @classmethod def scrape_projects(cls...
mit
Python