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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b74c56b3999800917946378f20288407347710e6 | social/backends/gae.py | social/backends/gae.py | """
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
name = 'googl... | """
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
name = 'googl... | Rename to be consistent with backend name | Rename to be consistent with backend name
| Python | bsd-3-clause | ononeor12/python-social-auth,barseghyanartur/python-social-auth,tutumcloud/python-social-auth,webjunkie/python-social-auth,cmichal/python-social-auth,henocdz/python-social-auth,mchdks/python-social-auth,falcon1kr/python-social-auth,cmichal/python-social-auth,contracode/python-social-auth,SeanHayes/python-social-auth,Vi... | """
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
name = 'googl... | """
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
name = 'googl... | <commit_before>"""
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
... | """
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
name = 'googl... | """
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
name = 'googl... | <commit_before>"""
Google App Engine support using User API
"""
from __future__ import absolute_import
from google.appengine.api import users
from social.backends.base import BaseAuth
from social.exceptions import AuthException
class GoogleAppEngineAuth(BaseAuth):
"""GoogleAppengine authentication backend"""
... |
b5fe965315920cc10664b3e0ba52bc50bf717374 | sites/scrapy.org/site/urls.py | sites/scrapy.org/site/urls.py | from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download.urls")),
(... | from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download.urls")),
(... | Add link url to access position inc/dec views | Add link url to access position inc/dec views
--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%409
| Python | bsd-3-clause | zjuwangg/scrapy,famorted/scrapy,pranjalpatil/scrapy,yusofm/scrapy,Geeglee/scrapy,foromer4/scrapy,CodeJuan/scrapy,rahulsharma1991/scrapy,jeffreyjinfeng/scrapy,dhenyjarasandy/scrapy,emschorsch/scrapy,lacrazyboy/scrapy,webmakin/scrapy,cleydson/scrapy,Preetwinder/scrapy,olorz/scrapy,cyrixhero/scrapy,pfctdayelise/scrapy,far... | from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download.urls")),
(... | from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download.urls")),
(... | <commit_before>from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download... | from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download.urls")),
(... | from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download.urls")),
(... | <commit_before>from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
urlpatterns = patterns('',
(r"^$", direct_to_template, { "template": "home.html" }),
(r"^article/", include("article.urls")),
(r"^download/", include("download... |
b78c457d52702beb5067eb7c3067cb69af5e935d | itunes/exceptions.py | itunes/exceptions.py | """
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
Represents an e... | """
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
Represents an e... | Add custom exception for track-related errors | Add custom exception for track-related errors
The new exception type (`TrackError`) will be used when a track cannot
be played or found.
| Python | mit | adanoff/iTunesTUI | """
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
Represents an e... | """
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
Represents an e... | <commit_before>"""
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
... | """
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
Represents an e... | """
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
Represents an e... | <commit_before>"""
exceptions.py
Copyright © 2015 Alex Danoff. All Rights Reserved.
2015-08-02
This file defines custom exceptions for the iTunes funcitonality.
"""
class ITunesError(Exception):
"""
Base exception class for iTunes interface.
"""
pass
class AppleScriptError(ITunesError):
"""
... |
b339c25068e849dbbf769f22893125b15325eb66 | figgypy/utils.py | figgypy/utils.py | import os
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to search for
default (optional(str)): default to return
"""
if var in os.environ:
return os.environ[var]
return default
| # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from future.utils import bytes_to_native_str as n
from base64 import b64encode
import os
import boto3
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to searc... | Add new helper function to encrypt for KMS | Add new helper function to encrypt for KMS
| Python | mit | theherk/figgypy | import os
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to search for
default (optional(str)): default to return
"""
if var in os.environ:
return os.environ[var]
return default
Add new helper fu... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from future.utils import bytes_to_native_str as n
from base64 import b64encode
import os
import boto3
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to searc... | <commit_before>import os
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to search for
default (optional(str)): default to return
"""
if var in os.environ:
return os.environ[var]
return default
<c... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from future.utils import bytes_to_native_str as n
from base64 import b64encode
import os
import boto3
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to searc... | import os
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to search for
default (optional(str)): default to return
"""
if var in os.environ:
return os.environ[var]
return default
Add new helper fu... | <commit_before>import os
def env_or_default(var, default=None):
"""Get environment variable or provide default.
Args:
var (str): environment variable to search for
default (optional(str)): default to return
"""
if var in os.environ:
return os.environ[var]
return default
<c... |
0f4ca12e524be7cbd82ac79e81a62015b47ca6ef | openfisca_core/tests/formula_helpers.py | openfisca_core/tests/formula_helpers.py | # -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
thresholds = [5]... | # -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
thresholds = [5]... | Add more tricky case test for apply_threshold | Add more tricky case test for apply_threshold
| Python | agpl-3.0 | benjello/openfisca-core,openfisca/openfisca-core,benjello/openfisca-core,sgmap/openfisca-core,openfisca/openfisca-core | # -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
thresholds = [5]... | # -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
thresholds = [5]... | <commit_before># -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
t... | # -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
thresholds = [5]... | # -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
thresholds = [5]... | <commit_before># -*- coding: utf-8 -*-
import numpy
from nose.tools import raises
from openfisca_core.formula_helpers import apply_threshold as apply_threshold
from openfisca_core.tools import assert_near
@raises(AssertionError)
def test_apply_threshold_with_too_many_thresholds():
input = numpy.array([10])
t... |
342e6134a63c5b575ae8e4348a54f61350bca2da | parser/crimeparser/pipelinesEnricher.py | parser/crimeparser/pipelinesEnricher.py | from geopy import Nominatim
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Nominatim(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, spider):
... | from geopy import Nominatim, Photon
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Photon(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, spider):
... | Use Phonon instead of Nominatim for geo coding | Use Phonon instead of Nominatim for geo coding
Phonon is more fault tolerant to spelling mistakes.
| Python | mit | aberklotz/crimereport,aberklotz/crimereport,aberklotz/crimereport | from geopy import Nominatim
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Nominatim(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, spider):
... | from geopy import Nominatim, Photon
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Photon(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, spider):
... | <commit_before>from geopy import Nominatim
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Nominatim(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, s... | from geopy import Nominatim, Photon
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Photon(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, spider):
... | from geopy import Nominatim
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Nominatim(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, spider):
... | <commit_before>from geopy import Nominatim
from geopy.extra.rate_limiter import RateLimiter
class GeoCodePipeline(object):
def open_spider(self, spider):
geolocator = Nominatim(timeout=5)
self.__geocodeFunc = RateLimiter(geolocator.geocode, min_delay_seconds=2)
def process_item(self, item, s... |
5398a864449db0a1d6ec106ddb839fff3b6afcda | mopidy_frontpanel/frontend.py | mopidy_frontpanel/frontend.py | from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
super(Fron... | from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
super(Fron... | Handle playback changes in FrontPanel | Handle playback changes in FrontPanel
| Python | apache-2.0 | nick-bulleid/mopidy-frontpanel | from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
super(Fron... | from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
super(Fron... | <commit_before>from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
... | from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
super(Fron... | from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
super(Fron... | <commit_before>from __future__ import unicode_literals
import logging
from mopidy.core import CoreListener
import pykka
import .menu import BrowseMenu
import .painter import Painter
logger = logging.getLogger(__name__)
class FrontPanel(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
... |
8d52686ddf40266b0022b77816cf3899c726a834 | notifications/upcoming_match.py | notifications/upcoming_match.py | import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
self._event_feed =... | import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
self._event_feed =... | Add event key to upcoming match notification | Add event key to upcoming match notification | Python | mit | fangeugene/the-blue-alliance,nwalters512/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,the-blue-alliance/the-blue-alliance,fangeugene/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,synth3... | import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
self._event_feed =... | import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
self._event_feed =... | <commit_before>import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
sel... | import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
self._event_feed =... | import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
self._event_feed =... | <commit_before>import calendar
import datetime
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class UpcomingMatchNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
sel... |
77038432486071c9459c5ce43492905e158b7713 | Topo/LoopTopo.py | Topo/LoopTopo.py | '''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 = self.addHost(... | '''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 = self.addHost(... | Rename the name of topo. | Rename the name of topo.
| Python | mit | ray6/sdn,ray6/sdn,ray6/sdn | '''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 = self.addHost(... | '''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 = self.addHost(... | <commit_before>'''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 ... | '''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 = self.addHost(... | '''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 = self.addHost(... | <commit_before>'''
SDN project testing topo
s1
/ \
s2--s3
| |
host.. host...
'''
from mininet.topo import Topo
class LoopTopo( Topo ):
def __init__( self , n=2 ):
# Initialize topology
Topo.__init__( self)
# Add Host
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 ... |
35849633c3ce751445ffca92410001513d445ce9 | code2html/cli.py | code2html/cli.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# TODO: Check whether Vim is available
# TODO: Arguments validation
# TODO: Test the inupt/o... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# Check whether Vim is available
p1 = Popen(["vim", "--version"], stdout=PIPE)
p2 = Popen(["gr... | Check whether Vim is available | Check whether Vim is available
| Python | mit | kfei/code2html | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# TODO: Check whether Vim is available
# TODO: Arguments validation
# TODO: Test the inupt/o... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# Check whether Vim is available
p1 = Popen(["vim", "--version"], stdout=PIPE)
p2 = Popen(["gr... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# TODO: Check whether Vim is available
# TODO: Arguments validation
# TODO: T... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# Check whether Vim is available
p1 = Popen(["vim", "--version"], stdout=PIPE)
p2 = Popen(["gr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# TODO: Check whether Vim is available
# TODO: Arguments validation
# TODO: Test the inupt/o... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from args import get_args
from subprocess import Popen, PIPE
if __name__ == '__main__':
# Get the arguments passed by user
args = get_args()
# TODO: Check whether Vim is available
# TODO: Arguments validation
# TODO: T... |
76b916c6f53d97b4658c16a85f10302e75794bcd | kitsune/upload/storage.py | kitsune/upload/storage.py | import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileStorage(DjangoStor... | import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileStorage(DjangoStor... | Update RenameFileStorage method to be 1.11 compatible | Update RenameFileStorage method to be 1.11 compatible
| Python | bsd-3-clause | mozilla/kitsune,anushbmx/kitsune,mozilla/kitsune,anushbmx/kitsune,anushbmx/kitsune,mozilla/kitsune,mozilla/kitsune,anushbmx/kitsune | import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileStorage(DjangoStor... | import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileStorage(DjangoStor... | <commit_before>import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileSto... | import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileStorage(DjangoStor... | import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileStorage(DjangoStor... | <commit_before>import hashlib
import itertools
import os
import time
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage
class RenameFileSto... |
f0d16962b2b07e602cff15391cc44bfd199a4d43 | pywikibot/families/wikivoyage_family.py | pywikibot/families/wikivoyage_family.py | # -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
class... | # -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
class... | Add hi.wikivoyage to wikivoyage family | Add hi.wikivoyage to wikivoyage family
Bug: T173013
Change-Id: I82e708c0b55df2e48c83838a4db38e43bf0b5085
| Python | mit | PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core,magul/pywikibot-core,wikimedia/pywikibot-core,magul/pywikibot-core | # -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
class... | # -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
class... | <commit_before># -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ =... | # -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
class... | # -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
class... | <commit_before># -*- coding: utf-8 -*-
"""Family module for Wikivoyage."""
#
# (C) Pywikibot team, 2012-2017
#
# Distributed under the terms of the MIT license.
#
# The new wikivoyage family that is hosted at wikimedia
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ =... |
669325d6ca93f81c4635d7d3d57120d8e23e5251 | organizations/backends/forms.py | organizations/backends/forms.py | from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_confirm = forms.... | from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_confirm = forms.... | Hide all unnecessary user info | Hide all unnecessary user info
Excludes all User fields save for useranme, first/last name, email, and
password. Also clears the username of its default data.
| Python | bsd-2-clause | aptivate/django-organizations,arteria/django-ar-organizations,GauthamGoli/django-organizations,aptivate/django-organizations,DESHRAJ/django-organizations,DESHRAJ/django-organizations,GauthamGoli/django-organizations,st8st8/django-organizations,bennylope/django-organizations,arteria/django-ar-organizations,aptivate/djan... | from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_confirm = forms.... | from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_confirm = forms.... | <commit_before>from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_c... | from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_confirm = forms.... | from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_confirm = forms.... | <commit_before>from django import forms
from django.contrib.auth.models import User
class InvitationRegistrationForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
password = forms.CharField(max_length=30, widget=forms.PasswordInput)
password_c... |
16fdad8ce40a539d732c8def4898aae0f2d58cd0 | foxybot/registrar.py | foxybot/registrar.py |
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandRegistrar._instanc... |
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandRegistrar._instanc... | Add `commands` property to `CommandManager` to allow retrieving the command table | Add `commands` property to `CommandManager` to allow retrieving the command table
| Python | bsd-2-clause | 6180/foxybot |
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandRegistrar._instanc... |
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandRegistrar._instanc... | <commit_before>
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandReg... |
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandRegistrar._instanc... |
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandRegistrar._instanc... | <commit_before>
class CommandRegistrar():
"""A singleton to manage the command table and command execution"""
_instance = None
def __init__(self):
self.command_table = {}
@staticmethod
def instance():
"""Get the singleton, create an instance if needed"""
if not CommandReg... |
5bb0259a747651290f91c0384ca93492a423c82d | IPython/utils/docs.py | IPython/utils/docs.py | # encoding: utf-8
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
| import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
| Remove outdated header as suggested | Remove outdated header as suggested
Co-authored-by: Matthias Bussonnier <[email protected]> | Python | bsd-3-clause | ipython/ipython,ipython/ipython | # encoding: utf-8
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
Remove outdated header as suggested
Co-authored-by: Matthias Bussonnier <bc6ce7c050ee90e1f3b70c16cec57d4205e63b6c... | import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
| <commit_before># encoding: utf-8
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
<commit_msg>Remove outdated header as suggested
Co-authored-by: Matthias Bussonnier <bc6ce7c050ee9... | import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
| # encoding: utf-8
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
Remove outdated header as suggested
Co-authored-by: Matthias Bussonnier <bc6ce7c050ee90e1f3b70c16cec57d4205e63b6c... | <commit_before># encoding: utf-8
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
<commit_msg>Remove outdated header as suggested
Co-authored-by: Matthias Bussonnier <bc6ce7c050ee9... |
bc50a924c50fb22a0ac03b3b696d6fba4efcd120 | src/main.py | src/main.py | #!/usr/bin/env python2
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is not None:
... | #!/usr/bin/env python2
import math
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is no... | Change fov scaling to "Hor+". | Change fov scaling to "Hor+".
| Python | apache-2.0 | Moguri/sigurd | #!/usr/bin/env python2
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is not None:
... | #!/usr/bin/env python2
import math
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is no... | <commit_before>#!/usr/bin/env python2
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is... | #!/usr/bin/env python2
import math
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is no... | #!/usr/bin/env python2
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is not None:
... | <commit_before>#!/usr/bin/env python2
import sys
from direct.showbase.ShowBase import ShowBase
import panda3d.core as p3d
import ecs
from player import PlayerController
class NodePathComponent(ecs.Component):
__slots__ = [
"nodepath",
]
def __init__(self, modelpath=None):
if modelpath is... |
6d2d915d7bec4e4a8e733a073ec3dc79a1d06812 | src/stop.py | src/stop.py | import os
import json
from flask import Flask
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digitransit_test():
return json.d... | import os
import json
from flask import Flask
from flask import make_response
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digit... | Set response content type of a json response to application/json | Set response content type of a json response to application/json
| Python | mit | STOP2/stop2.0-backend,STOP2/stop2.0-backend | import os
import json
from flask import Flask
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digitransit_test():
return json.d... | import os
import json
from flask import Flask
from flask import make_response
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digit... | <commit_before>import os
import json
from flask import Flask
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digitransit_test():
... | import os
import json
from flask import Flask
from flask import make_response
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digit... | import os
import json
from flask import Flask
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digitransit_test():
return json.d... | <commit_before>import os
import json
from flask import Flask
from flask import request
from flask import json
import services
app = Flask(__name__)
digitransitAPIService = services.DigitransitAPIService()
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test')
def digitransit_test():
... |
6327703fa1a0a7463facc9574bf74ef9dace7d15 | dthm4kaiako/config/__init__.py | dthm4kaiako/config/__init__.py | """Configuration for Django system."""
__version__ = "0.8.1"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.8.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| Increment version number to 0.8.2 | Increment version number to 0.8.2
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Configuration for Django system."""
__version__ = "0.8.1"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.8.2 | """Configuration for Django system."""
__version__ = "0.8.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| <commit_before>"""Configuration for Django system."""
__version__ = "0.8.1"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.8.2<commit_after> | """Configuration for Django system."""
__version__ = "0.8.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.8.1"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.8.2"""Configuration for Django system."""
__version__ = "0.8.2"
__version_info__ ... | <commit_before>"""Configuration for Django system."""
__version__ = "0.8.1"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.8.2<commit_after>"""Configuration for Django system."""... |
f40b42890fef78483825525dfbfdc226a50dc9c1 | scripts/master/factory/dart/channels.py | scripts/master/factory/dart/channels.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | Update stable channel builders to the 1.2 branch | Update stable channel builders to the 1.2 branch
Review URL: https://codereview.chromium.org/179723002
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@253135 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... |
7cfdf48bd04ba45a962901e1778ba05bab4699e6 | readthedocs/core/migrations/0005_migrate-old-passwords.py | readthedocs/core/migrations/0005_migrate-old-passwords.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
'sha1$',
# RTD's production database does... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
from django.contrib.auth.hashers import make_password
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
... | Migrate old passwords without "set_unusable_password" | Migrate old passwords without "set_unusable_password"
| Python | mit | rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
'sha1$',
# RTD's production database does... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
from django.contrib.auth.hashers import make_password
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
'sha1$',
# RTD's productio... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
from django.contrib.auth.hashers import make_password
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
'sha1$',
# RTD's production database does... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 17:28
from __future__ import unicode_literals
from django.db import migrations
def forwards_func(apps, schema_editor):
User = apps.get_model('auth', 'User')
old_password_patterns = (
'sha1$',
# RTD's productio... |
673f4ad22ccd14f9feb68cfc3afc1f34580c0a51 | test/teeminus10_helpers_test.py | test/teeminus10_helpers_test.py | from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_time = datetime... | from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_time = datetime... | Remove sun setup for now | Remove sun setup for now
| Python | mit | jpgneves/t-10_server,jpgneves/t-10_server | from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_time = datetime... | from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_time = datetime... | <commit_before>from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_... | from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_time = datetime... | from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_time = datetime... | <commit_before>from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_... |
848c3a8b754d7a359da94c211f58d16bdf34c804 | fabfile.py | fabfile.py | # -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = 'root'
env.host... | # -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = 'root'
env.host... | Add js tasks to fabric update | Add js tasks to fabric update
| Python | mit | komitywa/wysadzulice.pl,magul/wysadzulice.pl,magul/wysadzulice.pl,magul/wysadzulice.pl,komitywa/wysadzulice.pl,komitywa/wysadzulice.pl | # -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = 'root'
env.host... | # -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = 'root'
env.host... | <commit_before># -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = ... | # -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = 'root'
env.host... | # -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = 'root'
env.host... | <commit_before># -*- coding: utf-8 -*-
u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""
import contextlib
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run
env.user = ... |
db4ecaba64a4fbd9d432b461ca0df5b63dd11fb4 | marathon_acme/cli.py | marathon_acme/cli.py | import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage ACME certificates... | import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage ACME certificates... | Add --group option to CLI | Add --group option to CLI
| Python | mit | praekeltfoundation/certbot,praekeltfoundation/certbot | import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage ACME certificates... | import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage ACME certificates... | <commit_before>import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage AC... | import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage ACME certificates... | import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage ACME certificates... | <commit_before>import argparse
import sys
def main(raw_args=sys.argv[1:]):
"""
A tool to automatically request, renew and distribute Let's Encrypt
certificates for apps running on Marathon and served by marathon-lb.
"""
parser = argparse.ArgumentParser(
description='Automatically manage AC... |
51d7414e94981dc530d9f8be427ac9942ee263d7 | spacy/tests/regression/test_issue704.py | spacy/tests/regression/test_issue704.py | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I know you’ll go af... | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I know you’ll go af... | Make sure sents are a list | Make sure sents are a list
| Python | mit | aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,honnibal/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spa... | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I know you’ll go af... | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I know you’ll go af... | <commit_before># coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I kn... | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I know you’ll go af... | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I know you’ll go af... | <commit_before># coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models('en')
def test_issue704(EN):
"""Test that sentence boundaries are detected correctly."""
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I kn... |
316533b3d0864c3cf3dba7ae7a3a83e30a02f33a | scrape-10k.py | scrape-10k.py | import csv
import time
import requests
import lxml.html
top10k = {}
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descending order
'page': page_index,
}
... | import csv
import time
import collections
import requests
import lxml.html
top10k = collections.OrderedDict()
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descendin... | Maintain top 10k order when writing into file | Maintain top 10k order when writing into file
| Python | mit | Cyanogenoid/osu-modspecific-rank | import csv
import time
import requests
import lxml.html
top10k = {}
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descending order
'page': page_index,
}
... | import csv
import time
import collections
import requests
import lxml.html
top10k = collections.OrderedDict()
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descendin... | <commit_before>import csv
import time
import requests
import lxml.html
top10k = {}
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descending order
'page': pag... | import csv
import time
import collections
import requests
import lxml.html
top10k = collections.OrderedDict()
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descendin... | import csv
import time
import requests
import lxml.html
top10k = {}
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descending order
'page': page_index,
}
... | <commit_before>import csv
import time
import requests
import lxml.html
top10k = {}
for page_index in range(1, 201):
print('Requesting page {}'.format(page_index))
url = 'https://osu.ppy.sh/p/pp/'
payload = {
'm': 0, # osu! standard gamemode
'o': 1, # descending order
'page': pag... |
89b9bb45b17d457f6cf158330dfde6fe00e78cf4 | core/storage/statistics/models.py | core/storage/statistics/models.py | # coding: utf-8
#
# Copyright 2013 Google Inc. 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 ... | # coding: utf-8
#
# Copyright 2013 Google Inc. 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 ... | Fix omission in previous commit. | Fix omission in previous commit.
| Python | apache-2.0 | leandrotoledo/oppia,rackstar17/oppia,zgchizi/oppia-uc,nagyistoce/oppia,kennho/oppia,MAKOSCAFEE/oppia,raju249/oppia,hazmatzo/oppia,Atlas-Sailed-Co/oppia,Atlas-Sailed-Co/oppia,mit0110/oppia,brylie/oppia,nagyistoce/oppia,BenHenning/oppia,dippatel1994/oppia,VictoriaRoux/oppia,CMDann/oppia,kennho/oppia,cleophasmashiri/oppia... | # coding: utf-8
#
# Copyright 2013 Google Inc. 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 ... | # coding: utf-8
#
# Copyright 2013 Google Inc. 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># coding: utf-8
#
# Copyright 2013 Google Inc. 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... | # coding: utf-8
#
# Copyright 2013 Google Inc. 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 ... | # coding: utf-8
#
# Copyright 2013 Google Inc. 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># coding: utf-8
#
# Copyright 2013 Google Inc. 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... |
805f92a6aee1d9b9514818459809a5230fa7f7eb | svenv/blog/settings.py | svenv/blog/settings.py | BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 3,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissions... | BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 12,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermission... | Set page size to 12 | Set page size to 12
| Python | mit | svenvandescheur/svenv.nl-app,svenvandescheur/svenv.nl-app,svenvandescheur/svenv.nl-app,svenvandescheur/svenv.nl-app | BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 3,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissions... | BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 12,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermission... | <commit_before>BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 3,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoM... | BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 12,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermission... | BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 3,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissions... | <commit_before>BASE_URL = 'http://svenv.nl'
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.OrderingFilter',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 3,
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoM... |
6ea521e022a40a7abb7ed43b28907d7085bbf423 | muzicast/web/main.py | muzicast/web/main.py | from flask import Module, render_template, url_for, redirect, session, escape, request
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix this to use statistics
return [Track.get(... | from flask import Module, render_template, url_for, redirect, session, escape, request
from sqlobject.main import SQLObjectNotFound
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix... | Return 0 tracks in case of error | Return 0 tracks in case of error
| Python | mit | nikhilm/muzicast,nikhilm/muzicast | from flask import Module, render_template, url_for, redirect, session, escape, request
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix this to use statistics
return [Track.get(... | from flask import Module, render_template, url_for, redirect, session, escape, request
from sqlobject.main import SQLObjectNotFound
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix... | <commit_before>from flask import Module, render_template, url_for, redirect, session, escape, request
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix this to use statistics
ret... | from flask import Module, render_template, url_for, redirect, session, escape, request
from sqlobject.main import SQLObjectNotFound
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix... | from flask import Module, render_template, url_for, redirect, session, escape, request
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix this to use statistics
return [Track.get(... | <commit_before>from flask import Module, render_template, url_for, redirect, session, escape, request
from muzicast.web.util import is_first_run
from muzicast.meta import Track
main = Module(__name__)
def top_tracks(n):
"""
Returns the top n tracks
"""
#TODO(nikhil) fix this to use statistics
ret... |
f9be8cce93134dc4e5592591beb605c0a75c813c | chunks/redsolution_setup/make.py | chunks/redsolution_setup/make.py | from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
cms_set... | from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
cms_set... | Rewrite robots.txt file in setup | Rewrite robots.txt file in setup
| Python | bsd-3-clause | redsolution/django-chunks,redsolution/django-chunks | from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
cms_set... | from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
cms_set... | <commit_before>from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
... | from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
cms_set... | from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
cms_set... | <commit_before>from redsolutioncms.make import BaseMake
from redsolutioncms.models import CMSSettings
class Make(BaseMake):
def make(self):
super(Make, self).make()
cms_settings = CMSSettings.objects.get_settings()
cms_settings.render_to('settings.py', 'chunks/redsolutioncms/settings.pyt')
... |
d68935dfb34f7c5fc463f94e49f0c060717b17b8 | cmsplugin_contact_plus/checks.py | cmsplugin_contact_plus/checks.py | # -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',
hi... | # -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',
hi... | Comment out warning for renamed field | Comment out warning for renamed field
| Python | bsd-3-clause | arteria/cmsplugin-contact-plus,arteria/cmsplugin-contact-plus,worthwhile/cmsplugin-remote-form,worthwhile/cmsplugin-remote-form | # -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',
hi... | # -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',
hi... | <commit_before># -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',... | # -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',
hi... | # -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',
hi... | <commit_before># -*- coding: utf-8 -*-
from django.core.checks import Warning, register
def warn_1_3_changes(app_configs, **kwargs):
return [
Warning(
'cmsplugin-contact-plus >= 1.3 has renamed the "input" field. Do not forget to migrate your '
'database and update your templates',... |
f0f66aa917d9ec85cfbe2a0460b2d4b4d5ffe0eb | middleware/hat_manager.py | middleware/hat_manager.py | class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.sense.get_press... | class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.sense.get_press... | Add a method to print a message on the sense hat | Add a method to print a message on the sense hat
| Python | mit | ylerjen/pir-hat,ylerjen/pir-hat,ylerjen/pir-hat | class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.sense.get_press... | class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.sense.get_press... | <commit_before>class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.... | class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.sense.get_press... | class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.sense.get_press... | <commit_before>class HatManager(object):
def __init__(self, sense):
self.sense = sense
self._pressure = self.sense.get_pressure()
self._temperature = self.sense.get_temperature()
self._humidity = self.sense.get_humidity()
def refresh_state(self):
self._pressure = self.... |
5b4208712d5f5f64774e033d0e831863822cb90f | libraries/log.py | libraries/log.py | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronosDebug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
def mailCronos... | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronos_debug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
def mail_cron... | Rename libraries, I'll prefer underscores instead of stuck names Prefer unicodes in CronosError | Rename libraries, I'll prefer underscores instead of stuck names
Prefer unicodes in CronosError
| Python | agpl-3.0 | LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronosDebug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
def mailCronos... | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronos_debug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
def mail_cron... | <commit_before># -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronosDebug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
... | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronos_debug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
def mail_cron... | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronosDebug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
def mailCronos... | <commit_before># -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.mail import send_mail
def cronosDebug(msg, logfile):
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(message)s', filename = settings.LOGDIR + logfile, filemode = 'a+')
logging.debug(msg)
... |
60173acbecf1239872411b2ca0dd9eb75b543843 | tests/sentry/web/frontend/test_organization_stats.py | tests/sentry/web/frontend/test_organization_stats.py | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path = reverse('sent... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path = reverse('sent... | Correct permission tests for organization stats | Correct permission tests for organization stats
| Python | bsd-3-clause | looker/sentry,alexm92/sentry,gg7/sentry,zenefits/sentry,vperron/sentry,ifduyue/sentry,imankulov/sentry,JamesMura/sentry,daevaorn/sentry,mitsuhiko/sentry,JackDanger/sentry,ewdurbin/sentry,BuildingLink/sentry,daevaorn/sentry,kevinlondon/sentry,songyi199111/sentry,TedaLIEz/sentry,kevinlondon/sentry,wujuguang/sentry,mitsuh... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path = reverse('sent... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path = reverse('sent... | <commit_before>from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path ... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path = reverse('sent... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path = reverse('sent... | <commit_before>from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import TestCase, PermissionTestCase
class OrganizationStatsPermissionTest(PermissionTestCase):
def setUp(self):
super(OrganizationStatsPermissionTest, self).setUp()
self.path ... |
54e5ee0cb6df1f47a1a6edd114c65ad62fd0c517 | node/floor_divide.py | node/floor_divide.py | #!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
@Node.test... | #!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
@Node.test... | Add a group chunk, chunks a list into N groups | Add a group chunk, chunks a list into N groups
| Python | mit | muddyfish/PYKE,muddyfish/PYKE | #!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
@Node.test... | #!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
@Node.test... | <commit_before>#!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
... | #!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
@Node.test... | #!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
@Node.test... | <commit_before>#!/usr/bin/env python
from nodes import Node
class FloorDiv(Node):
char = "f"
args = 2
results = 1
@Node.test_func([3,2], [1])
@Node.test_func([6,-3], [-2])
def func(self, a:Node.number,b:Node.number):
"""a/b. Rounds down, returns an int."""
return a//b
... |
2477bc7e4cb39c8fc34efec75143f42b6fee7dda | bot.py | bot.py | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | Add handler for 433 Nickname already in use | Add handler for 433 Nickname already in use
| Python | mit | wolfy1339/Python-IRC-Bot | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | <commit_before>import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.f... | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.freenode.net",
... | <commit_before>import zirc
import ssl
import socket
import utils
import commands
debug = False
class Bot(zirc.Client):
def __init__(self):
self.connection = zirc.Socket(family=socket.AF_INET6,
wrapper=ssl.wrap_socket)
self.config = zirc.IRCConfig(host="chat.f... |
80737e5de2ca3f0f039c9d4fbbf3df4ac8b59193 | run.py | run.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
# Launch web server
p = subprocess.Popen(['/usr/bin/python2', config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
with open... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
import sys
# Launch web server
p = subprocess.Popen([sys.executable, config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
wi... | Use sys.executable instead of harcoded python path | Use sys.executable instead of harcoded python path
Fixes issue when running in a virtualenv and in non-standard python
installations.
| Python | mit | Astalaseven/twitter-rss,Astalaseven/twitter-rss | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
# Launch web server
p = subprocess.Popen(['/usr/bin/python2', config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
with open... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
import sys
# Launch web server
p = subprocess.Popen([sys.executable, config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
wi... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
# Launch web server
p = subprocess.Popen(['/usr/bin/python2', config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
import sys
# Launch web server
p = subprocess.Popen([sys.executable, config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
wi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
# Launch web server
p = subprocess.Popen(['/usr/bin/python2', config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
with open... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import twitter_rss
import time
import subprocess
import config
# Launch web server
p = subprocess.Popen(['/usr/bin/python2', config.INSTALL_DIR + 'server.py'])
# Update the feeds
try:
while 1:
print 'Updating ALL THE FEEDS!'
try:
... |
d7d1e2937c9f09189aad713db1f5ee5d2d6a64bd | run.py | run.py | # -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(subplots=False, ... | # -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(subplots=False, ... | Make K transport bar graph | Make K transport bar graph
| Python | mit | UNH-CORE/RM2-tow-tank | # -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(subplots=False, ... | # -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(subplots=False, ... | <commit_before># -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(s... | # -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(subplots=False, ... | # -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(subplots=False, ... | <commit_before># -*- coding: utf-8 -*-
"""
This script generates all the relevant figures from the experiment.
"""
from Modules.processing import *
from Modules.plotting import *
set_sns()
save = True
savetype = ".eps"
show = True
def main():
plot_perf_curves(save=save, savetype=savetype)
plot_perf_curves(s... |
5f14b7217f81b6d7653f94065d1a3305204cf83b | ddcz/templatetags/creations.py | ddcz/templatetags/creations.py | from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': RATING_DESCRIPTIONS[r... | from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': "Hodnocení: %s" % RAT... | Add explicit rating word to rating alt | Add explicit rating word to rating alt
| Python | mit | dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard | from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': RATING_DESCRIPTIONS[r... | from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': "Hodnocení: %s" % RAT... | <commit_before>from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': RATING... | from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': "Hodnocení: %s" % RAT... | from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': RATING_DESCRIPTIONS[r... | <commit_before>from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
from ..creations import RATING_DESCRIPTIONS
register = template.Library()
@register.inclusion_tag('creations/rating.html')
def creation_rating(rating, skin):
return {
'rating_description': RATING... |
6b59d17aa06741f40bb99dde6c10950de3a142e6 | utils/load.py | utils/load.py | #!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
host = 'http://data.cityofnewyork.us/resource/xfyi-uyt5.json'
for i in range(0, 7000, 1000):
query = 'permit_type_description=MOBILE+FOOD+UNIT&$offset=%d' % i
request = host + '?' +... | #!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
request = 'http://data.cityofnewyork.us/resource/akqf-qv4n.json'
for i in range(0, 24000, 1000):
query = '?$offset=%d' % i
data = urllib2.urlopen(request + query)
results =... | Change cart structure and url endpoint for getting cart data | Change cart structure and url endpoint for getting cart data
| Python | bsd-3-clause | stuycs-softdev-fall-2013/proj3-7-cartwheels,stuycs-softdev-fall-2013/proj3-7-cartwheels | #!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
host = 'http://data.cityofnewyork.us/resource/xfyi-uyt5.json'
for i in range(0, 7000, 1000):
query = 'permit_type_description=MOBILE+FOOD+UNIT&$offset=%d' % i
request = host + '?' +... | #!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
request = 'http://data.cityofnewyork.us/resource/akqf-qv4n.json'
for i in range(0, 24000, 1000):
query = '?$offset=%d' % i
data = urllib2.urlopen(request + query)
results =... | <commit_before>#!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
host = 'http://data.cityofnewyork.us/resource/xfyi-uyt5.json'
for i in range(0, 7000, 1000):
query = 'permit_type_description=MOBILE+FOOD+UNIT&$offset=%d' % i
request... | #!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
request = 'http://data.cityofnewyork.us/resource/akqf-qv4n.json'
for i in range(0, 24000, 1000):
query = '?$offset=%d' % i
data = urllib2.urlopen(request + query)
results =... | #!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
host = 'http://data.cityofnewyork.us/resource/xfyi-uyt5.json'
for i in range(0, 7000, 1000):
query = 'permit_type_description=MOBILE+FOOD+UNIT&$offset=%d' % i
request = host + '?' +... | <commit_before>#!/usr/local/bin/python
from website import carts
import urllib2
import json
def load():
carts.remove_all()
host = 'http://data.cityofnewyork.us/resource/xfyi-uyt5.json'
for i in range(0, 7000, 1000):
query = 'permit_type_description=MOBILE+FOOD+UNIT&$offset=%d' % i
request... |
de1c2842d7f07025f23e9b12efc7dd52e4d0efbf | device_notifications/tests/model_tests.py | device_notifications/tests/model_tests.py | from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
@patch.object(settings, 'get_devi... | from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
class AbstractBaseDeviceTests(Tes... | Patch get_device_model in the setUp and tearDown methods so that we don't send the mock object to each test method. | Patch get_device_model in the setUp and tearDown methods so that we don't send the mock object to each test method. | Python | bsd-3-clause | roverdotcom/django-device-notifications | from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
@patch.object(settings, 'get_devi... | from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
class AbstractBaseDeviceTests(Tes... | <commit_before>from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
@patch.object(sett... | from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
class AbstractBaseDeviceTests(Tes... | from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
@patch.object(settings, 'get_devi... | <commit_before>from mock import patch
from django.test.testcases import TestCase
from device_notifications import settings
from device_notifications.models import AbstractBaseDevice
from device_notifications.models import InvalidDeviceType
class ConcreteTestDevice(AbstractBaseDevice):
pass
@patch.object(sett... |
b6dcb4029d3bf4b402a6874c942c9e4a105f2a62 | tracker_project/tracker_project/urls.py | tracker_project/tracker_project/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.core.urlresolvers import reverse_lazy
urlpatterns = patterns(
'',
url(r'^$', 'tracker_project.views.home', name='home'),
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contri... | Fix login and logout URLs | Fix login and logout URLs
| Python | mit | abarto/tracker_project,abarto/tracker_project,abarto/tracker_project,vivek8943/tracker_project,vivek8943/tracker_project,vivek8943/tracker_project | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.core.urlresolvers import reverse_lazy
urlpatterns = patterns(
'',
url(r'^$', 'tracker_project.views.home', name='home'),
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contri... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, ... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.core.urlresolvers import reverse_lazy
urlpatterns = patterns(
'',
url(r'^$', 'tracker_project.views.home', name='home'),
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contri... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, ... |
02140561a29a2b7fe50f7bf2402da566e60be641 | bluebottle/organizations/serializers.py | bluebottle/organizations/serializers.py | from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_line1', 'address_l... | from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_line1', 'address_l... | Make the name of an organization required | Make the name of an organization required
| Python | bsd-3-clause | jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle | from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_line1', 'address_l... | from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_line1', 'address_l... | <commit_before>from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_lin... | from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_line1', 'address_l... | from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_line1', 'address_l... | <commit_before>from rest_framework import serializers
from bluebottle.organizations.models import Organization
from bluebottle.utils.serializers import URLField
class OrganizationSerializer(serializers.ModelSerializer):
class Meta:
model = Organization
fields = ('id', 'name', 'slug', 'address_lin... |
33f2075396ded90e3cf17033985f29d262965500 | dariah_static_data/management/commands/import_tadirah_vcc.py | dariah_static_data/management/commands/import_tadirah_vcc.py | from dariah_static_data.models import VCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('description', 'des... | from dariah_static_data.models import TADIRAHVCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('description... | Fix incorrect import after refactor of dariah_static_data models. | Fix incorrect import after refactor of dariah_static_data models.
| Python | apache-2.0 | DANS-KNAW/dariah-contribute,DANS-KNAW/dariah-contribute | from dariah_static_data.models import VCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('description', 'des... | from dariah_static_data.models import TADIRAHVCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('description... | <commit_before>from dariah_static_data.models import VCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('des... | from dariah_static_data.models import TADIRAHVCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('description... | from dariah_static_data.models import VCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('description', 'des... | <commit_before>from dariah_static_data.models import VCC
from dariah_static_data.management.commands._private_helper import Command as SuperCommand
class Command(SuperCommand):
filename = 'tadirah_vcc.csv'
fieldnames = ['uri', 'name', 'description']
mapping = [('name', 'name', 1), ('uri', 'uri', 1), ('des... |
add508b780d16fd2da2fd0639304935b762c001f | tests/cupy_tests/binary_tests/test_packing.py | tests/cupy_tests/binary_tests/test_packing.py | import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
| import numpy
import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
@testing.for_int_dtypes()
@testing.numpy_cupy_array_equal()
def check_packbits(self, data, xp, dtype):
a = xp.array(data, dtype=dtype)
return xp.p... | Add tests for packbits and unpackbits | Add tests for packbits and unpackbits
| Python | mit | okuta/chainer,niboshi/chainer,ktnyt/chainer,chainer/chainer,ktnyt/chainer,jnishi/chainer,ysekky/chainer,pfnet/chainer,wkentaro/chainer,keisuke-umezawa/chainer,ktnyt/chainer,chainer/chainer,hvy/chainer,jnishi/chainer,anaruse/chainer,wkentaro/chainer,keisuke-umezawa/chainer,ronekko/chainer,niboshi/chainer,chainer/chainer... | import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
Add tests for packbits and unpackbits | import numpy
import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
@testing.for_int_dtypes()
@testing.numpy_cupy_array_equal()
def check_packbits(self, data, xp, dtype):
a = xp.array(data, dtype=dtype)
return xp.p... | <commit_before>import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
<commit_msg>Add tests for packbits and unpackbits<commit_after> | import numpy
import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
@testing.for_int_dtypes()
@testing.numpy_cupy_array_equal()
def check_packbits(self, data, xp, dtype):
a = xp.array(data, dtype=dtype)
return xp.p... | import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
Add tests for packbits and unpackbitsimport numpy
import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
@... | <commit_before>import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
_multiprocess_can_split_ = True
<commit_msg>Add tests for packbits and unpackbits<commit_after>import numpy
import unittest
from cupy import testing
@testing.gpu
class TestPacking(unittest.TestCase):
... |
09ef3ba394faf9edc941e30e5c3f86bffa96d645 | plugins/eightball.py | plugins/eightball.py | # Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | # Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | Add documentation for 8ball command | Add documentation for 8ball command
| Python | mit | quanticle/GorillaBot,molly/GorillaBot,quanticle/GorillaBot,molly/GorillaBot | # Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | # Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | <commit_before># Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge... | # Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | # Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | <commit_before># Copyright (c) 2013-2014 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge... |
ee6df56514c2d592a527719b60abf42028e07420 | tests/test_japanese.py | tests/test_japanese.py | from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
masu_freq = wor... | from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
masu_freq = wor... | Revert a small syntax change introduced by a circular series of changes. | Revert a small syntax change introduced by a circular series of changes.
Former-commit-id: 09597b7cf33f4c1692f48d08a535bdbc45042cde | Python | mit | LuminosoInsight/wordfreq | from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
masu_freq = wor... | from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
masu_freq = wor... | <commit_before>from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
... | from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
masu_freq = wor... | from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
masu_freq = wor... | <commit_before>from nose.tools import eq_, assert_almost_equal
from wordfreq import tokenize, word_frequency
def test_tokens():
eq_(tokenize('おはようございます', 'ja'),
['おはよう', 'ござい', 'ます'])
def test_combination():
ohayou_freq = word_frequency('おはよう', 'ja')
gozai_freq = word_frequency('ござい', 'ja')
... |
421ce72069c269be3207fbc32022c3f4471654ba | examples/sentiment/download.py | examples/sentiment/download.py | #!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.path.split(name)
... | #!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.path.split(name)... | Add one more empty line to end of import to adjust to H306 | Add one more empty line to end of import to adjust to H306
| Python | mit | keisuke-umezawa/chainer,cemoody/chainer,woodshop/complex-chainer,ikasumi/chainer,kiyukuta/chainer,cupy/cupy,anaruse/chainer,delta2323/chainer,t-abe/chainer,t-abe/chainer,hvy/chainer,wkentaro/chainer,ronekko/chainer,wkentaro/chainer,kuwa32/chainer,1986ks/chainer,hidenori-t/chainer,benob/chainer,cupy/cupy,chainer/chainer... | #!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.path.split(name)
... | #!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.path.split(name)... | <commit_before>#!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.pa... | #!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.path.split(name)... | #!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.path.split(name)
... | <commit_before>#!/usr/bin/env python
import os
import os.path
import urllib
import zipfile
urllib.urlretrieve(
'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',
'trainDevTestTrees_PTB.zip')
zf = zipfile.ZipFile('trainDevTestTrees_PTB.zip')
for name in zf.namelist():
(dirname, filename) = os.pa... |
7c5061e4fbf0737ce07f13cb9102cdbbacf73115 | pyethapp/tests/test_genesis.py | pyethapp/tests/test_genesis.py | import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
def check_genesis(profile):
config = dict(et... | from pprint import pprint
import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
@pytest.mark.parametri... | Fix & cleanup profile genesis tests | Fix & cleanup profile genesis tests
| Python | mit | ethereum/pyethapp,gsalgado/pyethapp,gsalgado/pyethapp,changwu-tw/pyethapp,RomanZacharia/pyethapp,changwu-tw/pyethapp,RomanZacharia/pyethapp,ethereum/pyethapp | import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
def check_genesis(profile):
config = dict(et... | from pprint import pprint
import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
@pytest.mark.parametri... | <commit_before>import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
def check_genesis(profile):
c... | from pprint import pprint
import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
@pytest.mark.parametri... | import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
def check_genesis(profile):
config = dict(et... | <commit_before>import pytest
from ethereum import blocks
from ethereum.db import DB
from ethereum.config import Env
from pyethapp.utils import merge_dict
from pyethapp.utils import update_config_from_genesis_json
import pyethapp.config as konfig
from pyethapp.profiles import PROFILES
def check_genesis(profile):
c... |
71d42d763bdb2d0c1bd8474a4da99695d5b77f91 | alg_selection_sort.py | alg_selection_sort.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select next max num to swap them.
f... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select max num to swap.
for i in re... | Revise to i_max and enhance comments | Revise to i_max and enhance comments
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select next max num to swap them.
f... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select max num to swap.
for i in re... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select next max num to swa... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select max num to swap.
for i in re... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select next max num to swap them.
f... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def selection_sort(nums):
"""Selection Sort algortihm.
Time complexity: O(n^2).
Space complexity: O(1).
"""
# Start from the last num, iteratively select next max num to swa... |
a8d3790e4ef539c2a833fa493aeef4456b4a5dbb | unchecked_repos.py | unchecked_repos.py | #!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly, you should us... | #!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly, you should us... | Check for unchecked repos in more than just the edx org | Check for unchecked repos in more than just the edx org
| Python | apache-2.0 | edx/repo-tools,edx/repo-tools | #!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly, you should us... | #!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly, you should us... | <commit_before>#!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly... | #!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly, you should us... | #!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly, you should us... | <commit_before>#!/usr/bin/env python
"""List repos missing from repos.yaml."""
from __future__ import print_function
import yaml
from helpers import paginated_get
REPOS_URL = "https://api.github.com/orgs/{org}/repos"
# This is hacky; you need to have repo-tools-data cloned locally one dir up.
# To do this properly... |
4a9d1a373b5a460f1e793dd94d0c248e81b75f40 | website/addons/box/settings/defaults.py | website/addons/box/settings/defaults.py | # OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_AUTH_CSRF_TOKEN = 'box-auth-csrf-token'
| # OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_OAUTH_TOKEN_ENDPOINT = 'https://www.box.com/api/oauth2/token'
BOX_OAUTH_AUTH_ENDPOINT = 'https://www.box.com/api/oauth2/authorize'
| Add oauth endpoints to settings | Add oauth endpoints to settings
| Python | apache-2.0 | caneruguz/osf.io,GageGaskins/osf.io,GageGaskins/osf.io,ticklemepierce/osf.io,ticklemepierce/osf.io,kwierman/osf.io,samchrisinger/osf.io,CenterForOpenScience/osf.io,felliott/osf.io,DanielSBrown/osf.io,zkraime/osf.io,MerlinZhang/osf.io,mfraezz/osf.io,pattisdr/osf.io,monikagrabowska/osf.io,monikagrabowska/osf.io,asanfilip... | # OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_AUTH_CSRF_TOKEN = 'box-auth-csrf-token'
Add oauth endpoints to settings | # OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_OAUTH_TOKEN_ENDPOINT = 'https://www.box.com/api/oauth2/token'
BOX_OAUTH_AUTH_ENDPOINT = 'https://www.box.com/api/oauth2/authorize'
| <commit_before># OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_AUTH_CSRF_TOKEN = 'box-auth-csrf-token'
<commit_msg>Add oauth endpoints to settings<commit_after> | # OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_OAUTH_TOKEN_ENDPOINT = 'https://www.box.com/api/oauth2/token'
BOX_OAUTH_AUTH_ENDPOINT = 'https://www.box.com/api/oauth2/authorize'
| # OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_AUTH_CSRF_TOKEN = 'box-auth-csrf-token'
Add oauth endpoints to settings# OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_OAUTH_TOKEN_ENDPOINT = 'https://www.box.com/api/oauth2/token'
BOX_OAUTH_AUTH_ENDPOINT = 'https://www.box.com/api/oauth2/authorize'
| <commit_before># OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_AUTH_CSRF_TOKEN = 'box-auth-csrf-token'
<commit_msg>Add oauth endpoints to settings<commit_after># OAuth app keys
BOX_KEY = None
BOX_SECRET = None
BOX_OAUTH_TOKEN_ENDPOINT = 'https://www.box.com/api/oauth2/token'
BOX_OAUTH_AUTH_ENDPOINT = 'https://w... |
62d7c94968d70564839b32375fac6608720c2a67 | backend/pycon/urls.py | backend/pycon/urls.py | from api.views import GraphQLView
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", include("users.ur... | from api.views import GraphQLView
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(... | Add media url when running in debug mode | Add media url when running in debug mode
| Python | mit | patrick91/pycon,patrick91/pycon | from api.views import GraphQLView
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", include("users.ur... | from api.views import GraphQLView
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(... | <commit_before>from api.views import GraphQLView
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", in... | from api.views import GraphQLView
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(... | from api.views import GraphQLView
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", include("users.ur... | <commit_before>from api.views import GraphQLView
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", in... |
7185c5ef58757949197081808bf237f0111e7a86 | packages/mono.py | packages/mono.py | class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=no',
'--wit... | class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=no',
'--wit... | Fix building Mono 32-bit with Mac 10.7 SDK | Fix building Mono 32-bit with Mac 10.7 SDK | Python | mit | mono/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,bl8/bockbuild,mono/bockbuild | class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=no',
'--wit... | class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=no',
'--wit... | <commit_before>class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=... | class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=no',
'--wit... | class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=no',
'--wit... | <commit_before>class MonoPackage (Package):
def __init__ (self):
Package.__init__ (self, 'mono', '2.10.6',
sources = [
'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',
'patches/mono-runtime-relocation.patch'
],
configure_flags = [
'--with-jit=yes',
'--with-ikvm=... |
6246c26365b2df4cbb91142969aa857c7187e094 | app/test_base.py | app/test_base.py | from flask.ext.testing import TestCase
import unittest
from app import app, db
class BaseTestCase(TestCase):
def create_app(self):
app.config.from_object('config.TestingConfiguration')
return app
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
... | from flask.ext.testing import TestCase
import unittest
from app import create_app, db
class BaseTestCase(TestCase):
def create_app(self):
return create_app('config.TestingConfiguration')
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()... | Update tests to leverage factory pattern | Update tests to leverage factory pattern
| Python | mit | rtfoley/scorepy,rtfoley/scorepy,rtfoley/scorepy | from flask.ext.testing import TestCase
import unittest
from app import app, db
class BaseTestCase(TestCase):
def create_app(self):
app.config.from_object('config.TestingConfiguration')
return app
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
... | from flask.ext.testing import TestCase
import unittest
from app import create_app, db
class BaseTestCase(TestCase):
def create_app(self):
return create_app('config.TestingConfiguration')
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()... | <commit_before>from flask.ext.testing import TestCase
import unittest
from app import app, db
class BaseTestCase(TestCase):
def create_app(self):
app.config.from_object('config.TestingConfiguration')
return app
def setUp(self):
db.create_all()
def tearDown(self):
db.sessio... | from flask.ext.testing import TestCase
import unittest
from app import create_app, db
class BaseTestCase(TestCase):
def create_app(self):
return create_app('config.TestingConfiguration')
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()... | from flask.ext.testing import TestCase
import unittest
from app import app, db
class BaseTestCase(TestCase):
def create_app(self):
app.config.from_object('config.TestingConfiguration')
return app
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
... | <commit_before>from flask.ext.testing import TestCase
import unittest
from app import app, db
class BaseTestCase(TestCase):
def create_app(self):
app.config.from_object('config.TestingConfiguration')
return app
def setUp(self):
db.create_all()
def tearDown(self):
db.sessio... |
fcd98cc714b5a790eaf2e946c492ab4e14700568 | scripts/award_badge_to_user.py | scripts/award_badge_to_user.py | #!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validator... | #!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.database import db
from byceps.services.user_badge.models.badge import Badge, BadgeID
from byceps.services.user_badge import service as badge_ser... | Change script to avoid creation of badge URLs to make it work outside of a *party-specific* app context | Change script to avoid creation of badge URLs to make it work outside of a *party-specific* app context
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps | #!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validator... | #!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.database import db
from byceps.services.user_badge.models.badge import Badge, BadgeID
from byceps.services.user_badge import service as badge_ser... | <commit_before>#!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from boot... | #!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.database import db
from byceps.services.user_badge.models.badge import Badge, BadgeID
from byceps.services.user_badge import service as badge_ser... | #!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validator... | <commit_before>#!/usr/bin/env python
"""Award a badge to a user.
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import click
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from boot... |
8332dc01c3c743543f4c3faff44da84436ae5da2 | planner/forms.py | planner/forms.py | from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(attrs={'placehold... | from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser, Trip, Step
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(attrs... | Add Trip and Step ModelForms | Add Trip and Step ModelForms
| Python | mit | livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride | from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(attrs={'placehold... | from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser, Trip, Step
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(attrs... | <commit_before>from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(at... | from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser, Trip, Step
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(attrs... | from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(attrs={'placehold... | <commit_before>from django.contrib.auth.forms import AuthenticationForm
from django import forms
from django.core.validators import MinLengthValidator
from .models import PoolingUser
from users.forms import UserCreationForm
class LoginForm(AuthenticationForm):
username = forms.CharField(widget=forms.EmailInput(at... |
bd4e1c3f511ac1163e39d99fdc8e70f261023c44 | setup/create_player_seasons.py | setup/create_player_seasons.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with session_scope() as s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with session_scope() as s... | Update player season retrieval function | Update player season retrieval function
| Python | mit | leaffan/pynhldb | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with session_scope() as s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with session_scope() as s... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with sessi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with session_scope() as s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with session_scope() as s... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import concurrent.futures
from db.common import session_scope
from db.player import Player
from utils.player_data_retriever import PlayerDataRetriever
def create_player_seasons(simulation=False):
data_retriever = PlayerDataRetriever()
with sessi... |
f2a88e4849876970c29b568b897dff88ffe09306 | djrichtextfield/urls.py | djrichtextfield/urls.py | from django.conf.urls import url
from djrichtextfield.views import InitView
urlpatterns = [
url('^init.js$', InitView.as_view(), name='djrichtextfield_init')
]
| from django.urls import path
from djrichtextfield.views import InitView
urlpatterns = [
path('init.js', InitView.as_view(), name='djrichtextfield_init')
]
| Use path instead of soon to be deprecated url | Use path instead of soon to be deprecated url
| Python | mit | jaap3/django-richtextfield,jaap3/django-richtextfield | from django.conf.urls import url
from djrichtextfield.views import InitView
urlpatterns = [
url('^init.js$', InitView.as_view(), name='djrichtextfield_init')
]
Use path instead of soon to be deprecated url | from django.urls import path
from djrichtextfield.views import InitView
urlpatterns = [
path('init.js', InitView.as_view(), name='djrichtextfield_init')
]
| <commit_before>from django.conf.urls import url
from djrichtextfield.views import InitView
urlpatterns = [
url('^init.js$', InitView.as_view(), name='djrichtextfield_init')
]
<commit_msg>Use path instead of soon to be deprecated url<commit_after> | from django.urls import path
from djrichtextfield.views import InitView
urlpatterns = [
path('init.js', InitView.as_view(), name='djrichtextfield_init')
]
| from django.conf.urls import url
from djrichtextfield.views import InitView
urlpatterns = [
url('^init.js$', InitView.as_view(), name='djrichtextfield_init')
]
Use path instead of soon to be deprecated urlfrom django.urls import path
from djrichtextfield.views import InitView
urlpatterns = [
path('init.js',... | <commit_before>from django.conf.urls import url
from djrichtextfield.views import InitView
urlpatterns = [
url('^init.js$', InitView.as_view(), name='djrichtextfield_init')
]
<commit_msg>Use path instead of soon to be deprecated url<commit_after>from django.urls import path
from djrichtextfield.views import Init... |
c080865fdb36da2718774ddff436325d947be323 | test/test_fit_allocator.py | test/test_fit_allocator.py | from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_lists - 1
... | from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_lists - 1
... | Add test for index to cells | Add test for index to cells
| Python | mit | ntruessel/qcgc,ntruessel/qcgc,ntruessel/qcgc | from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_lists - 1
... | from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_lists - 1
... | <commit_before>from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_li... | from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_lists - 1
... | from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_lists - 1
... | <commit_before>from support import lib,ffi
from qcgc_test import QCGCTest
class FitAllocatorTest(QCGCTest):
def test_macro_consistency(self):
self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)
last_exp = lib.QCGC_LARGE_FREE_LIST_FIRST_EXP + lib.qcgc_large_free_li... |
b0a6652a11236409ec3e2606e04621f714a3ab63 | test/test_jobs/__init__.py | test/test_jobs/__init__.py | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | Test generic creator of jobs. | Test generic creator of jobs.
| Python | agpl-3.0 | jean/pybossa,Scifabric/pybossa,geotagx/pybossa,OpenNewsLabs/pybossa,jean/pybossa,inteligencia-coletiva-lsd/pybossa,geotagx/pybossa,stefanhahmann/pybossa,stefanhahmann/pybossa,PyBossa/pybossa,Scifabric/pybossa,inteligencia-coletiva-lsd/pybossa,OpenNewsLabs/pybossa,PyBossa/pybossa | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | <commit_before># -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Li... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | <commit_before># -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Li... |
1e5f8299dfa0e724933bb565359650a5dc579bb6 | aybu/core/dispatch.py | aybu/core/dispatch.py | import os
import logging
from paste.deploy import loadapp
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_file = os.path.... | import os
import logging
import pyramid.paster
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_file = os.path.join(dir_, ... | Use pyramid.paster instad of paste.deploy | Use pyramid.paster instad of paste.deploy
--HG--
extra : convert_revision : g.bagnoli%40asidev.com-20110509152058-7sd3ek2lvqrdksuw
| Python | apache-2.0 | asidev/aybu-core | import os
import logging
from paste.deploy import loadapp
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_file = os.path.... | import os
import logging
import pyramid.paster
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_file = os.path.join(dir_, ... | <commit_before>import os
import logging
from paste.deploy import loadapp
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_... | import os
import logging
import pyramid.paster
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_file = os.path.join(dir_, ... | import os
import logging
from paste.deploy import loadapp
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_file = os.path.... | <commit_before>import os
import logging
from paste.deploy import loadapp
from paste.script.util.logging_config import fileConfig
log = logging.getLogger(__name__)
def get_pylons_app(global_conf):
pyramid_config = os.path.realpath(global_conf['__file__'])
dir_, conf = os.path.split(pyramid_config)
config_... |
b14ca021e93c40b02c5fef4972795796bddeb5ba | boris/utils/management/load_static_fixtures.py | boris/utils/management/load_static_fixtures.py | from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APPS_TO_WAIT_FOR) ... | from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APPS_TO_WAIT_FOR) ... | Disable groups.json loading until it's fixed. | Disable groups.json loading until it's fixed.
| Python | mit | fragaria/BorIS,fragaria/BorIS,fragaria/BorIS | from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APPS_TO_WAIT_FOR) ... | from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APPS_TO_WAIT_FOR) ... | <commit_before>from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APP... | from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APPS_TO_WAIT_FOR) ... | from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APPS_TO_WAIT_FOR) ... | <commit_before>from django.conf import settings
from django.core.management import call_command
from south.signals import post_migrate
__author__ = 'xaralis'
APPS_TO_WAIT_FOR = ['clients', 'services']
def load_static_data(app, **kwargs):
global APPS_TO_WAIT_FOR
APPS_TO_WAIT_FOR.remove(app)
if len(APP... |
af31c71e49b7d63c24ab7d7c04a5e908451263e2 | iati/core/tests/test_utilities.py | iati/core/tests/test_utilities.py | """A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check that an etree c... | """A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check that an etree c... | Add more logging test stubs | Add more logging test stubs
| Python | mit | IATI/iati.core,IATI/iati.core | """A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check that an etree c... | """A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check that an etree c... | <commit_before>"""A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check ... | """A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check that an etree c... | """A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check that an etree c... | <commit_before>"""A module containing tests for the library implementation of accessing utilities."""
from lxml import etree
import iati.core.resources
import iati.core.utilities
class TestUtilities(object):
"""A container for tests relating to utilities"""
def test_convert_to_schema(self):
"""Check ... |
0deac2fe49d1240a1d5fee1b9c47313bde84d609 | seleniumlogin/__init__.py | seleniumlogin/__init__.py | from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = getattr(settings, ... | from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = getattr(settings, ... | Change how the base_url is turned into a domain | Change how the base_url is turned into a domain
| Python | mit | feffe/django-selenium-login,feffe/django-selenium-login | from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = getattr(settings, ... | from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = getattr(settings, ... | <commit_before>from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = get... | from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = getattr(settings, ... | from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = getattr(settings, ... | <commit_before>from importlib import import_module
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
def force_login(user, driver, base_url):
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
selenium_login_start_page = get... |
53b17a3b576a90e5d5bb773ca868a3dd160b3273 | roamer/record.py | roamer/record.py | """
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
class Record(object):
def __init__(self):
self.entries = {}
# TODO: Load saved directory json
if os.path.exists(entries_path):
with open(entries_pa... | """
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
trash_path = os.path.expanduser('~/.roamer-data/trash.json')
class Record(object):
def __init__(self):
self.entries = self._load(entries_path)
self.trash_entries = sel... | Add trash loading. Refactor shared load method | Add trash loading. Refactor shared load method
| Python | mit | abaldwin88/roamer | """
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
class Record(object):
def __init__(self):
self.entries = {}
# TODO: Load saved directory json
if os.path.exists(entries_path):
with open(entries_pa... | """
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
trash_path = os.path.expanduser('~/.roamer-data/trash.json')
class Record(object):
def __init__(self):
self.entries = self._load(entries_path)
self.trash_entries = sel... | <commit_before>"""
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
class Record(object):
def __init__(self):
self.entries = {}
# TODO: Load saved directory json
if os.path.exists(entries_path):
with ... | """
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
trash_path = os.path.expanduser('~/.roamer-data/trash.json')
class Record(object):
def __init__(self):
self.entries = self._load(entries_path)
self.trash_entries = sel... | """
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
class Record(object):
def __init__(self):
self.entries = {}
# TODO: Load saved directory json
if os.path.exists(entries_path):
with open(entries_pa... | <commit_before>"""
argh
"""
import os
import json
from roamer.entry import Entry
entries_path = os.path.expanduser('~/.roamer-data/entries.json')
class Record(object):
def __init__(self):
self.entries = {}
# TODO: Load saved directory json
if os.path.exists(entries_path):
with ... |
56e764835e75035452a6a1ea06c386ec61dbe872 | src/rinoh/stylesheets/__init__.py | src/rinoh/stylesheets/__init__.py | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from .. import DATA... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from .. import DATA... | Fix the auto-generated docstrings of style sheets | Fix the auto-generated docstrings of style sheets
| Python | agpl-3.0 | brechtm/rinohtype,brechtm/rinohtype,brechtm/rinohtype | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from .. import DATA... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from .. import DATA... | <commit_before># This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from .. import DATA... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from .. import DATA... | <commit_before># This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
import inspect
import os
import sys
from... |
e9df17b0319e50351cdaa39abb504dfafc77de6d | glitch/config.py | glitch/config.py | # Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
renderer_port = 88... | # Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
renderer_port = 81... | Use port 81 instead of 8889. | Use port 81 instead of 8889.
| Python | artistic-2.0 | MikeiLL/appension,MikeiLL/appension,MikeiLL/appension,MikeiLL/appension | # Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
renderer_port = 88... | # Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
renderer_port = 81... | <commit_before># Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
ren... | # Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
renderer_port = 81... | # Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
renderer_port = 88... | <commit_before># Basic config for stuff that can be easily changed, but which is git-managed.
# See also apikeys_sample.py for the configs which are _not_ git-managed.
#server_domain = "http://www.infiniteglitch.net"
server_domain = "http://50.116.55.59"
http_port = 8888 # Port for the main web site, in debug mode
ren... |
27deb367c8fb080ad3a05c684920d2a90fb207f5 | hoomd/analyze/python_analyzer.py | hoomd/analyze/python_analyzer.py | from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
def analyze(self,... | from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class _CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
def analyze(self... | Make _CustomAnalyzer a private class | Make _CustomAnalyzer a private class
| Python | bsd-3-clause | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
def analyze(self,... | from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class _CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
def analyze(self... | <commit_before>from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
de... | from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class _CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
def analyze(self... | from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
def analyze(self,... | <commit_before>from hoomd.python_action import _PythonAction, _InternalPythonAction
from hoomd.custom_action import _CustomAction, _InternalCustomAction
class CustomAnalyzer(_CustomAction):
def analyze(self, timestep):
return self.act(timestep)
class _InternalCustomAnayzer(_InternalCustomAction):
de... |
b448d52e5a30346633dd20e52431af39eb6859ec | importer/importer/connections.py | importer/importer/connections.py | import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_ENDPOINTS)
aw... | import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_ENDPOINTS)
re... | Remove the pointless cluster health check | Remove the pointless cluster health check
| Python | mit | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics | import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_ENDPOINTS)
aw... | import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_ENDPOINTS)
re... | <commit_before>import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_EN... | import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_ENDPOINTS)
re... | import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_ENDPOINTS)
aw... | <commit_before>import aioes
from .utils import wait_for_all_services
from .settings import ELASTICSEARCH_ENDPOINTS
async def connect_to_elasticsearch():
print("Connecting to Elasticsearch...")
await wait_for_all_services(ELASTICSEARCH_ENDPOINTS, timeout=10)
elastic = aioes.Elasticsearch(ELASTICSEARCH_EN... |
70d435e1176a1132db6a04c34c04567df354d1d9 | cla_backend/apps/reports/management/commands/mi_cb1_report.py | cla_backend/apps/reports/management/commands/mi_cb1_report.py | # coding=utf-8
import logging
from django.core.management.base import BaseCommand
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"
def handle(self, *args, **options):
self.create_report()
def create_report():
print("stuff goes her... | # coding=utf-8
import logging
from django.core.management.base import BaseCommand
from reports.tasks import ExportTask
from core.models import get_web_user
from django.views.decorators.csrf import csrf_exempt
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"... | Send weekly report to aws | Send weekly report to aws
| Python | mit | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | # coding=utf-8
import logging
from django.core.management.base import BaseCommand
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"
def handle(self, *args, **options):
self.create_report()
def create_report():
print("stuff goes her... | # coding=utf-8
import logging
from django.core.management.base import BaseCommand
from reports.tasks import ExportTask
from core.models import get_web_user
from django.views.decorators.csrf import csrf_exempt
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"... | <commit_before># coding=utf-8
import logging
from django.core.management.base import BaseCommand
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"
def handle(self, *args, **options):
self.create_report()
def create_report():
print(... | # coding=utf-8
import logging
from django.core.management.base import BaseCommand
from reports.tasks import ExportTask
from core.models import get_web_user
from django.views.decorators.csrf import csrf_exempt
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"... | # coding=utf-8
import logging
from django.core.management.base import BaseCommand
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"
def handle(self, *args, **options):
self.create_report()
def create_report():
print("stuff goes her... | <commit_before># coding=utf-8
import logging
from django.core.management.base import BaseCommand
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "This runs the MCCB1sSLA report"
def handle(self, *args, **options):
self.create_report()
def create_report():
print(... |
28803e4669f4c7b2b84e53e39e3a0a99ff57572d | skyfield/__main__.py | skyfield/__main__.py | # -*- coding: utf-8 -*-
import pkg_resources
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 version: {0}'.format(... | # -*- coding: utf-8 -*-
import pkg_resources
import numpy as np
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 ve... | Fix “python -m skyfield” following ∆T array rename | Fix “python -m skyfield” following ∆T array rename
| Python | mit | skyfielders/python-skyfield,skyfielders/python-skyfield | # -*- coding: utf-8 -*-
import pkg_resources
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 version: {0}'.format(... | # -*- coding: utf-8 -*-
import pkg_resources
import numpy as np
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 ve... | <commit_before># -*- coding: utf-8 -*-
import pkg_resources
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 versio... | # -*- coding: utf-8 -*-
import pkg_resources
import numpy as np
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 ve... | # -*- coding: utf-8 -*-
import pkg_resources
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 version: {0}'.format(... | <commit_before># -*- coding: utf-8 -*-
import pkg_resources
import skyfield
from skyfield.api import load
from skyfield.functions import load_bundled_npy
def main():
print('Skyfield version: {0}'.format(skyfield.__version__))
print('jplephem version: {0}'.format(version_of('jplephem')))
print('sgp4 versio... |
b812a8da81ec9943d11b8cb9f709e234c90a2282 | stylo/utils.py | stylo/utils.py | from uuid import uuid4
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
"""Use this to get a name to use for your events."""
return str(uuid4())
def re... | import inspect
from uuid import uuid4
def get_parameters(f):
return list(inspect.signature(f).parameters.keys())
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
... | Add the function back for now | Add the function back for now
| Python | mit | alcarney/stylo,alcarney/stylo | from uuid import uuid4
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
"""Use this to get a name to use for your events."""
return str(uuid4())
def re... | import inspect
from uuid import uuid4
def get_parameters(f):
return list(inspect.signature(f).parameters.keys())
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
... | <commit_before>from uuid import uuid4
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
"""Use this to get a name to use for your events."""
return str(uuid4... | import inspect
from uuid import uuid4
def get_parameters(f):
return list(inspect.signature(f).parameters.keys())
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
... | from uuid import uuid4
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
"""Use this to get a name to use for your events."""
return str(uuid4())
def re... | <commit_before>from uuid import uuid4
class MessageBus:
"""A class that is used behind the scenes to coordinate events and timings of
animations.
"""
def __init__(self):
self.subs = {}
def new_id(self):
"""Use this to get a name to use for your events."""
return str(uuid4... |
2e631e8e3b3fe738d9f41ab46f138769f688d00f | dthm4kaiako/config/__init__.py | dthm4kaiako/config/__init__.py | """Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.17.5"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| Increment version number to 0.17.5 | Increment version number to 0.17.5
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.17.5 | """Configuration for Django system."""
__version__ = "0.17.5"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| <commit_before>"""Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.17.5<commit_after> | """Configuration for Django system."""
__version__ = "0.17.5"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.17.5"""Configuration for Django system."""
__version__ = "0.17.5"
__version_info... | <commit_before>"""Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.17.5<commit_after>"""Configuration for Django system."... |
eb4d480d8bf7807f7a0d38f445a5779331f8d3f3 | aids/stack/stack.py | aids/stack/stack.py | '''
Implementation of Stack data structure
'''
class Stack:
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.items.append(item... | '''
Implementation of Stack data structure
'''
class Stack(object):
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.items.app... | Convert old-style class to new-style class | Convert old-style class to new-style class
| Python | mit | ueg1990/aids | '''
Implementation of Stack data structure
'''
class Stack:
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.items.append(item... | '''
Implementation of Stack data structure
'''
class Stack(object):
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.items.app... | <commit_before>'''
Implementation of Stack data structure
'''
class Stack:
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.it... | '''
Implementation of Stack data structure
'''
class Stack(object):
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.items.app... | '''
Implementation of Stack data structure
'''
class Stack:
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.items.append(item... | <commit_before>'''
Implementation of Stack data structure
'''
class Stack:
def __init__(self):
'''
Initialize stack
'''
self.items = []
def is_empty(self):
'''
Return True if stack if empty else False
'''
return self.item == []
def push(self, item):
'''
Push item to stack
'''
self.it... |
602184794c3f38bf6307cf68f4d61294b523c009 | examples/LKE_example.py | examples/LKE_example.py | from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address
standard_file = standard_path + 'auth.log.anon.labeled'
analyzed_file = 'auth.log.... | from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
dataset_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/'
groundtruth_file = dataset_path + 'Dec 1.log.labeled'
analyzed_file = 'Dec 1.log'
OutputPath = '/home/hudan/Git/pygraph... | Edit path and external evaluation | Edit path and external evaluation
| Python | mit | studiawan/pygraphc | from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address
standard_file = standard_path + 'auth.log.anon.labeled'
analyzed_file = 'auth.log.... | from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
dataset_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/'
groundtruth_file = dataset_path + 'Dec 1.log.labeled'
analyzed_file = 'Dec 1.log'
OutputPath = '/home/hudan/Git/pygraph... | <commit_before>from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address
standard_file = standard_path + 'auth.log.anon.labeled'
analyzed_fi... | from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
dataset_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/'
groundtruth_file = dataset_path + 'Dec 1.log.labeled'
analyzed_file = 'Dec 1.log'
OutputPath = '/home/hudan/Git/pygraph... | from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address
standard_file = standard_path + 'auth.log.anon.labeled'
analyzed_file = 'auth.log.... | <commit_before>from pygraphc.misc.LKE import *
from pygraphc.evaluation.ExternalEvaluation import *
# set input and output path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address
standard_file = standard_path + 'auth.log.anon.labeled'
analyzed_fi... |
2739999c6fa0628e7cfe7a918e3cde3b7d791d66 | tests/astroplpython/data/test_Timeseries.py | tests/astroplpython/data/test_Timeseries.py | '''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as t
strarr = ['(1,1.)', '(2,2.)', '(2.1,3.)', '... | '''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as Timeseries
# test data stra... | Modify test to match changes in class | Modify test to match changes in class
| Python | mit | brianthomas/astroplpython,brianthomas/astroplpython | '''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as t
strarr = ['(1,1.)', '(2,2.)', '(2.1,3.)', '... | '''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as Timeseries
# test data stra... | <commit_before>'''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as t
strarr = ['(1,1.)', '(2,2.)'... | '''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as Timeseries
# test data stra... | '''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as t
strarr = ['(1,1.)', '(2,2.)', '(2.1,3.)', '... | <commit_before>'''
Created on Jul 16, 2014
@author: thomas
'''
import unittest
class TestTimeseries (unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_strToXTArray (self):
import astroplpython.data.Timeseries as t
strarr = ['(1,1.)', '(2,2.)'... |
5b7789d519be7251c58b68879f013d5f3bf0c950 | tests/thread/thread_stacksize1.py | tests/thread/thread_stacksize1.py | # test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
def thread_entry(... | # test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation.name == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
def thread_e... | Make stack-size test run correctly and reliable on uPy. | tests/thread: Make stack-size test run correctly and reliable on uPy.
| Python | mit | mhoffma/micropython,HenrikSolver/micropython,ryannathans/micropython,dmazzella/micropython,mhoffma/micropython,PappaPeppar/micropython,MrSurly/micropython,tuc-osg/micropython,oopy/micropython,oopy/micropython,SHA2017-badge/micropython-esp32,AriZuu/micropython,toolmacher/micropython,redbear/micropython,mhoffma/micropyth... | # test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
def thread_entry(... | # test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation.name == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
def thread_e... | <commit_before># test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
de... | # test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation.name == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
def thread_e... | # test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
def thread_entry(... | <commit_before># test setting the thread stack size
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
import sys
import _thread
# different implementations have different minimum sizes
if sys.implementation == 'micropython':
sz = 2 * 1024
else:
sz = 32 * 1024
def foo():
pass
de... |
7a68eaf67ce57be832e37922c52f1b8bc73a5e69 | indra/tests/test_kappa_util.py | indra/tests/test_kappa_util.py | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
'ka... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
'ka... | Fix networkx 1.11 compatibility issue | Fix networkx 1.11 compatibility issue
| Python | bsd-2-clause | pvtodorov/indra,bgyori/indra,sorgerlab/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/belpy,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/indra,bgyori/indra,sorgerlab/belpy | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
'ka... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
'ka... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
'ka... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
'ka... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from os import path
from indra.util.kappa_util import im_json_to_graph
def test_kappy_influence_json_to_graph():
with open(path.join(path.dirname(path.abspath(__file__)),
... |
ec9b1f0ebda55e3e02e597e10ac28d62286b922f | SimPEG/EM/NSEM/Utils/__init__.py | SimPEG/EM/NSEM/Utils/__init__.py | """ module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfields, getImpedanc... | """ module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfields, getImpedanc... | Fix import issue due to name changes | Fix import issue due to name changes
| Python | mit | simpeg/simpeg | """ module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfields, getImpedanc... | """ module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfields, getImpedanc... | <commit_before>""" module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfiel... | """ module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfields, getImpedanc... | """ module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfields, getImpedanc... | <commit_before>""" module SimPEG.EM.NSEM.Utils
Collection of utilities that are usefull for the NSEM problem
NOTE: These utilities are not well test, use with care
"""
from __future__ import absolute_import
from .MT1Dsolutions import get1DEfields # Add the names of the functions
from .MT1Danalytic import getEHfiel... |
3a470c02a1a171f876200258897d6e277a1aab91 | tournamentcontrol/competition/signals/__init__.py | tournamentcontrol/competition/signals/__init__.py | from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.signals.matches imp... | from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.signals.matches imp... | Stop using the undocumented get_all_related_objects_with_model API | Stop using the undocumented get_all_related_objects_with_model API
| Python | bsd-3-clause | goodtune/vitriolic,goodtune/vitriolic,goodtune/vitriolic,goodtune/vitriolic | from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.signals.matches imp... | from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.signals.matches imp... | <commit_before>from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.sign... | from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.signals.matches imp... | from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.signals.matches imp... | <commit_before>from django.db import models
from tournamentcontrol.competition.signals.custom import match_forfeit # noqa
from tournamentcontrol.competition.signals.ladders import ( # noqa
changed_points_formula,
scale_ladder_entry,
team_ladder_entry_aggregation,
)
from tournamentcontrol.competition.sign... |
cbb90d03b83a495b1c46514a583538f2cfc0d29c | test/functional/test_manager.py | test/functional/test_manager.py | from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
imgr = PILImageManager("RGB")
osm = OSMManager(image_manager=imgr)
image, bnds = osm.createOSMImage((30, 35, -117, -112), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 = image.resize((int(8... | from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
image_manager = PILImageManager("RGB")
osm = OSMManager(image_manager=image_manager)
image, bounds = osm.createOSMImage((30, 31, -117, -116), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 =... | Reduce number of tiles downloaded | Reduce number of tiles downloaded
| Python | mit | hugovk/osmviz,hugovk/osmviz | from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
imgr = PILImageManager("RGB")
osm = OSMManager(image_manager=imgr)
image, bnds = osm.createOSMImage((30, 35, -117, -112), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 = image.resize((int(8... | from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
image_manager = PILImageManager("RGB")
osm = OSMManager(image_manager=image_manager)
image, bounds = osm.createOSMImage((30, 31, -117, -116), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 =... | <commit_before>from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
imgr = PILImageManager("RGB")
osm = OSMManager(image_manager=imgr)
image, bnds = osm.createOSMImage((30, 35, -117, -112), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 = imag... | from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
image_manager = PILImageManager("RGB")
osm = OSMManager(image_manager=image_manager)
image, bounds = osm.createOSMImage((30, 31, -117, -116), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 =... | from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
imgr = PILImageManager("RGB")
osm = OSMManager(image_manager=imgr)
image, bnds = osm.createOSMImage((30, 35, -117, -112), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 = image.resize((int(8... | <commit_before>from osmviz.manager import PILImageManager, OSMManager
import PIL.Image as Image
def test_pil():
imgr = PILImageManager("RGB")
osm = OSMManager(image_manager=imgr)
image, bnds = osm.createOSMImage((30, 35, -117, -112), 9)
wh_ratio = float(image.size[0]) / image.size[1]
image2 = imag... |
a1e90125199a12beaa132c4d1eba4c09be3f9ba0 | fileupload/serialize.py | fileupload/serialize.py | # encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re.sub(r'^.*/', '... | # encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re.sub(r'^.*/', '... | FIX add links to reports generated v2 | FIX add links to reports generated v2
| Python | mit | semitki/canales,semitki/canales,semitki/canales | # encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re.sub(r'^.*/', '... | # encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re.sub(r'^.*/', '... | <commit_before># encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re... | # encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re.sub(r'^.*/', '... | # encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re.sub(r'^.*/', '... | <commit_before># encoding: utf-8
import mimetypes
import re
from django.core.urlresolvers import reverse
def order_name(name):
"""order_name -- Limit a text to 20 chars length, if necessary strips the
middle of the text and substitute it for an ellipsis.
name -- text to be limited.
"""
name = re... |
40c15fb4300dfe729461e0bc09066f8176830188 | src/cutecoin/main.py | src/cutecoin/main.py | """
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
if __name__ == '__main__':
# activate ctrl-c interrupt
signal.... | """
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
import logging
import os
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
def async_exception_handler(loop, context):
... | Exit process when exception not catch in async task | Exit process when exception not catch in async task
| Python | mit | ucoin-io/cutecoin,ucoin-io/cutecoin,ucoin-io/cutecoin | """
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
if __name__ == '__main__':
# activate ctrl-c interrupt
signal.... | """
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
import logging
import os
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
def async_exception_handler(loop, context):
... | <commit_before>"""
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
if __name__ == '__main__':
# activate ctrl-c interr... | """
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
import logging
import os
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
def async_exception_handler(loop, context):
... | """
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
if __name__ == '__main__':
# activate ctrl-c interrupt
signal.... | <commit_before>"""
Created on 1 févr. 2014
@author: inso
"""
import signal
import sys
import asyncio
from quamash import QEventLoop
from PyQt5.QtWidgets import QApplication
from cutecoin.gui.mainwindow import MainWindow
from cutecoin.core.app import Application
if __name__ == '__main__':
# activate ctrl-c interr... |
2b89b28b2a5900d8e5be5509b6f01054e2bfdb23 | app.py | app.py | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command("runserver", Se... | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command("runserver", Se... | Fix host and port for Heroku | Fix host and port for Heroku
| Python | mpl-2.0 | xeBuz/CompanyDK,xeBuz/CompanyDK,xeBuz/CompanyDK,xeBuz/CompanyDK | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command("runserver", Se... | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command("runserver", Se... | <commit_before>import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command(... | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command("runserver", Se... | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command("runserver", Se... | <commit_before>import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, Server
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.heroku import Heroku
# Initialize Application
app = Flask(__name__)
manager = Manager(app)
manager.add_command(... |
257686cfa72318c0b476d4623731080f848c4942 | app.py | app.py | import requests
from flask import Flask, render_template
app = Flask(__name__)
BBC_id= "bbc-news"
API_KEY = "c4002216fa5446d582b5f31d73959d36"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={API_KEY}"
)
return render_template("in... | import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
BBC_id= "bbc-news"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={app.config['API_KEY']... | Use instance folder to load configuration file. | Use instance folder to load configuration file.
| Python | mit | alchermd/headlines,alchermd/headlines | import requests
from flask import Flask, render_template
app = Flask(__name__)
BBC_id= "bbc-news"
API_KEY = "c4002216fa5446d582b5f31d73959d36"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={API_KEY}"
)
return render_template("in... | import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
BBC_id= "bbc-news"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={app.config['API_KEY']... | <commit_before>import requests
from flask import Flask, render_template
app = Flask(__name__)
BBC_id= "bbc-news"
API_KEY = "c4002216fa5446d582b5f31d73959d36"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={API_KEY}"
)
return rend... | import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
BBC_id= "bbc-news"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={app.config['API_KEY']... | import requests
from flask import Flask, render_template
app = Flask(__name__)
BBC_id= "bbc-news"
API_KEY = "c4002216fa5446d582b5f31d73959d36"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={API_KEY}"
)
return render_template("in... | <commit_before>import requests
from flask import Flask, render_template
app = Flask(__name__)
BBC_id= "bbc-news"
API_KEY = "c4002216fa5446d582b5f31d73959d36"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source={BBC_id}&sortBy=top&apiKey={API_KEY}"
)
return rend... |
2a8a50528a36525f37ea26dbccefd153d4cdcc8c | go/apps/dialogue/definition.py | go/apps/dialogue/definition.py | from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = True
def chec... | from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = True
def chec... | Fix name of command sent by send_dialogue action. | Fix name of command sent by send_dialogue action.
| Python | bsd-3-clause | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = True
def chec... | from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = True
def chec... | <commit_before>from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = Tru... | from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = True
def chec... | from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = True
def chec... | <commit_before>from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class SendDialogueAction(ConversationAction):
action_name = 'send_dialogue'
action_display_name = 'Send Dialogue'
needs_confirmation = True
needs_group = True
needs_running = Tru... |
d1ccd3e93043d11a22e873e7ccdb76d749746151 | api/app/app.py | api/app/app.py | import os
import logging
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgre... | import os
import logging
from uwsgidecorators import postfork
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config[... | Refresh db connections on uwsgi fork | Refresh db connections on uwsgi fork
| Python | mit | hexa4313/velov-companion-server,hexa4313/velov-companion-server | import os
import logging
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgre... | import os
import logging
from uwsgidecorators import postfork
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config[... | <commit_before>import os
import logging
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config['SQLALCHEMY_DATABASE_U... | import os
import logging
from uwsgidecorators import postfork
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config[... | import os
import logging
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgre... | <commit_before>import os
import logging
from flask import Flask
from model.base import db
from route.base import blueprint
# Register models and routes
import model
import route
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
# app.config['PROPAGATE_EXCEPTIONS'] = True
app.config['SQLALCHEMY_DATABASE_U... |
08fbfa49129a42821b128913e4aa9fbacf966f20 | grizzly-jersey/setup.py | grizzly-jersey/setup.py | import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package shade:shade", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except subprocess.Called... | import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except subprocess.CalledProcessError... | Fix the build so it no longer double-shades. This removes all the warnings it printed. | Fix the build so it no longer double-shades. This removes all the warnings it printed.
| Python | bsd-3-clause | yunspace/FrameworkBenchmarks,grob/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,grob/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jet... | import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package shade:shade", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except subprocess.Called... | import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except subprocess.CalledProcessError... | <commit_before>import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package shade:shade", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except su... | import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except subprocess.CalledProcessError... | import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package shade:shade", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except subprocess.Called... | <commit_before>import subprocess
import sys
import setup_util
import os
def start(args):
try:
subprocess.check_call("mvn clean package shade:shade", shell=True, cwd="grizzly-jersey")
subprocess.Popen("java -jar target/grizzly-jersey-example-0.1.jar".rsplit(" "), cwd="grizzly-jersey")
return 0
except su... |
8ae763c69bbba11a264f8404b8189a53c63d4f40 | marathon_itests/environment.py | marathon_itests/environment.py | import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""
if scenari... | import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""
if context... | Move log print to after_step | Move log print to after_step
| Python | apache-2.0 | Yelp/paasta,gstarnberger/paasta,gstarnberger/paasta,Yelp/paasta,somic/paasta,somic/paasta | import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""
if scenari... | import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""
if context... | <commit_before>import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""... | import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""
if context... | import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""
if scenari... | <commit_before>import time
from itest_utils import wait_for_marathon
from itest_utils import print_container_logs
def before_all(context):
wait_for_marathon()
def after_scenario(context, scenario):
"""If a marathon client object exists in our context, delete any apps in Marathon and wait until they die."""... |
605443886582d13c2b45b19fad86854bf4e8ddbd | backend/catalogue/serializers.py | backend/catalogue/serializers.py | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
class Meta:
model = Track
fields... | Add more fields to Release serializer. | Add more fields to Release serializer.
| Python | mit | ThreeDRadio/playlists,ThreeDRadio/playlists,ThreeDRadio/playlists | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
class Meta:
model = Track
fields... | <commit_before>from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedFi... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
class Meta:
model = Track
fields... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | <commit_before>from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedFi... |
1118541b1cdea7f6079bb63d000ba54f69dfa119 | books/views.py | books/views.py | from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def receipt_list(request... | from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def receipt_list(request, user_... | Use form.save for receipt creation | Use form.save for receipt creation
| Python | mit | trimailov/finance,trimailov/finance,trimailov/finance | from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def receipt_list(request... | from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def receipt_list(request, user_... | <commit_before>from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def recei... | from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def receipt_list(request, user_... | from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def receipt_list(request... | <commit_before>from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from books import models
from books import forms
@login_required
def recei... |
1e01e66f23f7a2ca541a29d29658749f95352c41 | generate-key.py | generate-key.py | #!/usr/bin/python
import os
import sqlite3
import sys
import time
if len(sys.argv) < 3:
raise ValueError('Usage: %s "Firstnam Lastname" [email protected]' % sys.argv[0])
db = sqlite3.connect('/var/lib/zon-api/data.db')
api_key = str(os.urandom(26).encode('hex'))
tier = 'free'
name = sys.argv[1]
email = sys.argv[... | #!/usr/bin/python
import os
import sqlite3
import sys
import time
db = sqlite3.connect('/var/lib/zon-api/data.db')
if len(sys.argv) < 3:
print('Usage: %s "Firstname Lastname" [email protected]' % sys.argv[0])
print('\nLast keys:')
query = 'SELECT * FROM client ORDER by reset DESC limit 10'
for client... | Print last 10 generated keys when no arguments were given. | Print last 10 generated keys when no arguments were given.
| Python | bsd-3-clause | ZeitOnline/content-api,ZeitOnline/content-api | #!/usr/bin/python
import os
import sqlite3
import sys
import time
if len(sys.argv) < 3:
raise ValueError('Usage: %s "Firstnam Lastname" [email protected]' % sys.argv[0])
db = sqlite3.connect('/var/lib/zon-api/data.db')
api_key = str(os.urandom(26).encode('hex'))
tier = 'free'
name = sys.argv[1]
email = sys.argv[... | #!/usr/bin/python
import os
import sqlite3
import sys
import time
db = sqlite3.connect('/var/lib/zon-api/data.db')
if len(sys.argv) < 3:
print('Usage: %s "Firstname Lastname" [email protected]' % sys.argv[0])
print('\nLast keys:')
query = 'SELECT * FROM client ORDER by reset DESC limit 10'
for client... | <commit_before>#!/usr/bin/python
import os
import sqlite3
import sys
import time
if len(sys.argv) < 3:
raise ValueError('Usage: %s "Firstnam Lastname" [email protected]' % sys.argv[0])
db = sqlite3.connect('/var/lib/zon-api/data.db')
api_key = str(os.urandom(26).encode('hex'))
tier = 'free'
name = sys.argv[1]
em... | #!/usr/bin/python
import os
import sqlite3
import sys
import time
db = sqlite3.connect('/var/lib/zon-api/data.db')
if len(sys.argv) < 3:
print('Usage: %s "Firstname Lastname" [email protected]' % sys.argv[0])
print('\nLast keys:')
query = 'SELECT * FROM client ORDER by reset DESC limit 10'
for client... | #!/usr/bin/python
import os
import sqlite3
import sys
import time
if len(sys.argv) < 3:
raise ValueError('Usage: %s "Firstnam Lastname" [email protected]' % sys.argv[0])
db = sqlite3.connect('/var/lib/zon-api/data.db')
api_key = str(os.urandom(26).encode('hex'))
tier = 'free'
name = sys.argv[1]
email = sys.argv[... | <commit_before>#!/usr/bin/python
import os
import sqlite3
import sys
import time
if len(sys.argv) < 3:
raise ValueError('Usage: %s "Firstnam Lastname" [email protected]' % sys.argv[0])
db = sqlite3.connect('/var/lib/zon-api/data.db')
api_key = str(os.urandom(26).encode('hex'))
tier = 'free'
name = sys.argv[1]
em... |
8c01d9c3b7d1938e78a52a86dfb4d8536987c223 | hackfmi/urls.py | hackfmi/urls.py | from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# Examples:
# ... | from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# Examples:
# ... | Change search url regexp to match all characters | Change search url regexp to match all characters
| Python | mit | Hackfmi/Diaphanum,Hackfmi/Diaphanum | from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# Examples:
# ... | from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# Examples:
# ... | <commit_before>from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# E... | from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# Examples:
# ... | from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# Examples:
# ... | <commit_before>from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from members import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.homepage, name='homepage'),
# E... |
2af5eff46cbae0927aeee135c22304e108519659 | server/python_django/file_uploader/__init__.py | server/python_django/file_uploader/__init__.py | """
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or [... | """
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.conf import settings
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=None):
self.allowedEx... | Use the default file upload max memory size | Use the default file upload max memory size
| Python | mit | SimonWaldherr/uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,FineUploader/fine-uploader | """
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or [... | """
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.conf import settings
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=None):
self.allowedEx... | <commit_before>"""
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowed... | """
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.conf import settings
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=None):
self.allowedEx... | """
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or [... | <commit_before>"""
@author: Ferdinand E. Silva
@email: [email protected]
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowed... |
5c874677cc978e1cdd563a563d62bae162d3b7ac | mycroft/skills/audioservice.py | mycroft/skills/audioservice.py | import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
self.info = messag... | import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
self.info = messag... | Add check for valid type of tracks | Add check for valid type of tracks
| Python | apache-2.0 | aatchison/mycroft-core,MycroftAI/mycroft-core,MycroftAI/mycroft-core,aatchison/mycroft-core,linuxipho/mycroft-core,forslund/mycroft-core,linuxipho/mycroft-core,Dark5ide/mycroft-core,Dark5ide/mycroft-core,forslund/mycroft-core | import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
self.info = messag... | import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
self.info = messag... | <commit_before>import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
sel... | import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
self.info = messag... | import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
self.info = messag... | <commit_before>import time
from mycroft.messagebus.message import Message
class AudioService():
def __init__(self, emitter):
self.emitter = emitter
self.emitter.on('MycroftAudioServiceTrackInfoReply', self._track_info)
self.info = None
def _track_info(self, message=None):
sel... |
73fb23af2db047c8012382c03abbf48f392f63b9 | dimod/package_info.py | dimod/package_info.py | __version__ = '1.0.0.dev2'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
| __version__ = '1.0.0.dev3'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
| Update verion 1.0.0.dev2 -> 1.0.0.dev3 | Update verion 1.0.0.dev2 -> 1.0.0.dev3 | Python | apache-2.0 | oneklc/dimod,oneklc/dimod | __version__ = '1.0.0.dev2'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
Update verion 1.0.0.dev2 -> 1.0.0.dev3 | __version__ = '1.0.0.dev3'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
| <commit_before>__version__ = '1.0.0.dev2'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
<commit_msg>Update verion 1.0.0.dev2 -> 1.0.0.dev3<commit_after> | __version__ = '1.0.0.dev3'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
| __version__ = '1.0.0.dev2'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
Update verion 1.0.0.dev2 -> 1.0.0.dev3__version__ = '1.0.0.dev3'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__... | <commit_before>__version__ = '1.0.0.dev2'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = '[email protected]'
__description__ = 'A shared API for binary quadratic model samplers.'
<commit_msg>Update verion 1.0.0.dev2 -> 1.0.0.dev3<commit_after>__version__ = '1.0.0.dev3'
__author__ = 'D-Wave Systems Inc.'
__au... |
77ef9f4a7ccd51d7b070da31ff4c30768653bb7b | tools/build_modref_templates.py | tools/build_modref_templates.py | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api','generated')
... | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api','generated')
... | Remove alloy and s3 from generated docs, just for 0.1 release. | Remove alloy and s3 from generated docs, just for 0.1 release.
git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@496 ead46cd0-7350-4e37-8683-fc4c6f79bf00
| Python | bsd-3-clause | blakedewey/nipype,gerddie/nipype,FCP-INDI/nipype,rameshvs/nipype,blakedewey/nipype,satra/NiPypeold,FCP-INDI/nipype,FredLoney/nipype,arokem/nipype,dmordom/nipype,pearsonlab/nipype,pearsonlab/nipype,Leoniela/nipype,glatard/nipype,mick-d/nipype_source,mick-d/nipype,dmordom/nipype,arokem/nipype,carlohamalainen/nipype,mick-... | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api','generated')
... | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api','generated')
... | <commit_before>#!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api',... | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api','generated')
... | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api','generated')
... | <commit_before>#!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
# local imports
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
package = 'nipype'
outdir = os.path.join('api',... |
0f3c33de86d38cf47f84df97a79e838d37264b7c | sugar/session/LogWriter.py | sugar/session/LogWriter.py | import os
import sys
import dbus
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def start(self):
... | import os
import sys
import dbus
import gobject
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def ... | Add messages on idle so that we don't break | Add messages on idle so that we don't break
| Python | lgpl-2.1 | sugarlabs/sugar-toolkit,ceibal-tatu/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,manuq/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,Daksh/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit,gusDuarte/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,sugarlabs/sugar-toolki... | import os
import sys
import dbus
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def start(self):
... | import os
import sys
import dbus
import gobject
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def ... | <commit_before>import os
import sys
import dbus
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def ... | import os
import sys
import dbus
import gobject
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def ... | import os
import sys
import dbus
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def start(self):
... | <commit_before>import os
import sys
import dbus
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def ... |
2022357fd0f81be6f3ca91718a6c8c1d1d46ac1b | examples/olfaction/config_files/gen_olf_stimuli.py | examples/olfaction/config_files/gen_olf_stimuli.py | """
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("al.hdf5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data point during o... | """
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("olfactory_stimulus.h5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data ... | Rename olfactory stimulus file and internal array. | Rename olfactory stimulus file and internal array.
--HG--
branch : LPU
| Python | bsd-3-clause | cerrno/neurokernel | """
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("al.hdf5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data point during o... | """
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("olfactory_stimulus.h5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data ... | <commit_before>"""
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("al.hdf5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data... | """
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("olfactory_stimulus.h5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data ... | """
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("al.hdf5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data point during o... | <commit_before>"""
Create odorant stimuli in hd5 format
"""
"""
Create the gexf configuration based on E. Hallem's cell paper on 2006
"""
import numpy as np
import h5py
osn_num = 1375;
f = h5py.File("al.hdf5","w")
dt = 1e-4 # time step
Ot = 2000 # number of data point during reset period
Rt = 1000 # number of data... |
58d131e8aceb1adbbcdce2e1d4a86f5fb4615196 | Lib/xml/__init__.py | Lib/xml/__init__.py | """Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David
Meggins... | """Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David
Meggins... | Remove the outer test for __name__; not necessary. | Remove the outer test for __name__; not necessary.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | """Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David
Meggins... | """Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David
Meggins... | <commit_before>"""Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David... | """Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David
Meggins... | """Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David
Meggins... | <commit_before>"""Core XML support for Python.
This package contains three sub-packages:
dom -- The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers -- Python wrappers for XML parsers (currently only supports Expat).
sax -- The Simple API for XML, developed by XML-Dev, led by David... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.