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
cc55c01b6e842f4aa22eafc7ee44759be5259709
check settings value explicitly against true
DisposaBoy/GoSublime,nathany/GoSublime,Mistobaan/GoSublime,FWennerdahl/GoSublime,alexmullins/GoSublime,allgeek/GoSublime,allgeek/GoSublime,FWennerdahl/GoSublime,Mistobaan/GoSublime,nathany/GoSublime,cdht/GoSublime,DisposaBoy/GoSublime-next,simman/GoSublime,anacrolix/GoSublime,simman/GoSublime,DisposaBoy/GoSublime,dlcla...
gsfmt.py
gsfmt.py
import sublime, sublime_plugin import gscommon as gs from os.path import basename class GoFmt(sublime_plugin.EventListener): def on_pre_save(self, view): scopes = view.scope_name(0).split() should_run = gs.setting("run_gofmt_on_save", False) if 'source.go' not in scopes or should_run is not...
import sublime, sublime_plugin import gscommon as gs from os.path import basename class GoFmt(sublime_plugin.EventListener): def on_pre_save(self, view): scopes = view.scope_name(0).split() if 'source.go' not in scopes or not gs.setting("run_gofmt_on_save", False): return ...
mit
Python
b4cd24c8eac5bc0798248173d8ca59eb1b9c3ea1
refactor send_email utils: change arguments in fucntion explicitly
jupiny/EnglishDiary,jupiny/EnglishDiary,jupiny/EnglishDiary
english_diary/core/utils/email.py
english_diary/core/utils/email.py
from django.conf import settings import requests def send_email(sender, receiver, subject, html): response = requests.post( settings.MAILGUN_API_MESSAGE_URL, auth=("api", settings.MAILGUN_API_KEY), data={ "from": sender, "to": [ receiver, ...
from django.conf import settings import requests def send_email(*args, **kwargs): sender = kwargs.get("sender") receiver = kwargs.get("receiver") subject = kwargs.get("subject") html = kwargs.get("html") response = requests.post( settings.MAILGUN_API_MESSAGE_URL, auth=("api", se...
mit
Python
9b9bc5515b8457a39480b6341a398b111ee5037d
correct the path to README.md
kissmetrics/py-KISSmetrics
KISSmetrics/tests/test_docs.py
KISSmetrics/tests/test_docs.py
# -*- coding: utf-8 -*- import doctest import unittest # We avoid using doctest.DocFileSuite so the tests are runnable by both py.test # and unittest. class DocTestCase(unittest.TestCase): def test_docs(self): failure_count, test_count \ = doctest.testfile('../../README.md', optionflags=docte...
# -*- coding: utf-8 -*- import doctest import unittest # We avoid using doctest.DocFileSuite so the tests are runnable by both py.test # and unittest. class DocTestCase(unittest.TestCase): def test_docs(self): failure_count, test_count \ = doctest.testfile('../README.md', optionflags=doctest....
mit
Python
ca7b50920a90e335b4cebe124ec3160aafada824
Make apitestcase __all__ a tuple
bramwelt/apitestcase
apitestcase/__init__.py
apitestcase/__init__.py
from apitestcase.testcase import TestCase __version__ = ("0", "1", "0") __all__ = ( "TestCase", "__version__", )
from apitestcase.testcase import TestCase __version__ = ("0", "1", "0") __all__ = [ "TestCase", "__version__", ]
mit
Python
c6d042ee5d4867750a54ab9f6c3576928e4ba457
Prepare for next development iteration
toidi/hadoop-yarn-api-python-client
yarn_api_client/__init__.py
yarn_api_client/__init__.py
# -*- coding: utf-8 -*- __version__ = '2.0.0.dev0' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
# -*- coding: utf-8 -*- __version__ = '1.0.0' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
bsd-3-clause
Python
956e5e3825915c090cebc4c504e605b8b532672b
Add easy mass exploit dumper
shellphish/rex,shellphish/rex
rex/exploit/exploit.py
rex/exploit/exploit.py
import angr from .shellcode_manager import ShellcodeManager from rex.exploit import CannotExploit import logging l = logging.getLogger("rex.exploit.Exploit") class Exploit(object): ''' Exploit object which can leak flags or set registers ''' def __init__(self, crash): ''' :param crash...
import angr from .shellcode_manager import ShellcodeManager from rex.exploit import CannotExploit import logging l = logging.getLogger("rex.exploit.Exploit") class Exploit(object): ''' Exploit object which can leak flags or set registers ''' def __init__(self, crash): ''' :param crash...
bsd-2-clause
Python
8dc5807e58c23da272714e1fa2846609830e9d82
fix import
desihub/desidatamodel,desihub/desidatamodel
py/desiDataModel/stub/data_format.py
py/desiDataModel/stub/data_format.py
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def data_format(hdr,div): """Decide which kind of header this is, and print its data format Parameters ---------- hdr ...
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def data_format(hdr,div): """Decide which kind of header this is, and print its data format Parameters ---------- hdr ...
bsd-3-clause
Python
228603fbc6eb74cbca052c2157e4addefc77c1da
Update get_xbee.py
mbartling/TAMU_senior_design,mbartling/TAMU_senior_design,mbartling/TAMU_senior_design,mbartling/TAMU_senior_design,mbartling/TAMU_senior_design,mbartling/TAMU_senior_design,mbartling/TAMU_senior_design,mbartling/TAMU_senior_design
Python/get_xbee.py
Python/get_xbee.py
#! /usr/bin/env python import serial import sys xbee = serial.Serial() xbee.baudrate = 115200 if len(sys.argv) > 1: xbee.port = sys.argv[1] else: xbee.port = '/dev/ttyACM0' if xbee.isOpen(): xbee.clos() xbee.open() print xbee xbee.write("?") if xbee.isOpen: for line in xbee: line = line.strip() packet = l...
import serial import sys xbee = serial.Serial() xbee.baudrate = 115200 if len(sys.argv) > 1: xbee.port = sys.argv[1] else: xbee.port = '/dev/ttyACM0' if xbee.isOpen(): xbee.clos() xbee.open() print xbee xbee.write("?") if xbee.isOpen: for line in xbee: line = line.strip() packet = line.split() sf = p...
mit
Python
2f41615d50bf4399749b02b7ea58aee4a0a31998
Add an inheritance test for importlib.abc.SourceLoader.
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/importlib/test/test_abc.py
Lib/importlib/test/test_abc.py
from importlib import abc from importlib import machinery import inspect import unittest class InheritanceTests: """Test that the specified class is a subclass/superclass of the expected classes.""" subclasses = [] superclasses = [] def __init__(self, *args, **kwargs): super().__init__(...
from importlib import abc from importlib import machinery import inspect import unittest class InheritanceTests: """Test that the specified class is a subclass/superclass of the expected classes.""" subclasses = [] superclasses = [] def __init__(self, *args, **kwargs): super().__init__(...
mit
Python
64eab4b1df182683f4280c1178a445f67561ea8f
add checking for old folder py/cudax_lib
Alexey-T/CudaText,Alexey-T/CudaText,vhanla/CudaText,vhanla/CudaText,vhanla/CudaText,vhanla/CudaText,vhanla/CudaText,Alexey-T/CudaText,Alexey-T/CudaText,vhanla/CudaText,vhanla/CudaText,Alexey-T/CudaText,vhanla/CudaText,vhanla/CudaText,Alexey-T/CudaText,vhanla/CudaText,Alexey-T/CudaText,Alexey-T/CudaText
app/py/cudatext_init.py
app/py/cudatext_init.py
import sys, os if os.name=='nt': os.putenv('PYTHONIOENCODING', 'UTF-8') _v = sys.version_info print("Python %d.%d.%d" % (_v[0], _v[1], _v[2]) ) # it's to test API in console from cudatext import * fn = os.path.join(app_path(APP_DIR_PY), 'cudax_lib') if os.path.isdir(fn): msg_box('CudaText has found that old ...
import sys, os if os.name=='nt': os.putenv('PYTHONIOENCODING', 'UTF-8') _v = sys.version_info print("Python %d.%d.%d" % (_v[0], _v[1], _v[2]) ) # it's to test API in console from cudatext import *
mpl-2.0
Python
99c1a6d728e52e166da8e29e861bfbeb9c1c84d0
Correct authors info added to KRLS example
JacekPierzchlewski/RxCS
examples/auxiliary/aldkrls_ex0.py
examples/auxiliary/aldkrls_ex0.py
""" This script is an example of how to use the Kernel Recursive Least Squares algorithms. |br| In this example the algorithm approximates a noisy sinc function. |br| *Author*: This example is based on Matlab example in 'Kafbox' by Steven Van Vaerenbergh. 2012 - 2014 Steven Van Vaerenbergh (Matlab version: http...
""" This script is an example of how to use the Kernel Recursive Least Squares algorithms. |br| In this example the algorithm approximates a noisy sinc function. |br| *Author*: Jacek Pierzchlewski, Aalborg University, Denmark. <jap@es.aau.dk> *Version*: 1.0 | 2-DEC-2014 : * Version 1.0 released. |br| *Lice...
bsd-2-clause
Python
0d818f75d85c0eb9a78f8e2c6d2d4f3528bb1985
Set version to 0.1.0b6.
gnotaras/django-taggit-autocomplete-modified,gnotaras/django-taggit-autocomplete-modified
src/taggit_autocomplete_modified/__init__.py
src/taggit_autocomplete_modified/__init__.py
# -*- coding: utf-8 -*- # # This file is part of django-taggit-autocomplete-modified. # # django-taggit-autocomplete-modified provides autocomplete functionality # to the tags form field of django-taggit. # # Development Web Site: # - http://www.codetrax.org/projects/django-taggit-autocomplete-modified # Public...
# -*- coding: utf-8 -*- # # This file is part of django-taggit-autocomplete-modified. # # django-taggit-autocomplete-modified provides autocomplete functionality # to the tags form field of django-taggit. # # Development Web Site: # - http://www.codetrax.org/projects/django-taggit-autocomplete-modified # Public...
apache-2.0
Python
b8656ae21ab494b49013a7cd67facff7bdbd7cf5
Add decode_responses option to redis
tferreira/Flask-Redis
index.py
index.py
from flask import Flask from flask_redis import FlaskRedis from redis import StrictRedis from config import BaseConfig class DecodedRedis(StrictRedis): @classmethod def from_url(cls, url, db=None, **kwargs): kwargs['decode_responses'] = True return StrictRedis.from_url(url, db, **kwargs) app...
from flask import Flask from flask_redis import FlaskRedis from config import BaseConfig app = Flask(__name__) app.config.from_object(BaseConfig) db = FlaskRedis(app)
mit
Python
9841c921592976f9a32f44591bcab5c23d91809e
Update __openerp__.py
Elico-Corp/openerp-7.0,Elico-Corp/openerp-7.0,Elico-Corp/openerp-7.0
portal_product/__openerp__.py
portal_product/__openerp__.py
# -*- coding: utf-8 -*- # © 2014 Elico corp(www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) { 'name': 'Portal Product', 'version': '7.0.1.0.0', 'author': 'Elico', 'website': 'http://www.elico-corp.com', 'depends': ['product', 'portal'], 'data': [ '...
# -*- coding: utf-8 -*- # © 2014 Elico corp(www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) { 'name': 'Portal Product', 'version': '7.0.1.0.0', 'author': 'Elico', 'website': 'http://www.openerp.com', 'depends': ['product', 'portal'], 'data': [ 'vie...
agpl-3.0
Python
173212428290e1c4d384736ad212ed9a48829b59
Update cam_test.py
jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi
apps/camera/cam_test.py
apps/camera/cam_test.py
#-*-coding:utf8-*- #!/usr/bin/python # Author : Jeonghoonkang, github.com/jeonghoonkang import sys, os sys.path.insert(0, '/var/www/camera') #import textindex from time import strftime, localtime, sleep import picamera import datetime pic = '/var/www/camera/%s_cam_shot.jpg' if len(sys.argv) is 1: print ' *****' ...
#-*-coding:utf8-*- #!/usr/bin/python # Author : Jeonghoonkang, github.com/jeonghoonkang import sys, os sys.path.insert(0, '/var/www/camera') #import textindex from time import strftime, localtime, sleep import picamera import datetime pic = '/var/www/camera/%s_cam_shot.jpg' if len(sys.argv) is 1: print ' *****'...
bsd-2-clause
Python
31000ca90746859b3a54db3caf4d5ec4d665b089
Update Keras.py
paperrune/Neural-Networks,paperrune/Neural-Networks
Multilayer-Perceptron/Keras.py
Multilayer-Perceptron/Keras.py
from keras.datasets import mnist from keras.initializers import RandomUniform from keras.layers import Dense from keras.models import Sequential from keras.optimizers import SGD from keras.utils import to_categorical batch_size = 128 epochs = 30 learning_rate = 1 num_classes = 10 (x_train, y_train), (x_te...
from keras.datasets import mnist from keras.initializers import RandomUniform from keras.layers import Dense from keras.models import Sequential from keras.optimizers import SGD from keras.utils import to_categorical batch_size = 128 epochs = 30 learning_rate = 1 num_classes = 10 (x_train, y_train), (x_te...
mit
Python
8a1563ca2b93885869f25a5ed547f703a32913fb
Add confluence search example
AstroTech/atlassian-python-api,AstroTech/atlassian-python-api,MattAgile/atlassian-python-api
examples/confluence-search-cql.py
examples/confluence-search-cql.py
# coding: utf8 from atlassian import Confluence """This example shows how to use the cql More detail documentation located here https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/ """ confluence = Confluence( url='http://localhost:8090', username='admin', password=...
# coding: utf8 from atlassian import Confluence """This example shows how to use the cql More detail documentation located here https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/ """ confluence = Confluence( url='http://localhost:8090', username='admin', password=...
apache-2.0
Python
e86afc843a0d21c7ffd796e96419b56a45cbac51
Update to xenvbd 8.2.1.158
xenserver/win-installer,OwenSmith/win-installer,OwenSmith/win-installer,xenserver/win-installer,OwenSmith/win-installer,OwenSmith/win-installer,xenserver/win-installer,OwenSmith/win-installer,xenserver/win-installer,xenserver/win-installer
manifestspecific.py
manifestspecific.py
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
bsd-2-clause
Python
43a1ebc98e42a9c68d3472470459d4e6c9c1c86d
put the Zencoder object at the top level of the module
pbs/zencoder-py,torchbox/zencoder-py,zencoder/zencoder-py
zencoder/__init__.py
zencoder/__init__.py
from zencoder import Zencoder
mit
Python
091c6061b98617dcbfff686c6b0134b89c228dde
Update XENVIF
OwenSmith/win-installer,xenserver/win-installer,xenserver/win-installer,OwenSmith/win-installer,OwenSmith/win-installer,OwenSmith/win-installer,xenserver/win-installer,xenserver/win-installer,xenserver/win-installer,OwenSmith/win-installer
manifestspecific.py
manifestspecific.py
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
bsd-2-clause
Python
abdc3a4f115cfec56dfe8de7aec91a6a8351f996
add imports and as_xml kwarg
pbs/zencoder-py,torchbox/zencoder-py,zencoder/zencoder-py
zencoder/zencoder.py
zencoder/zencoder.py
""" Main Zencoder module """ import os import json import httplib2 class ZencoderError(Exception): pass class Zencoder(object): """ Main class for pushing jobs to zencoder """ def __init__(self, api_key=None, as_xml=False): """ Initialize Zencoder """ self.base_url = 'https://app.zencoder...
""" Main Zencoder module """ import os class ZencoderError(Exception): pass class Zencoder(object): """ Main class for pushing jobs to zencoder """ def __init__(self, api_key=None): """ Initialize Zencoder """ self.base_url = 'https://app.zencoder.com/api' if not api_key: ...
mit
Python
3f4f5c4de90669e82f4b2072d7868bcaeec086e3
fix bug 2
wangweihao/my-blog
hello.py
hello.py
def hello(): print 'hello' # fix bug # fix bug2
def hello(): print 'hello' # fix bug
apache-2.0
Python
88bcdc4dec40e728c62bec87b1db325ec277795c
fix missing platform
lawrencec/horace
examples/duckduckgo/duckduckgo.py
examples/duckduckgo/duckduckgo.py
from horace.driver import Driver from horace.agent import Agent from examples.duckduckgo.pages.homepage import DuckDuckGoHomePage from examples.duckduckgo.pages.searchpage import DuckDuckGoSearchPage class DuckDuckGoAgent(Agent): def drive(self): searchTerm = 'deus ex machina' self.to_at(DuckDuck...
from horace.driver import Driver from horace.agent import Agent from examples.duckduckgo.pages.homepage import DuckDuckGoHomePage from examples.duckduckgo.pages.searchpage import DuckDuckGoSearchPage class DuckDuckGoAgent(Agent): def drive(self): searchTerm = 'deus ex machina' self.to_at(DuckDuck...
mit
Python
52b7aad38e04ec4d2aab1d557d5006611d361a27
Work on testing redis RPC backend
adamcharnock/lightbus
tests/redis_transports/test_reliability_redis_rpc.py
tests/redis_transports/test_reliability_redis_rpc.py
import asyncio import logging from asyncio.futures import CancelledError from random import random import pytest import lightbus from lightbus.exceptions import SuddenDeathException, LightbusTimeout from lightbus.utilities import handle_aio_exceptions @pytest.mark.run_loop async def test_timeouts(bus: lightbus.Bus...
import asyncio import logging from asyncio.futures import CancelledError from random import random import pytest import lightbus from lightbus.exceptions import SuddenDeathException, LightbusTimeout from lightbus.utilities import handle_aio_exceptions @pytest.mark.run_loop # TODO: Have test repeat a few times asy...
apache-2.0
Python
a7a01e3b36e6292e4ded556b8d556daf9cefe00e
make sigsort function backwards compatible with older analyses
cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo
web/analysis/templatetags/analysis_tags.py
web/analysis/templatetags/analysis_tags.py
from django.template.defaultfilters import register @register.filter("mongo_id") def mongo_id(value): """Retrieve _id value. @todo: it will be removed in future. """ if isinstance(value, dict): return value.get("_id", value) # Return value return unicode(value) @register.filter("is_di...
from django.template.defaultfilters import register @register.filter("mongo_id") def mongo_id(value): """Retrieve _id value. @todo: it will be removed in future. """ if isinstance(value, dict): return value.get("_id", value) # Return value return unicode(value) @register.filter("is_di...
mit
Python
7da0164b6bfbec37e34e7151f635ce200761e521
Fix input test
vorwerkc/pymatgen,gmatteo/pymatgen,davidwaroquiers/pymatgen,gVallverdu/pymatgen,gVallverdu/pymatgen,fraricci/pymatgen,fraricci/pymatgen,fraricci/pymatgen,davidwaroquiers/pymatgen,fraricci/pymatgen,vorwerkc/pymatgen,gVallverdu/pymatgen,davidwaroquiers/pymatgen,vorwerkc/pymatgen,gVallverdu/pymatgen,davidwaroquiers/pymatg...
pymatgen/io/xtb/tests/test_inputs.py
pymatgen/io/xtb/tests/test_inputs.py
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os from pymatgen.core.structure import Molecule from pymatgen.io.xtb.inputs import CRESTInput from pymatgen.util.testing import PymatgenTest __author__ = "Alex Epstein" __copyright__ = "Copyright 2020...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os from pymatgen.core.structure import Molecule from pymatgen.io.xtb.inputs import CRESTInput from pymatgen.util.testing import PymatgenTest __author__ = "Alex Epstein" __copyright__ = "Copyright 2020...
mit
Python
2b9d3a776781697eab1d5e57af6b6ea1a12b28cc
fix custom settings
Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,Anaethelion/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,Anaethelion/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin
geotrek/settings/tests.py
geotrek/settings/tests.py
from .default import * # NOQA # # Django Tests # .......................... TEST = True TEST_EXCLUDE = ('django',) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' SOUTH_TESTS_MIGRATE = False MAPENTITY_CONFIG['MAPENTITY_WEASYPRINT'] = False MAILALERTSUBJECT = "Acknowledgment of feedba...
from .default import * # NOQA # # Django Tests # .......................... TEST = True TEST_EXCLUDE = ('django',) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' SOUTH_TESTS_MIGRATE = False MAPENTITY_CONFIG['MAPENTITY_WEASYPRINT'] = False MAILALERTSUBJECT = "Acknowledgment of feedba...
bsd-2-clause
Python
6c116857a3d5091742066db1e00bf2f3402c5e41
Store date in CharField
lord63/zhihudaily,lord63/zhihudaily,lord63/zhihudaily
zhihudaily/models.py
zhihudaily/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from peewee import Model, CharField from zhihudaily.configs import Config class BaseModel(Model): class Meta: database = Config.database class Zhihudaily(BaseModel): date = CharField() json_...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from peewee import Model, IntegerField, CharField from zhihudaily.configs import Config class BaseModel(Model): class Meta: database = Config.database class Zhihudaily(BaseModel): date = Integer...
mit
Python
0cd5d81dec201cc232025394741b5bff6e12da78
remove unused variable
Boussadia/weboob,laurent-george/weboob,eirmag/weboob,sputnick-dev/weboob,frankrousseau/weboob,nojhan/weboob-devel,willprice/weboob,sputnick-dev/weboob,franek/weboob,Boussadia/weboob,yannrouillard/weboob,willprice/weboob,Boussadia/weboob,RouxRC/weboob,frankrousseau/weboob,franek/weboob,Konubinix/weboob,eirmag/weboob,Kon...
weboob/backends/youporn/backend.py
weboob/backends/youporn/backend.py
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # 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, version 3 of the License. # # This program is distributed in the hope that it will b...
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # 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, version 3 of the License. # # This program is distributed in the hope that it will b...
agpl-3.0
Python
372575716d3ec04985b0d5bf4888d123cca07b66
Use get_meta to avoid error
saurabh6790/frappe,yashodhank/frappe,vjFaLk/frappe,adityahase/frappe,mhbu50/frappe,yashodhank/frappe,vjFaLk/frappe,mhbu50/frappe,yashodhank/frappe,mhbu50/frappe,saurabh6790/frappe,yashodhank/frappe,frappe/frappe,saurabh6790/frappe,frappe/frappe,saurabh6790/frappe,frappe/frappe,vjFaLk/frappe,StrellaGroup/frappe,adityaha...
frappe/patches/v11_0/apply_customization_to_custom_doctype.py
frappe/patches/v11_0/apply_customization_to_custom_doctype.py
import frappe from frappe.utils import cint # This patch aims to apply & delete all the customization # on custom doctypes done through customize form # This is required because customize form in now blocked # for custom doctypes and user may not be able to # see previous customization def execute(): custom_doctype...
import frappe from frappe.utils import cint # This patch aims to apply & delete all the customization # on custom doctypes done through customize form # This is required because customize form in now blocked # for custom doctypes and user may not be able to # see previous customization def execute(): custom_doctype...
mit
Python
b520c62527189e66a6ab8690a42e5e18dbf9b00b
Update getch.py
alexbragdon/SpeedReader
getch.py
getch.py
#Adapted from: http://stackoverflow.com/questions/32671306/how-can-i-read-keyboard-input-in-python #usr/bin/env python import sys #Tries a couple of potentialy built in packages to enable the retrival of single charecters from the keybaord. try: import tty, termios except ImportError: try: import msv...
#!/usr/bin/env python import sys #Tries a couple of potentialy built in packages to enable the retrival of single charecters from the keybaord. try: import tty, termios except ImportError: try: import msvcrt except ImportError: raise ImportError('getch not available') else: ge...
mit
Python
9769a171ffc1ff691070e0e375b5873a08bec4f7
Fix Pylint errors
DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe
zoe_api/auth/base.py
zoe_api/auth/base.py
# Copyright (c) 2018, Daniele Venzano # # 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 w...
# Copyright (c) 2018, Daniele Venzano # # 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 w...
apache-2.0
Python
54177e19df14ca878e537554345fa1bef2fef9c3
adjust wording to class description
tijko/IO-Mon
iomon.py
iomon.py
#!/usr/bin/env python import os import sys from gi.repository import GObject from lib.io_object import IoMonitor class InitIoMon(object): ''' Initializing class for IO-Mon that creates the main instance of IoMonitor (the dbus object to export). Inside the IoMonitor instance the DBusGMainLoop is ca...
#!/usr/bin/env python import os import sys from gi.repository import GObject from lib.io_object import IoMonitor class InitIoMon(object): ''' Initializing class for IO-Mon that creates the main instance of IoMonitor (the dbus object to export). Inside the IoMonitor instance the DBusGMainLoop is ca...
mit
Python
5cadb19aec67945efa5c4367ee4d1aab6bbc66e7
Split out writing to disk into it's own mfunction
AutomatedTester/git-issues,AutomatedTester/git-issues,AutomatedTester/git-issues
git-issues/git-handler.py
git-issues/git-handler.py
import os import re import subprocess import requests GITHUB_API_ADDRESS = "https://api.github.com/" def get_git_address(): response = subprocess.check_output(['git', 'remote', '-v']) dirty = response.split('\n') repos = {} for repo in dirty: rep = repo.split('\t') if len(rep) > 1: ...
import os import re import subprocess import requests GITHUB_API_ADDRESS = "https://api.github.com/" def get_git_address(): response = subprocess.check_output(['git', 'remote', '-v']) dirty = response.split('\n') repos = {} for repo in dirty: rep = repo.split('\t') if len(rep) > 1: ...
apache-2.0
Python
bc6af25366aacf394f96b5a93008109904a89e93
Add a UiautoApk resource type.
bjackman/workload-automation,bjackman/workload-automation,bjackman/workload-automation,bjackman/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,bjackman/workload-automation,bjackman/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-au...
wlauto/common/android/resources.py
wlauto/common/android/resources.py
# Copyright 2014-2015 ARM 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 w...
# Copyright 2014-2015 ARM 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 w...
apache-2.0
Python
618c81647e327a8f5106ac181aa9081eecb23328
change the time to one hour and get the new solr input
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
ae627917a70cf0f1837051629b187e3ec75d1260
Bump version
mbourqui/django-publications-bootstrap,mbourqui/django-publications-bootstrap,mbourqui/django-publications-bootstrap
publications_bootstrap/__init__.py
publications_bootstrap/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>' __authors__ = ['Lucas Theis <lucas@theis.io>', 'Marc Bourqui <pypi.kemar@bourqui.org>'] __docformat__ = 'numpy' __version__ = '2.3.0' __version_info__ = tuple([int(num) if num.isdigit() else n...
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>' __authors__ = ['Lucas Theis <lucas@theis.io>', 'Marc Bourqui <pypi.kemar@bourqui.org>'] __docformat__ = 'numpy' __version__ = '2.2.2' __version_info__ = tuple([int(num) if num.isdigit() else n...
mit
Python
4cfffd15edac97a9b5e638f19be75bc7b418d637
Fix pre-commit errors
learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri
kolibri/core/auth/migrations/0018_no_i18n_collection_kinds.py
kolibri/core/auth/migrations/0018_no_i18n_collection_kinds.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-06-22 15:50 from __future__ import unicode_literals from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ("kolibriauth", "0017_remove_facilitydataset_allow_guest_access"), ]...
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-06-22 15:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('kolibriauth', '0017_remove_facilitydataset_allow_guest_access'), ] operations = [ ...
mit
Python
365ef086c04096311e41645a7b7d9979039c96d1
Add missing global and fix incorrect exception
stackforge/git-upstream,emonty/git-upstream,dguerri/git-upstream-old,dguerri/git-upstream-old,stackforge/git-upstream,emonty/git-upstream
ghp/version.py
ghp/version.py
# # Copyright (c) 2012 Hewlett-Packard # # 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 ...
# # Copyright (c) 2012 Hewlett-Packard # # 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 ...
apache-2.0
Python
134881d93d6173156fa8a132ad408d09c278a26e
fix address and postcode in West Berkshire script
chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_westberks.py
polling_stations/apps/data_collection/management/commands/import_westberks.py
""" Import West Berkshire Polling stations """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from West Berkshire Council """ council_id = 'E06000037' districts_name = 'polling_districts' stations_n...
""" Import West Berkshire Polling stations """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from West Berkshire Council """ council_id = 'E06000037' districts_name = 'polling_districts' stations_n...
bsd-3-clause
Python
d048bbb7ee2d02c68496393a3ebf247412d8eb01
add version 1.9 (#9595)
LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack
var/spack/repos/builtin/packages/bcftools/package.py
var/spack/repos/builtin/packages/bcftools/package.py
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Bcftools(AutotoolsPackage): """BCFtools is a set of utilities that manipulate variant call...
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Bcftools(AutotoolsPackage): """BCFtools is a set of utilities that manipulate variant call...
lgpl-2.1
Python
d54451cb7e9de8926581002e6b1412a3fda77ac2
Fix imcut.py
zhaipro/misc,zhaipro/misc
imcut.py
imcut.py
# coding: utf-8 import sys import cv2 def imcut(im, width, height, x=0.5, y=0.5, c=0.0, resize=False): if isinstance(im, str): im = cv2.imread(im) h, w, _ = im.shape ch = max(h - w * height / width, 0) cw = max(w - h * width / height, 0) ch = int(ch + (h - ch) * c) cw = int(cw + (w - c...
# coding: utf-8 import sys import cv2 def imcut(im, width, height, x=0.5, y=0.5, r=1.0, resize=False): if isinstance(im, str): im = cv2.imread(im) h, w, _ = im.shape ch = int(max(h - w * height / width * r, 0)) cw = int(max(w - h * width / height * r, 0)) x, y = int(cw * x), int(ch * y) ...
mit
Python
fd217f454c2bc801c1ef5697adb2f9009e1c35bc
make pep8 happy
moreati/pyscard,LudovicRousseau/pyscard,LudovicRousseau/pyscard,moreati/pyscard,moreati/pyscard,LudovicRousseau/pyscard
smartcard/guid.py
smartcard/guid.py
"""smartcard.guid Utility functions to handle GUIDs as strings or list of bytes __author__ = "http://www.gemalto.com" Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under ...
"""smartcard.guid Utility functions to handle GUIDs as strings or list of bytes __author__ = "http://www.gemalto.com" Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under ...
lgpl-2.1
Python
f4d7bc57e9fdc721cc8f5f2d24547e4954b8ba53
Fix rotomap-montagesingle: clip to top-left
aevri/mel,aevri/mel
py/mel/cmd/rotomapmontagesingle.py
py/mel/cmd/rotomapmontagesingle.py
"""Create a montage image for a single mole from a rotomap.""" import cv2 import mel.lib.common import mel.lib.image import mel.rotomap.moles def setup_parser(parser): parser.add_argument( 'ROTOMAP', type=mel.rotomap.moles.ArgparseRotomapDirectoryType, help="Path to the rotomap to copy ...
"""Create a montage image for a single mole from a rotomap.""" import cv2 import mel.lib.common import mel.lib.image import mel.rotomap.moles def setup_parser(parser): parser.add_argument( 'ROTOMAP', type=mel.rotomap.moles.ArgparseRotomapDirectoryType, help="Path to the rotomap to copy ...
apache-2.0
Python
3bd0101fb955c9d92aa355f492d1405b2a9c3464
Update to 4.4.0 (#2850)
EmreAtes/spack,TheTimmy/spack,iulian787/spack,matthiasdiener/spack,iulian787/spack,TheTimmy/spack,lgarren/spack,TheTimmy/spack,skosukhin/spack,matthiasdiener/spack,mfherbst/spack,lgarren/spack,mfherbst/spack,mfherbst/spack,EmreAtes/spack,tmerrick1/spack,iulian787/spack,tmerrick1/spack,LLNL/spack,LLNL/spack,krafczyk/spa...
var/spack/repos/builtin/packages/jemalloc/package.py
var/spack/repos/builtin/packages/jemalloc/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Python
51c4de1e091a1a089c0975701f9843a92e021835
Add Orca Overview and Context Doc (#2748)
yangw1234/BigDL,yangw1234/BigDL,yangw1234/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,intel-analytics/BigDL
python/orca/src/bigdl/orca/common.py
python/orca/src/bigdl/orca/common.py
# # Copyright 2018 Analytics Zoo Authors. # # 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...
# # Copyright 2018 Analytics Zoo Authors. # # 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...
apache-2.0
Python
30afb3c488ad4bf3eed6103c9bd8587d411f56fa
Improve test registry to 100% code coverage
labs127/typhoon,hiraq/typhoon,labs127/typhoon,hiraq/typhoon
tests/core/test_registry.py
tests/core/test_registry.py
import sys import os sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/../../') import unittest import logging from types import * from mock import MagicMock from core.registry import Registry from core.container import Container from core.exceptions.application import ContainerError class FakeHandler(...
import sys import os sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/../../') import unittest import logging from types import * from mock import MagicMock from core.registry import Registry from core.container import Container from core.exceptions.application import ContainerError class FakeHandler(...
bsd-3-clause
Python
35a892d5008c111c25af0d8aa72ebfe35d435a95
Add lint test and format generated code (#4114)
googleapis/java-iot,googleapis/java-iot,googleapis/java-iot
google-cloud-iot/synth.py
google-cloud-iot/synth.py
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
80482061a5a615a196dc3aca47282c2d096bae74
Add key property and setter to Lists
joshua-stone/DerPyBooru
derpibooru/Lists.py
derpibooru/Lists.py
class Lists(object) def __init__(self, lists, page=1, last="", comments=False, fav=False, key=""): self.__parameters = {} @property def hostname() return("https://derpiboo.ru") @property def parameters(self): return(self.__parameters) @property def lists(): lists = { 0: "index",...
class Lists(object) def __init__(self, lists, page=1, last="", comments=False, fav=False, key=""): self.__parameters = {} @property def hostname() return("https://derpiboo.ru") @property def parameters(self): return(self.__parameters) @property def lists(): lists = { 0: "index",...
bsd-2-clause
Python
47285248836fa94b05e703a52456e5168c2ce161
fix crash in prepare_po_requisition
jorsea/vertical-ngo,jorsea/vertical-ngo
logistic_requisition_department/model/logistic_requisition.py
logistic_requisition_department/model/logistic_requisition.py
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2014-2015 Camptocamp SA (http://www.camptocamp.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the...
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2014-2015 Camptocamp SA (http://www.camptocamp.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the...
agpl-3.0
Python
e7c6bb6328e56c8862947be8e20634ae86c53f16
Bump version number to 0.0.2
krischer/python-future,michaelpacer/python-future,PythonCharmers/python-future,QuLogic/python-future,michaelpacer/python-future,PythonCharmers/python-future,krischer/python-future,QuLogic/python-future
future/__init__.py
future/__init__.py
""" The ``future`` module helps run Python 3.x-compatible code under Python 2. It allows people to write clean, modern Python 3.x-compatible code today and to run it with minimal effort under Python 2 alongside a Python 2 stack that may contain dependencies that have not yet been ported to Python 3. It is designed to...
""" The ``future`` module helps run Python 3.x-compatible code under Python 2. It allows people to write clean, modern Python 3.x-compatible code today and to run it with minimal effort under Python 2 alongside a Python 2 stack that may contain dependencies that have not yet been ported to Python 3. It is designed to...
mit
Python
075ec4f261082c34169c402ab12b4cb9280ff954
update file scanner
zhengbomo/python_practice,zhengbomo/python_practice,zhengbomo/python_practice
project/TextFileScaner/Scanner.py
project/TextFileScaner/Scanner.py
#!/usr/bin/python # -*- coding:utf-8 -*- import os import re import shutil class Scanner(object): def __init__(self): pass @staticmethod def __get_all_files(folder, file_pattern): files = [] for res in os.walk(folder): # (文件夹, 当前子文件夹, 当前子文件) for f in res[2]...
#!/usr/bin/python # -*- coding:utf-8 -*- import os import re import shutil class Scanner(object): def __init__(self): pass @staticmethod def __get_all_files(folder, file_filter): files = [] for res in os.walk(folder): # (文件夹, 当前子文件夹, 当前子文件) for f in res[2]:...
mit
Python
5290ed7f45a6c7704a3f5728699df2146c26bdf5
add gitignore
neotea/google-calendar-display,neotea/google-calendar-display
calendar_config.py
calendar_config.py
SCOPE = 'https://www.googleapis.com/auth/calendar' USER_AGENT = 'GoogleCalendarDisplay/1.0' CLIENT_ID = '' CLIENT_SECRET = '' DEVELOPER_KEY = '' CALENDAR_IDS = ['room1@resource.calendar.google.com','room2@resource.calendar.google.com','room3@resource.calendar.google.com']
SCOPE = 'https://www.googleapis.com/auth/calendar' USER_AGENT = 'GoogleCalendarDisplay/1.0' CLIENT_ID = '409255160896-qq33qf34uvlq97p9052rblvj47q5lq58.apps.googleusercontent.com' CLIENT_SECRET = '9OmtCJbXhOdnb-XXMc3zhIri' DEVELOPER_KEY = 'AIzaSyCadP0t4oOWPFyOm-0uMU3OQ-bbe3dphVk' CALENDAR_IDS = ['collect.ai_32383734373...
apache-2.0
Python
6d879888d06c8f37c532f5d1c4e9065e458aa547
print failing tests
rustoscript/js.rs,rustoscript/js.rs,rustoscript/js.rs
parse.py
parse.py
#!/usr/bin/env python3 import re import operator from collections import defaultdict import sys COMMON_ERRS_ONLY = True reg_err = re.compile("sputnik/([\w\.]+/)*([\w\.]+)/.*: (\w+)Error: (.*)") reg_ok = re.compile("sputnik/([\w\.]+/)*([\w\.]+)/.*: OK") f = open('test_results.txt') counts = defaultdict(lambda: defaul...
#!/usr/bin/env python3 import re import operator from collections import defaultdict import sys COMMON_ERRS_ONLY = True reg_err = re.compile("sputnik/([\w\.]+/)*([\w\.]+)/.*: (\w+)Error: (.*)") reg_ok = re.compile("sputnik/([\w\.]+/)*([\w\.]+)/.*: OK") f = open('test_results.txt') counts = defaultdict(lambda: defaul...
mit
Python
c75aeea58cdb7db30b6051a449d8bbe17a56a6b9
Add some outputters for the puppet module
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/puppet.py
salt/modules/puppet.py
''' Execute puppet routines ''' from salt.exceptions import CommandNotFoundError __outputter__ = { 'run': 'txt', 'noop': 'txt', } def _check_puppet(): ''' Checks if puppet is installed ''' # I thought about making this a virtual module, but then I realized that I # would require the mini...
''' Execute puppet routines ''' from salt.exceptions import CommandNotFoundError def _check_puppet(): ''' Checks if puppet is installed ''' # I thought about making this a virtual module, but then I realized that I # would require the minion to restart if puppet was installed after the # minio...
apache-2.0
Python
079966335015ae373b4f63a0f1a4e2bb3786b332
Add inverse_prandtl_meyer_function, rename prandtl_meyer_function
iwarobots/TunnelDesign
properties/prandtl_meyer_function.py
properties/prandtl_meyer_function.py
#!/usr/bin/env python from __future__ import absolute_import, division from math import asin, atan, degrees, radians, sqrt from scipy.optimize import brentq from properties.constants import GAMMA MIN_MACH = 1E-5 MAX_MACH = 1E1 def m2nu_in_rad(m): if m < 1: raise ValueError('Mach number should be gr...
#!/usr/bin/env python from __future__ import absolute_import, division from math import asin, atan, degrees, sqrt from properties.constants import GAMMA def nu_in_rad(m): if m < 1: raise ValueError('Mach number should be greater than or equal to 1') a = (GAMMA+1) / (GAMMA-1) b = m**2 - 1 c...
mit
Python
d39aad32f71ad3c3c3e6f348bc83032995405d4b
Fix API
Inter-Actief/alexia,Inter-Actief/alexia,Inter-Actief/alexia,Inter-Actief/alexia
api/v1/__init__.py
api/v1/__init__.py
from . import api, authorization, billing, juliana, organization, rfid, user
bsd-3-clause
Python
9980b68a105df0b6cccfbaed6f27ba40fea6172e
remove PR1 report from unsupported types
pitthsls/pycounter
pycounter/test/test_bad_reports.py
pycounter/test/test_bad_reports.py
"""Test parsing of deliberately bad data.""" from __future__ import absolute_import import pytest from pycounter import report import pycounter.exceptions @pytest.mark.parametrize( "report_type", [u"Bogus Report 7 (R4)"], # unsupported but valid ) def test_report_type(report_type): """Report type does...
"""Test parsing of deliberately bad data.""" from __future__ import absolute_import import pytest from pycounter import report import pycounter.exceptions @pytest.mark.parametrize( "report_type", [u"Bogus Report 7 (R4)", u"Platform Report 1 (R4)"], # unsupported but valid ) def test_report_type(report_typ...
mit
Python
3d63d3d64bb694c3ca38a11891b3d2dc47824ba3
handle case where ether_url is absent
cligu/gitdox,cligu/gitdox,cligu/gitdox,cligu/gitdox
paths.py
paths.py
import requests, os, platform from modules.configobj import ConfigObj # Support IIS site prefix on Windows if platform.system() == "Windows": prefix = "transc\\" else: prefix = "" # to use password authentication, use a netrc file called .netrc in the project root try: ether_url = ConfigObj(prefix + "users" + o...
import requests, os, platform from modules.configobj import ConfigObj # Support IIS site prefix on Windows if platform.system() == "Windows": prefix = "transc\\" else: prefix = "" # to use password authentication, use a netrc file called .netrc in the project root ether_url = ConfigObj(prefix + "users" + os.sep + "...
apache-2.0
Python
494eb74c5524f22bbf3c2ef3ebb73af2d2e5420a
Fix for new parameter stuff.
andrewfu0325/gem5-aladdin,andrewfu0325/gem5-aladdin,andrewfu0325/gem5-aladdin,andrewfu0325/gem5-aladdin,andrewfu0325/gem5-aladdin,andrewfu0325/gem5-aladdin,andrewfu0325/gem5-aladdin
tests/long/70.twolf/test.py
tests/long/70.twolf/test.py
# Copyright (c) 2006-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
# Copyright (c) 2006-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
bsd-3-clause
Python
01f932149608d49e2ba3b16805b2b1d25eb378a1
build PythonKit with just built toolchain
parkera/swift,JGiola/swift,roambotics/swift,jmgc/swift,rudkx/swift,stephentyrone/swift,tkremenek/swift,rudkx/swift,atrick/swift,jckarter/swift,jmgc/swift,apple/swift,glessard/swift,hooman/swift,tkremenek/swift,parkera/swift,roambotics/swift,allevato/swift,atrick/swift,nathawes/swift,xwu/swift,CodaFi/swift,hooman/swift,...
utils/swift_build_support/swift_build_support/products/pythonkit.py
utils/swift_build_support/swift_build_support/products/pythonkit.py
# swift_build_support/products/pythonkit.py ---------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
# swift_build_support/products/pythonkit.py ---------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
apache-2.0
Python
905998fb41356345a74de1eedd3dfccb5b02cf24
fix uneeded import in sphinx conf
pirate/bookmark-archiver,pirate/bookmark-archiver,pirate/bookmark-archiver
archivebox/docs/conf.py
archivebox/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...
mit
Python
15c58fb05a9bfb06b87d8d00a1b26d50ee68c1f7
Add creation of js message files to management command
JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder
django/publicmapping/redistricting/management/commands/makelanguagefiles.py
django/publicmapping/redistricting/management/commands/makelanguagefiles.py
#!/usr/bin/python from django.core.management.base import BaseCommand from redistricting.utils import * class Command(BaseCommand): """ This command prints creates and compiles language message files """ args = None help = 'Create and compile language message files' def handle(self, *args, **o...
#!/usr/bin/python from django.core.management.base import BaseCommand from redistricting.utils import * class Command(BaseCommand): """ This command prints creates and compiles language message files """ args = None help = 'Create and compile language message files' def handle(self, *args, **o...
apache-2.0
Python
8c3116a93f78336e02f5eca423c4bdd63e0e5f3b
disable one part when creating the documentation
sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper
src/pyquickhelper/helpgen/_nbconvert_config.py
src/pyquickhelper/helpgen/_nbconvert_config.py
""" @file @brief Custom preprocessor, see `custom_preprocessor <https://github.com/jupyter/nbconvert-examples/blob/master/custom_preprocessor/>`_ """ import os # -- HELP BEGIN EXCLUDE -- try: c = get_config() except ImportError as e: from IPython import get_config c = get_config() c.Exporter.preprocessors...
""" @file @brief Custom preprocessor, see `custom_preprocessor <https://github.com/jupyter/nbconvert-examples/blob/master/custom_preprocessor/>`_ """ import os try: c = get_config() except ImportError as e: from IPython import get_config c = get_config() c.Exporter.preprocessors = [ '_nbconvert_preproce...
mit
Python
1ee01152b384d2aa1a854ec46749f45022229b53
fix chuynked response
wong2/gunicorn,GitHublong/gunicorn,wong2/gunicorn,ammaraskar/gunicorn,prezi/gunicorn,gtrdotmcs/gunicorn,WSDC-NITWarangal/gunicorn,MrKiven/gunicorn,mvaled/gunicorn,jamesblunt/gunicorn,tempbottle/gunicorn,prezi/gunicorn,pschanely/gunicorn,urbaniak/gunicorn,ephes/gunicorn,prezi/gunicorn,1stvamp/gunicorn,wong2/gunicorn,mva...
gunicorn/http/response.py
gunicorn/http/response.py
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from gunicorn.util import close, http_date, write, write_chunk class Response(object): def __init__(self, sock, response, req): self.req = req self._sock = sock ...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from gunicorn.util import close, http_date, write, write_chunk class Response(object): def __init__(self, sock, response, req): self.req = req self._sock = sock ...
mit
Python
6a06f1df3e3543f364a1c85a1bf0b1b8e15b0b94
Bump version to 0.7
gmjosack/gsh
gsh/version.py
gsh/version.py
""" Specify version information about GSH. This file is meant to be kept minimal. It is loaded by both GSH itself and setup.py. This is to avoid having to specify the code in multiple places. Because of this, this file should remain empty other than the __version__ itself. """ __version__ = 0.7
""" Specify version information about GSH. This file is meant to be kept minimal. It is loaded by both GSH itself and setup.py. This is to avoid having to specify the code in multiple places. Because of this, this file should remain empty other than the __version__ itself. """ __version__ = 0.6
mit
Python
fcd0b59ccf012e7d68988c0a15ff60d4b6ee4476
print statement was off by 1
superphy/backend
app/scripts/sideload.py
app/scripts/sideload.py
# to be run from within a Docker container # allows bypassing of reactapp front-end to load genome files into RQ import os from modules.spfy import spfy def create_request(f): ''' Args: f (str): genome file with absolute path ex. '/datastore/GCA_001911305.1_ASM191130v1_genomic.fna' ''' ...
# to be run from within a Docker container # allows bypassing of reactapp front-end to load genome files into RQ import os from modules.spfy import spfy def create_request(f): ''' Args: f (str): genome file with absolute path ex. '/datastore/GCA_001911305.1_ASM191130v1_genomic.fna' ''' ...
apache-2.0
Python
679d7b4381e02d3f0788dcf6ab1b8cea477c93d4
Update imageDownloader.py
agusmakmun/Some-Examples-of-Simple-Python-Script,agusmakmun/Some-Examples-of-Simple-Python-Script
Download/imageDownloader/imageDownloader.py
Download/imageDownloader/imageDownloader.py
# -*- coding: utf-8 -*- ''' Created by: Summon Agus (agus@python.web.id) at Wed, 22 Jun 2016 : 20:50 Licensed : MIT ''' import os, sys, urllib, urllib2 from bs4 import BeautifulSoup path_download_images = 'images/' if os.path.isdir(path_download_images) == False: os.makedirs(path_download_images) def down...
# -*- coding: utf-8 -*- ''' Created by: Summon Agus (agus@python.web.id) at Wed, 22 Jun 2016 : 20:50 Licensed : MIT ''' import os, sys, urllib, urllib2 from bs4 import BeautifulSoup path_download_images = 'images/' if os.path.isdir(path_download_images) == False: os.makedirs(path_download_images) def down...
agpl-3.0
Python
33c8d16366f8e89377af94d1a82da4b3debefe61
fix filters
achiku/jungle
jangle.py
jangle.py
# -*- coding: utf-8 -*- import click import boto3 def get_tag_value(x, key): result = [y['Value'] for y in x if y['Key'] == key] if len(result) == 0: return None return result[0] @click.group() def cli(): pass @cli.group() def ec2(): pass @ec2.command(help='List EC2 instances') @clic...
#!/usr/bin/env python # -*- coding: utf-8 -*- import click import boto3 def get_tag_value(x, key): result = [y['Value'] for y in x if y['Key'] == key] if len(result) == 0: return None return result[0] @click.group() def cli(): pass @cli.group() def ec2(): pass @ec2.command(help='List...
mit
Python
692066a97a625731dfa4622a0acd02eba4fdab59
add time zone to protoutil.
Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server
pykeg/src/pykeg/proto/protoutil.py
pykeg/src/pykeg/proto/protoutil.py
# Copyright 2010 Mike Wakerly <opensource@hoho.com> # # This file is part of the Pykeg package of the Kegbot project. # For more information on Pykeg or Kegbot, see http://kegbot.org/ # # Pykeg is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by...
# Copyright 2010 Mike Wakerly <opensource@hoho.com> # # This file is part of the Pykeg package of the Kegbot project. # For more information on Pykeg or Kegbot, see http://kegbot.org/ # # Pykeg is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by...
mit
Python
0e6e3e274bd2c185d8f9afb3ef3eb42f18a9680e
fix pep8
bradsokol/PyLCP,Points/PyLCP,Points/PyLCP,bradsokol/PyLCP
pylcp/schema/postings/constants.py
pylcp/schema/postings/constants.py
STATUS_UNKNOWN = '' STATUS_SUCCESS = 'success' STATUS_PENDING = 'pending' STATUS_FAILURE = 'failure'
STATUS_UNKNOWN = '' STATUS_SUCCESS = 'success' STATUS_PENDING = 'pending' STATUS_FAILURE = 'failure'
bsd-3-clause
Python
8a6630283197f4c68751a1fccd58b6b83467eb3f
Add new actions
cloudtools/awacs,craigbruce/awacs
awacs/cloudformation.py
awacs/cloudformation.py
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from aws import Action service_name = 'AWS CloudFormation' prefix = 'cloudformation' class CloudformationAction(Action): def __init__(self, action=None): self.prefix = prefix self.a...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from aws import Action service_name = 'AWS CloudFormation' prefix = 'cloudformation' CreateStack = Action(prefix, 'CreateStack') DeleteStack = Action(prefix, 'DeleteStack') DescribeStackEvents = Action(...
bsd-2-clause
Python
7ecc8d8127ef5032465c1586fd78b438b3a5c518
Use fastest hasher to speed up tests
ryu22e/django_template,ryu22e/django_template
project_name/settings/test.py
project_name/settings/test.py
from .base import * # NOQA import logging # Disable logging, Because this doesn't need to run tests. logging.disable(logging.CRITICAL) # Disable Debug mode, Because this doesn't need to run tests. DEBUG = False # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { "default": {...
from .base import * # NOQA import logging # Disable logging, Because this doesn't need to run tests. logging.disable(logging.CRITICAL) # Disable Debug mode, Because this doesn't need to run tests. DEBUG = False # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { "default": {...
mit
Python
f1384b22df0fa544bdbbfa599b5aa092e7e5804a
Fix path errors in src/w2v_train.py
tapilab/is-jzheng
src/w2v_train.py
src/w2v_train.py
""" Train word2vec """ import logging import os.path import sys import multiprocessing #import gensim.models.word2vec from gensim.models.word2vec import Word2Vec from gensim.models.word2vec import LineSentence import os if __name__ == '__main__': program = os.path.basename(sys.argv[0]) logger = logging.getLogge...
""" Train word2vec """ import logging import os.path import sys import multiprocessing #import gensim.models.word2vec from gensim.models.word2vec import Word2Vec from gensim.models.word2vec import LineSentence import os if __name__ == '__main__': program = os.path.basename(sys.argv[0]) logger = logging.getLogge...
mit
Python
aa872be9610dc004e1548954d0f63873479fdbcb
Restructure microphone matcher to use class
piotrwicijowski/whistler,piotrwicijowski/whistler
microphone_match.py
microphone_match.py
#!/usr/bin/python2 from __future__ import print_function import os import sys from sys import platform import audfprint import hash_table import audfprint_match import tempfile import subprocess import docopt if platform == "linux" or platform == "linux2": FFMPEG_BIN = "ffmpeg" # on Linux FFMPEG_AUDIO_DE...
#!/usr/bin/python2 from __future__ import print_function import os import sys from sys import platform import audfprint import tempfile import subprocess if platform == "linux" or platform == "linux2": FFMPEG_BIN = "ffmpeg" # on Linux FFMPEG_AUDIO_DEVICE = "pulse" elif platform == "win32": FFMPEG_BIN...
mit
Python
0d623b79f368b485de85c3779a2f84f932d64e9f
Test for DirectedGraph.to_dot
mdickinson/refcycle
refcycle/test/test_directed_graph.py
refcycle/test/test_directed_graph.py
""" Tests for the DirectedGraph class. """ import unittest from refcycle.directed_graph import DirectedGraph test_graph = DirectedGraph.from_out_edges( vertices=set(range(1, 12)), edge_mapper={ 1: [4, 2, 3], 2: [1], 3: [5, 6, 7], 4: [], 5: [], 6: [7], ...
""" Tests for the DirectedGraph class. """ import unittest from refcycle.directed_graph import DirectedGraph test_graph = DirectedGraph.from_out_edges( vertices=set(range(1, 12)), edge_mapper={ 1: [4, 2, 3], 2: [1], 3: [5, 6, 7], 4: [], 5: [], 6: [7], ...
apache-2.0
Python
8ddcabe29dfaa6716578664224620fc5a0116a2b
Fix pre-commit issue for the cli_eigenvals test.
Z2PackDev/TBmodels,Z2PackDev/TBmodels
tests/test_cli_eigenvals.py
tests/test_cli_eigenvals.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Tests for the 'eigenvals' command. """ import os import tempfile import numpy as np import bands_inspect as bi from click.testing import CliRunner from tbmodels....
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> import os import pytest import tempfile import numpy as np import bands_inspect as bi from click.testing import CliRunner import tbmodels from tbmodels._cli import c...
apache-2.0
Python
b056ac776628149c738977890d5cb0cee64261f5
bump 0.1.0
ImageIntelligence/mimiron
mimiron/__init__.py
mimiron/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals __version_info__ = (0, 1, 0) __version__ = '.'.join([unicode(i) for i in __version_info__]) __author__ = 'David Vuong' __author_email__ = 'david@imageintelligence.com'
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals __version_info__ = (0, 0, 2) __version__ = '.'.join([unicode(i) for i in __version_info__]) __author__ = 'David Vuong' __author_email__ = 'david@imageintelligence.com'
mit
Python
ab234b07c1c0b590e109bdcff2defcc08291aa6d
remove unused code
brunosmmm/hdltools,brunosmmm/hdltools
hdltools/abshdl/concat.py
hdltools/abshdl/concat.py
"""Concatenation.""" from . import HDLObject from .expr import HDLExpression from .signal import HDLSignal, HDLSignalSlice from .const import HDLIntegerConstant class HDLConcatenation(HDLObject): """Concatenation of HDLObjects.""" def __init__(self, *args): """Initialize.""" self.items = [] ...
"""Concatenation.""" from . import HDLObject from .expr import HDLExpression from .signal import HDLSignal, HDLSignalSlice from .const import HDLIntegerConstant class HDLConcatenation(HDLObject): """Concatenation of HDLObjects.""" def __init__(self, *args): """Initialize.""" self.items = [] ...
mit
Python
ce6bbe93ff091b7436d6b06f7342502e14060186
Remove merge conflicts
durden/dash,durden/dash
apps/codrspace/views.py
apps/codrspace/views.py
"""Main codrspace views""" from django.shortcuts import render, redirect from settings import GITHUB_CLIENT_ID def index(request, slug=None, template_name="base.html"): return render(request, template_name) def signin_start(request, slug=None, template_name="signin.html"): """Start of OAuth signin""" r...
<<<<<<< HEAD from django.shortcuts import render ======= """Main codrspace views""" from django.shortcuts import render_to_response, redirect >>>>>>> ce96d1c209bb5f2d3359681c7fac7d8bd3fceb84 from django.template import RequestContext from settings import GITHUB_CLIENT_ID def index(request, slug=None, template_name="...
mit
Python
a2ea535f2ae565e0364af6257f82adced23d71d9
Bump TF version to 2.3.0rc2+ (#1048)
tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io
tensorflow_io/core/python/ops/version_ops.py
tensorflow_io/core/python/ops/version_ops.py
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Python
b6f88f83aeb67abb3bf38b5086677f696f19683d
Bump version number.
mrGeen/cython,acrispin/cython,encukou/cython,JelleZijlstra/cython,cython/cython,bzzzz/cython,mcanthony/cython,achernet/cython,ChristopherHogan/cython,JelleZijlstra/cython,roxyboy/cython,hpfem/cython,c-blake/cython,acrispin/cython,fabianrost84/cython,mcanthony/cython,hickford/cython,JelleZijlstra/cython,acrispin/cython,...
Cython/__init__.py
Cython/__init__.py
__version__ = "0.14.1rc0" # Void cython.* directives (for case insensitive operating systems). from Cython.Shadow import *
__version__ = "0.14+" # Void cython.* directives (for case insensitive operating systems). from Cython.Shadow import *
apache-2.0
Python
d77d6ca65b7be5cf288c56f5146f8dc98bccc784
Add service function to update a user badge
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/services/user_badge/command_service.py
byceps/services/user_badge/command_service.py
""" byceps.services.user_badge.command_service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import datetime from typing import Optional, Tuple from ...database import db from ...events.user_badge import UserBa...
""" byceps.services.user_badge.command_service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import datetime from typing import Optional, Tuple from ...database import db from ...events.user_badge import UserBa...
bsd-3-clause
Python
93aa07471f4a4a04676c66b52f04d3ee529e951e
Correct argument to subprocess.call
Empiria/matador-cookiecutter
hooks/post_gen_project.py
hooks/post_gen_project.py
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' hooks_dir = os.path.join(project_dir, '.git/hooks') src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(hooks_dir, 'prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os.mkdir('{{cookie...
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' hooks_dir = os.path.join(project_dir, '.git/hooks') src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(hooks_dir, 'prepare-commit-msg') process = subprocess.call('git', 'init', project_dir) os.mkdir('{{cookiecu...
mit
Python
53952b07ec12b963c7f0b0f5c51021dffeebea5e
Fix tests
tytek2012/TweetPoster,aperson/TweetPoster,joealcorn/TweetPoster,r3m0t/TweetPoster
TweetPoster/test/test_utils.py
TweetPoster/test/test_utils.py
import httpretty from TweetPoster.utils import ( canonical_url, replace_entities, ) class FakeTweet(object): def __init__(self, **kw): self.entities = { 'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [], } for key, val...
import httpretty from TweetPoster.test import test_twitter from TweetPoster.utils import ( canonical_url, replace_entities, ) class FakeTweet(object): entities = { 'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [], } def __init__(self, **kw): ...
mit
Python
48504f2c3d53a8b3409a89bc2e2a10687cfdff29
Enable the wrapped method to be reentrant
hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR,hlange/LogSoCR
playground/exclusive_link/excl.py
playground/exclusive_link/excl.py
#! /usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2011-2015 (ita) """ Prevents link tasks from executing in parallel. This can be used to improve the linker execution, which may use a lot of memory. The variable 'MAX' represents the tasks able to run concurrently (just one by default). The variable 'count' is t...
#! /usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2011 (ita) """ Prevents link tasks from executing in parallel. This can be used to improve the linker execution, which may use a lot of memory. The variable 'MAX' represents the tasks able to run concurrently (just one by default). The variable 'count' is the am...
agpl-3.0
Python
a2b03a6b1842e51cecbd2c046c37569f8d64fa85
update error message
sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper
_unittests/ut_filehelper/test_transfer_ftp_true.py
_unittests/ut_filehelper/test_transfer_ftp_true.py
""" @brief test log(time=2s) @author Xavier Dupre """ import sys import os import unittest try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if p...
""" @brief test log(time=2s) @author Xavier Dupre """ import sys import os import unittest try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if p...
mit
Python
842ab1d53224117fc750d963b6c5f3b6f5af5f1d
Add charset to connect mysql
hakobe/hakoblog-python,hakobe/hakoblog-python,hakobe/hakoblog-python
hakoblog/db.py
hakoblog/db.py
import MySQLdb import MySQLdb.cursors from hakoblog.config import CONFIG class DB(): def __init__(self): self.conn = MySQLdb.connect( db=CONFIG.DATABASE, host=CONFIG.DATABASE_HOST, user=CONFIG.DATABASE_USER, password=CONFIG.DATABASE_PASS, cursorc...
import MySQLdb import MySQLdb.cursors from hakoblog.config import CONFIG class DB(): def __init__(self): self.conn = MySQLdb.connect( db=CONFIG.DATABASE, host=CONFIG.DATABASE_HOST, user=CONFIG.DATABASE_USER, password=CONFIG.DATABASE_PASS, cursorc...
mit
Python
53681d121016b21ee0e73fe6eadd21cacff0f424
Fix whitespace
Samuel-L/cli-ws,Samuel-L/cli-ws
tests/test_html_fetchers.py
tests/test_html_fetchers.py
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import unittest from unittest import mock from web_scraper.core import html_fetchers def mocked_requests_get(*args, **kwargs): """this method will be used by the mock to replace requests.get""" class MockResponse:...
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import unittest from unittest import mock from web_scraper.core import html_fetchers def mocked_requests_get(*args, **kwargs): """this method will be used by the mock to replace requests.get""" class MockResponse:...
mit
Python
992a935f11a6a7ba0b8c157ef8f51b2baa5576a7
Add the ability to skip tests that depend on openbabel.
migueldiascosta/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,migueldiascosta/pymatgen,sonium0/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,ctoher/pymatgen,Dioptas/pymatgen,ctoher/pymatgen,migueldiascosta/pymatgen,yanikou19/p...
pymatgen/io/tests/test_babelio.py
pymatgen/io/tests/test_babelio.py
#!/usr/bin/env python ''' Created on Apr 28, 2012 ''' from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Apr 28, 2012" import unittest import os from pyma...
#!/usr/bin/env python ''' Created on Apr 28, 2012 ''' from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Apr 28, 2012" import unittest import os from pyma...
mit
Python
fec8214fd78d6ead456a9d672c8515f8ed368f64
add more modules (#344)
MatrixCrawler/ansible-lint,willthames/ansible-lint
lib/ansiblelint/rules/PackageIsNotLatestRule.py
lib/ansiblelint/rules/PackageIsNotLatestRule.py
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
mit
Python
62de8f2be26f651821538c8421c9eb1d7b54dd9f
add license
ClearCorp/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,ClearCorp/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,ClearCorp/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp-dev...
account_analytic_rename/account_analytic_rename.py
account_analytic_rename/account_analytic_rename.py
# -*- encoding: utf-8 -*- ############################################################################## # # account_analytic_rename.py # account_analytic_rename # First author: Mag Guevara <mag.guevara@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2011-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All...
# -*- encoding: utf-8 -*- ############################################################################## # # account_analytic_rename.py # account_analytic_rename # First author: Mag Guevara <mag.guevara@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2011-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All...
agpl-3.0
Python
bea607376ac340013f994fc0dc40988e91a39783
bump version for new pip and conda installer
sassoftware/sas_kernel,sassoftware/sas_kernel
sas_kernel/__init__.py
sas_kernel/__init__.py
# # Copyright SAS Institute # # 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 SAS Institute # # 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
1565f40182b897428ebb2f60b65310d894ceba7a
Set drpver and dapver in dapall VAC from parent_object
sdss/marvin,sdss/marvin,sdss/marvin,sdss/marvin
python/marvin/contrib/vacs/dapall.py
python/marvin/contrib/vacs/dapall.py
# !usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Brian Cherinka # @Date: 2018-06-21 15:13:07 # @Last modified by: José Sánchez-Gallego # @Last Modified time: 2018-07-08 13:13:48 from __future__ import absolute_import, division, print_function import astropy from ...
# !usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Brian Cherinka # @Date: 2018-06-21 15:13:07 # @Last modified by: José Sánchez-Gallego # @Last Modified time: 2018-07-08 13:11:34 from __future__ import absolute_import, division, print_function import astropy from ...
bsd-3-clause
Python
cb52dfadc2c93970466d0cf1f75aeeac697997cc
add suport for explorer api calls.
PeerAssets/pypeerassets
pypeerassets/provider/cryptoid.py
pypeerassets/provider/cryptoid.py
import requests class Cryptoid: '''API wrapper for http://chainz.cryptoid.info blockexplorer.''' @classmethod def __init__(self, network: str): """ : network = ppc, tppc ... """ self.net = network self.api_session = requests.Session() key = '7547f94398e3' ...
import requests class Cryptoid: '''API wrapper for http://chainz.cryptoid.info blockexplorer.''' @classmethod def __init__(self, network: str): """ : network = ppc, tppc ... """ self.net = network self.api_session = requests.Session() key = '7547f94398e3' ...
bsd-3-clause
Python
d478c966192241cccf53ac665820fd9a62ebcdeb
Make IsPostOrSuperuserOnly a non-object-level permission.
nathanielparke/huxley,bmun/huxley,bmun/huxley,nathanielparke/huxley,bmun/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,bmun/huxley,ctmunwebmaster/huxley,ctmunwebmaster/huxley
huxley/api/permissions.py
huxley/api/permissions.py
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from rest_framework import permissions class IsSuperuserOrReadOnly(permissions.BasePermission): '''Allow writes if superuser, read-only otherwise.''' def has_pe...
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from rest_framework import permissions class IsSuperuserOrReadOnly(permissions.BasePermission): '''Allow writes if superuser, read-only otherwise.''' def has_pe...
bsd-3-clause
Python
05a6141ba1f039d2af018c5c5797e8257331d0e5
set hyp.reduce normalize default to None
ContextLab/hypertools
hypertools/util/reduce.py
hypertools/util/reduce.py
#!/usr/bin/env python """ Implements PCA (wrapper for scikit-learn.decomposition.PCA) INPUTS: -numpy array(s) -list of numpy arrays OUTPUTS: -numpy array (or list of arrays) with dimensions reduced """ ##PACKAGES## import warnings import numpy as np from ppca import PPCA from sklearn.decomposition import PCA as PCA...
#!/usr/bin/env python """ Implements PCA (wrapper for scikit-learn.decomposition.PCA) INPUTS: -numpy array(s) -list of numpy arrays OUTPUTS: -numpy array (or list of arrays) with dimensions reduced """ ##PACKAGES## import warnings import numpy as np from ppca import PPCA from sklearn.decomposition import PCA as PCA...
mit
Python
f88d747f7959808884451245aeba65edf7c490bf
Add a comment explaining why the filter cache doesn't need exipiring
TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,TribeMedia/synapse
synapse/replication/slave/storage/filtering.py
synapse/replication/slave/storage/filtering.py
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 applica...
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 applica...
apache-2.0
Python
05ce5c1d7f9bc5ada99b92e18c8fab8d66bde56d
Use slug URL first
emilian/django-hermes
hermes/urls.py
hermes/urls.py
from django.conf.urls import patterns, url from .views import ArchivePostListView, PostListView, PostDetail, CategoryPostListView from .feeds import LatestPostFeed urlpatterns = patterns( '', url( regex=r'^(?P<slug>[\w-]+)/$', view=PostDetail.as_view(), name='hermes_post_detail', )...
from django.conf.urls import patterns, url from .views import ArchivePostListView, PostListView, PostDetail, CategoryPostListView from .feeds import LatestPostFeed urlpatterns = patterns( '', url( regex=r'^(?P<year>\d+)/(?P<month>\d+)/(?P<day>\d+)/(?P<slug>[\w-]+)/$', view=PostDetail.as_view()...
mit
Python
232d575447dbc8ceeb457aca662b7efc92225ac3
fix keyword
codysk/BGmi,BGmi/BGmi,Trim21/BGmi,Trim21/BGmi,BGmi/BGmi,codysk/BGmi
bgmi/patches/keyword.py
bgmi/patches/keyword.py
# coding=utf-8 from __future__ import print_function, unicode_literals patch_dict = { '魔法少女☆伊莉雅 3rei!!': 'Liner%7C莉雅%203re', '槍彈辯駁3': '論破3', '槍彈辯駁3未來篇': '論破3%20未来', '槍彈辯駁3絕望篇': '論破3%20绝望', '食戟之靈 貳之皿': '食戟%20皿', 'Show by ROCK!!': 'SHOW+BY+ROCK+第二季', '我老婆是學生會長!+!': '老婆%20生會', 'Rewrite 2nd...
# coding=utf-8 from __future__ import print_function, unicode_literals patch_dict = { '魔法少女☆伊莉雅 3rei!!': 'Liner%7C莉雅%203re', '槍彈辯駁3': '論破3', '槍彈辯駁3未來篇': '論破3%20未来', '槍彈辯駁3絕望篇': '論破3%20绝望', '食戟之靈 貳之皿': '食戟%20皿', 'Show by ROCK!!': 'SHOW+BY+ROCK+第二季', '我老婆是學生會長!+!': '老婆%20生會', } def main(key...
mit
Python