commit
stringlengths
40
40
old_file
stringlengths
4
118
new_file
stringlengths
4
118
old_contents
stringlengths
0
2.94k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
444
message
stringlengths
16
3.45k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
5
43.2k
prompt
stringlengths
17
4.58k
response
stringlengths
1
4.43k
prompt_tagged
stringlengths
58
4.62k
response_tagged
stringlengths
1
4.43k
text
stringlengths
132
7.29k
text_tagged
stringlengths
173
7.33k
ee49f4f592cf04199f9d82c2da2af9e34dd1d9d4
avwx_api/views.py
avwx_api/views.py
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app # Static Web ...
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app # Static Web ...
Add error handling to station endpoint
Add error handling to station endpoint
Python
mit
flyinactor91/AVWX-API,flyinactor91/AVWX-API,flyinactor91/AVWX-API
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app # Static Web ...
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app # Static Web ...
<commit_before>""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app...
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app # Static Web ...
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app # Static Web ...
<commit_before>""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # stdlib from dataclasses import asdict # library import avwx from quart import Response, jsonify from quart_openapi.cors import crossdomain # module from avwx_api import app...
c5c12e1f5aaeb56921b69cbb64a7d6a1b7585936
languages_plus/admin.py
languages_plus/admin.py
from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_en',) class C...
from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_en',) searc...
Define `search_fields` for Admin classes
Define `search_fields` for Admin classes This enables the search box on the admin change list page [1], and can be used by other apps like django-autocomplete-light [2]. 1: https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.ModelAdmin.search_fields 2: https://github.com/yourlabs/django-auto...
Python
mit
cordery/django-languages-plus
from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_en',) class C...
from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_en',) searc...
<commit_before>from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_...
from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_en',) searc...
from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_en',) class C...
<commit_before>from django.contrib import admin from .models import Language, CultureCode class LanguageAdmin(admin.ModelAdmin): list_display = ('name_en', 'name_native', 'iso_639_1', 'iso_639_2T', 'iso_639_2B', 'iso_639_2T', 'iso_639_3', 'iso_639_6', 'notes') list_display_links = ('name_...
2b08ce1d980ff01c2f0ac258aaba52f2ca758427
beethoven/urls.py
beethoven/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('courses.urls', namespace='courses'))...
from django.conf.urls import patterns, include, url from django.contrib import admin from beethoven import settings urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('cour...
Fix static file 404 error
Fix static file 404 error
Python
mit
lockhawksp/beethoven,lockhawksp/beethoven
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('courses.urls', namespace='courses'))...
from django.conf.urls import patterns, include, url from django.contrib import admin from beethoven import settings urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('cour...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('courses.urls', namesp...
from django.conf.urls import patterns, include, url from django.contrib import admin from beethoven import settings urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('cour...
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('courses.urls', namespace='courses'))...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns( '', url(r'^$', 'beethoven.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('allauth.urls')), url(r'^', include('courses.urls', namesp...
690d00e7b8f4021ff43e50a2b41ede50745ee4ae
fabfile.py
fabfile.py
from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', 'armstrong.cor...
from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', 'armstrong.cor...
Add missing installed app for testing
Add missing installed app for testing
Python
apache-2.0
armstrong/armstrong.apps.content,armstrong/armstrong.apps.content
from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', 'armstrong.cor...
from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', 'armstrong.cor...
<commit_before>from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', ...
from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', 'armstrong.cor...
from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', 'armstrong.cor...
<commit_before>from armstrong.dev.tasks import * settings = { 'DEBUG': True, 'INSTALLED_APPS': ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'armstrong.core.arm_access', ...
6d0fa6dda7613e734ce958f88bc0eaf55cfddf3c
st2common/st2common/persistence/pack.py
st2common/st2common/persistence/pack.py
# Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you may not use th...
Add persistance class for ConfigSchema.
Add persistance class for ConfigSchema.
Python
apache-2.0
pixelrebel/st2,Plexxi/st2,emedvedev/st2,lakshmi-kannan/st2,StackStorm/st2,punalpatel/st2,Plexxi/st2,peak6/st2,StackStorm/st2,Plexxi/st2,pixelrebel/st2,StackStorm/st2,Plexxi/st2,punalpatel/st2,nzlosh/st2,emedvedev/st2,peak6/st2,emedvedev/st2,punalpatel/st2,peak6/st2,lakshmi-kannan/st2,tonybaloney/st2,nzlosh/st2,tonybalo...
# Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you...
# Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you...
f7e218b72a09615259b4d77e9169f5237a4cae32
mopidy/core/mixer.py
mopidy/core/mixer.py
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_volume(self): ...
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_volume(self): ...
Remove test-only code paths in MixerController
core: Remove test-only code paths in MixerController
Python
apache-2.0
jmarsik/mopidy,vrs01/mopidy,SuperStarPL/mopidy,diandiankan/mopidy,SuperStarPL/mopidy,mokieyue/mopidy,pacificIT/mopidy,vrs01/mopidy,diandiankan/mopidy,jcass77/mopidy,tkem/mopidy,glogiotatidis/mopidy,dbrgn/mopidy,bencevans/mopidy,bencevans/mopidy,SuperStarPL/mopidy,kingosticks/mopidy,swak/mopidy,glogiotatidis/mopidy,Supe...
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_volume(self): ...
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_volume(self): ...
<commit_before>from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_vol...
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_volume(self): ...
from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_volume(self): ...
<commit_before>from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__) class MixerController(object): pykka_traversable = True def __init__(self, mixer): self._mixer = mixer self._volume = None self._mute = False def get_vol...
e01c2049f9b8c9b576c889433db14d1b6ae7f796
frappy/services/pacman.py
frappy/services/pacman.py
""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion): APICall.__init__(self, auth=auth, re...
""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion, debug=False): APICal...
Add debug argument to main Pacman __init__
Add debug argument to main Pacman __init__
Python
mit
durden/frappy
""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion): APICall.__init__(self, auth=auth, re...
""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion, debug=False): APICal...
<commit_before>""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion): APICall.__init__(self...
""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion, debug=False): APICal...
""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion): APICall.__init__(self, auth=auth, re...
<commit_before>""" Wrapper for fictional test service """ from frappy.core.api import APICall, DefaultVersion class Pacman(APICall): """ """ def __init__(self, req_format="json", domain="127.0.0.1:8000", secure=False, auth=None, api_version=DefaultVersion): APICall.__init__(self...
c2a07e3e53651f8679aacc23ad665822115c5928
ibutton.py
ibutton.py
import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: with open("i...
import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: with open("i...
Update for working rfid reader. Test code
Update for working rfid reader. Test code
Python
mit
harlanhaskins/DrinkTouchClient-2.0,stevenmirabito/DrinkTouchClient-2.0
import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: with open("i...
import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: with open("i...
<commit_before>import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: ...
import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: with open("i...
import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: with open("i...
<commit_before>import serial class iButton(object): def __init__(self, ibutton_address, rfid_address, debug=False): # self.ibutton_serial = serial.Serial(ibutton_address) self.rfid_serial = serial.Serial(rfid_address) self.debug = debug def read(self): if self.debug: ...
47273357ac7bd646e8a9326c87688191eb8a1a89
airesources/Python/MyBot.py
airesources/Python/MyBot.py
from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("BasicBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == playerTag: dir...
from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("PythonBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == playerTag: mo...
Revert python mybot to random bot
Revert python mybot to random bot Former-commit-id: b08897ea13c57ce3700439954b432a6453fcfb3f Former-commit-id: 28471a6712bd57db5dc7fd6d42d614d2f7ae7069 Former-commit-id: 871c6ab61f365689493b0663b761317cfb786507
Python
mit
yangle/HaliteIO,yangle/HaliteIO,HaliteChallenge/Halite,HaliteChallenge/Halite-II,yangle/HaliteIO,lanyudhy/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,yangle/HaliteIO,HaliteChallenge/Halite,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge...
from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("BasicBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == playerTag: dir...
from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("PythonBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == playerTag: mo...
<commit_before>from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("BasicBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == pla...
from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("PythonBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == playerTag: mo...
from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("BasicBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == playerTag: dir...
<commit_before>from hlt import * from networking import * playerTag, gameMap = getInit() sendInit("BasicBot"+str(playerTag)) while True: moves = [] gameMap = getFrame() for y in range(0, len(gameMap.contents)): for x in range(0, len(gameMap.contents[y])): site = gameMap.contents[y][x] if site.owner == pla...
35eceaf748ca415a58f7230fcb4d6a2aa9379f05
pdf_generator/medias.py
pdf_generator/medias.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== """ from __future__ import absolute_import import os.path class PathMediasLocator(object): """ Returns medias relatively to the root directory *base*. """ def __init__(self, base): self.base = base def __ca...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== Medias locator returns a path on the file system from the *src* of an img tag. .. data:: PLACEHOLDER A special object that indicates to the renderer to use a placeholder instead of a media. """ from __future__ import absolute_i...
Add a special PLACEHOLDER value
Add a special PLACEHOLDER value
Python
mit
cecedille1/PDF_generator
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== """ from __future__ import absolute_import import os.path class PathMediasLocator(object): """ Returns medias relatively to the root directory *base*. """ def __init__(self, base): self.base = base def __ca...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== Medias locator returns a path on the file system from the *src* of an img tag. .. data:: PLACEHOLDER A special object that indicates to the renderer to use a placeholder instead of a media. """ from __future__ import absolute_i...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== """ from __future__ import absolute_import import os.path class PathMediasLocator(object): """ Returns medias relatively to the root directory *base*. """ def __init__(self, base): self.base = bas...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== Medias locator returns a path on the file system from the *src* of an img tag. .. data:: PLACEHOLDER A special object that indicates to the renderer to use a placeholder instead of a media. """ from __future__ import absolute_i...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== """ from __future__ import absolute_import import os.path class PathMediasLocator(object): """ Returns medias relatively to the root directory *base*. """ def __init__(self, base): self.base = base def __ca...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Medias locator ============== """ from __future__ import absolute_import import os.path class PathMediasLocator(object): """ Returns medias relatively to the root directory *base*. """ def __init__(self, base): self.base = bas...
a220aa08071b18edf314a1cfc200cc90c19b3ced
antxetamedia/blobs/views.py
antxetamedia/blobs/views.py
from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['app_label'], ...
from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['app_label'], ...
Order blobs in the playlist API by lowest position first
Order blobs in the playlist API by lowest position first
Python
agpl-3.0
GISAElkartea/amv2,GISAElkartea/amv2,GISAElkartea/amv2
from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['app_label'], ...
from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['app_label'], ...
<commit_before>from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['ap...
from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['app_label'], ...
from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['app_label'], ...
<commit_before>from django.http import JsonResponse from django.views.generic import ListView from .models import Blob class PodcastBlobList(ListView): model = Blob def get_queryset(self): qs = super(PodcastBlobList, self).get_queryset() qs = qs.filter(content_type__app_label=self.kwargs['ap...
6a9524502ebf3c04dede24fb937baec5c48342ef
widgy/contrib/widgy_mezzanine/search_indexes.py
widgy/contrib/widgy_mezzanine/search_indexes.py
from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, indexes.Indexabl...
from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, indexes.Indexabl...
Use a more realistic context to render pages for search
Use a more realistic context to render pages for search The Mezzanine page middleware adds a page and _current_page to the context for pages, so our search index should too.
Python
apache-2.0
j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy
from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, indexes.Indexabl...
from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, indexes.Indexabl...
<commit_before>from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, i...
from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, indexes.Indexabl...
from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, indexes.Indexabl...
<commit_before>from haystack import indexes from widgy.contrib.widgy_mezzanine import get_widgypage_model from widgy.templatetags.widgy_tags import render_root from widgy.utils import html_to_plaintext from .signals import widgypage_pre_index WidgyPage = get_widgypage_model() class PageIndex(indexes.SearchIndex, i...
b12f869f169cd44c8dba633c4707d1a60b092893
mayavi/__init__.py
mayavi/__init__.py
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '5.0.0' __requires__ = [ 'apptools', 'traits', 'traitsui',...
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '4.4.0' __requires__ = [ 'apptools', 'traits', 'traitsui',...
Update the next version to 4.4.0
Update the next version to 4.4.0
Python
bsd-3-clause
dmsurti/mayavi,dmsurti/mayavi,alexandreleroux/mayavi,alexandreleroux/mayavi,liulion/mayavi,liulion/mayavi
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '5.0.0' __requires__ = [ 'apptools', 'traits', 'traitsui',...
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '4.4.0' __requires__ = [ 'apptools', 'traits', 'traitsui',...
<commit_before># Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '5.0.0' __requires__ = [ 'apptools', 'traits', ...
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '4.4.0' __requires__ = [ 'apptools', 'traits', 'traitsui',...
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '5.0.0' __requires__ = [ 'apptools', 'traits', 'traitsui',...
<commit_before># Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '5.0.0' __requires__ = [ 'apptools', 'traits', ...
edf08b9928558688c2402d1c144f04777f4b4bc5
gb/helpers.py
gb/helpers.py
"""Helpers to facilitate API interaction.""" # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9 } # The same thing as NUM_WORD_INT, but already stringi...
"""Helpers to facilitate API interaction.""" from functools import wraps from datetime import datetime # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': ...
Add caching feature to API lookup requests
Add caching feature to API lookup requests
Python
mit
jaykwon/giantanswers
"""Helpers to facilitate API interaction.""" # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9 } # The same thing as NUM_WORD_INT, but already stringi...
"""Helpers to facilitate API interaction.""" from functools import wraps from datetime import datetime # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': ...
<commit_before>"""Helpers to facilitate API interaction.""" # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9 } # The same thing as NUM_WORD_INT, but ...
"""Helpers to facilitate API interaction.""" from functools import wraps from datetime import datetime # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': ...
"""Helpers to facilitate API interaction.""" # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9 } # The same thing as NUM_WORD_INT, but already stringi...
<commit_before>"""Helpers to facilitate API interaction.""" # Spoken strings come to us as words, not numbers. NUM_WORD_INT = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9 } # The same thing as NUM_WORD_INT, but ...
750c7bef1483c914e195e26a179a3b362fa3f059
pmg/admin/validators.py
pmg/admin/validators.py
from wtforms.validators import AnyOf class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly and transmitted to the NCOP for concurrence', ...
from wtforms.validators import AnyOf from wtforms.compat import string_types, text_type class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly...
Format event title error message titles in quotation marks
Format event title error message titles in quotation marks
Python
apache-2.0
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
from wtforms.validators import AnyOf class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly and transmitted to the NCOP for concurrence', ...
from wtforms.validators import AnyOf from wtforms.compat import string_types, text_type class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly...
<commit_before>from wtforms.validators import AnyOf class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly and transmitted to the NCOP for con...
from wtforms.validators import AnyOf from wtforms.compat import string_types, text_type class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly...
from wtforms.validators import AnyOf class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly and transmitted to the NCOP for concurrence', ...
<commit_before>from wtforms.validators import AnyOf class BillEventTitleAllowed(object): """ Checks that the bill event title is one of the allowed titles when the event type is "bill-passed". """ ALLOWED_TITLES = [ 'Bill passed by the National Assembly and transmitted to the NCOP for con...
fd176b8eae33cac5fa7b2ba4f7a7586d9e6ebf14
mlat/connection.py
mlat/connection.py
# -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single receiver, or may m...
# -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single receiver, or may m...
Raise NotImplemented if methods aren't overridden
Raise NotImplemented if methods aren't overridden
Python
agpl-3.0
tmuic/mlat-server,mutability/mlat-server,mutability/mlat-server,tmuic/mlat-server
# -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single receiver, or may m...
# -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single receiver, or may m...
<commit_before># -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single rec...
# -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single receiver, or may m...
# -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single receiver, or may m...
<commit_before># -*- mode: python; indent-tabs-mode: nil -*- class Connection(object): """Interface for receiver connections. A receiver connection is something that can send messages (filter requests, multilateration results) to a particular receiver. A single connection may handle only a single rec...
8f2d6d2714aa1b60950a2fc355d39297b7f2cdfb
keras/activations.py
keras/activations.py
from __future__ import absolute_import from . import backend as K def softmax(x): return K.softmax(x) def softplus(x): return K.softplus(x) def relu(x, alpha=0., max_value=None): return K.relu(x, alpha=alpha, max_value=max_value) def tanh(x): return K.tanh(x) def sigmoid(x): return K.sigmo...
from __future__ import absolute_import from . import backend as K def softmax(x): ndim = K.ndim(x) if ndim == 2: return K.softmax(x) elif ndim == 3: # apply softmax to each timestep def step(x, states): return K.softmax(x), [] last_output, outputs, states = K.rn...
Add support for time-distributed softmax.
Add support for time-distributed softmax.
Python
mit
daviddiazvico/keras,DeepGnosis/keras,kemaswill/keras,keras-team/keras,relh/keras,keras-team/keras,dolaameng/keras,kuza55/keras,nebw/keras
from __future__ import absolute_import from . import backend as K def softmax(x): return K.softmax(x) def softplus(x): return K.softplus(x) def relu(x, alpha=0., max_value=None): return K.relu(x, alpha=alpha, max_value=max_value) def tanh(x): return K.tanh(x) def sigmoid(x): return K.sigmo...
from __future__ import absolute_import from . import backend as K def softmax(x): ndim = K.ndim(x) if ndim == 2: return K.softmax(x) elif ndim == 3: # apply softmax to each timestep def step(x, states): return K.softmax(x), [] last_output, outputs, states = K.rn...
<commit_before>from __future__ import absolute_import from . import backend as K def softmax(x): return K.softmax(x) def softplus(x): return K.softplus(x) def relu(x, alpha=0., max_value=None): return K.relu(x, alpha=alpha, max_value=max_value) def tanh(x): return K.tanh(x) def sigmoid(x): ...
from __future__ import absolute_import from . import backend as K def softmax(x): ndim = K.ndim(x) if ndim == 2: return K.softmax(x) elif ndim == 3: # apply softmax to each timestep def step(x, states): return K.softmax(x), [] last_output, outputs, states = K.rn...
from __future__ import absolute_import from . import backend as K def softmax(x): return K.softmax(x) def softplus(x): return K.softplus(x) def relu(x, alpha=0., max_value=None): return K.relu(x, alpha=alpha, max_value=max_value) def tanh(x): return K.tanh(x) def sigmoid(x): return K.sigmo...
<commit_before>from __future__ import absolute_import from . import backend as K def softmax(x): return K.softmax(x) def softplus(x): return K.softplus(x) def relu(x, alpha=0., max_value=None): return K.relu(x, alpha=alpha, max_value=max_value) def tanh(x): return K.tanh(x) def sigmoid(x): ...
0c833808e9c761a98e11ffb4834b8344221db1d5
matador/commands/deployment/deploy_sql_script.py
matador/commands/deployment/deploy_sql_script.py
#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.args[0] ...
#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.args[0] ...
Remove lines which deleted and checked out file for substitution
Remove lines which deleted and checked out file for substitution
Python
mit
Empiria/matador
#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.args[0] ...
#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.args[0] ...
<commit_before>#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.a...
#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.args[0] ...
#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.args[0] ...
<commit_before>#!/usr/bin/env python import os import shutil import subprocess from matador.session import Session from .deployment_command import DeploymentCommand from matador.commands.run_sql_script import run_sql_script class DeploySqlScript(DeploymentCommand): def _execute(self): scriptPath = self.a...
05b2874c54658e451841637d534156c2407f0b0a
streak-podium/render.py
streak-podium/render.py
import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, streaks = zip(*[...
import matplotlib.pyplot as plt import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, streaks = zip(*[(user, streak.get(...
Remove weird matplot lib defaults thing that did nothing
Remove weird matplot lib defaults thing that did nothing
Python
mit
jollyra/hubot-streak-podium,supermitch/streak-podium,jollyra/hubot-commit-streak,jollyra/hubot-streak-podium,jollyra/hubot-commit-streak,supermitch/streak-podium
import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, streaks = zip(*[...
import matplotlib.pyplot as plt import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, streaks = zip(*[(user, streak.get(...
<commit_before>import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, s...
import matplotlib.pyplot as plt import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, streaks = zip(*[(user, streak.get(...
import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, streaks = zip(*[...
<commit_before>import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ # Only extract those users & streaks for streaks that are non-zero: users, s...
242f27f943a107bf7dd2a472f08a71a8382f6467
mopidy/__init__.py
mopidy/__init__.py
import os import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') VERSION = (0, 4, 0) def is_in_git_repo(): git_dir = os.path.abspath(os.path.join( os.path.dirname(__file__), '../.git')) return os.path.exists(git_dir) def get_git_version(): if not ...
import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') from subprocess import PIPE, Popen VERSION = (0, 4, 0) def get_git_version(): process = Popen(['git', 'describe'], stdout=PIPE) if process.wait() != 0: raise Exception|('Execution of "git describe...
Use subprocess instead of os.popen
Use subprocess instead of os.popen
Python
apache-2.0
ZenithDK/mopidy,bacontext/mopidy,adamcik/mopidy,kingosticks/mopidy,jcass77/mopidy,jmarsik/mopidy,bacontext/mopidy,mopidy/mopidy,hkariti/mopidy,bencevans/mopidy,ZenithDK/mopidy,dbrgn/mopidy,hkariti/mopidy,SuperStarPL/mopidy,jodal/mopidy,adamcik/mopidy,jcass77/mopidy,jodal/mopidy,vrs01/mopidy,ali/mopidy,diandiankan/mopid...
import os import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') VERSION = (0, 4, 0) def is_in_git_repo(): git_dir = os.path.abspath(os.path.join( os.path.dirname(__file__), '../.git')) return os.path.exists(git_dir) def get_git_version(): if not ...
import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') from subprocess import PIPE, Popen VERSION = (0, 4, 0) def get_git_version(): process = Popen(['git', 'describe'], stdout=PIPE) if process.wait() != 0: raise Exception|('Execution of "git describe...
<commit_before>import os import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') VERSION = (0, 4, 0) def is_in_git_repo(): git_dir = os.path.abspath(os.path.join( os.path.dirname(__file__), '../.git')) return os.path.exists(git_dir) def get_git_version...
import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') from subprocess import PIPE, Popen VERSION = (0, 4, 0) def get_git_version(): process = Popen(['git', 'describe'], stdout=PIPE) if process.wait() != 0: raise Exception|('Execution of "git describe...
import os import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') VERSION = (0, 4, 0) def is_in_git_repo(): git_dir = os.path.abspath(os.path.join( os.path.dirname(__file__), '../.git')) return os.path.exists(git_dir) def get_git_version(): if not ...
<commit_before>import os import sys if not (2, 6) <= sys.version_info < (3,): sys.exit(u'Mopidy requires Python >= 2.6, < 3') VERSION = (0, 4, 0) def is_in_git_repo(): git_dir = os.path.abspath(os.path.join( os.path.dirname(__file__), '../.git')) return os.path.exists(git_dir) def get_git_version...
da238e29efcf8ab4cf68d29d87869031d74d761a
hooks/pre_gen_project.py
hooks/pre_gen_project.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name): logger.err...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^(?!pytest)[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name): ...
Make sure the user does not prepend plugin_name with pytest
Make sure the user does not prepend plugin_name with pytest
Python
mit
pytest-dev/cookiecutter-pytest-plugin
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name): logger.err...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^(?!pytest)[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name): ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name):...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^(?!pytest)[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name): logger.err...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('pre_gen_project') PLUGIN_REGEX = r'^[_a-zA-Z][_a-zA-Z0-9]+$' plugin_name = '{{cookiecutter.plugin_name}}' if not re.match(PLUGIN_REGEX, plugin_name):...
8244c811d294f1f5b75d9ad1d9eec4217aed8882
src/python/dependencies.py
src/python/dependencies.py
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
Remove the upper bound constraint on tensorflow_datasets dependency.
Remove the upper bound constraint on tensorflow_datasets dependency. PiperOrigin-RevId: 371241485
Python
apache-2.0
tensorflow/cloud,tensorflow/cloud
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
<commit_before># Lint as: python3 # Copyright 2020 Google LLC. 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 # # Unle...
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
<commit_before># Lint as: python3 # Copyright 2020 Google LLC. 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 # # Unle...
5ac7c07277ef1c7e714336e1b96571cdfea15a13
ktbs_bench_manager/benchable_graph.py
ktbs_bench_manager/benchable_graph.py
import logging from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str graph_id: The g...
from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str graph_id: The graph identifier....
Remove unnecessary import of logging
Remove unnecessary import of logging
Python
mit
vincent-octo/ktbs_bench_manager,vincent-octo/ktbs_bench_manager
import logging from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str graph_id: The g...
from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str graph_id: The graph identifier....
<commit_before>import logging from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str ...
from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str graph_id: The graph identifier....
import logging from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str graph_id: The g...
<commit_before>import logging from rdflib import Graph class BenchableGraph(object): """ Provides a convenient way to use a graph for benchmarks. """ def __init__(self, store, graph_id, store_config, graph_create=False): """ :param str store: Type of store to use. :param str ...
81f4f4b1318ff800e3febbc1bd7bbd9ff8e868b1
node/dictionary.py
node/dictionary.py
#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".join(Dictionary.wo...
#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".join(Dictionary.wo...
Add some exception handling for dict
Add some exception handling for dict
Python
mit
muddyfish/PYKE,muddyfish/PYKE
#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".join(Dictionary.wo...
#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".join(Dictionary.wo...
<commit_before>#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".joi...
#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".join(Dictionary.wo...
#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".join(Dictionary.wo...
<commit_before>#!/usr/bin/env python from nodes import Node import json class Dictionary(Node): char = ".d" args = 0 results = 1 def __init__(self, word_ids:Node.IntList): if not hasattr(Dictionary, "word_list"): Dictionary.word_list = init_words() self.words = " ".joi...
bb3605bd99892bed37ecb2b6371d2bc88d599e1a
caso/__init__.py
caso/__init__.py
# -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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 # # Unle...
# -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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 # # Unle...
Include "OpenStack" string in the user agent
Include "OpenStack" string in the user agent EGI's accounting team requires that we put "OpenStack" in the UA string. closes IFCA/caso#38
Python
apache-2.0
alvarolopez/caso,IFCA/caso,IFCA/caso
# -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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 # # Unle...
# -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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 # # Unle...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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/LICEN...
# -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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 # # Unle...
# -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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 # # Unle...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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/LICEN...
ebf5e05acfb7f1edce0c0987576ee712f3fdea54
test/scripts/test_sequana_coverage.py
test/scripts/test_sequana_coverage.py
from sequana.scripts import coverage from nose.plugins.attrib import attr from sequana import sequana_data #@attr("skip") class TestPipeline(object): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run""" klass.prog = "sequana_coverage" ...
from sequana.scripts import coverage from sequana import sequana_data import pytest prog = "sequana_coverage" @pytest.fixture def coveragefix(): import os # local nosetests execution try:os.remove('README') except:pass try:os.remove('quality.rules') except:pass try:os.remove('config.yaml')...
Fix tests to use pytest
Fix tests to use pytest
Python
bsd-3-clause
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
from sequana.scripts import coverage from nose.plugins.attrib import attr from sequana import sequana_data #@attr("skip") class TestPipeline(object): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run""" klass.prog = "sequana_coverage" ...
from sequana.scripts import coverage from sequana import sequana_data import pytest prog = "sequana_coverage" @pytest.fixture def coveragefix(): import os # local nosetests execution try:os.remove('README') except:pass try:os.remove('quality.rules') except:pass try:os.remove('config.yaml')...
<commit_before>from sequana.scripts import coverage from nose.plugins.attrib import attr from sequana import sequana_data #@attr("skip") class TestPipeline(object): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run""" klass.prog = "sequana_...
from sequana.scripts import coverage from sequana import sequana_data import pytest prog = "sequana_coverage" @pytest.fixture def coveragefix(): import os # local nosetests execution try:os.remove('README') except:pass try:os.remove('quality.rules') except:pass try:os.remove('config.yaml')...
from sequana.scripts import coverage from nose.plugins.attrib import attr from sequana import sequana_data #@attr("skip") class TestPipeline(object): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run""" klass.prog = "sequana_coverage" ...
<commit_before>from sequana.scripts import coverage from nose.plugins.attrib import attr from sequana import sequana_data #@attr("skip") class TestPipeline(object): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run""" klass.prog = "sequana_...
2b5c186337bcb396f630c0b86938e43eb06d3e5b
tests/test_i10knobs.py
tests/test_i10knobs.py
from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path.join(os.path.d...
from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path.join(os.path.d...
Add test checking only for imports
Add test checking only for imports
Python
apache-2.0
dls-controls/i10switching,dls-controls/i10switching
from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path.join(os.path.d...
from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path.join(os.path.d...
<commit_before>from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path...
from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path.join(os.path.d...
from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path.join(os.path.d...
<commit_before>from pkg_resources import require require("cothread") require("mock") import unittest import mock import sys # Mock out catools as it requires EPICS binaries at import sys.modules['cothread.catools'] = mock.MagicMock() import cothread import sys import os from PyQt4 import QtGui sys.path.append(os.path...
a55dd124d54955476411ee8ae830c9fd3c4f00dc
tests/test_pdfbuild.py
tests/test_pdfbuild.py
from latex import build_pdf from latex.exc import LatexBuildError import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): broken_late...
from latex import build_pdf, LatexBuildError from latex.errors import parse_log import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): ...
Test get_errors() method of LatexBuildError.
Test get_errors() method of LatexBuildError.
Python
bsd-3-clause
mbr/latex
from latex import build_pdf from latex.exc import LatexBuildError import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): broken_late...
from latex import build_pdf, LatexBuildError from latex.errors import parse_log import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): ...
<commit_before>from latex import build_pdf from latex.exc import LatexBuildError import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): ...
from latex import build_pdf, LatexBuildError from latex.errors import parse_log import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): ...
from latex import build_pdf from latex.exc import LatexBuildError import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): broken_late...
<commit_before>from latex import build_pdf from latex.exc import LatexBuildError import pytest def test_generates_something(): min_latex = r""" \documentclass{article} \begin{document} Hello, world! \end{document} """ pdf = build_pdf(min_latex) assert pdf def test_raises_correct_exception_on_fail(): ...
8535c59c26e2c5badfd3637d41901f1bc987e200
tests/test_requests.py
tests/test_requests.py
"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], query={'foo': ...
"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], query={'foo': ...
Add a test for the __call__ method of the APIRequest class.
Add a test for the __call__ method of the APIRequest class.
Python
mit
openspending/gobble
"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], query={'foo': ...
"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], query={'foo': ...
<commit_before>"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], ...
"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], query={'foo': ...
"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], query={'foo': ...
<commit_before>"""Test the api_requests module.""" from pytest import mark from gobble.api_requests import APIRequest SIMPLE = ('foo.bar', dict(), ['https://foo.bar']) LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000']) LONG = ( 'foo.bar', dict( path=['spam', 'eggs'], ...
ca7403462588f374cf1af39d537765c02fc7726c
mctrl/rest.py
mctrl/rest.py
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
Fix status codes of handled responses
Fix status codes of handled responses
Python
apache-2.0
h2020-endeavour/endeavour,h2020-endeavour/endeavour
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
<commit_before>from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_a...
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
<commit_before>from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_a...
87bf261345919e90cb88853165fb1556046c80ef
tests/mpd/protocol/test_connection.py
tests/mpd/protocol/test_connection.py
from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.send_request('cl...
from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.send_request('cl...
Fix typo in mock usage
tests: Fix typo in mock usage The error was made evident by a newer mock version that no longer swallowed the wrong assert as regular use of a spec-less mock.
Python
apache-2.0
hkariti/mopidy,bencevans/mopidy,diandiankan/mopidy,dbrgn/mopidy,kingosticks/mopidy,mopidy/mopidy,ali/mopidy,jmarsik/mopidy,quartz55/mopidy,mopidy/mopidy,vrs01/mopidy,diandiankan/mopidy,ali/mopidy,adamcik/mopidy,pacificIT/mopidy,tkem/mopidy,pacificIT/mopidy,dbrgn/mopidy,adamcik/mopidy,hkariti/mopidy,jmarsik/mopidy,vrs01...
from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.send_request('cl...
from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.send_request('cl...
<commit_before>from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.s...
from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.send_request('cl...
from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.send_request('cl...
<commit_before>from __future__ import absolute_import, unicode_literals from mock import patch from tests.mpd import protocol class ConnectionHandlerTest(protocol.BaseTestCase): def test_close_closes_the_client_connection(self): with patch.object(self.session, 'close') as close_mock: self.s...
e34bcec834bf4d84168d04a1ea0a98613ad0df4e
corehq/apps/locations/management/commands/migrate_new_location_fixture.py
corehq/apps/locations/management/commands/migrate_new_location_fixture.py
from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import LocationFixtureConfiguration, SQLLocation from corehq.toggles import FLAT_LOCATION_FIXTURE class Command(BaseCommand): help = """ To migrate to new flat fixture for locations. Update ...
import json from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import SQLLocation from corehq.apps.domain.models import Domain from corehq.toggles import HIERARCHICAL_LOCATION_FIXTURE, NAMESPACE_DOMAIN class Command(BaseCommand): help = """ ...
Update migration to fetch domains with applications using old location fixture
Update migration to fetch domains with applications using old location fixture
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import LocationFixtureConfiguration, SQLLocation from corehq.toggles import FLAT_LOCATION_FIXTURE class Command(BaseCommand): help = """ To migrate to new flat fixture for locations. Update ...
import json from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import SQLLocation from corehq.apps.domain.models import Domain from corehq.toggles import HIERARCHICAL_LOCATION_FIXTURE, NAMESPACE_DOMAIN class Command(BaseCommand): help = """ ...
<commit_before>from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import LocationFixtureConfiguration, SQLLocation from corehq.toggles import FLAT_LOCATION_FIXTURE class Command(BaseCommand): help = """ To migrate to new flat fixture for loc...
import json from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import SQLLocation from corehq.apps.domain.models import Domain from corehq.toggles import HIERARCHICAL_LOCATION_FIXTURE, NAMESPACE_DOMAIN class Command(BaseCommand): help = """ ...
from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import LocationFixtureConfiguration, SQLLocation from corehq.toggles import FLAT_LOCATION_FIXTURE class Command(BaseCommand): help = """ To migrate to new flat fixture for locations. Update ...
<commit_before>from django.core.management.base import BaseCommand from toggle.models import Toggle from corehq.apps.locations.models import LocationFixtureConfiguration, SQLLocation from corehq.toggles import FLAT_LOCATION_FIXTURE class Command(BaseCommand): help = """ To migrate to new flat fixture for loc...
a17ed4f65b7fa5a035efb7c6ff19fcf477a65429
categories_i18n/managers.py
categories_i18n/managers.py
""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """ The Querys...
""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """ The Querys...
Remove remaining django-mptt 0.7 compatibility code
Remove remaining django-mptt 0.7 compatibility code
Python
apache-2.0
edoburu/django-categories-i18n,edoburu/django-categories-i18n
""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """ The Querys...
""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """ The Querys...
<commit_before>""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """...
""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """ The Querys...
""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """ The Querys...
<commit_before>""" The manager classes. """ import django from django.db.models.query import QuerySet from mptt.managers import TreeManager from mptt.querysets import TreeQuerySet from parler.managers import TranslatableManager, TranslatableQuerySet class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet): """...
e775613d43dac702565cf266d9995c9cd706d7c8
pwndbg/commands/cpsr.py
pwndbg/commands/cpsr.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): if pwndbg.arch.current != 'arm': print("This is only availabl...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): 'Print out the ARM CPSR register' if pwndbg.arch.current != 'arm'...
Add documentation for the CPSR command
Add documentation for the CPSR command
Python
mit
0xddaa/pwndbg,pwndbg/pwndbg,anthraxx/pwndbg,pwndbg/pwndbg,disconnect3d/pwndbg,zachriggle/pwndbg,anthraxx/pwndbg,pwndbg/pwndbg,disconnect3d/pwndbg,anthraxx/pwndbg,cebrusfs/217gdb,pwndbg/pwndbg,chubbymaggie/pwndbg,chubbymaggie/pwndbg,disconnect3d/pwndbg,zachriggle/pwndbg,0xddaa/pwndbg,cebrusfs/217gdb,cebrusfs/217gdb,0xdd...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): if pwndbg.arch.current != 'arm': print("This is only availabl...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): 'Print out the ARM CPSR register' if pwndbg.arch.current != 'arm'...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): if pwndbg.arch.current != 'arm': print("This i...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): 'Print out the ARM CPSR register' if pwndbg.arch.current != 'arm'...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): if pwndbg.arch.current != 'arm': print("This is only availabl...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import gdb import pwndbg.arch import pwndbg.color import pwndbg.commands import pwndbg.regs @pwndbg.commands.Command @pwndbg.commands.OnlyWhenRunning def cpsr(): if pwndbg.arch.current != 'arm': print("This i...
91eca37144d0c378761e47c143e66a79af37c226
repo_manage/forms.py
repo_manage/forms.py
from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form): repo_name ...
from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form): repo_name ...
Fix IntegrityError and DoesNotExist 500s
Fix IntegrityError and DoesNotExist 500s
Python
mit
vault/bugit,vault/bugit,vault/bugit
from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form): repo_name ...
from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form): repo_name ...
<commit_before> from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form):...
from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form): repo_name ...
from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form): repo_name ...
<commit_before> from django import forms from django.forms import ModelForm from django.forms.models import inlineformset_factory from common.models import Repository, Collaboration, User slug_errors = { 'invalid' : "Use only letters, numbers, underscores, and hyphens", } class NewRepositoryForm(forms.Form):...
f6ddd5c4d79ada59d9db4b467849d9b52c5fef75
landlab/field/__init__.py
landlab/field/__init__.py
from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn', 'FieldError', 'GroupErr...
from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn from .graph_field import GraphFields __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn...
Add GraphFields to package import.
Add GraphFields to package import.
Python
mit
cmshobe/landlab,cmshobe/landlab,cmshobe/landlab,RondaStrauch/landlab,amandersillinois/landlab,RondaStrauch/landlab,landlab/landlab,Carralex/landlab,RondaStrauch/landlab,landlab/landlab,amandersillinois/landlab,csherwood-usgs/landlab,Carralex/landlab,Carralex/landlab,csherwood-usgs/landlab,landlab/landlab
from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn', 'FieldError', 'GroupErr...
from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn from .graph_field import GraphFields __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn...
<commit_before>from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn', 'FieldEr...
from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn from .graph_field import GraphFields __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn...
from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn', 'FieldError', 'GroupErr...
<commit_before>from landlab.field.scalar_data_fields import ScalarDataFields, FieldError from landlab.field.grouped import ModelDataFields, GroupError, GroupSizeError from landlab.field.field_mixin import ModelDataFieldsMixIn __all__ = ['ScalarDataFields', 'ModelDataFields', 'ModelDataFieldsMixIn', 'FieldEr...
e360b4e2a19a526e1541a7833648619bb5fac8e2
stock_orderpoint_move_link/models/procurement_rule.py
stock_orderpoint_move_link/models/procurement_rule.py
# Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, ...
# Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, ...
Fix read of wrong dictionnary
Fix read of wrong dictionnary
Python
agpl-3.0
Vauxoo/stock-logistics-warehouse,Vauxoo/stock-logistics-warehouse,Vauxoo/stock-logistics-warehouse
# Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, ...
# Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, ...
<commit_before># Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product...
# Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, ...
# Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, ...
<commit_before># Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import models class ProcurementRule(models.Model): _inherit = 'procurement.rule' def _get_stock_move_values(self, product_id, product_qty, product...
75f236f8fd0ba368197da3070002b60233a01d49
tests/test_track_bed.py
tests/test_track_bed.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader path = os.path.dirname(__file__) os.chdir(path) class TestBedR...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader from chromosomer.track.bed import Writer from itertools import iz...
Test routines to the BED writer added
Test routines to the BED writer added
Python
mit
gtamazian/Chromosomer
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader path = os.path.dirname(__file__) os.chdir(path) class TestBedR...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader from chromosomer.track.bed import Writer from itertools import iz...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader path = os.path.dirname(__file__) os.chdir(path) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader from chromosomer.track.bed import Writer from itertools import iz...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader path = os.path.dirname(__file__) os.chdir(path) class TestBedR...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com import os import logging import unittest from chromosomer.track.bed import BedRecord from chromosomer.track.bed import Reader path = os.path.dirname(__file__) os.chdir(path) ...
9e666e97b07d7c08e434791a061086010da6e6eb
main.py
main.py
# -*- utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8'))} print(...
# -*- coding: utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8'))} ...
Add ability to get the latest TwoHeadlines tweet
Add ability to get the latest TwoHeadlines tweet
Python
mit
underyx/TheMajorNews
# -*- utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8'))} print(...
# -*- coding: utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8'))} ...
<commit_before># -*- utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8...
# -*- coding: utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8'))} ...
# -*- utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8'))} print(...
<commit_before># -*- utf-8 -*- import config import requests from base64 import b64encode def get_access_token(): token = config.twitter_key + ':' + config.twitter_secret h = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': b'Basic ' + b64encode(bytes(token, 'utf8...
789ac1de1e94eda1224fb314ccad14c061c58ad4
pact/group.py
pact/group.py
from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts): self._pacts = list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self def _is_finished(self): ...
from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts=None): self._pacts = [] if pacts is None else list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self ...
Create empty PactGroup if no arguments given
Create empty PactGroup if no arguments given
Python
bsd-3-clause
vmalloc/pact
from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts): self._pacts = list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self def _is_finished(self): ...
from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts=None): self._pacts = [] if pacts is None else list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self ...
<commit_before>from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts): self._pacts = list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self def _is_fini...
from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts=None): self._pacts = [] if pacts is None else list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self ...
from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts): self._pacts = list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self def _is_finished(self): ...
<commit_before>from .base import PactBase from .utils import GroupWaitPredicate class PactGroup(PactBase): def __init__(self, pacts): self._pacts = list(pacts) super(PactGroup, self).__init__() def __iadd__(self, other): self._pacts.append(other) return self def _is_fini...
d1ec190f1a4dc84db0540481f2489f1db8421799
oemof_pg/db.py
oemof_pg/db.py
from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): engine = create_engine( "postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}".format( user=cfg.get("postGIS", "username"), passwd=keyring.get_password( cfg.get("po...
from configparser import NoOptionError as option, NoSectionError as section from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): pw = keyring.get_password(cfg.get("postGIS", "database"), cfg.get("postGIS", "username")) if pw is None: ...
Enable specifying the password in `config.ini`
Enable specifying the password in `config.ini`
Python
mit
oemof/oemof.db
from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): engine = create_engine( "postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}".format( user=cfg.get("postGIS", "username"), passwd=keyring.get_password( cfg.get("po...
from configparser import NoOptionError as option, NoSectionError as section from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): pw = keyring.get_password(cfg.get("postGIS", "database"), cfg.get("postGIS", "username")) if pw is None: ...
<commit_before>from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): engine = create_engine( "postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}".format( user=cfg.get("postGIS", "username"), passwd=keyring.get_password( ...
from configparser import NoOptionError as option, NoSectionError as section from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): pw = keyring.get_password(cfg.get("postGIS", "database"), cfg.get("postGIS", "username")) if pw is None: ...
from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): engine = create_engine( "postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}".format( user=cfg.get("postGIS", "username"), passwd=keyring.get_password( cfg.get("po...
<commit_before>from sqlalchemy import create_engine import keyring from . import config as cfg def connection(): engine = create_engine( "postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}".format( user=cfg.get("postGIS", "username"), passwd=keyring.get_password( ...
901a47adf6726d50c01ac743e9661c0caac2b555
test_openfolder.py
test_openfolder.py
import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.check_call', Magic...
import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.check_call', Magic...
Check to ensure the excpetions return the text we expect.
Check to ensure the excpetions return the text we expect.
Python
mit
golliher/dg-tickler-file
import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.check_call', Magic...
import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.check_call', Magic...
<commit_before>import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.che...
import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.check_call', Magic...
import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.check_call', Magic...
<commit_before>import pytest from mock import patch, MagicMock from open_folder import * def test_folder_exists(): with patch('subprocess.check_call', MagicMock(return_value="NOOP")): result = open_folder(".") assert result == None def test_folder_does_not_exists(): with patch('subprocess.che...
b8638ab2befa55029f2aeb8a907acb1a94aba3a9
app/rules.py
app/rules.py
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
Decrease sensitivity of dark ground checking.
Decrease sensitivity of dark ground checking.
Python
bsd-2-clause
legorovers/legoflask,legorovers/legoflask,legorovers/legoflask
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
<commit_before> class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) ...
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
<commit_before> class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) ...
ea972c89cd7abe4fdb772ce359dd9acd83817242
tests/test.py
tests/test.py
from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(object): ""...
from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(object): ""...
Add http_transport and websocket_transport methods
Add http_transport and websocket_transport methods
Python
apache-2.0
devicehive/devicehive-python
from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(object): ""...
from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(object): ""...
<commit_before>from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(...
from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(object): ""...
from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(object): ""...
<commit_before>from devicehive import Handler from devicehive import DeviceHive class TestHandler(Handler): """Test handler class.""" def handle_connect(self): if not self.options['handle_connect'](self): self.api.disconnect() def handle_event(self, event): pass class Test(...
42a4a8b4480bc481e0467ae7ee46c60400d63f77
theme-installer.py
theme-installer.py
#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # The app if __name__ == '__main__': # Create app app = QApplication(sys.argv) app.setApplicationName('LMMS Theme Installer') # Show window window = Mai...
#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # Create tmp directory if it doesn't exist if not os.path.exists(os.path.join(os.getcwd(), 'tmp')): os.mkdir(os.path.join(os.getcwd(), 'tmp')) # The app if ...
Create tmp directory if it doesn't exist
Create tmp directory if it doesn't exist
Python
lgpl-2.1
kmklr72/LMMS-Theme-Installer
#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # The app if __name__ == '__main__': # Create app app = QApplication(sys.argv) app.setApplicationName('LMMS Theme Installer') # Show window window = Mai...
#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # Create tmp directory if it doesn't exist if not os.path.exists(os.path.join(os.getcwd(), 'tmp')): os.mkdir(os.path.join(os.getcwd(), 'tmp')) # The app if ...
<commit_before>#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # The app if __name__ == '__main__': # Create app app = QApplication(sys.argv) app.setApplicationName('LMMS Theme Installer') # Show windo...
#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # Create tmp directory if it doesn't exist if not os.path.exists(os.path.join(os.getcwd(), 'tmp')): os.mkdir(os.path.join(os.getcwd(), 'tmp')) # The app if ...
#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # The app if __name__ == '__main__': # Create app app = QApplication(sys.argv) app.setApplicationName('LMMS Theme Installer') # Show window window = Mai...
<commit_before>#!/usr/bin/env python import sys from inc.functions import * from PySide.QtGui import QApplication, QPixmap, QSplashScreen from ui.mainwindow import MainWindow # The app if __name__ == '__main__': # Create app app = QApplication(sys.argv) app.setApplicationName('LMMS Theme Installer') # Show windo...
dd40b392b73ddc1bcf88d932418b4f891bcc6a89
twine/__init__.py
twine/__init__.py
# Copyright 2013 Donald Stufft # # 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, so...
# Copyright 2013 Donald Stufft # # 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, so...
Allow star imports from twine
Allow star imports from twine Unicode literals on Python 2 prevent people from being able to use from twine import * Closes gh-209 (cherry picked from commit c2cd72d0f4ff4d380845333fbfaaf2c92d6a5674)
Python
apache-2.0
pypa/twine
# Copyright 2013 Donald Stufft # # 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, so...
# Copyright 2013 Donald Stufft # # 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, so...
<commit_before># Copyright 2013 Donald Stufft # # 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 2013 Donald Stufft # # 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, so...
# Copyright 2013 Donald Stufft # # 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, so...
<commit_before># Copyright 2013 Donald Stufft # # 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...
0c84f6dd314ea62019356b09363f98118a4da776
txircd/factory.py
txircd/factory.py
from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address import re ipv4MappedAddr = re.compile("::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})") def unmapIPv4(ip: str) -> str: """ Converts an IPv6-mapped IPv4 addres...
from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address from typing import Union def unmapIPv4(ip: str) -> Union["IPv4Address", "IPv6Address"]: """ Converts an IPv6-mapped IPv4 address to a bare IPv4 address. "...
Use built-in IP address functionality to unmap IPv4 addresses
Use built-in IP address functionality to unmap IPv4 addresses
Python
bsd-3-clause
Heufneutje/txircd
from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address import re ipv4MappedAddr = re.compile("::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})") def unmapIPv4(ip: str) -> str: """ Converts an IPv6-mapped IPv4 addres...
from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address from typing import Union def unmapIPv4(ip: str) -> Union["IPv4Address", "IPv6Address"]: """ Converts an IPv6-mapped IPv4 address to a bare IPv4 address. "...
<commit_before>from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address import re ipv4MappedAddr = re.compile("::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})") def unmapIPv4(ip: str) -> str: """ Converts an IPv6-map...
from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address from typing import Union def unmapIPv4(ip: str) -> Union["IPv4Address", "IPv6Address"]: """ Converts an IPv6-mapped IPv4 address to a bare IPv4 address. "...
from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address import re ipv4MappedAddr = re.compile("::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})") def unmapIPv4(ip: str) -> str: """ Converts an IPv6-mapped IPv4 addres...
<commit_before>from twisted.internet.protocol import ClientFactory, Factory from txircd.server import IRCServer from txircd.user import IRCUser from ipaddress import ip_address import re ipv4MappedAddr = re.compile("::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})") def unmapIPv4(ip: str) -> str: """ Converts an IPv6-map...
bee5ed1d9815a4c4291179d0de3ec54fe467b219
project.py
project.py
import os, cPickle as pickle import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(filename, "rb") ...
import os import json import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(filename, "rb") as f: ...
Save sessions in JSON format instead of pickle.
Save sessions in JSON format instead of pickle.
Python
mit
shaurz/devo
import os, cPickle as pickle import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(filename, "rb") ...
import os import json import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(filename, "rb") as f: ...
<commit_before>import os, cPickle as pickle import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(f...
import os import json import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(filename, "rb") as f: ...
import os, cPickle as pickle import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(filename, "rb") ...
<commit_before>import os, cPickle as pickle import fileutil class Project(object): def __init__(self, name, rootdir, filename, session=None): self.name = name self.rootdir = rootdir self.filename = filename self.session = session def read_project(filename, rootdir): with open(f...
a587d48694690957934a159bad98cacd3f012a6a
cms/tests/test_externals.py
cms/tests/test_externals.py
from django.test import TestCase from ..externals import External from contextlib import GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): external = External('foo') with self.assertRaises(ImportError): external._load('') ...
from django.test import TestCase from ..externals import External try: from contextlib import GeneratorContextManager except ImportError: from contextlib import _GeneratorContextManager as GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): ...
Change contextlib import to handle the new location in Python 3.
Change contextlib import to handle the new location in Python 3.
Python
bsd-3-clause
danielsamuels/cms,jamesfoley/cms,jamesfoley/cms,jamesfoley/cms,dan-gamble/cms,danielsamuels/cms,dan-gamble/cms,lewiscollard/cms,jamesfoley/cms,dan-gamble/cms,lewiscollard/cms,danielsamuels/cms,lewiscollard/cms
from django.test import TestCase from ..externals import External from contextlib import GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): external = External('foo') with self.assertRaises(ImportError): external._load('') ...
from django.test import TestCase from ..externals import External try: from contextlib import GeneratorContextManager except ImportError: from contextlib import _GeneratorContextManager as GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): ...
<commit_before>from django.test import TestCase from ..externals import External from contextlib import GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): external = External('foo') with self.assertRaises(ImportError): externa...
from django.test import TestCase from ..externals import External try: from contextlib import GeneratorContextManager except ImportError: from contextlib import _GeneratorContextManager as GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): ...
from django.test import TestCase from ..externals import External from contextlib import GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): external = External('foo') with self.assertRaises(ImportError): external._load('') ...
<commit_before>from django.test import TestCase from ..externals import External from contextlib import GeneratorContextManager from types import FunctionType class TestExternals(TestCase): def test_load(self): external = External('foo') with self.assertRaises(ImportError): externa...
278069a0637f7f329ceaff0975e3b95d609a7b9f
cosmoscope/cli.py
cosmoscope/cli.py
# -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click @click.command() def main(args=None): """Console script for cosmoscope.""" click.echo("Replace this message by putting your code into " "cosmoscope.cli.main") click.echo("See click documentation at http://...
# -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click from .core.server import launch @click.command() @click.option('--server-address', default="tcp://127.0.0.1:4242", help="Server IP address.") @click.option('--publisher-address', default="tcp://127.0.0.1:4243", help="Publisher IP a...
Improve the command line interface
Improve the command line interface
Python
mit
cosmoscope/cosmoscope
# -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click @click.command() def main(args=None): """Console script for cosmoscope.""" click.echo("Replace this message by putting your code into " "cosmoscope.cli.main") click.echo("See click documentation at http://...
# -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click from .core.server import launch @click.command() @click.option('--server-address', default="tcp://127.0.0.1:4242", help="Server IP address.") @click.option('--publisher-address', default="tcp://127.0.0.1:4243", help="Publisher IP a...
<commit_before># -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click @click.command() def main(args=None): """Console script for cosmoscope.""" click.echo("Replace this message by putting your code into " "cosmoscope.cli.main") click.echo("See click documenta...
# -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click from .core.server import launch @click.command() @click.option('--server-address', default="tcp://127.0.0.1:4242", help="Server IP address.") @click.option('--publisher-address', default="tcp://127.0.0.1:4243", help="Publisher IP a...
# -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click @click.command() def main(args=None): """Console script for cosmoscope.""" click.echo("Replace this message by putting your code into " "cosmoscope.cli.main") click.echo("See click documentation at http://...
<commit_before># -*- coding: utf-8 -*- """Console script for cosmoscope.""" import sys import click @click.command() def main(args=None): """Console script for cosmoscope.""" click.echo("Replace this message by putting your code into " "cosmoscope.cli.main") click.echo("See click documenta...
780002f5df7278776a26bb65b4b0f3dce84537a1
pentai/db/test_db.py
pentai/db/test_db.py
import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m z_m.set_db("test.db") initialised = True def init_logging(): logger = logging.getLog...
import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m # Use kivy's user_data_dir so we're guaranteed write access os.environ['KIVY_NO_CONSOLELO...
Allow unit tests to run on iOS. (filesystem restriction)
Allow unit tests to run on iOS. (filesystem restriction)
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m z_m.set_db("test.db") initialised = True def init_logging(): logger = logging.getLog...
import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m # Use kivy's user_data_dir so we're guaranteed write access os.environ['KIVY_NO_CONSOLELO...
<commit_before>import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m z_m.set_db("test.db") initialised = True def init_logging(): logger =...
import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m # Use kivy's user_data_dir so we're guaranteed write access os.environ['KIVY_NO_CONSOLELO...
import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m z_m.set_db("test.db") initialised = True def init_logging(): logger = logging.getLog...
<commit_before>import os import logging def init(): """ TODO: Call this setUp """ global initialised try: if initialised: return except: init_logging() import zodb_dict as z_m z_m.set_db("test.db") initialised = True def init_logging(): logger =...
4efa9c87264eabb6712f4fb787ab0de42be18de6
places/urls.py
places/urls.py
from django.conf.urls import url from . import views app_name = 'places' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.PlaceView.as_view(), name='place'), ]
from django.urls import include, path from . import views app_name = 'places' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('<slug:slug>/', views.PlaceView.as_view(), name='place'), ]
Move places urlpatterns to Django 2.0 preferred method
Move places urlpatterns to Django 2.0 preferred method
Python
mit
evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca
from django.conf.urls import url from . import views app_name = 'places' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.PlaceView.as_view(), name='place'), ] Move places urlpatterns to Django 2.0 preferred method
from django.urls import include, path from . import views app_name = 'places' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('<slug:slug>/', views.PlaceView.as_view(), name='place'), ]
<commit_before>from django.conf.urls import url from . import views app_name = 'places' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.PlaceView.as_view(), name='place'), ] <commit_msg>Move places urlpatterns to Django 2.0 preferred method<commit_after>
from django.urls import include, path from . import views app_name = 'places' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('<slug:slug>/', views.PlaceView.as_view(), name='place'), ]
from django.conf.urls import url from . import views app_name = 'places' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.PlaceView.as_view(), name='place'), ] Move places urlpatterns to Django 2.0 preferred methodfrom django.urls import include, path fro...
<commit_before>from django.conf.urls import url from . import views app_name = 'places' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.PlaceView.as_view(), name='place'), ] <commit_msg>Move places urlpatterns to Django 2.0 preferred method<commit_after>f...
a9dc245f99e5c29f3b11cadc77dcfa0f44274b74
ctfbackend/backend/urls.py
ctfbackend/backend/urls.py
from django.conf.urls import url, include from django.http import HttpResponseRedirect from django.conf import settings from django.contrib.auth import views as auth_views from . import views urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views.logout, {'next_...
from django.conf.urls import url, include from django.contrib.auth import views as auth_views from . import views from django.contrib.auth.decorators import login_required urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views.logout, {'next_page...
Add login_required decorator to protected sites
Add login_required decorator to protected sites
Python
agpl-3.0
c0d3z3r0/ctf-backend,c0d3z3r0/ctf-backend,c0d3z3r0/ctf-backend,c0d3z3r0/ctf-backend
from django.conf.urls import url, include from django.http import HttpResponseRedirect from django.conf import settings from django.contrib.auth import views as auth_views from . import views urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views.logout, {'next_...
from django.conf.urls import url, include from django.contrib.auth import views as auth_views from . import views from django.contrib.auth.decorators import login_required urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views.logout, {'next_page...
<commit_before>from django.conf.urls import url, include from django.http import HttpResponseRedirect from django.conf import settings from django.contrib.auth import views as auth_views from . import views urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views....
from django.conf.urls import url, include from django.contrib.auth import views as auth_views from . import views from django.contrib.auth.decorators import login_required urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views.logout, {'next_page...
from django.conf.urls import url, include from django.http import HttpResponseRedirect from django.conf import settings from django.contrib.auth import views as auth_views from . import views urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views.logout, {'next_...
<commit_before>from django.conf.urls import url, include from django.http import HttpResponseRedirect from django.conf import settings from django.contrib.auth import views as auth_views from . import views urlpatterns = [ # Authentication ## Override logout next_page url(r'^accounts/logout/$', auth_views....
defdf2220804ca492ec889c9f4b6eff9ff56eefc
tests/create_references.py
tests/create_references.py
#! /usr/bin/env python import os from cyclus_tools import run_cyclus from tests_list import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__main__": main()
#! /usr/bin/env python import os from cyclus_tools import run_cyclus from testcases import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__main__": main()
Correct import statement after renaming test_lists.py to testcases
Correct import statement after renaming test_lists.py to testcases
Python
bsd-3-clause
Baaaaam/cyBaM,Baaaaam/cyBaM,jlittell/cycamore,cyclus/cycaless,gonuke/cycamore,Baaaaam/cyBaM,Baaaaam/cycamore,rwcarlsen/cycamore,rwcarlsen/cycamore,Baaaaam/cycamore,rwcarlsen/cycamore,Baaaaam/cyCLASS,gonuke/cycamore,rwcarlsen/cycamore,Baaaaam/cyCLASS,cyclus/cycaless,jlittell/cycamore,Baaaaam/cyBaM,jlittell/cycamore,gonu...
#! /usr/bin/env python import os from cyclus_tools import run_cyclus from tests_list import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__main__": main() ...
#! /usr/bin/env python import os from cyclus_tools import run_cyclus from testcases import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__main__": main()
<commit_before>#! /usr/bin/env python import os from cyclus_tools import run_cyclus from tests_list import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__m...
#! /usr/bin/env python import os from cyclus_tools import run_cyclus from testcases import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__main__": main()
#! /usr/bin/env python import os from cyclus_tools import run_cyclus from tests_list import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__main__": main() ...
<commit_before>#! /usr/bin/env python import os from cyclus_tools import run_cyclus from tests_list import sim_files def main(): """Creates reference databases. Assumes that cyclus is included into PATH. """ cwd = os.getcwd() # Run cyclus run_cyclus("cyclus", cwd, sim_files) if __name__ == "__m...
6ff6f7ecf75551dc49685c4bb0501e6f4b2de854
packages/Python/lldbsuite/test/expression_command/vector_of_enums/TestVectorOfEnums.py
packages/Python/lldbsuite/test/expression_command/vector_of_enums/TestVectorOfEnums.py
""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): mydir = TestBase...
""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): mydir = TestBase...
Fix for regression test, since we rely on the formatter for std::vector in the test we need a libc++ category.
Fix for regression test, since we rely on the formatter for std::vector in the test we need a libc++ category. See differential https://reviews.llvm.org/D59847 for initial change that this fixes git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@357210 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb
""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): mydir = TestBase...
""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): mydir = TestBase...
<commit_before>""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): m...
""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): mydir = TestBase...
""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): mydir = TestBase...
<commit_before>""" Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): m...
df7e834b8418aeeeaee7fb90b953468c2490b93d
pypiup/cli.py
pypiup/cli.py
import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to "requirements.t...
import __init__ import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to...
Add Ascii Art & Version Number
Add Ascii Art & Version Number
Python
bsd-2-clause
ekonstantinidis/pypiup
import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to "requirements.t...
import __init__ import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to...
<commit_before>import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to ...
import __init__ import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to...
import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to "requirements.t...
<commit_before>import os import click from pypiup.requirements import Requirements BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @click.command() @click.option('--requirement', '-r', default='requirements.txt', type=click.STRING, help='Specify the path of the requirements file. Defaults to ...
6c9a3e5133115a4724c8499380ee690a9cca0552
pmagpy/__init__.py
pmagpy/__init__.py
from __future__ import absolute_import from . import pmag from . import ipmag from . import pmagplotlib from . import find_pmag_dir from . import version from . import controlled_vocabularies2 as controlled_vocabularies from . import data_model3 from . import new_builder from . import mapping #import set_env __all__ =...
from __future__ import absolute_import import sys if sys.version_info <= (3,): raise Exception(""" You are running Python {}. This version of pmagpy is only compatible with Python 3. Make sure you have pip >= 9.0 to avoid this kind of issue, as well as setuptools >= 24.2: $ pip install pip setuptools --upgrade T...
Add Exception on import of pmagpy if using wrong Python version (should be impossible to install this version, but people are tricky….)
Add Exception on import of pmagpy if using wrong Python version (should be impossible to install this version, but people are tricky….)
Python
bsd-3-clause
lfairchild/PmagPy,lfairchild/PmagPy,Caoimhinmg/PmagPy,lfairchild/PmagPy,Caoimhinmg/PmagPy,Caoimhinmg/PmagPy
from __future__ import absolute_import from . import pmag from . import ipmag from . import pmagplotlib from . import find_pmag_dir from . import version from . import controlled_vocabularies2 as controlled_vocabularies from . import data_model3 from . import new_builder from . import mapping #import set_env __all__ =...
from __future__ import absolute_import import sys if sys.version_info <= (3,): raise Exception(""" You are running Python {}. This version of pmagpy is only compatible with Python 3. Make sure you have pip >= 9.0 to avoid this kind of issue, as well as setuptools >= 24.2: $ pip install pip setuptools --upgrade T...
<commit_before>from __future__ import absolute_import from . import pmag from . import ipmag from . import pmagplotlib from . import find_pmag_dir from . import version from . import controlled_vocabularies2 as controlled_vocabularies from . import data_model3 from . import new_builder from . import mapping #import set...
from __future__ import absolute_import import sys if sys.version_info <= (3,): raise Exception(""" You are running Python {}. This version of pmagpy is only compatible with Python 3. Make sure you have pip >= 9.0 to avoid this kind of issue, as well as setuptools >= 24.2: $ pip install pip setuptools --upgrade T...
from __future__ import absolute_import from . import pmag from . import ipmag from . import pmagplotlib from . import find_pmag_dir from . import version from . import controlled_vocabularies2 as controlled_vocabularies from . import data_model3 from . import new_builder from . import mapping #import set_env __all__ =...
<commit_before>from __future__ import absolute_import from . import pmag from . import ipmag from . import pmagplotlib from . import find_pmag_dir from . import version from . import controlled_vocabularies2 as controlled_vocabularies from . import data_model3 from . import new_builder from . import mapping #import set...
d3cbcfa3d134ef7ce158f229eff75a83418afc52
tools/dmqmc/extract_n_k.py
tools/dmqmc/extract_n_k.py
#!/usr/bin/env python '''Extract the momentum distribution from a analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys # [review] - JSS: use if __name__ == '__main__' and functions so code can easily be reused in another script if necessary. if (len(sys.argv) < 2): print ("Usage: extra...
#!/usr/bin/env python '''Extract the momentum distribution from an analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys def main(args): if (len(sys.argv) < 2): print ("Usage: extract_n_k.py file bval") sys.exit() bval = float(sys.argv[2]) data = pd.read_csv(s...
Write the extraction script properly.
Write the extraction script properly.
Python
lgpl-2.1
hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande
#!/usr/bin/env python '''Extract the momentum distribution from a analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys # [review] - JSS: use if __name__ == '__main__' and functions so code can easily be reused in another script if necessary. if (len(sys.argv) < 2): print ("Usage: extra...
#!/usr/bin/env python '''Extract the momentum distribution from an analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys def main(args): if (len(sys.argv) < 2): print ("Usage: extract_n_k.py file bval") sys.exit() bval = float(sys.argv[2]) data = pd.read_csv(s...
<commit_before>#!/usr/bin/env python '''Extract the momentum distribution from a analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys # [review] - JSS: use if __name__ == '__main__' and functions so code can easily be reused in another script if necessary. if (len(sys.argv) < 2): print...
#!/usr/bin/env python '''Extract the momentum distribution from an analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys def main(args): if (len(sys.argv) < 2): print ("Usage: extract_n_k.py file bval") sys.exit() bval = float(sys.argv[2]) data = pd.read_csv(s...
#!/usr/bin/env python '''Extract the momentum distribution from a analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys # [review] - JSS: use if __name__ == '__main__' and functions so code can easily be reused in another script if necessary. if (len(sys.argv) < 2): print ("Usage: extra...
<commit_before>#!/usr/bin/env python '''Extract the momentum distribution from a analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys # [review] - JSS: use if __name__ == '__main__' and functions so code can easily be reused in another script if necessary. if (len(sys.argv) < 2): print...
bea80411c13ed72b1e7d5a5ac79fdba64b4b4661
benchmarks/benchmarks/sparse_csgraph_djisktra.py
benchmarks/benchmarks/sparse_csgraph_djisktra.py
"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False] ] param_names = ['n...
"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False], ['random', 'star']...
Add star graph for sparse.csgraph.dijkstra benchmark
ENH: Add star graph for sparse.csgraph.dijkstra benchmark
Python
bsd-3-clause
scipy/scipy,scipy/scipy,scipy/scipy,scipy/scipy,scipy/scipy,scipy/scipy
"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False] ] param_names = ['n...
"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False], ['random', 'star']...
<commit_before>"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False] ] pa...
"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False], ['random', 'star']...
"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False] ] param_names = ['n...
<commit_before>"""benchmarks for the scipy.sparse.csgraph module""" import numpy as np import scipy.sparse from .common import Benchmark, safe_import with safe_import(): from scipy.sparse.csgraph import dijkstra class Dijkstra(Benchmark): params = [ [30, 300, 900], [True, False] ] pa...
d1fd32946ba422e8f240bd44bffab3107f4d1057
pymoji/__init__.py
pymoji/__init__.py
"""Python Library Boilerplate contains all the boilerplate you need to create a Python package.""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' def pymoji(): return 'Hello World!'
"""Emits HTML from emoji""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' from .emoji import emoji def pymoji(text): if text[0] <> text[:-1] and text[0] <> ':': text = ':%s:' % text return emoji(text)
Return the emoji and format it
Return the emoji and format it
Python
apache-2.0
michaeljoseph/pymoji,michaeljoseph/pymoji
"""Python Library Boilerplate contains all the boilerplate you need to create a Python package.""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' def pymoji(): return 'Hello World!' Return the emoji and format it
"""Emits HTML from emoji""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' from .emoji import emoji def pymoji(text): if text[0] <> text[:-1] and text[0] <> ':': text = ':%s:' % text return emoji(text)
<commit_before>"""Python Library Boilerplate contains all the boilerplate you need to create a Python package.""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' def pymoji(): return 'Hello World!' <commit_msg>Return th...
"""Emits HTML from emoji""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' from .emoji import emoji def pymoji(text): if text[0] <> text[:-1] and text[0] <> ':': text = ':%s:' % text return emoji(text)
"""Python Library Boilerplate contains all the boilerplate you need to create a Python package.""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' def pymoji(): return 'Hello World!' Return the emoji and format it"""Emi...
<commit_before>"""Python Library Boilerplate contains all the boilerplate you need to create a Python package.""" __author__ = 'Michael Joseph' __email__ = 'michaeljoseph@gmail.com' __url__ = 'https://github.com/michaeljoseph/pymoji' __version__ = '0.0.1' def pymoji(): return 'Hello World!' <commit_msg>Return th...
bca6ca83ce43f6d9b96ac590bda9c6253384ab69
winthrop/people/viaf.py
winthrop/people/viaf.py
import requests from django.conf import settings class ViafAPI(object): """Wrapper for ViafAPI""" def __init__(self): default_url = 'https://www.viaf.org/viaf/AutoSuggest?query=' self.base_url = getattr(settings, "VIAF_AUTOSUGGEST_URL", default_url) def search(self, query): """Do...
import json import requests class ViafAPI(object): """Wrapper for Viaf API""" def __init__(self): self.base_url = "https://www.viaf.org/" def suggest(self, query): """Do a GET request to pull in JSON""" url = self.base_url + "viaf/AutoSuggest?query=" r = requests.get("%s%...
Refactor for other search options later (search -> suggest)
Refactor for other search options later (search -> suggest)
Python
apache-2.0
Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django
import requests from django.conf import settings class ViafAPI(object): """Wrapper for ViafAPI""" def __init__(self): default_url = 'https://www.viaf.org/viaf/AutoSuggest?query=' self.base_url = getattr(settings, "VIAF_AUTOSUGGEST_URL", default_url) def search(self, query): """Do...
import json import requests class ViafAPI(object): """Wrapper for Viaf API""" def __init__(self): self.base_url = "https://www.viaf.org/" def suggest(self, query): """Do a GET request to pull in JSON""" url = self.base_url + "viaf/AutoSuggest?query=" r = requests.get("%s%...
<commit_before>import requests from django.conf import settings class ViafAPI(object): """Wrapper for ViafAPI""" def __init__(self): default_url = 'https://www.viaf.org/viaf/AutoSuggest?query=' self.base_url = getattr(settings, "VIAF_AUTOSUGGEST_URL", default_url) def search(self, query)...
import json import requests class ViafAPI(object): """Wrapper for Viaf API""" def __init__(self): self.base_url = "https://www.viaf.org/" def suggest(self, query): """Do a GET request to pull in JSON""" url = self.base_url + "viaf/AutoSuggest?query=" r = requests.get("%s%...
import requests from django.conf import settings class ViafAPI(object): """Wrapper for ViafAPI""" def __init__(self): default_url = 'https://www.viaf.org/viaf/AutoSuggest?query=' self.base_url = getattr(settings, "VIAF_AUTOSUGGEST_URL", default_url) def search(self, query): """Do...
<commit_before>import requests from django.conf import settings class ViafAPI(object): """Wrapper for ViafAPI""" def __init__(self): default_url = 'https://www.viaf.org/viaf/AutoSuggest?query=' self.base_url = getattr(settings, "VIAF_AUTOSUGGEST_URL", default_url) def search(self, query)...
3e2be4a8a597cfaa11b625eb6a94a4a18061df9b
readux/__init__.py
readux/__init__.py
__version_info__ = (1, 6, 1, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
__version_info__ = (1, 7, 0, 'dev') # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environ...
Update develop version to 1.7-dev since 1.6 is in production
Update develop version to 1.7-dev since 1.6 is in production
Python
apache-2.0
emory-libraries/readux,emory-libraries/readux,emory-libraries/readux
__version_info__ = (1, 6, 1, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
__version_info__ = (1, 7, 0, 'dev') # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environ...
<commit_before>__version_info__ = (1, 6, 1, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the te...
__version_info__ = (1, 7, 0, 'dev') # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environ...
__version_info__ = (1, 6, 1, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
<commit_before>__version_info__ = (1, 6, 1, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the te...
b5068d644ffde56f302e9aee5b77e837a1d3e181
pyshelf/app.py
pyshelf/app.py
import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): if not error.message: error.message = "Internal Server Error" return res...
import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map import logging app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): """ Prevents Exceptions flying all around the place. """...
Add some logging to generic error handler.
Add some logging to generic error handler.
Python
mit
not-nexus/shelf,kyle-long/pyshelf,not-nexus/shelf,kyle-long/pyshelf
import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): if not error.message: error.message = "Internal Server Error" return res...
import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map import logging app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): """ Prevents Exceptions flying all around the place. """...
<commit_before>import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): if not error.message: error.message = "Internal Server Error"...
import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map import logging app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): """ Prevents Exceptions flying all around the place. """...
import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): if not error.message: error.message = "Internal Server Error" return res...
<commit_before>import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) def generic_exception_handler(error): if not error.message: error.message = "Internal Server Error"...
e503ef58e801cfbc3ba72ba84bc2150c79a401d3
girder/molecules/molecules/models/geometry.py
girder/molecules/molecules/models/geometry.py
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...
Save creatorId as well for geometries
Save creatorId as well for geometries This is to keep track of the creator, even when the provenance is not the user. Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>
Python
bsd-3-clause
OpenChemistry/mongochemserver
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...
<commit_before>from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initi...
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...
<commit_before>from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initi...
3429293244359b5635b7d060caf527a36850f3a2
orchestrator/__init__.py
orchestrator/__init__.py
from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.5' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging)
from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.6' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging)
Prepare for next dev version to incorporate encofing fixes in flask-hyperschema library
Prepare for next dev version to incorporate encofing fixes in flask-hyperschema library
Python
mit
totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator
from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.5' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging) Prepare for next dev version to incorporate encofing fixes in flask-h...
from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.6' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging)
<commit_before>from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.5' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging) <commit_msg>Prepare for next dev version to incorporat...
from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.6' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging)
from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.5' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging) Prepare for next dev version to incorporate encofing fixes in flask-h...
<commit_before>from __future__ import absolute_import from celery.signals import setup_logging import orchestrator.logger __version__ = '0.3.5' __author__ = 'sukrit' orchestrator.logger.init_logging() setup_logging.connect(orchestrator.logger.init_celery_logging) <commit_msg>Prepare for next dev version to incorporat...
5006ba3124cd80a4529b9ed645aa8981d06a9886
publishconf.py
publishconf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False FEED_ALL_ATOM = 'fee...
#!/usr/bin/env python3 # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False DELETE_OUTPUT_DIRECTORY = True # Following items are often useful when publishing #...
Stop generate feeds when publishing
Stop generate feeds when publishing
Python
mit
andrewheiss/scorecarddiplomacy-org,andrewheiss/scorecarddiplomacy-org,andrewheiss/scorecarddiplomacy-org,andrewheiss/scorecarddiplomacy-org
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False FEED_ALL_ATOM = 'fee...
#!/usr/bin/env python3 # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False DELETE_OUTPUT_DIRECTORY = True # Following items are often useful when publishing #...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False FEED_...
#!/usr/bin/env python3 # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False DELETE_OUTPUT_DIRECTORY = True # Following items are often useful when publishing #...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False FEED_ALL_ATOM = 'fee...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = '' RELATIVE_URLS = False FEED_...
ddd3373ce078cf9bf40da7ebd8591995e819b750
phell/utils.py
phell/utils.py
# -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(value): if sy...
# -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(value): if sy...
Add function to swap byte order
Add function to swap byte order
Python
mit
bjoernricks/phell
# -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(value): if sy...
# -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(value): if sy...
<commit_before># -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(va...
# -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(value): if sy...
# -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(value): if sy...
<commit_before># -*- coding: utf-8 -*- # # (c) 2016 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'phell' for details. # import sys def to_hex(value): if sys.version_info.major < 3: return value.encode('hex') return "".join("%02x" % b for b in value) def from_hex(va...
c8ffd1fc4c4e06cd71e86d1d48749a3fe527a54e
biosys/apps/main/tests/api/test_serializers.py
biosys/apps/main/tests/api/test_serializers.py
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
Fix test to accommodate change of error message.
Fix test to accommodate change of error message.
Python
apache-2.0
gaiaresources/biosys,parksandwildlife/biosys,gaiaresources/biosys,serge-gaia/biosys,ropable/biosys,parksandwildlife/biosys,serge-gaia/biosys,ropable/biosys,gaiaresources/biosys,ropable/biosys,serge-gaia/biosys,parksandwildlife/biosys
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
<commit_before>from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not uniq...
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
<commit_before>from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not uniq...
27c9da3129c6fbdd8d54276cf054c1f46e665aaf
flask_app.py
flask_app.py
from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main import slack app = Flask(__name__) cache = Cache(app, config={"CACHE_TYPE": "simple"}) cors = CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefix="/api/slack")...
import flask import flask_caching import flask_cors import main import slack app = flask.Flask(__name__) cache = flask_caching.Cache(app, config={"CACHE_TYPE": "simple"}) cors = flask_cors.CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefix="/api/slack") @app.route("/a...
Remove trailing slashes, add origin url to responses
Remove trailing slashes, add origin url to responses
Python
bsd-3-clause
talavis/kimenu
from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main import slack app = Flask(__name__) cache = Cache(app, config={"CACHE_TYPE": "simple"}) cors = CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefix="/api/slack")...
import flask import flask_caching import flask_cors import main import slack app = flask.Flask(__name__) cache = flask_caching.Cache(app, config={"CACHE_TYPE": "simple"}) cors = flask_cors.CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefix="/api/slack") @app.route("/a...
<commit_before>from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main import slack app = Flask(__name__) cache = Cache(app, config={"CACHE_TYPE": "simple"}) cors = CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefi...
import flask import flask_caching import flask_cors import main import slack app = flask.Flask(__name__) cache = flask_caching.Cache(app, config={"CACHE_TYPE": "simple"}) cors = flask_cors.CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefix="/api/slack") @app.route("/a...
from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main import slack app = Flask(__name__) cache = Cache(app, config={"CACHE_TYPE": "simple"}) cors = CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefix="/api/slack")...
<commit_before>from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main import slack app = Flask(__name__) cache = Cache(app, config={"CACHE_TYPE": "simple"}) cors = CORS(app, resources={r"/*": {"origins": "*"}}) app.register_blueprint(slack.blueprint, url_prefi...
e2f83a6a5d43ebc52d03d4059a7526a579a425c1
darkoob/social/models.py
darkoob/social/models.py
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, choices = SEX_CHO...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, choices = SEX_CHO...
Set User Profile Unicode Function
Set User Profile Unicode Function
Python
mit
s1na/darkoob,s1na/darkoob,s1na/darkoob
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, choices = SEX_CHO...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, choices = SEX_CHO...
<commit_before>from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, ch...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, choices = SEX_CHO...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, choices = SEX_CHO...
<commit_before>from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save SEX_CHOICES = ( ('Male', 'Male'), ('Female', 'Female'), ) class UserProfile(models.Model): user = models.OneToOneField(User) sex = models.CharField(max_length = 6, ch...
74ca49c62ba63b7eb42f3825ea5c036e32b98d50
busstops/management/commands/import_tfl_stops.py
busstops/management/commands/import_tfl_stops.py
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
Work around null TfL common names
Work around null TfL common names
Python
mpl-2.0
jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
<commit_before>""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import Stop...
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
<commit_before>""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import Stop...
9a8fd944fb78d582f06d7165f097c1e54cb870dc
project/asylum/mixins.py
project/asylum/mixins.py
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): def save(self, *args, **kwargs): wit...
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): """Makes sure saves and deletes go via transa...
Add a mixin for calling full_clean() on save()
Add a mixin for calling full_clean() on save()
Python
mit
ojousima/asylum,rambo/asylum,HelsinkiHacklab/asylum,ojousima/asylum,hacklab-fi/asylum,hacklab-fi/asylum,jautero/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,rambo/asylum,jautero/asylum,rambo/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,ojousima/asylum,rambo/asy...
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): def save(self, *args, **kwargs): wit...
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): """Makes sure saves and deletes go via transa...
<commit_before>from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): def save(self, *args, **kwarg...
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): """Makes sure saves and deletes go via transa...
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): def save(self, *args, **kwargs): wit...
<commit_before>from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): def save(self, *args, **kwarg...
39f7530f9082062abdd530255ab34d642097b605
Python/Product/PythonTools/ptvsd/setup.py
Python/Product/PythonTools/ptvsd/setup.py
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
Update ptvsd version number for 2.2 release.
Update ptvsd version number for 2.2 release.
Python
apache-2.0
bolabola/PTVS,christer155/PTVS,gomiero/PTVS,DEVSENSE/PTVS,mlorbetske/PTVS,ChinaQuants/PTVS,christer155/PTVS,dut3062796s/PTVS,Microsoft/PTVS,huguesv/PTVS,msunardi/PTVS,fivejjs/PTVS,alanch-ms/PTVS,Habatchii/PTVS,Microsoft/PTVS,denfromufa/PTVS,fjxhkj/PTVS,crwilcox/PTVS,MetSystem/PTVS,bolabola/PTVS,denfromufa/PTVS,modulexc...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
<commit_before>#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 ...
<commit_before>#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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...
6794bb897e7e8730b1c3ab2fc6b856865887ac8b
scripts/upsrv_schema.py
scripts/upsrv_schema.py
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = Ser...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore class SimpleFileLog(tracelog.FileLog): def pr...
Use a simpler trace logger that does not prepend timestamps
Use a simpler trace logger that does not prepend timestamps
Python
apache-2.0
sassoftware/rbm,sassoftware/rbm,sassoftware/rbm
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = Ser...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore class SimpleFileLog(tracelog.FileLog): def pr...
<commit_before>#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository....
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore class SimpleFileLog(tracelog.FileLog): def pr...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = Ser...
<commit_before>#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository....
31e4da5e782c29d7d0c893a3fc9af48260c50a3a
src/ansible/views.py
src/ansible/views.py
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): def get_form_initial(...
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github, Playbook import sys def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): ...
Save form data to DB on each step
Save form data to DB on each step
Python
bsd-3-clause
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): def get_form_initial(...
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github, Playbook import sys def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): ...
<commit_before>from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): def ge...
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github, Playbook import sys def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): ...
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): def get_form_initial(...
<commit_before>from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): def ge...
c99db48154ed327aead8a56211ac5125529f8ea0
count-inversions/count_inversions.py
count-inversions/count_inversions.py
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr): return 0 def main(arr_len): test_a...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr1, arr2): return 0 def main(arr_len): ...
Change merge_and_count to accept 2 array arguments
Change merge_and_count to accept 2 array arguments
Python
mit
timpel/stanford-algs,timpel/stanford-algs
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr): return 0 def main(arr_len): test_a...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr1, arr2): return 0 def main(arr_len): ...
<commit_before>from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr): return 0 def main(ar...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr1, arr2): return 0 def main(arr_len): ...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr): return 0 def main(arr_len): test_a...
<commit_before>from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr): return 0 def main(ar...
aa026fb39bd4a053766988383e9374dba20fd7f5
scripts/init_tree.py
scripts/init_tree.py
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' return 1 os.chdir('../../') os.mkdir('frensie_build_tree') os.renames('FRENSIE', 'frensie_build_tree/FRENSIE') ...
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' print 'Your CWD is', cwd return 1 os.chdir('../../') os.mkdir('frensie_build_tree') #os.renames('FRENSIE'...
Use symlinks to avoid weird behavior from removing the CWD while we're in it
Use symlinks to avoid weird behavior from removing the CWD while we're in it
Python
bsd-3-clause
lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' return 1 os.chdir('../../') os.mkdir('frensie_build_tree') os.renames('FRENSIE', 'frensie_build_tree/FRENSIE') ...
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' print 'Your CWD is', cwd return 1 os.chdir('../../') os.mkdir('frensie_build_tree') #os.renames('FRENSIE'...
<commit_before>import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' return 1 os.chdir('../../') os.mkdir('frensie_build_tree') os.renames('FRENSIE', 'frensie_build_tr...
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' print 'Your CWD is', cwd return 1 os.chdir('../../') os.mkdir('frensie_build_tree') #os.renames('FRENSIE'...
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' return 1 os.chdir('../../') os.mkdir('frensie_build_tree') os.renames('FRENSIE', 'frensie_build_tree/FRENSIE') ...
<commit_before>import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' return 1 os.chdir('../../') os.mkdir('frensie_build_tree') os.renames('FRENSIE', 'frensie_build_tr...
cd48c66406c39ca6dd6bdc6ba7c2be0df623e6ae
src/leap/mx/check_recipient_access.py
src/leap/mx/check_recipient_access.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
Fix return codes for check recipient
Fix return codes for check recipient
Python
agpl-3.0
meskio/leap_mx,meskio/leap_mx,leapcode/leap_mx,micah/leap_mx,leapcode/leap_mx,micah/leap_mx
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
<commit_before>#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
<commit_before>#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
aefd972c7fb423396f59da03a1d460cd3559d1e1
duplicate_questions/data/tokenizers/word_tokenizers.py
duplicate_questions/data/tokenizers/word_tokenizers.py
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def tokenize(self, sente...
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') def tokenize(self, sentence): return [str(token.lower_) for token in s...
Remove unnecesssary comments of old function signatures
Remove unnecesssary comments of old function signatures
Python
mit
nelson-liu/paraphrase-id-tensorflow,nelson-liu/paraphrase-id-tensorflow
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def tokenize(self, sente...
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') def tokenize(self, sentence): return [str(token.lower_) for token in s...
<commit_before>class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def token...
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') def tokenize(self, sentence): return [str(token.lower_) for token in s...
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def tokenize(self, sente...
<commit_before>class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def token...
d9c677a35d18a878ef8d253a9453e93da3341e96
runTwircBot.py
runTwircBot.py
#!/usr/bin/env python3 from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start()
#!/usr/bin/env python3 from src.TwircBot import TwircBot from src.CommandModule import CommandModule import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() module = CommandModule() bot.print_config() # bot.start()
Add extremely basic template for command modules
Add extremely basic template for command modules
Python
mit
johnmarcampbell/twircBot
#!/usr/bin/env python3 from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start() Add extremely basic template for command modules
#!/usr/bin/env python3 from src.TwircBot import TwircBot from src.CommandModule import CommandModule import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() module = CommandModule() bot.print_config() # bot.start()
<commit_before>#!/usr/bin/env python3 from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start() <commit_msg>Add extremely basic template for command modules<commit_after>
#!/usr/bin/env python3 from src.TwircBot import TwircBot from src.CommandModule import CommandModule import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() module = CommandModule() bot.print_config() # bot.start()
#!/usr/bin/env python3 from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start() Add extremely basic template for command modules#!/usr/bin/env python3 from src.TwircBot import TwircBot from src.CommandModule import Comma...
<commit_before>#!/usr/bin/env python3 from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start() <commit_msg>Add extremely basic template for command modules<commit_after>#!/usr/bin/env python3 from src.TwircBot import Twi...
16b3e30a88e9101db58c0549e515848df29f29b9
raygun4py-sample/test.py
raygun4py-sample/test.py
import sys, os import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1111, ...
import sys, os, urllib2 import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1...
Set up sample project to throw web exceptions (for request oject)
Set up sample project to throw web exceptions (for request oject)
Python
mit
Osmose/raygun4py,MindscapeHQ/raygun4py,ferringb/raygun4py
import sys, os import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1111, ...
import sys, os, urllib2 import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1...
<commit_before>import sys, os import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], ...
import sys, os, urllib2 import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1...
import sys, os import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1111, ...
<commit_before>import sys, os import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], ...
9f3356d06067dbcc77a79afee6bccf80600dab28
server/systeminfo.py
server/systeminfo.py
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess def get_uptime(): """ Return the uptime of the system as a str using the command: $ uptime """ proc = subprocess.Popen(["uptime"], stdout=subprocess.PIPE, shell=True) ...
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess from datetime import timedelta def get_uptime(): """ Return the uptime of the system as a timedelta object. """ proc = subprocess.Popen(["cat /proc/uptime"], ...
Add a method to get the idle time. Also data are directly readed in /proc/uptime.
Add a method to get the idle time. Also data are directly readed in /proc/uptime.
Python
mit
juliendelplanque/raspirestmonitor
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess def get_uptime(): """ Return the uptime of the system as a str using the command: $ uptime """ proc = subprocess.Popen(["uptime"], stdout=subprocess.PIPE, shell=True) ...
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess from datetime import timedelta def get_uptime(): """ Return the uptime of the system as a timedelta object. """ proc = subprocess.Popen(["cat /proc/uptime"], ...
<commit_before>#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess def get_uptime(): """ Return the uptime of the system as a str using the command: $ uptime """ proc = subprocess.Popen(["uptime"], stdout=subprocess.PIPE, s...
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess from datetime import timedelta def get_uptime(): """ Return the uptime of the system as a timedelta object. """ proc = subprocess.Popen(["cat /proc/uptime"], ...
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess def get_uptime(): """ Return the uptime of the system as a str using the command: $ uptime """ proc = subprocess.Popen(["uptime"], stdout=subprocess.PIPE, shell=True) ...
<commit_before>#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess def get_uptime(): """ Return the uptime of the system as a str using the command: $ uptime """ proc = subprocess.Popen(["uptime"], stdout=subprocess.PIPE, s...
595218c33892facf0cf26e5e6b3e16b2c02e737e
spring/settings.py
spring/settings.py
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
Add a stub for fts_updates
Add a stub for fts_updates Change-Id: Ieb48f98a0072dcd27de0b50027ff6c5f3ecc1513 Reviewed-on: http://review.couchbase.org/70413 Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com> Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
Python
apache-2.0
pavel-paulau/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
<commit_before>from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # St...
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # Stub for library ...
<commit_before>from urlparse import urlparse from logger import logger class WorkloadSettings(object): def __init__(self, options): self.creates = options.creates self.reads = options.reads self.updates = options.updates self.deletes = options.deletes self.cases = 0 # St...
a578e2e738a77f8ca0073b2b337a8fa79794500b
skeleton/settings.py
skeleton/settings.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
Change default SERVER_NAME to localhost:5000
Change default SERVER_NAME to localhost:5000 This is to make it work more out of the box, without the need to edit /etc/hosts
Python
mit
peterhil/skeleton,peterhil/ninhursag,peterhil/skeleton,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/skeleton
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Sk...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Skeleton' # Serv...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Flask application default config: # http://flask.pocoo.org/docs/config/#configuring-from-files # https://github.com/mbr/flask-appconfig DEBUG = True TESTING = False JS_LOG_LEVEL = 3 # log (1) < debug (2) < info (3) < warn (4) < error (5) APP_NAME = 'Sk...
963857463cd706260667995bd8817bd2facea5f0
setup.py
setup.py
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
Include the official nydus release
Include the official nydus release
Python
apache-2.0
numan/sunspear
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
<commit_before>#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r...
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
<commit_before>#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r...
427292a82aea2a2291833ca0cb3f30cee2afd497
ixdjango/management/commands/newrelic_notify_deploy.py
ixdjango/management/commands/newrelic_notify_deploy.py
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
Fix NR deploy notification bug
Fix NR deploy notification bug
Python
mit
infoxchange/ixdjango
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
<commit_before>""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class ...
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
<commit_before>""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class ...
f6f9ce94c33ad959cfd3f9cbb1b19e8bff17126d
solar/solar/utils.py
solar/solar/utils.py
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
Fix python object searilization problem in yaml
Fix python object searilization problem in yaml
Python
apache-2.0
torgartor21/solar,Mirantis/solar,torgartor21/solar,loles/solar,zen/solar,openstack/solar,pigmej/solar,Mirantis/solar,loles/solar,dshulyak/solar,loles/solar,pigmej/solar,zen/solar,zen/solar,Mirantis/solar,Mirantis/solar,openstack/solar,CGenie/solar,pigmej/solar,openstack/solar,dshulyak/solar,CGenie/solar,loles/solar,zen...
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
<commit_before>import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def ya...
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
<commit_before>import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def ya...
329e74f280537aab41d5b810f8650bfd8d6d81f5
tests/test_generate_files.py
tests/test_generate_files.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ import pytest from cookiecutter import generate from cookiecutter import exceptions @pyte...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ from __future__ import unicode_literals import os import pytest from cookiecutter import g...
Add teardown specific to the former TestCase class
Add teardown specific to the former TestCase class
Python
bsd-3-clause
michaeljoseph/cookiecutter,christabor/cookiecutter,cguardia/cookiecutter,janusnic/cookiecutter,michaeljoseph/cookiecutter,cguardia/cookiecutter,vincentbernat/cookiecutter,drgarcia1986/cookiecutter,Vauxoo/cookiecutter,cichm/cookiecutter,benthomasson/cookiecutter,0k/cookiecutter,terryjbates/cookiecutter,atlassian/cookiec...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ import pytest from cookiecutter import generate from cookiecutter import exceptions @pyte...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ from __future__ import unicode_literals import os import pytest from cookiecutter import g...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ import pytest from cookiecutter import generate from cookiecutter import exc...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ from __future__ import unicode_literals import os import pytest from cookiecutter import g...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ import pytest from cookiecutter import generate from cookiecutter import exceptions @pyte...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_files ------------------- Test formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception """ import pytest from cookiecutter import generate from cookiecutter import exc...
2c0947fcba8e260e01420182fe0da307af5a8426
tests/test_online_checker.py
tests/test_online_checker.py
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.http.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.web.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
Rename sys modules access to web module
Rename sys modules access to web module
Python
mit
thatsIch/sublime-rainmeter
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.http.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.web.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
<commit_before>"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.http.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc...
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.web.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.http.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc_online(self): ...
<commit_before>"""This module is for testing the online checker.""" import sys from unittest import TestCase ONLINE_CHECKER = sys.modules["Rainmeter.http.online_checker"] class TestRmDocOnlineChecker(TestCase): """Test of the online checks for Rainmeter Documentation using unittest.""" def test_is_rm_doc...
e8e3a7daaa1e6afc4c8f9853f6db77dcd557f4d3
examples/black-whitelist/whitelist_generator.py
examples/black-whitelist/whitelist_generator.py
""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt file with users" ...
""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt file with users" ...
Call 'lower()' on the input
Call 'lower()' on the input
Python
apache-2.0
instagrambot/instabot,ohld/instabot,instagrambot/instabot
""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt file with users" ...
""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt file with users" ...
<commit_before>""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt fi...
""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt file with users" ...
""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt file with users" ...
<commit_before>""" instabot example Whitelist generator: generates a list of users which will not be unfollowed. """ import sys import os import random sys.path.append(os.path.join(sys.path[0], '../../')) from instabot import Bot bot = Bot() bot.login() print("This script will generate whitelist.txt fi...
56bc9c79522fd534f2a756bd5a18193635e2adae
tests/test_default_security_groups.py
tests/test_default_security_groups.py
"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_groups(mock_properties): """Make sure default Security Groups are added ...
"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_details') @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_group...
Fix missing mock and rename variable
tests: Fix missing mock and rename variable
Python
apache-2.0
gogoair/foremast,gogoair/foremast
"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_groups(mock_properties): """Make sure default Security Groups are added ...
"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_details') @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_group...
<commit_before>"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_groups(mock_properties): """Make sure default Security Gr...
"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_details') @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_group...
"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_groups(mock_properties): """Make sure default Security Groups are added ...
<commit_before>"""Test default Security Groups.""" from unittest import mock from foremast.securitygroup.create_securitygroup import SpinnakerSecurityGroup @mock.patch('foremast.securitygroup.create_securitygroup.get_properties') def test_default_security_groups(mock_properties): """Make sure default Security Gr...
6cf4901344033b50c6e56a9c878a7e89f33d3880
2to3/fix_reload.py
2to3/fix_reload.py
# Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_import class ...
# Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_import class ...
Fix 2to3 fixers to work with Python 3.
Fix 2to3 fixers to work with Python 3.
Python
bsd-3-clause
ProgVal/Limnoria-test,Ban3/Limnoria,ProgVal/Limnoria-test,Ban3/Limnoria
# Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_import class ...
# Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_import class ...
<commit_before># Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_...
# Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_import class ...
# Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_import class ...
<commit_before># Based on fix_intern.py. Original copyright: # Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from lib2to3 import pytree from lib2to3 import fixer_base from lib2to3.fixer_util import Name, Attr, touch_...
84929e01bfb9236fd0f51d82ee514d513d018408
triangle/triangle.py
triangle/triangle.py
class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = dims def kind(self): a, b, c = self.dims if a == b and b == c: ...
class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = sorted(dims) def kind(self): a, b, c = self.dims if a == b and b == c: # i...
Sort dimensins to reduce code
Sort dimensins to reduce code
Python
agpl-3.0
CubicComet/exercism-python-solutions
class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = dims def kind(self): a, b, c = self.dims if a == b and b == c: ...
class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = sorted(dims) def kind(self): a, b, c = self.dims if a == b and b == c: # i...
<commit_before>class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = dims def kind(self): a, b, c = self.dims if a == b and b ==...
class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = sorted(dims) def kind(self): a, b, c = self.dims if a == b and b == c: # i...
class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = dims def kind(self): a, b, c = self.dims if a == b and b == c: ...
<commit_before>class TriangleError(Exception): pass class Triangle(object): def __init__(self, *dims): if not self.is_valid(dims): raise TriangleError("Invalid dimensions: {}".format(dims)) self.dims = dims def kind(self): a, b, c = self.dims if a == b and b ==...
3dd23df07d7d1f84e361c87345aafcfefeff636a
jsk_2016_01_baxter_apc/node_scripts/control_vacuum_gripper.py
jsk_2016_01_baxter_apc/node_scripts/control_vacuum_gripper.py
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('action', type=str, choices=['start', 'stop']) ...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('-l', '--left', action='store_true', ...
Order agonistic options to control vacuum gripper
Order agonistic options to control vacuum gripper
Python
bsd-3-clause
pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('action', type=str, choices=['start', 'stop']) ...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('-l', '--left', action='store_true', ...
<commit_before>#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('action', type=str, choices=['start...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('-l', '--left', action='store_true', ...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('action', type=str, choices=['start', 'stop']) ...
<commit_before>#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import rospy from std_msgs.msg import Bool def main(): parser = argparse.ArgumentParser() parser.add_argument('action', type=str, choices=['start...
74e9f4f4f64ed0c9501d2527b3948dbcde423cc6
jetcomcrawl/modes/items.py
jetcomcrawl/modes/items.py
from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items') def wor...
from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items') def wor...
Increase log verbosity on exception
Increase log verbosity on exception
Python
mit
tdickman/jetcom-crawl
from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items') def wor...
from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items') def wor...
<commit_before>from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items...
from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items') def wor...
from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items') def wor...
<commit_before>from bs4 import BeautifulSoup import logging from jetcomcrawl import browser import jetcomcrawl.libs.queue class Worker(object): def __init__(self): self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categories') self.queue_items = jetcomcrawl.libs.queue.Queue('queue_items...
bf0e192b190efbde1b594cdf85c6552b343c2f0c
run_samples.py
run_samples.py
#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria', ...
#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria', ...
Use new API correctly, v2...
Use new API correctly, v2...
Python
agpl-3.0
janmedlock/HIV-95-vaccine
#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria', ...
#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria', ...
<commit_before>#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria',...
#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria', ...
#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria', ...
<commit_before>#!/usr/bin/python3 ''' Run simulations with parameter samples. ''' import model countries = model.datasheet.get_country_list() # Move these to the front. countries_to_plot = ['United States of America', 'South Africa', 'Uganda', 'Nigeria',...
27b0a5b95e188a5bd77ae662bbb43e06dfde4749
slack/views.py
slack/views.py
from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_name"] text = text[:-1] if text[-1] ==...
from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_id"] text = unquote(text) text = t...
Use the id of the channel and unquote all of the text first.
Use the id of the channel and unquote all of the text first.
Python
mit
DuaneGarber/slack-meme,joeynebula/slack-meme,tezzutezzu/slack-meme,nicolewhite/slack-meme
from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_name"] text = text[:-1] if text[-1] ==...
from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_id"] text = unquote(text) text = t...
<commit_before>from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_name"] text = text[:-1]...
from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_id"] text = unquote(text) text = t...
from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_name"] text = text[:-1] if text[-1] ==...
<commit_before>from flask import Flask, request import requests from urllib import unquote app = Flask(__name__) @app.route("/") def meme(): domain = request.args["team_domain"] slackbot = request.args["slackbot"] text = request.args["text"] channel = request.args["channel_name"] text = text[:-1]...
ddd45afa0708682bb11d606e03e38aed111d7b9c
fireplace/cards/game/all.py
fireplace/cards/game/all.py
""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1)
""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) # Big Banana class TB_006: play = Buff(TARGET, "TB_006e") # Deviate Banana class TB_007: play = Buff(TARGET, "TB_007e") # Rotten Banana class TB_008: play = Hit(TARGET, 1)
Implement Big Banana, Deviate Banana, Rotten Banana
Implement Big Banana, Deviate Banana, Rotten Banana
Python
agpl-3.0
liujimj/fireplace,Ragowit/fireplace,butozerca/fireplace,butozerca/fireplace,smallnamespace/fireplace,amw2104/fireplace,smallnamespace/fireplace,beheh/fireplace,NightKev/fireplace,Meerkov/fireplace,Meerkov/fireplace,liujimj/fireplace,oftc-ftw/fireplace,Ragowit/fireplace,amw2104/fireplace,jleclanche/fireplace,oftc-ftw/fi...
""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) Implement Big Banana, Deviate Banana, Rotten Banana
""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) # Big Banana class TB_006: play = Buff(TARGET, "TB_006e") # Deviate Banana class TB_007: play = Buff(TARGET, "TB_007e") # Rotten Banana class TB_008: play = Hit(TARGET, 1)
<commit_before>""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) <commit_msg>Implement Big Banana, Deviate Banana, Rotten Banana<commit_after>
""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) # Big Banana class TB_006: play = Buff(TARGET, "TB_006e") # Deviate Banana class TB_007: play = Buff(TARGET, "TB_007e") # Rotten Banana class TB_008: play = Hit(TARGET, 1)
""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) Implement Big Banana, Deviate Banana, Rotten Banana""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) # Big Banan...
<commit_before>""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ManaThisTurn(CONTROLLER, 1) <commit_msg>Implement Big Banana, Deviate Banana, Rotten Banana<commit_after>""" GAME set and other special cards """ from ..utils import * # The Coin class GAME_005: play = ...
b0bde22e3ff0d2df2773f41aeaf8eb0ba6d0fa3f
tools/getapifield.py
tools/getapifield.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 # # https://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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Allow a default value to be specified when fetching a field value
Allow a default value to be specified when fetching a field value
Python
apache-2.0
jskeet/gcloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet
# 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 # # https://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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# 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 # # https://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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
f51915a6c373de39785d8273b2a9f6e11ff67b9e
test_dimuon.py
test_dimuon.py
from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0
from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0 def test_one_particle(): particles = [None] pairs = find_pairs(particles) assert len(pairs) ...
Test for no pairs from one particle
Test for no pairs from one particle
Python
mit
benwaugh/dimuon
from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0 Test for no pairs from one particle
from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0 def test_one_particle(): particles = [None] pairs = find_pairs(particles) assert len(pairs) ...
<commit_before>from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0 <commit_msg>Test for no pairs from one particle<commit_after>
from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0 def test_one_particle(): particles = [None] pairs = find_pairs(particles) assert len(pairs) ...
from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0 Test for no pairs from one particlefrom dimuon import find_pairs def test_find_pairs(): particle...
<commit_before>from dimuon import find_pairs def test_find_pairs(): particles = None pairs = find_pairs(particles) def test_no_particles(): particles = [] pairs = find_pairs(particles) assert len(pairs) == 0 <commit_msg>Test for no pairs from one particle<commit_after>from dimuon import find_p...