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
5c41066e9c93c417253cbde325a18079c1c69d1a
scipy/sparse/linalg/isolve/__init__.py
scipy/sparse/linalg/isolve/__init__.py
"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester().bench
"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr from lsmr import lsmr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester()....
Add lsmr to isolve module.
ENH: Add lsmr to isolve module.
Python
bsd-3-clause
bkendzior/scipy,mikebenfield/scipy,anielsen001/scipy,nonhermitian/scipy,aeklant/scipy,apbard/scipy,jjhelmus/scipy,giorgiop/scipy,sonnyhu/scipy,befelix/scipy,jor-/scipy,gfyoung/scipy,piyush0609/scipy,pbrod/scipy,Shaswat27/scipy,pschella/scipy,chatcannon/scipy,Newman101/scipy,ilayn/scipy,Newman101/scipy,mtrbean/scipy,Sha...
"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester().bench ENH: Add lsmr to...
"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr from lsmr import lsmr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester()....
<commit_before>"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester().bench <...
"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr from lsmr import lsmr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester()....
"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester().bench ENH: Add lsmr to...
<commit_before>"Iterative Solvers for Sparse Linear Systems" #from info import __doc__ from iterative import * from minres import minres from lgmres import lgmres from lsqr import lsqr __all__ = filter(lambda s:not s.startswith('_'),dir()) from numpy.testing import Tester test = Tester().test bench = Tester().bench <...
493cfa88dae90a19a4173deaae5f4af8934b47b5
datastore/tests/services/test_export.py
datastore/tests/services/test_export.py
from django.test import TestCase from django.contrib.auth.models import User from datastore import models, services class ExportServiceTestCase(TestCase): def setUp(self): user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') project = models.Project.objects.create( ...
Add test of export service
Add test of export service
Python
mit
impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore
Add test of export service
from django.test import TestCase from django.contrib.auth.models import User from datastore import models, services class ExportServiceTestCase(TestCase): def setUp(self): user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') project = models.Project.objects.create( ...
<commit_before><commit_msg>Add test of export service<commit_after>
from django.test import TestCase from django.contrib.auth.models import User from datastore import models, services class ExportServiceTestCase(TestCase): def setUp(self): user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') project = models.Project.objects.create( ...
Add test of export servicefrom django.test import TestCase from django.contrib.auth.models import User from datastore import models, services class ExportServiceTestCase(TestCase): def setUp(self): user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') project = models.P...
<commit_before><commit_msg>Add test of export service<commit_after>from django.test import TestCase from django.contrib.auth.models import User from datastore import models, services class ExportServiceTestCase(TestCase): def setUp(self): user = User.objects.create_user('john', 'lennon@thebeatles.com', '...
993ada8e5e970399b98b40832b5a3d23874ae7fb
plugins/vetting/ontarget/system_info.py
plugins/vetting/ontarget/system_info.py
#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname ''' import os import json # pylint: disable=C0103 system_info = { 'hostname' : os.uname()[1], 'os' : os.uname()[0], 'kernel' : os.uname()[2], } print json.dumps(system_info)
#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname * Networking ''' import os import json import subprocess def get_linux_networking(): ''' Gather linux networking information ''' interfaces = [] if os.path.isdir("/sys/class/net/"): interface...
Revert "Revert "Adding ip interface facts""
Revert "Revert "Adding ip interface facts""
Python
apache-2.0
madflojo/automatron,madflojo/automatron,madflojo/automatron,madflojo/automatron
#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname ''' import os import json # pylint: disable=C0103 system_info = { 'hostname' : os.uname()[1], 'os' : os.uname()[0], 'kernel' : os.uname()[2], } print json.dumps(system_info) Revert "Revert "Adding ip ...
#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname * Networking ''' import os import json import subprocess def get_linux_networking(): ''' Gather linux networking information ''' interfaces = [] if os.path.isdir("/sys/class/net/"): interface...
<commit_before>#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname ''' import os import json # pylint: disable=C0103 system_info = { 'hostname' : os.uname()[1], 'os' : os.uname()[0], 'kernel' : os.uname()[2], } print json.dumps(system_info) <commit_msg...
#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname * Networking ''' import os import json import subprocess def get_linux_networking(): ''' Gather linux networking information ''' interfaces = [] if os.path.isdir("/sys/class/net/"): interface...
#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname ''' import os import json # pylint: disable=C0103 system_info = { 'hostname' : os.uname()[1], 'os' : os.uname()[0], 'kernel' : os.uname()[2], } print json.dumps(system_info) Revert "Revert "Adding ip ...
<commit_before>#!/usr/bin/env python ''' Automatron: Fact Finder Identify facts about a specified host * Hostname ''' import os import json # pylint: disable=C0103 system_info = { 'hostname' : os.uname()[1], 'os' : os.uname()[0], 'kernel' : os.uname()[2], } print json.dumps(system_info) <commit_msg...
ff0631c625cda7c1aac3d86cbc7074a996ef0fc1
powerline/bindings/bar/powerline-bar.py
powerline/bindings/bar/powerline-bar.py
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic from powerline.l...
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic from powerline.l...
Make sure powerline class knows that it will use UTF-8
Make sure powerline class knows that it will use UTF-8
Python
mit
darac/powerline,darac/powerline,junix/powerline,dragon788/powerline,kenrachynski/powerline,junix/powerline,areteix/powerline,russellb/powerline,seanfisk/powerline,Liangjianghao/powerline,lukw00/powerline,xxxhycl2010/powerline,bezhermoso/powerline,bartvm/powerline,EricSB/powerline,cyrixhero/powerline,DoctorJellyface/pow...
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic from powerline.l...
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic from powerline.l...
<commit_before>#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic f...
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic from powerline.l...
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic from powerline.l...
<commit_before>#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import time from threading import Lock from argparse import ArgumentParser from powerline import Powerline from powerline.lib.monotonic import monotonic f...
f99a898d66c9f88496dee73ec574c7b9b69e8dc2
ocds/storage/backends/design/tenders.py
ocds/storage/backends/design/tenders.py
from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): yield (doc['tenderID'], doc) class DateView(CouchView): design = 'dates' @staticmethod def map(doc): yield (doc['dateModified'], doc) views = [ AllDocs()...
from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): if 'doc_type' in doc and doc['doc_type'] != 'Tender': return yield doc['_id'], doc class DateView(CouchView): design = 'dates' @staticmethod def m...
Add filter in design docs
Add filter in design docs
Python
apache-2.0
yshalenyk/openprocurement.ocds.export,yshalenyk/ocds.export,yshalenyk/openprocurement.ocds.export
from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): yield (doc['tenderID'], doc) class DateView(CouchView): design = 'dates' @staticmethod def map(doc): yield (doc['dateModified'], doc) views = [ AllDocs()...
from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): if 'doc_type' in doc and doc['doc_type'] != 'Tender': return yield doc['_id'], doc class DateView(CouchView): design = 'dates' @staticmethod def m...
<commit_before>from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): yield (doc['tenderID'], doc) class DateView(CouchView): design = 'dates' @staticmethod def map(doc): yield (doc['dateModified'], doc) views = ...
from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): if 'doc_type' in doc and doc['doc_type'] != 'Tender': return yield doc['_id'], doc class DateView(CouchView): design = 'dates' @staticmethod def m...
from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): yield (doc['tenderID'], doc) class DateView(CouchView): design = 'dates' @staticmethod def map(doc): yield (doc['dateModified'], doc) views = [ AllDocs()...
<commit_before>from ocds.storage.helpers import CouchView class AllDocs(CouchView): design = 'docs' @staticmethod def map(doc): yield (doc['tenderID'], doc) class DateView(CouchView): design = 'dates' @staticmethod def map(doc): yield (doc['dateModified'], doc) views = ...
d3f33af2fa7d4e7bf9969752e696aaf8120642bc
panoptes/environment/weather_station.py
panoptes/environment/weather_station.py
import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from the monitor.En...
import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from the monitor.En...
Set up weather station to receive updates
Set up weather station to receive updates
Python
mit
Guokr1991/POCS,fmin2958/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,fmin2958/POCS,Guokr1991/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,joshwalawender/POCS,Guokr1991/POCS,AstroHuntsman/POCS,fmin2958/POCS,joshwalawender/POCS,joshwalawender/POCS,Guokr1991/POCS
import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from the monitor.En...
import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from the monitor.En...
<commit_before>import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from...
import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from the monitor.En...
import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from the monitor.En...
<commit_before>import datetime import zmq from . import monitor from panoptes.utils import logger, config, messaging, threads @logger.has_logger @config.has_config class WeatherStation(monitor.EnvironmentalMonitor): """ This object is used to determine the weather safe/unsafe condition. It inherits from...
dc40793ad27704c83dbbd2e923bf0cbcd7cb00ed
polyaxon/event_manager/event_service.py
polyaxon/event_manager/event_service.py
from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, instance, **kwargs): return...
from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, event_data=None, instance=None, **k...
Handle both event instanciation from object and from serialized events
Handle both event instanciation from object and from serialized events
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, instance, **kwargs): return...
from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, event_data=None, instance=None, **k...
<commit_before>from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, instance, **kwargs):...
from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, event_data=None, instance=None, **k...
from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, instance, **kwargs): return...
<commit_before>from libs.services import Service class EventService(Service): __all__ = ('record', 'setup') event_manager = None def can_handle(self, event_type): return isinstance(event_type, str) and self.event_manager.knows(event_type) def get_event(self, event_type, instance, **kwargs):...
38d298a81aa8fcd85b16b3879c1665085e5450be
exercises/control_flow/prime.py
exercises/control_flow/prime.py
#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0)) print("Should be False (1): %r" % is_prime(1)) print("Sho...
#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" # add logic here to make sure number < 2 are not prime for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0...
Add description where student should add logic
Add description where student should add logic
Python
mit
introprogramming/exercises,introprogramming/exercises,introprogramming/exercises
#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0)) print("Should be False (1): %r" % is_prime(1)) print("Sho...
#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" # add logic here to make sure number < 2 are not prime for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0...
<commit_before>#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0)) print("Should be False (1): %r" % is_prime...
#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" # add logic here to make sure number < 2 are not prime for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0...
#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0)) print("Should be False (1): %r" % is_prime(1)) print("Sho...
<commit_before>#!/bin/python def is_prime(integer): """Determines weather integer is prime, returns a boolean value""" for i in range(2, integer): if integer % i == 0: return False return True print("Should be False (0): %r" % is_prime(0)) print("Should be False (1): %r" % is_prime...
d5b326d8d368d2ac75c6e078572df8c28704c163
vcs/models.py
vcs/models.py
from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=10) unique_...
from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=10) unique_...
Use the app string version of foreign keying. It prevents a circular import.
Use the app string version of foreign keying. It prevents a circular import.
Python
bsd-3-clause
AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker
from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=10) unique_...
from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=10) unique_...
<commit_before>from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=...
from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=10) unique_...
from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=10) unique_...
<commit_before>from django.db import models class Activity(models.Model): group = models.CharField(max_length=4) grouptype = models.TextField() groupdetail = models.TextField() details = models.TextField() disabled = models.BooleanField() time = models.DecimalField(decimal_places=2, max_digits=...
1163bc40a15eb2461c6ead570db8a8d211f1f5be
web/blueprints/facilities/tables.py
web/blueprints/facilities/tables.py
from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.multiBtnFormatter...
from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.multiBtnFormatter...
Sort room table by room name by default
Sort room table by room name by default
Python
apache-2.0
agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft
from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.multiBtnFormatter...
from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.multiBtnFormatter...
<commit_before>from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.mu...
from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.multiBtnFormatter...
from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.multiBtnFormatter...
<commit_before>from web.blueprints.helpers.table import BootstrapTable, Column class SiteTable(BootstrapTable): def __init__(self, *a, **kw): super().__init__(*a, columns=[ Column('site', 'Site', formatter='table.linkFormatter'), Column('buildings', 'Buildings', formatter='table.mu...
1abbca6200fa3da0a3216b18b1385f3575edb49a
registration/__init__.py
registration/__init__.py
from django.utils.version import get_version as django_get_version VERSION = (0, 9, 0, 'beta', 1) def get_version(): return django_get_version(VERSION) # pragma: no cover
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover
Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.
Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.
Python
bsd-3-clause
myimages/django-registration,Troyhy/django-registration,futurecolors/django-registration,hacklabr/django-registration,akvo/django-registration,sandipagr/django-registration,futurecolors/django-registration,liberation/django-registration,euanlau/django-registration,tdruez/django-registration,Troyhy/django-registration,g...
from django.utils.version import get_version as django_get_version VERSION = (0, 9, 0, 'beta', 1) def get_version(): return django_get_version(VERSION) # pragma: no cover Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover
<commit_before>from django.utils.version import get_version as django_get_version VERSION = (0, 9, 0, 'beta', 1) def get_version(): return django_get_version(VERSION) # pragma: no cover <commit_msg>Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.<co...
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover
from django.utils.version import get_version as django_get_version VERSION = (0, 9, 0, 'beta', 1) def get_version(): return django_get_version(VERSION) # pragma: no cover Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.VERSION = (0, 9, 0, 'beta', 1)...
<commit_before>from django.utils.version import get_version as django_get_version VERSION = (0, 9, 0, 'beta', 1) def get_version(): return django_get_version(VERSION) # pragma: no cover <commit_msg>Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.<co...
37d01f6088b1cf5673f66f4532dd51c73a0156f1
rest_framework/authtoken/serializers.py
rest_framework/authtoken/serializers.py
from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): username...
from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): username...
Fix grammar in login error message
Fix grammar in login error message
Python
bsd-2-clause
sehmaschine/django-rest-framework,arpheno/django-rest-framework,ajaali/django-rest-framework,adambain-vokal/django-rest-framework,buptlsl/django-rest-framework,aericson/django-rest-framework,YBJAY00000/django-rest-framework,VishvajitP/django-rest-framework,werthen/django-rest-framework,xiaotangyuan/django-rest-framewor...
from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): username...
from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): username...
<commit_before>from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): ...
from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): username...
from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): username...
<commit_before>from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): username = serializers.CharField() password = serializers.CharField() def validate(self, attrs): ...
cd9a51ab2fe6b99c0665b8f499363a4d557b4a4d
DataWrangling/CaseStudy/sample_file.py
DataWrangling/CaseStudy/sample_file.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def get_element(osm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def get_element(osm...
Modify script which split your region in smaller sample
feat: Modify script which split your region in smaller sample
Python
mit
aguijarro/DataSciencePython
#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def get_element(osm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def get_element(osm...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def get_element(osm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def get_element(osm...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def ...
828e75919bd71912baf75a64010efcfcd93d07f1
library_magic.py
library_magic.py
import sys import subprocess import shutil executable = sys.argv[1] execfolder = sys.argv[1].rsplit("/",1)[0] libdir = execfolder+"/lib" otool_cmd = ["otool", "-L",executable] # Run otool otool_out = subprocess.check_output(otool_cmd).split("\n\t") # Find all the dylib files for l in otool_out: s = l.split(".dylib"...
import sys import subprocess import shutil copied = [] def update_libraries(executable): # Find all the dylib files and recursively add dependencies print "\nChecking dependencies of " + executable otool_cmd = ["otool", "-L",executable] execfolder = executable.rsplit("/",1)[0] otool_out = subprocess.check_outp...
Update library magic to be recursive
Update library magic to be recursive
Python
bsd-3-clause
baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB
import sys import subprocess import shutil executable = sys.argv[1] execfolder = sys.argv[1].rsplit("/",1)[0] libdir = execfolder+"/lib" otool_cmd = ["otool", "-L",executable] # Run otool otool_out = subprocess.check_output(otool_cmd).split("\n\t") # Find all the dylib files for l in otool_out: s = l.split(".dylib"...
import sys import subprocess import shutil copied = [] def update_libraries(executable): # Find all the dylib files and recursively add dependencies print "\nChecking dependencies of " + executable otool_cmd = ["otool", "-L",executable] execfolder = executable.rsplit("/",1)[0] otool_out = subprocess.check_outp...
<commit_before>import sys import subprocess import shutil executable = sys.argv[1] execfolder = sys.argv[1].rsplit("/",1)[0] libdir = execfolder+"/lib" otool_cmd = ["otool", "-L",executable] # Run otool otool_out = subprocess.check_output(otool_cmd).split("\n\t") # Find all the dylib files for l in otool_out: s = l...
import sys import subprocess import shutil copied = [] def update_libraries(executable): # Find all the dylib files and recursively add dependencies print "\nChecking dependencies of " + executable otool_cmd = ["otool", "-L",executable] execfolder = executable.rsplit("/",1)[0] otool_out = subprocess.check_outp...
import sys import subprocess import shutil executable = sys.argv[1] execfolder = sys.argv[1].rsplit("/",1)[0] libdir = execfolder+"/lib" otool_cmd = ["otool", "-L",executable] # Run otool otool_out = subprocess.check_output(otool_cmd).split("\n\t") # Find all the dylib files for l in otool_out: s = l.split(".dylib"...
<commit_before>import sys import subprocess import shutil executable = sys.argv[1] execfolder = sys.argv[1].rsplit("/",1)[0] libdir = execfolder+"/lib" otool_cmd = ["otool", "-L",executable] # Run otool otool_out = subprocess.check_output(otool_cmd).split("\n\t") # Find all the dylib files for l in otool_out: s = l...
dfa39db42cc5ce2c29da2ec0c388865ec7f41030
oauth2_provider/forms.py
oauth2_provider/forms.py
from django import forms class AllowForm(forms.Form): redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.CharField(required=False, widget=forms.HiddenInput(...
from django import forms class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.Char...
Add allow field to form
Add allow field to form
Python
bsd-2-clause
trbs/django-oauth-toolkit,DeskConnect/django-oauth-toolkit,jensadne/django-oauth-toolkit,vmalavolta/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,Gr1N/django-oauth-toolkit,andrefsp/django-oauth-toolkit,jensadne/django-oauth-toolkit,drgarcia1986/django-oauth-toolkit,bleib1dj/...
from django import forms class AllowForm(forms.Form): redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.CharField(required=False, widget=forms.HiddenInput(...
from django import forms class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.Char...
<commit_before>from django import forms class AllowForm(forms.Form): redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.CharField(required=False, widget=for...
from django import forms class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.Char...
from django import forms class AllowForm(forms.Form): redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.CharField(required=False, widget=forms.HiddenInput(...
<commit_before>from django import forms class AllowForm(forms.Form): redirect_uri = forms.URLField(widget=forms.HiddenInput()) scopes = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=forms.HiddenInput()) state = forms.CharField(required=False, widget=for...
11cd074f67668135d606f68dddb66c465ec01756
opps/core/tags/models.py
opps/core/tags/models.py
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True) def save(self,...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True, ...
Add db index on field tag name
Add db index on field tag name
Python
mit
jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,williamroot/opps
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True) def save(self,...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True, ...
<commit_before># -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True) ...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True, ...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True) def save(self,...
<commit_before># -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from opps.core.models import Date, Slugged class Tag(Date, Slugged): name = models.CharField(_(u'Name'), max_length=255, unique=True) ...
38a2d86aed4ea1e94691993c5f49722f9a69ac8d
lisa/__init__.py
lisa/__init__.py
#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibility purposes. ...
#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibility purposes. ...
Remove Python < 3.6 version check
lisa: Remove Python < 3.6 version check Since Python >= 3.6 is now mandatory, remove the check and the warning.
Python
apache-2.0
ARM-software/lisa,credp/lisa,credp/lisa,credp/lisa,credp/lisa,ARM-software/lisa,ARM-software/lisa,ARM-software/lisa
#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibility purposes. ...
#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibility purposes. ...
<commit_before>#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibi...
#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibility purposes. ...
#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibility purposes. ...
<commit_before>#! /usr/bin/env python3 import warnings import os import sys from lisa.version import __version__ # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibi...
7fd76d87cfda8f02912985cb3cf650ee8ff2e11e
mica/report/tests/test_write_report.py
mica/report/tests/test_write_report.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: HAS_SYBASE_ACCESS = True except: HAS_SYBASE_AC...
Remove py2 Ska.DBI assert in report test
Remove py2 Ska.DBI assert in report test
Python
bsd-3-clause
sot/mica,sot/mica
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: HAS_SYBASE_ACCESS = True except: HAS_SYBASE_AC...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: HAS_SYBASE_ACCESS = True except: HAS_SYBASE_AC...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 ...
ed0821bd41a10dd00727f09cf9ba82123bd2cf93
scripts/import_permissions_and_roles.py
scripts/import_permissions_and_roles.py
#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_config_filename_from...
#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_config_filename_from...
Fix output of permissions import script
Fix output of permissions import script
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_config_filename_from...
#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_config_filename_from...
<commit_before>#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_confi...
#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_config_filename_from...
#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_config_filename_from...
<commit_before>#!/usr/bin/env python """Import permissions, roles, and their relations from a TOML file. :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ import click from byceps.services.authorization import impex_service from byceps.util.system import get_confi...
f20c911285cc83f2cfe2b4650ba85f4b82eae43c
plyer/facades/temperature.py
plyer/facades/temperature.py
class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperature in degree C...
class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius (°C) With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperature in...
Improve description about the api
Improve description about the api
Python
mit
KeyWeeUsr/plyer,kivy/plyer,kivy/plyer,kived/plyer,KeyWeeUsr/plyer,kived/plyer,kivy/plyer,KeyWeeUsr/plyer
class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperature in degree C...
class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius (°C) With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperature in...
<commit_before>class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperat...
class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius (°C) With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperature in...
class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperature in degree C...
<commit_before>class Temperature(object): '''Temperature facade. Temperature sensor is used to measure the ambient room temperature in degrees Celsius With method `enable` you can turn on temperature sensor and 'disable' method stops the sensor. Use property `temperature` to get ambient air temperat...
d6c81135077867283738bcf9cceb0ce8198808d6
unicornclient/config.py
unicornclient/config.py
import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO HOST = 'unic...
import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO HOST = 'unic...
Enable SSL verify for prod
Enable SSL verify for prod
Python
mit
amm0nite/unicornclient,amm0nite/unicornclient
import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO HOST = 'unic...
import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO HOST = 'unic...
<commit_before>import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO ...
import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO HOST = 'unic...
import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO HOST = 'unic...
<commit_before>import os import logging ENV = os.getenv('PYTHONENV', 'prod') LOG_LEVEL = logging.DEBUG LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' HOST = 'localhost' PORT = 8080 SSL_VERIFY = False DEFAULT_ROUTINES = ['auth', 'ping', 'status', 'system'] if ENV == 'prod': LOG_LEVEL = logging.INFO ...
462312c3acf2d6daf7d8cd27f251b8cb92647f5e
pybossa/auth/category.py
pybossa/auth/category.py
from flaskext.login import current_user def create(app=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(app=None): return True def update(app): return create(app) d...
from flaskext.login import current_user def create(category=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(category=None): return True def update(category): return ...
Fix a typo in the variable name
Fix a typo in the variable name
Python
agpl-3.0
jean/pybossa,geotagx/geotagx-pybossa-archive,OpenNewsLabs/pybossa,stefanhahmann/pybossa,proyectos-analizo-info/pybossa-analizo-info,stefanhahmann/pybossa,proyectos-analizo-info/pybossa-analizo-info,Scifabric/pybossa,geotagx/geotagx-pybossa-archive,geotagx/geotagx-pybossa-archive,OpenNewsLabs/pybossa,harihpr/tweetclicke...
from flaskext.login import current_user def create(app=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(app=None): return True def update(app): return create(app) d...
from flaskext.login import current_user def create(category=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(category=None): return True def update(category): return ...
<commit_before>from flaskext.login import current_user def create(app=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(app=None): return True def update(app): return ...
from flaskext.login import current_user def create(category=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(category=None): return True def update(category): return ...
from flaskext.login import current_user def create(app=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(app=None): return True def update(app): return create(app) d...
<commit_before>from flaskext.login import current_user def create(app=None): if current_user.is_authenticated(): if current_user.admin is True: return True else: return False else: return False def read(app=None): return True def update(app): return ...
1ee2e880872c4744f4159df7fc64bb64b3f35632
pygametemplate/button.py
pygametemplate/button.py
import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pressed sel...
import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pressed sel...
Add docstring to Button.time_held() method
Add docstring to Button.time_held() method
Python
mit
AndyDeany/pygame-template
import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pressed sel...
import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pressed sel...
<commit_before>import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pres...
import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pressed sel...
import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pressed sel...
<commit_before>import time class Button(object): """Class representing keyboard keys.""" def __init__(self, game, number): self.game = game self.number = number self.event = None # The last event that caused the button press self.pressed = 0 # If the button was just pres...
6708830ab2bde841bbc3da2befbbe5ab9f3d21aa
ansi_str.py
ansi_str.py
import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call the ``len`` metho...
import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call the ``len`` metho...
Put test stuff inside `if __name__ == '__main__'`
Put test stuff inside `if __name__ == '__main__'`
Python
mit
msabramo/ansi_str
import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call the ``len`` metho...
import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call the ``len`` metho...
<commit_before>import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call th...
import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call the ``len`` metho...
import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call the ``len`` metho...
<commit_before>import re _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def strip_ansi(value): return _ansi_re.sub('', value) def len_exclude_ansi(value): return len(strip_ansi(value)) class ansi_str(str): """A str subclass, specialized for strings containing ANSI escapes. When you call th...
1056c3f489b162d77b6c117fad2b45bfa06beee1
app/urls.py
app/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views.splash', name='...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views.splash', name='sp...
Revert "Added a post view"
Revert "Added a post view" This reverts commit b1063480e7b2e1128c457e9e65c52f742109d90d.
Python
unlicense
yourbuddyconner/cs399-social,yourbuddyconner/cs399-social
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views.splash', name='...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views.splash', name='sp...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views....
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views.splash', name='sp...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views.splash', name='...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings #from . import views urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.views....
1165c923145be18d40fda1fc4303cac3e1613078
app/util.py
app/util.py
# Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache_key not in dat...
# Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache_key not in dat...
Update cached_function wrapper to set qualname instead of name
Update cached_function wrapper to set qualname instead of name
Python
mit
albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com
# Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache_key not in dat...
# Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache_key not in dat...
<commit_before># Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache...
# Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache_key not in dat...
# Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache_key not in dat...
<commit_before># Various utility functions import os SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production' def cached_function(func): data = {} def wrapper(*args): if not SHOULD_CACHE: return func(*args) cache_key = ' '.join([str(x) for x in args]) if cache...
4e74723aac53956fb0316ae0d438da623de133d5
tests/extensions/video/test_renderer.py
tests/extensions/video/test_renderer.py
import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): return '/tmp/test.mp4' @...
import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): ...
Add and update tests for video renderer
Add and update tests for video renderer
Python
apache-2.0
felliott/modular-file-renderer,CenterForOpenScience/modular-file-renderer,felliott/modular-file-renderer,CenterForOpenScience/modular-file-renderer,CenterForOpenScience/modular-file-renderer,CenterForOpenScience/modular-file-renderer,felliott/modular-file-renderer,felliott/modular-file-renderer
import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): return '/tmp/test.mp4' @...
import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): ...
<commit_before>import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): return '/tm...
import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): ...
import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): return '/tmp/test.mp4' @...
<commit_before>import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.video import VideoRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/file/test.mp4?token=1234') @pytest.fixture def file_path(): return '/tm...
0b048cef1f0efd190d8bf8f50c69df35c59b91a3
xdc-plugin/tests/compare_output_json.py
xdc-plugin/tests/compare_output_json.py
#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json def read_cells(json_file): with open(json_file) as f: data = j...
#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"] def read_cells(js...
Add verbosity on JSON compare fail
XDC: Add verbosity on JSON compare fail Signed-off-by: Tomasz Michalak <a2fdaa543b4cc5e3d6cd8672ec412c0eb393b86e@antmicro.com>
Python
apache-2.0
SymbiFlow/yosys-symbiflow-plugins,SymbiFlow/yosys-symbiflow-plugins,SymbiFlow/yosys-f4pga-plugins,SymbiFlow/yosys-symbiflow-plugins,chipsalliance/yosys-f4pga-plugins,antmicro/yosys-symbiflow-plugins,chipsalliance/yosys-f4pga-plugins,antmicro/yosys-symbiflow-plugins,antmicro/yosys-symbiflow-plugins,SymbiFlow/yosys-f4pga...
#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json def read_cells(json_file): with open(json_file) as f: data = j...
#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"] def read_cells(js...
<commit_before>#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json def read_cells(json_file): with open(json_file) as f: ...
#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"] def read_cells(js...
#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json def read_cells(json_file): with open(json_file) as f: data = j...
<commit_before>#!/usr/bin/env python3 """ This script extracts the top module cells and their corresponding parameters from json files produced by Yosys. The return code of this script is used to check if the output is equivalent. """ import sys import json def read_cells(json_file): with open(json_file) as f: ...
b82f21ea92aad44ca101744a3f5300280f081524
sweettooth/review/context_processors.py
sweettooth/review/context_processors.py
from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.unreviewed().count())
from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.objects.unreviewed().count())
Fix site when logged in
Fix site when logged in
Python
agpl-3.0
GNOME/extensions-web,magcius/sweettooth,GNOME/extensions-web,magcius/sweettooth,GNOME/extensions-web,GNOME/extensions-web
from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.unreviewed().count()) Fix site when logged in
from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.objects.unreviewed().count())
<commit_before> from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.unreviewed().count()) <commit_msg>Fix site when logged in<commit_after>
from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.objects.unreviewed().count())
from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.unreviewed().count()) Fix site when logged in from extensions.models import ExtensionVe...
<commit_before> from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.unreviewed().count()) <commit_msg>Fix site when logged in<commit_after> ...
ec7b52b457e749b4b4a1e9110ede221f2f0d5fe9
data/propaganda2mongo.py
data/propaganda2mongo.py
import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_table.get(ident)...
import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_table.get(ident)...
Fix fatal error in data processing.
Fix fatal error in data processing. The wrong identifier was being used as the key to tell whether a propagandist had been seen before in the dataset, leading to a completely, and incorrectly disconnected graph.
Python
apache-2.0
XDATA-Year-3/clique-propaganda,XDATA-Year-3/clique-propaganda,XDATA-Year-3/clique-propaganda
import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_table.get(ident)...
import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_table.get(ident)...
<commit_before>import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_t...
import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_table.get(ident)...
import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_table.get(ident)...
<commit_before>import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_t...
5bde6ca1fd62277463156875e874c4c6843923fd
pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py
pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
Use the correct variable for the test
Use the correct variable for the test
Python
mit
luzfcb/cookiecutter-pytest-plugin,pytest-dev/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
<commit_before># -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args...
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
<commit_before># -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args...
2549a66b6785d5a0ed0658a4f375a21c486792df
sifr/util.py
sifr/util.py
import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): return ...
import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): return ...
Raise explicit exception on no type match
Raise explicit exception on no type match
Python
mit
alisaifee/sifr,alisaifee/sifr
import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): return ...
import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): return ...
<commit_before>import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): ...
import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): return ...
import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): return ...
<commit_before>import datetime from dateutil import parser import six def normalize_time(t): try: if isinstance(t, datetime.datetime): return t elif isinstance(t, datetime.date): return datetime.datetime(t.year, t.month, t.day) elif isinstance(t, (int, float)): ...
66d1bce2cb497954749b211a26fd00ae4db6f7e7
foodsaving/conversations/serializers.py
foodsaving/conversations/serializers.py
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
Remove random bit of code
Remove random bit of code I have no idea what that is doing there. It is not called from what I can tell, and the tests work without it. And it makes no sense whatsoever, create a message each time you retrieve the conversation info??!?!?!
Python
agpl-3.0
yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/yunity-core
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
<commit_before>from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta:...
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta: model ...
<commit_before>from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from foodsaving.conversations.models import Conversation, ConversationMessage class ConversationSerializer(serializers.ModelSerializer): class Meta:...
d3847357c446c4a1ac50735b983b20cf57f9c7c6
malcolm/controllers/countercontroller.py
malcolm/controllers/countercontroller.py
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMeta("counte...
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes, returns import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMet...
Fix args and return of CounterController functions
Fix args and return of CounterController functions Even though they're not used, functions to be wrapped by Methods have to take arguments and return something (at least an empty dict).
Python
apache-2.0
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMeta("counte...
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes, returns import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMet...
<commit_before>from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(Num...
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes, returns import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMet...
from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(NumberMeta("counte...
<commit_before>from malcolm.core.controller import Controller from malcolm.core.attribute import Attribute from malcolm.core.numbermeta import NumberMeta from malcolm.core.method import takes import numpy as np class CounterController(Controller): def create_attributes(self): self.counter = Attribute(Num...
270af43ffbe8974698d17ff6d5cae20fbf410f73
admin/urls.py
admin/urls.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/connection/?(?P<slug>[\w-]+)?", ConnectionHandler), (r"/admin/cube/?(?P<slug>[\w-]+)?", CubeHandler), (r"/ad...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler, DeleteHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/delete/(?P<bucket>[\w-]+)/(?P<slug>[\w-]+)", DeleteHandler), (r"/admin/connection/?(?P<slug>[\w-]...
Add url enter delete element on riak
Add url enter delete element on riak
Python
mit
jgabriellima/mining,avelino/mining,chrisdamba/mining,seagoat/mining,avelino/mining,AndrzejR/mining,mlgruby/mining,mlgruby/mining,mining/mining,mlgruby/mining,mining/mining,chrisdamba/mining,AndrzejR/mining,seagoat/mining,jgabriellima/mining
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/connection/?(?P<slug>[\w-]+)?", ConnectionHandler), (r"/admin/cube/?(?P<slug>[\w-]+)?", CubeHandler), (r"/ad...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler, DeleteHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/delete/(?P<bucket>[\w-]+)/(?P<slug>[\w-]+)", DeleteHandler), (r"/admin/connection/?(?P<slug>[\w-]...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/connection/?(?P<slug>[\w-]+)?", ConnectionHandler), (r"/admin/cube/?(?P<slug>[\w-]+)?", CubeHandl...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler, DeleteHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/delete/(?P<bucket>[\w-]+)/(?P<slug>[\w-]+)", DeleteHandler), (r"/admin/connection/?(?P<slug>[\w-]...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/connection/?(?P<slug>[\w-]+)?", ConnectionHandler), (r"/admin/cube/?(?P<slug>[\w-]+)?", CubeHandler), (r"/ad...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from .views import CubeHandler, ConnectionHandler from .views import ElementHandler, DashboardHandler, APIElementCubeHandler INCLUDE_URLS = [ (r"/admin/connection/?(?P<slug>[\w-]+)?", ConnectionHandler), (r"/admin/cube/?(?P<slug>[\w-]+)?", CubeHandl...
4e12aea0a5479bad8289cbf6c9f460931d51f701
database.py
database.py
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("insert into " + txt) dbc...
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) self.db.autocommit(True) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("i...
Add autocommit to 1 to avoid select cache ¿WTF?
Add autocommit to 1 to avoid select cache ¿WTF?
Python
agpl-3.0
p4u/projecte_frigos,p4u/projecte_frigos,p4u/projecte_frigos,p4u/projecte_frigos
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("insert into " + txt) dbc...
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) self.db.autocommit(True) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("i...
<commit_before>import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("insert into " +...
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) self.db.autocommit(True) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("i...
import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("insert into " + txt) dbc...
<commit_before>import MySQLdb class database(object): def __init__(self): config = {} execfile("config.py",config) self.db = MySQLdb.connect(config["host"],config["user"],config["password"],config["database"]) def insert(self,txt): dbc = self.db.cursor() try: dbc.execute("insert into " +...
f25e0fe435f334e19fc84a9c9458a1bea4a051f9
money/parser/__init__.py
money/parser/__init__.py
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) return rows def import_movements(data, bank_ac...
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0, reverse_order=False): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) ...
Allow to reverse the order of the CSV for a proper reading
Allow to reverse the order of the CSV for a proper reading
Python
bsd-3-clause
shakaran/casterly,shakaran/casterly
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) return rows def import_movements(data, bank_ac...
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0, reverse_order=False): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) ...
<commit_before>import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) return rows def import_movement...
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0, reverse_order=False): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) ...
import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) return rows def import_movements(data, bank_ac...
<commit_before>import csv from money.models import Movement def parse_csv(raw_csv, parser, header_lines=0): reader = csv.reader(raw_csv, delimiter=',', quotechar='"') rows = [] for row in reader: if reader.line_num > header_lines and row: rows.append(parser.parse_row(row)) return rows def import_movement...
c4ef7fe24477d9160214c1cd2938aa8f5135d84b
utils/database_setup.py
utils/database_setup.py
import pandas def load_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) def get_column_n...
import pandas import argparse def get_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) d...
Add other needed method stubs
Add other needed method stubs
Python
mit
stuy-tetrabyte/graduation-req-tracker
import pandas def load_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) def get_column_n...
import pandas import argparse def get_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) d...
<commit_before>import pandas def load_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) d...
import pandas import argparse def get_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) d...
import pandas def load_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) def get_column_n...
<commit_before>import pandas def load_excel(filepath): """ Returns a Pandas datafile that contains the contents of a Microsoft Excel Spreadsheet Params: filepath - A string containing the path to the file Returns: A Pandas datafile """ return pandas.read_excel(filepath) d...
d52c4340a62802bcd0fcbd68516c5ac66fb10436
ftfy/streamtester/__init__.py
ftfy/streamtester/__init__.py
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_text_encoding from ftfy.chardata import possible_encoding class Stream...
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_encoding from ftfy.chardata import possible_encoding class StreamTeste...
Update function name used in the streamtester
Update function name used in the streamtester
Python
mit
LuminosoInsight/python-ftfy
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_text_encoding from ftfy.chardata import possible_encoding class Stream...
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_encoding from ftfy.chardata import possible_encoding class StreamTeste...
<commit_before>""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_text_encoding from ftfy.chardata import possible_encoding...
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_encoding from ftfy.chardata import possible_encoding class StreamTeste...
""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_text_encoding from ftfy.chardata import possible_encoding class Stream...
<commit_before>""" This file defines a general method for evaluating ftfy using data that arrives in a stream. A concrete implementation of it is found in `twitter_tester.py`. """ from __future__ import print_function, unicode_literals from ftfy.fixes import fix_text_encoding from ftfy.chardata import possible_encoding...
7a786fd031c3faa057256abc5d9cb47618041696
checks.d/veneur.py
checks.d/veneur.py
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' MAX_AGE_CHECK_NAME = 'veneur.build_age.fresh' # Check that the build is no more th...
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' def check(self, instance): success = 0 host = instance['host'] ...
Configure max build age on the monitoring side
Configure max build age on the monitoring side
Python
mit
stripe/stripe-datadog-checks,stripe/datadog-checks
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' MAX_AGE_CHECK_NAME = 'veneur.build_age.fresh' # Check that the build is no more th...
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' def check(self, instance): success = 0 host = instance['host'] ...
<commit_before>import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' MAX_AGE_CHECK_NAME = 'veneur.build_age.fresh' # Check that the buil...
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' def check(self, instance): success = 0 host = instance['host'] ...
import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' MAX_AGE_CHECK_NAME = 'veneur.build_age.fresh' # Check that the build is no more th...
<commit_before>import datetime from urlparse import urljoin import requests # project from checks import AgentCheck class Veneur(AgentCheck): VERSION_METRIC_NAME = 'veneur.deployed_version' BUILDAGE_METRIC_NAME = 'veneur.build_age' MAX_AGE_CHECK_NAME = 'veneur.build_age.fresh' # Check that the buil...
859d5ce6553b7651f05f27adec28e8c4330ca9bb
handler/supervisor_to_serf.py
handler/supervisor_to_serf.py
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
Add id of node generating the supervisor event
Add id of node generating the supervisor event
Python
mit
waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
<commit_before>#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGE...
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGED to READY ...
<commit_before>#!/usr/bin/env python import json import sys from utils import serf_event def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): while True: write_stdout('READY\n') # transition from ACKNOWLEDGE...
c136d416c2cb53449e1c175412eeaa46a2f78db1
zou/app/utils/emails.py
zou/app/utils/emails.py
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
Fix syntax error in email service
Fix syntax error in email service
Python
agpl-3.0
cgwire/zou
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
<commit_before>from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( ...
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( sender=...
<commit_before>from flask_mail import Message from zou.app import mail, app def send_email(subject, body, recipient_email, html=None): """ Send an email with given subject and body to given recipient. """ if html is None: html = body with app.app_context(): message = Message( ...
020015cccceb3c2391c4764ee2ec29dfc5c461c6
__init__.py
__init__.py
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): app.getController().addView("LayerView", LayerView.LayerView())
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): return LayerView.LayerView()
Update plugin's register functions to return the object instance instead of performing the registration themselves
Update plugin's register functions to return the object instance instead of performing the registration themselves
Python
agpl-3.0
Curahelper/Cura,bq/Ultimaker-Cura,ad1217/Cura,bq/Ultimaker-Cura,senttech/Cura,lo0ol/Ultimaker-Cura,quillford/Cura,derekhe/Cura,ynotstartups/Wanhao,markwal/Cura,lo0ol/Ultimaker-Cura,senttech/Cura,DeskboxBrazil/Cura,ynotstartups/Wanhao,totalretribution/Cura,ad1217/Cura,fieldOfView/Cura,quillford/Cura,fxtentacle/Cura,dere...
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): app.getController().addView("LayerView", LayerView.LayerView()) Update plugin's register functions to return the object instance instead of performing the registration themselves
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): return LayerView.LayerView()
<commit_before>from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): app.getController().addView("LayerView", LayerView.LayerView()) <commit_msg>Update plugin's register functions to return the object instance instead of performing the registration thems...
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): return LayerView.LayerView()
from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): app.getController().addView("LayerView", LayerView.LayerView()) Update plugin's register functions to return the object instance instead of performing the registration themselvesfrom . import LayerVie...
<commit_before>from . import LayerView def getMetaData(): return { "name": "LayerView", "type": "View" } def register(app): app.getController().addView("LayerView", LayerView.LayerView()) <commit_msg>Update plugin's register functions to return the object instance instead of performing the registration thems...
b186ed26e3250d8b02c94f5bb3b394c35986bcf6
__init__.py
__init__.py
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
Remove an import which snuck in but does not belong.
Remove an import which snuck in but does not belong. Signed-off-by: Robert Deaton <eb00a885478926d5d594195591fb94a03acb1062@udel.edu>
Python
lgpl-2.1
platipy/spyral
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
<commit_before>""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import col...
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import color import rect ...
<commit_before>""" Spyral, an awesome library for making games. """ __version__ = '0.1.1' __license__ = 'MIT' __author__ = 'Robert Deaton' import compat import memoize import point import camera import sprite import scene import _lib import event import animator import animation import pygame import image import col...
0ec01e1c5770c87faa5300b80c3b9d6bcb0df41b
tcxparser.py
tcxparser.py
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.3.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.4.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
Make sure to return python values, not lxml objects
Make sure to return python values, not lxml objects Bump version to 0.4.0
Python
bsd-2-clause
vkurup/python-tcxparser,vkurup/python-tcxparser,SimonArnu/python-tcxparser
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.3.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.4.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
<commit_before>"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.3.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(...
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.4.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.3.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(self): ...
<commit_before>"Simple parser for Garmin TCX files." from lxml import objectify __version__ = '0.3.0' class TcxParser: def __init__(self, tcx_file): tree = objectify.parse(tcx_file) self.root = tree.getroot() self.activity = self.root.Activities.Activity @property def latitude(...
3f18e4891b64c45fbda9ae88e9b508b5bc2cb03a
temp2dash.py
temp2dash.py
import json import requests import sys from temperusb import TemperHandler URL="http://dashing:3030/widgets/inside" SCALE=1.0 OFFSET=-3.0 th = TemperHandler() devs = th.get_devices() if len(devs) != 1: print "Expected exactly one TEMPer device, found %d" % len(devs) sys.exit(1) dev = devs[0] dev.set_calibr...
import json import os import requests import sys import time import traceback from temperusb import TemperHandler URL = os.environ['DASHING_URL'] SCALE = float(os.environ['TEMP_SCALE']) OFFSET = float(os.environ['TEMP_OFFSET']) SENSOR = int(os.environ['TEMP_SENSOR']) SLEEP = int(os.environ['SLEEP_TIME']) th = TemperH...
Add infinite loop; Add env vars
Add infinite loop; Add env vars
Python
mit
ps-jay/temp2dash
import json import requests import sys from temperusb import TemperHandler URL="http://dashing:3030/widgets/inside" SCALE=1.0 OFFSET=-3.0 th = TemperHandler() devs = th.get_devices() if len(devs) != 1: print "Expected exactly one TEMPer device, found %d" % len(devs) sys.exit(1) dev = devs[0] dev.set_calibr...
import json import os import requests import sys import time import traceback from temperusb import TemperHandler URL = os.environ['DASHING_URL'] SCALE = float(os.environ['TEMP_SCALE']) OFFSET = float(os.environ['TEMP_OFFSET']) SENSOR = int(os.environ['TEMP_SENSOR']) SLEEP = int(os.environ['SLEEP_TIME']) th = TemperH...
<commit_before>import json import requests import sys from temperusb import TemperHandler URL="http://dashing:3030/widgets/inside" SCALE=1.0 OFFSET=-3.0 th = TemperHandler() devs = th.get_devices() if len(devs) != 1: print "Expected exactly one TEMPer device, found %d" % len(devs) sys.exit(1) dev = devs[0] ...
import json import os import requests import sys import time import traceback from temperusb import TemperHandler URL = os.environ['DASHING_URL'] SCALE = float(os.environ['TEMP_SCALE']) OFFSET = float(os.environ['TEMP_OFFSET']) SENSOR = int(os.environ['TEMP_SENSOR']) SLEEP = int(os.environ['SLEEP_TIME']) th = TemperH...
import json import requests import sys from temperusb import TemperHandler URL="http://dashing:3030/widgets/inside" SCALE=1.0 OFFSET=-3.0 th = TemperHandler() devs = th.get_devices() if len(devs) != 1: print "Expected exactly one TEMPer device, found %d" % len(devs) sys.exit(1) dev = devs[0] dev.set_calibr...
<commit_before>import json import requests import sys from temperusb import TemperHandler URL="http://dashing:3030/widgets/inside" SCALE=1.0 OFFSET=-3.0 th = TemperHandler() devs = th.get_devices() if len(devs) != 1: print "Expected exactly one TEMPer device, found %d" % len(devs) sys.exit(1) dev = devs[0] ...
5768d1ebcfec46e564c8b420773d911c243327ff
dddp/msg.py
dddp/msg.py
"""Django DDP utils for DDP messaging.""" import collections from django.core.serializers import get_serializer _SERIALIZER = None def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg type.""" global _SERIALIZER if _SERIALIZER is None: _SERIALIZER = get_serializer('ddp...
"""Django DDP utils for DDP messaging.""" from dddp import THREAD_LOCAL as this from django.core.serializers import get_serializer def serializer_factory(): """Make a new DDP serializer.""" return get_serializer('ddp')() def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg t...
Fix non-threadsafe failure in serializer - now using thread local serializer instance.
Fix non-threadsafe failure in serializer - now using thread local serializer instance.
Python
mit
commoncode/django-ddp,commoncode/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp
"""Django DDP utils for DDP messaging.""" import collections from django.core.serializers import get_serializer _SERIALIZER = None def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg type.""" global _SERIALIZER if _SERIALIZER is None: _SERIALIZER = get_serializer('ddp...
"""Django DDP utils for DDP messaging.""" from dddp import THREAD_LOCAL as this from django.core.serializers import get_serializer def serializer_factory(): """Make a new DDP serializer.""" return get_serializer('ddp')() def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg t...
<commit_before>"""Django DDP utils for DDP messaging.""" import collections from django.core.serializers import get_serializer _SERIALIZER = None def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg type.""" global _SERIALIZER if _SERIALIZER is None: _SERIALIZER = get_...
"""Django DDP utils for DDP messaging.""" from dddp import THREAD_LOCAL as this from django.core.serializers import get_serializer def serializer_factory(): """Make a new DDP serializer.""" return get_serializer('ddp')() def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg t...
"""Django DDP utils for DDP messaging.""" import collections from django.core.serializers import get_serializer _SERIALIZER = None def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg type.""" global _SERIALIZER if _SERIALIZER is None: _SERIALIZER = get_serializer('ddp...
<commit_before>"""Django DDP utils for DDP messaging.""" import collections from django.core.serializers import get_serializer _SERIALIZER = None def obj_change_as_msg(obj, msg): """Generate a DDP msg for obj with specified msg type.""" global _SERIALIZER if _SERIALIZER is None: _SERIALIZER = get_...
338e2ba155df0759113c65ced6be6714092b9aaf
packages/gtk-quartz-engine.py
packages/gtk-quartz-engine.py
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } )
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/nirvanai/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } )
Use Alex's awesome new version of the GtkQuartz theme engine
Use Alex's awesome new version of the GtkQuartz theme engine
Python
mit
bl8/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } ) Use Alex's awesome ne...
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/nirvanai/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } )
<commit_before>Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } ) <commi...
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/nirvanai/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } )
Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } ) Use Alex's awesome ne...
<commit_before>Package ('gtk-quartz-engine', 'master', sources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ], override_properties = { 'configure': 'libtoolize --force --copy && ' 'aclocal && ' 'autoheader && ' 'automake --add-missing && ' 'autoconf && ' './configure --prefix=%{prefix}' } ) <commi...
12130cef6c9b08e0928ed856972ace3c2000e6f8
mooc_aggregator_restful_api/udacity.py
mooc_aggregator_restful_api/udacity.py
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
Fix error accessing class variable
Fix error accessing class variable
Python
mit
ueg1990/mooc_aggregator_restful_api
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
<commit_before>''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attrib...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
<commit_before>''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attrib...
f5600008defcd5fe4c9c397c0b7170f6f5e9a5e4
__init__.py
__init__.py
__author__ = "Justin Kitzes, Mark Wilber, Chloe Lewis" __copyright__ = "Copyright 2012, Regents of University of California" __credits__ = [] __license__ = "BSD 2-clause" __version__ = "0.1" __maintainer__ = "Justin Kitzes" __email__ = "jkitzes@berkeley.edu" __status__ = "Development" import compare import data import...
Add header info and submodule imports to init
Add header info and submodule imports to init
Python
bsd-2-clause
jkitzes/macroeco
Add header info and submodule imports to init
__author__ = "Justin Kitzes, Mark Wilber, Chloe Lewis" __copyright__ = "Copyright 2012, Regents of University of California" __credits__ = [] __license__ = "BSD 2-clause" __version__ = "0.1" __maintainer__ = "Justin Kitzes" __email__ = "jkitzes@berkeley.edu" __status__ = "Development" import compare import data import...
<commit_before> <commit_msg>Add header info and submodule imports to init<commit_after>
__author__ = "Justin Kitzes, Mark Wilber, Chloe Lewis" __copyright__ = "Copyright 2012, Regents of University of California" __credits__ = [] __license__ = "BSD 2-clause" __version__ = "0.1" __maintainer__ = "Justin Kitzes" __email__ = "jkitzes@berkeley.edu" __status__ = "Development" import compare import data import...
Add header info and submodule imports to init__author__ = "Justin Kitzes, Mark Wilber, Chloe Lewis" __copyright__ = "Copyright 2012, Regents of University of California" __credits__ = [] __license__ = "BSD 2-clause" __version__ = "0.1" __maintainer__ = "Justin Kitzes" __email__ = "jkitzes@berkeley.edu" __status__ = "D...
<commit_before> <commit_msg>Add header info and submodule imports to init<commit_after>__author__ = "Justin Kitzes, Mark Wilber, Chloe Lewis" __copyright__ = "Copyright 2012, Regents of University of California" __credits__ = [] __license__ = "BSD 2-clause" __version__ = "0.1" __maintainer__ = "Justin Kitzes" __email__...
977cf58125a204010197c95827457843503e2c5b
ideascube/conf/kb_rca_alliancefrancaise.py
ideascube/conf/kb_rca_alliancefrancaise.py
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui'
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' # Disable BSF Campus for now HOME_CARDS = [card for card in HOME_CARDS if card['id'] != 'bsfcampus']
Disable BSF Campus for RCA Alliance Française
Disable BSF Campus for RCA Alliance Française @barbayellow said so.
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' Disable BSF Campus for RCA Alliance Française @barbayellow said so.
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' # Disable BSF Campus for now HOME_CARDS = [card for card in HOME_CARDS if card['id'] != 'bsfcampus']
<commit_before># -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' <commit_msg>Disable BSF Campus for RCA Alliance Française @barbayellow said so.<commit_after>
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' # Disable BSF Campus for now HOME_CARDS = [card for card in HOME_CARDS if card['id'] != 'bsfcampus']
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' Disable BSF Campus for RCA Alliance Française @barbayellow said so.# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Al...
<commit_before># -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'Alliance française de Bangui' <commit_msg>Disable BSF Campus for RCA Alliance Française @barbayellow said so.<commit_after># -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa ...
cc12728d7160a10f0c182c0cccfde0fd15cadb75
spicedham/basewrapper.py
spicedham/basewrapper.py
class BaseWrapper(object): """ A base class for backend plugins. """ def get_key(self, tag, key, default=None): """ Gets the value held by the tag, key composite key. If it doesn't exist, return default. """ raise NotImplementedError() def get_key_list(sel...
class BaseWrapper(object): """ A base class for backend plugins. """ def reset(self, really): """ Resets the training data to a blank slate. """ if really: raise NotImplementedError() def get_key(self, tag, key, default=None): """ Gets ...
Add a reset function stub
Add a reset function stub Also fix a typo.
Python
mpl-2.0
mozilla/spicedham,mozilla/spicedham
class BaseWrapper(object): """ A base class for backend plugins. """ def get_key(self, tag, key, default=None): """ Gets the value held by the tag, key composite key. If it doesn't exist, return default. """ raise NotImplementedError() def get_key_list(sel...
class BaseWrapper(object): """ A base class for backend plugins. """ def reset(self, really): """ Resets the training data to a blank slate. """ if really: raise NotImplementedError() def get_key(self, tag, key, default=None): """ Gets ...
<commit_before> class BaseWrapper(object): """ A base class for backend plugins. """ def get_key(self, tag, key, default=None): """ Gets the value held by the tag, key composite key. If it doesn't exist, return default. """ raise NotImplementedError() def g...
class BaseWrapper(object): """ A base class for backend plugins. """ def reset(self, really): """ Resets the training data to a blank slate. """ if really: raise NotImplementedError() def get_key(self, tag, key, default=None): """ Gets ...
class BaseWrapper(object): """ A base class for backend plugins. """ def get_key(self, tag, key, default=None): """ Gets the value held by the tag, key composite key. If it doesn't exist, return default. """ raise NotImplementedError() def get_key_list(sel...
<commit_before> class BaseWrapper(object): """ A base class for backend plugins. """ def get_key(self, tag, key, default=None): """ Gets the value held by the tag, key composite key. If it doesn't exist, return default. """ raise NotImplementedError() def g...
cf6ddfdac8a56194ad1297921a390be541d773cc
app_info.py
app_info.py
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in version) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCarthy <luke@iogopro.co.uk>" company_na...
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in (version if version[2] != 0 else version[:2])) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCa...
Remove last digit of version number if it's 0.
Remove last digit of version number if it's 0.
Python
mit
shaurz/devo
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in version) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCarthy <luke@iogopro.co.uk>" company_na...
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in (version if version[2] != 0 else version[:2])) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCa...
<commit_before># coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in version) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCarthy <luke@iogopro.co.u...
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in (version if version[2] != 0 else version[:2])) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCa...
# coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in version) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCarthy <luke@iogopro.co.uk>" company_na...
<commit_before># coding=UTF8 import datetime name = "Devo" release_date = datetime.date(2012, 12, 13) version = (1, 0, 0) version_string = ".".join(str(x) for x in version) identifier = "com.iogopro.devo" copyright = u"Copyright © 2010-2012 Luke McCarthy" developer = "Developer: Luke McCarthy <luke@iogopro.co.u...
0b11bf48989673245adbc89aa6f65c85debafd9f
armstrong/apps/donations/backends.py
armstrong/apps/donations/backends.py
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
Make sure billing/shipping aren't populated if they aren't there
Make sure billing/shipping aren't populated if they aren't there
Python
apache-2.0
armstrong/armstrong.apps.donations,armstrong/armstrong.apps.donations
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
<commit_before>from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net")...
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
<commit_before>from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net")...
5efddf26176ac778556a3568bf97c2e70daac866
anchorhub/settings/default_settings.py
anchorhub/settings/default_settings.py
""" Defaults for all settings used by AnchorHub """ WRAPPER = "{ }" INPUT = "." OUTPUT = "out-anchorhub" ARGPARSER = { "description": "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { "help": "Path of directory tree to b...
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
Replace many double quotes with single quotes
Replace many double quotes with single quotes
Python
apache-2.0
samjabrahams/anchorhub
""" Defaults for all settings used by AnchorHub """ WRAPPER = "{ }" INPUT = "." OUTPUT = "out-anchorhub" ARGPARSER = { "description": "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { "help": "Path of directory tree to b...
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
<commit_before>""" Defaults for all settings used by AnchorHub """ WRAPPER = "{ }" INPUT = "." OUTPUT = "out-anchorhub" ARGPARSER = { "description": "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { "help": "Path of dire...
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
""" Defaults for all settings used by AnchorHub """ WRAPPER = "{ }" INPUT = "." OUTPUT = "out-anchorhub" ARGPARSER = { "description": "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { "help": "Path of directory tree to b...
<commit_before>""" Defaults for all settings used by AnchorHub """ WRAPPER = "{ }" INPUT = "." OUTPUT = "out-anchorhub" ARGPARSER = { "description": "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { "help": "Path of dire...
ff90958a0c79936d5056840ba03a5863bcdef099
formal/test/test_util.py
formal/test/test_util.py
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
Mark as test as "todo" for now.
Mark as test as "todo" for now.
Python
mit
emgee/formal,emgee/formal,emgee/formal
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
<commit_before>from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_...
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
<commit_before>from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_...
2e7271a33e098d7cdef15207e8caa05e644c3223
changes/buildfailures/testfailure.py
changes/buildfailures/testfailure.py
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure class TestFailure(BuildFailure): def get_html_label(self, build): link = '/projects/{0}/builds/{1}/tests/?result=failed'.format(build.project.slug, build.id.hex) try: ...
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure from changes.utils.http import build_uri class TestFailure(BuildFailure): def get_html_label(self, build): link = build_uri('/projects/{0}/builds/{1}/tests/?result=failed'.format(build.pr...
Use full URI for build failure reasons
Use full URI for build failure reasons
Python
apache-2.0
bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,dropbox/changes
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure class TestFailure(BuildFailure): def get_html_label(self, build): link = '/projects/{0}/builds/{1}/tests/?result=failed'.format(build.project.slug, build.id.hex) try: ...
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure from changes.utils.http import build_uri class TestFailure(BuildFailure): def get_html_label(self, build): link = build_uri('/projects/{0}/builds/{1}/tests/?result=failed'.format(build.pr...
<commit_before>from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure class TestFailure(BuildFailure): def get_html_label(self, build): link = '/projects/{0}/builds/{1}/tests/?result=failed'.format(build.project.slug, build.id.hex) t...
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure from changes.utils.http import build_uri class TestFailure(BuildFailure): def get_html_label(self, build): link = build_uri('/projects/{0}/builds/{1}/tests/?result=failed'.format(build.pr...
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure class TestFailure(BuildFailure): def get_html_label(self, build): link = '/projects/{0}/builds/{1}/tests/?result=failed'.format(build.project.slug, build.id.hex) try: ...
<commit_before>from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure class TestFailure(BuildFailure): def get_html_label(self, build): link = '/projects/{0}/builds/{1}/tests/?result=failed'.format(build.project.slug, build.id.hex) t...
4c303007d6418e2a2f1b2e1778d6b7d0c0573c74
gitfs/views/read_only.py
gitfs/views/read_only.py
import os from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): ...
from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): raise...
Raise read-only fs on touch
Raise read-only fs on touch
Python
apache-2.0
bussiere/gitfs,PressLabs/gitfs,PressLabs/gitfs,ksmaheshkumar/gitfs,rowhit/gitfs
import os from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): ...
from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): raise...
<commit_before>import os from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self,...
from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): raise...
import os from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): ...
<commit_before>import os from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self,...
a307c5fc2555d282dfa6193cdbcfb2d15e185c0c
aq/parsers.py
aq/parsers.py
from collections import namedtuple import collections from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectP...
import collections from collections import namedtuple from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectPa...
Allow query without table to run
Allow query without table to run
Python
mit
lebinh/aq
from collections import namedtuple import collections from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectP...
import collections from collections import namedtuple from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectPa...
<commit_before>from collections import namedtuple import collections from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) ...
import collections from collections import namedtuple from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectPa...
from collections import namedtuple import collections from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectP...
<commit_before>from collections import namedtuple import collections from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) ...
583a6319230b89a5f19c26e5bab83e28a5a4792e
pywps/processes/dummyprocess.py
pywps/processes/dummyprocess.py
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.de-jesus@jrc.it) as suggested by Kor de Jong """ from pywps.Process import WPSProcess class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, i...
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.jesus@gmail.com) as suggested by Kor de Jong """ from pywps.Process import WPSProcess import types class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, ...
Fix the but There is an error (cannot concatenate str and int objects) when the user does not specify the inputs.
Fix the but There is an error (cannot concatenate str and int objects) when the user does not specify the inputs.
Python
mit
ricardogsilva/PyWPS,jonas-eberle/pywps,geopython/pywps,ldesousa/PyWPS,bird-house/PyWPS,jachym/PyWPS,tomkralidis/pywps
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.de-jesus@jrc.it) as suggested by Kor de Jong """ from pywps.Process import WPSProcess class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, i...
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.jesus@gmail.com) as suggested by Kor de Jong """ from pywps.Process import WPSProcess import types class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, ...
<commit_before>""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.de-jesus@jrc.it) as suggested by Kor de Jong """ from pywps.Process import WPSProcess class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, ...
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.jesus@gmail.com) as suggested by Kor de Jong """ from pywps.Process import WPSProcess import types class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, ...
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.de-jesus@jrc.it) as suggested by Kor de Jong """ from pywps.Process import WPSProcess class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, i...
<commit_before>""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.de-jesus@jrc.it) as suggested by Kor de Jong """ from pywps.Process import WPSProcess class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, ...
305e54c328cf212e01a3af7cec7b940894044e55
gen_test.py
gen_test.py
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.randint(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.uniform(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
Use float, not int for random WPM
Use float, not int for random WPM
Python
mit
nickodell/morse-code
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.randint(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.uniform(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
<commit_before>import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.randint(2,20) elements_per_second = WPM * 50.0 /...
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.uniform(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.randint(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
<commit_before>import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.randint(2,20) elements_per_second = WPM * 50.0 /...
454c7d322af3328279582aef629736b92c87e869
backports/__init__.py
backports/__init__.py
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
Revert "It seems the mechanism to declare a namespace package changed."
Revert "It seems the mechanism to declare a namespace package changed." This reverts commit 68658fe9a3fee91963944937b80fcdaf3af4c8a1. Changing the backport to use setuptools namespaces broke all the other packages using the backports namespace. Switch back to standard python namespaces.
Python
bsd-3-clause
peterjc/backports.lzma,peterjc/backports.lzma
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
<commit_before># This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://w...
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
<commit_before># This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://w...
d1be7f345529594ba25ed5d0f22e544735a64404
qubs_data_centre/urls.py
qubs_data_centre/urls.py
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ]
from django.conf.urls import url, include from django.contrib import admin admin.site.site_header = 'QUBS Data Centre Admin' urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ]
Add a custom admin site header.
Add a custom admin site header.
Python
apache-2.0
qubs/climate-data-api,qubs/climate-data-api,qubs/data-centre,qubs/data-centre
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ] Add a custom admin site header.
from django.conf.urls import url, include from django.contrib import admin admin.site.site_header = 'QUBS Data Centre Admin' urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ]
<commit_before>from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ] <commit_msg>Add a custom admin site header.<commit_after>
from django.conf.urls import url, include from django.contrib import admin admin.site.site_header = 'QUBS Data Centre Admin' urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ]
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ] Add a custom admin site header.from django.conf.urls import url, include from django.contrib import admin admin.site.site_header = 'QUBS Data Cent...
<commit_before>from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ] <commit_msg>Add a custom admin site header.<commit_after>from django.conf.urls import url, include from django.contrib import admin ...
2665aa46702175a0d33ae76cfccdbbbddf42d316
multi_schema/management/commands/syncdb.py
multi_schema/management/commands/syncdb.py
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
Allow for comments in the sql file that do not start the line.
Allow for comments in the sql file that do not start the line.
Python
bsd-3-clause
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
<commit_before>import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs...
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
<commit_before>import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs...
bf336d99484cc3804f469631b513a927940ada30
profile_collection/startup/50-scans.py
profile_collection/startup/50-scans.py
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
Add scan_steps wrapper for scan_nd
Add scan_steps wrapper for scan_nd
Python
bsd-2-clause
NSLS-II-HXN/ipython_ophyd,NSLS-II-HXN/ipython_ophyd
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
<commit_before># vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_...
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
<commit_before># vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_...
a619f703b2d259877e30d3e1ede11813c014f3ad
pysc2/env/available_actions_printer.py
pysc2/env/available_actions_printer.py
# Copyright 2017 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 applicable law or ...
# Copyright 2017 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 applicable law or ...
Fix the AvailableActionsPrinter to support the new multiplayer action spec.
Fix the AvailableActionsPrinter to support the new multiplayer action spec. PiperOrigin-RevId: 183247161
Python
apache-2.0
deepmind/pysc2
# Copyright 2017 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 applicable law or ...
# Copyright 2017 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 applicable law or ...
<commit_before># Copyright 2017 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 app...
# Copyright 2017 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 applicable law or ...
# Copyright 2017 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 applicable law or ...
<commit_before># Copyright 2017 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 app...
a537f049bfb61488a056333d362d9983e8e9f88d
2020/10/p1.py
2020/10/p1.py
# Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 # this is bad lmao while len(puzzle) != 0: if last_joltage + 1 in puzzle: ...
# Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 while len(puzzle) != 0: if last_joltage + 1 in puzzle: last_joltage = last_...
Fix minor issues in 2020.10.1 file
Fix minor issues in 2020.10.1 file The comment about the 1 being bad was incorrect, in fact it was good. I had forgotten about adding the extra three-jolt difference for the final adapter in the device, and didn't make the connection between it and the three-jolt count being one short lol.
Python
mit
foxscotch/advent-of-code,foxscotch/advent-of-code
# Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 # this is bad lmao while len(puzzle) != 0: if last_joltage + 1 in puzzle: ...
# Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 while len(puzzle) != 0: if last_joltage + 1 in puzzle: last_joltage = last_...
<commit_before># Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 # this is bad lmao while len(puzzle) != 0: if last_joltage + 1 in puzzl...
# Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 while len(puzzle) != 0: if last_joltage + 1 in puzzle: last_joltage = last_...
# Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 # this is bad lmao while len(puzzle) != 0: if last_joltage + 1 in puzzle: ...
<commit_before># Python 3.8.3 def get_input(): with open('input.txt', 'r') as f: return set(int(i) for i in f.read().split()) def main(): puzzle = get_input() last_joltage = 0 one_jolt = 0 three_jolts = 1 # this is bad lmao while len(puzzle) != 0: if last_joltage + 1 in puzzl...
77ddff664ad1e10037a43c3ffabd816387c35e42
rotational-cipher/rotational_cipher.py
rotational-cipher/rotational_cipher.py
import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(map(lambda k: rules.get(k, k), s)) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, shifted)}
import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(rules.get(ch, ch) for ch in s) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, shifted)}
Use a comprehension instead of a lambda function
Use a comprehension instead of a lambda function
Python
agpl-3.0
CubicComet/exercism-python-solutions
import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(map(lambda k: rules.get(k, k), s)) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, shifted)} Use a...
import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(rules.get(ch, ch) for ch in s) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, shifted)}
<commit_before>import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(map(lambda k: rules.get(k, k), s)) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, ...
import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(rules.get(ch, ch) for ch in s) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, shifted)}
import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(map(lambda k: rules.get(k, k), s)) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, shifted)} Use a...
<commit_before>import string UPPER = string.ascii_uppercase LOWER = string.ascii_lowercase def rotate(s, n): rules = shift_rules(n) return "".join(map(lambda k: rules.get(k, k), s)) def shift_rules(n): shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n] return {k:v for k,v in zip(UPPER+LOWER, ...
513c7a2f5c5fb5a8c47b3173a8d5854755f7928f
pylab/website/tests/test_about_page.py
pylab/website/tests/test_about_page.py
import datetime from django_webtest import WebTest from django.contrib.auth.models import User from pylab.core.models import Event class AboutPageTests(WebTest): def setUp(self): self.user = User.objects.create(username='u1') def test_no_events_on_about_page(self): resp = self.app.get('/ab...
import datetime from django_webtest import WebTest from pylab.core.models import Event from pylab.core.factories import EventFactory class AboutPageTests(WebTest): def test_no_events_on_about_page(self): resp = self.app.get('/about/') self.assertEqual(resp.status_int, 200) self.assertTr...
Use factories instead of creating instance from model
Use factories instead of creating instance from model
Python
agpl-3.0
python-dirbtuves/website,python-dirbtuves/website,python-dirbtuves/website
import datetime from django_webtest import WebTest from django.contrib.auth.models import User from pylab.core.models import Event class AboutPageTests(WebTest): def setUp(self): self.user = User.objects.create(username='u1') def test_no_events_on_about_page(self): resp = self.app.get('/ab...
import datetime from django_webtest import WebTest from pylab.core.models import Event from pylab.core.factories import EventFactory class AboutPageTests(WebTest): def test_no_events_on_about_page(self): resp = self.app.get('/about/') self.assertEqual(resp.status_int, 200) self.assertTr...
<commit_before>import datetime from django_webtest import WebTest from django.contrib.auth.models import User from pylab.core.models import Event class AboutPageTests(WebTest): def setUp(self): self.user = User.objects.create(username='u1') def test_no_events_on_about_page(self): resp = se...
import datetime from django_webtest import WebTest from pylab.core.models import Event from pylab.core.factories import EventFactory class AboutPageTests(WebTest): def test_no_events_on_about_page(self): resp = self.app.get('/about/') self.assertEqual(resp.status_int, 200) self.assertTr...
import datetime from django_webtest import WebTest from django.contrib.auth.models import User from pylab.core.models import Event class AboutPageTests(WebTest): def setUp(self): self.user = User.objects.create(username='u1') def test_no_events_on_about_page(self): resp = self.app.get('/ab...
<commit_before>import datetime from django_webtest import WebTest from django.contrib.auth.models import User from pylab.core.models import Event class AboutPageTests(WebTest): def setUp(self): self.user = User.objects.create(username='u1') def test_no_events_on_about_page(self): resp = se...
1786702388abc4fe737ee73d64ef5864f42f0c3d
chat/query.py
chat/query.py
# Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Fix missing offset for Query
Fix missing offset for Query
Python
apache-2.0
SkygearIO/chat,SkygearIO/chat
# Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2017 Oursky Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
270812e89e8e0870bfea01367cf645cf5194a806
openacademy/model/openacademy_course.py
openacademy/model/openacademy_course.py
# -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved to identified re...
# -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved to identified re...
Add sql constraint identation fixed
[REF] openacademy: Add sql constraint identation fixed
Python
apache-2.0
jorgescalona/openacademy-project
# -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved to identified re...
# -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved to identified re...
<commit_before># -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved t...
# -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved to identified re...
# -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved to identified re...
<commit_before># -*- coding: utf-8 -*- from openerp import models, fields, api ''' This module create model of Course ''' class Course(models.Model): '''This class create model of Course''' _name = 'openacademy.course' # Model odoo name name = fields.Char(string='Title', required=True) # field reserved t...
df6b13a70241b616f49d4dcc25073084c371f5b1
share/models/creative/base.py
share/models/creative/base.py
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class Ab...
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class Ab...
Swap out license with rights
Swap out license with rights
Python
apache-2.0
CenterForOpenScience/SHARE,aaxelb/SHARE,zamattiac/SHARE,zamattiac/SHARE,CenterForOpenScience/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,zamattiac/SHARE,laurenbarker/SHARE,aaxelb/SHARE,laurenbarker/SHARE,laurenbarker/SHARE
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class Ab...
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class Ab...
<commit_before>from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyF...
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class Ab...
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class Ab...
<commit_before>from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyF...
9f44888c00d29bd1d1a53eb09ab90b61f33c5e05
awx/main/migrations/0002_v300_changes.py
awx/main/migrations/0002_v300_changes.py
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
Update existing settings migration with minor field change.
Update existing settings migration with minor field change.
Python
apache-2.0
snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(set...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(set...
18618a56ce674c479a0737dcabd4a47913ae2dde
scripts/compare_dir.py
scripts/compare_dir.py
import os dropboxFiles = [] localFiles = [] for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'): dropboxFiles += filenames for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'): if ('Process' no...
import os from shutil import copyfile FOLDER_A = '/media/itto/TOSHIBA EXT/Photos/Southeast Asia' FOLDER_B = '/media/itto/disk/PRIVATE/AVCHD/BDMV/STREAM' files_a = [] files_b = [] for dirpath, dirnames, filenames in os.walk(FOLDER_A): files_a += filenames for dirpath, dirnames, filenames in os.walk(FOLDER_B): ...
Add functionality to copy any missing files to the other folder
Add functionality to copy any missing files to the other folder
Python
mit
itko/itko.github.io,itko/itko.github.io,itko/itko.github.io,itko/itko.github.io
import os dropboxFiles = [] localFiles = [] for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'): dropboxFiles += filenames for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'): if ('Process' no...
import os from shutil import copyfile FOLDER_A = '/media/itto/TOSHIBA EXT/Photos/Southeast Asia' FOLDER_B = '/media/itto/disk/PRIVATE/AVCHD/BDMV/STREAM' files_a = [] files_b = [] for dirpath, dirnames, filenames in os.walk(FOLDER_A): files_a += filenames for dirpath, dirnames, filenames in os.walk(FOLDER_B): ...
<commit_before>import os dropboxFiles = [] localFiles = [] for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'): dropboxFiles += filenames for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'): i...
import os from shutil import copyfile FOLDER_A = '/media/itto/TOSHIBA EXT/Photos/Southeast Asia' FOLDER_B = '/media/itto/disk/PRIVATE/AVCHD/BDMV/STREAM' files_a = [] files_b = [] for dirpath, dirnames, filenames in os.walk(FOLDER_A): files_a += filenames for dirpath, dirnames, filenames in os.walk(FOLDER_B): ...
import os dropboxFiles = [] localFiles = [] for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'): dropboxFiles += filenames for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'): if ('Process' no...
<commit_before>import os dropboxFiles = [] localFiles = [] for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'): dropboxFiles += filenames for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'): i...
31231afea71b3fd9213b39cf1bb32e10b2a9e843
djangovirtualpos/admin.py
djangovirtualpos/admin.py
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.register(VPOSReds...
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal, VPOSBitpay admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.regis...
Add Bitpay config model to Django Admin panel
Add Bitpay config model to Django Admin panel
Python
mit
intelligenia/django-virtual-pos,intelligenia/django-virtual-pos,intelligenia/django-virtual-pos
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.register(VPOSReds...
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal, VPOSBitpay admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.regis...
<commit_before># coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.re...
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal, VPOSBitpay admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.regis...
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.register(VPOSReds...
<commit_before># coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.re...
ef15a8ba699e10b9f2d059669b63af6f4c768d39
casspy/admin_commands.py
casspy/admin_commands.py
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command ...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command ...
Change to console command prompt
[casspy] Change to console command prompt
Python
mit
joshuaprince/Cassoundra,joshuaprince/Cassoundra,joshuaprince/Cassoundra
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command ...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command ...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: ...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command ...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command ...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: ...
75c0861608871de2a2b1a6b4f2ea89c800dd8c07
pava/implementation/__init__.py
pava/implementation/__init__.py
import sys method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count print 'define', name, method_count method_count += 1 globals_dict = {} for module_name in modu...
import new import sys DEBUG = False method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count if DEBUG: print 'define', name, method_count method_count += 1 g...
Make verbose loading messages optional
Make verbose loading messages optional
Python
mit
laffra/pava,laffra/pava
import sys method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count print 'define', name, method_count method_count += 1 globals_dict = {} for module_name in modu...
import new import sys DEBUG = False method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count if DEBUG: print 'define', name, method_count method_count += 1 g...
<commit_before>import sys method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count print 'define', name, method_count method_count += 1 globals_dict = {} for modu...
import new import sys DEBUG = False method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count if DEBUG: print 'define', name, method_count method_count += 1 g...
import sys method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count print 'define', name, method_count method_count += 1 globals_dict = {} for module_name in modu...
<commit_before>import sys method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count print 'define', name, method_count method_count += 1 globals_dict = {} for modu...
7e6dc283dbecf4bf9674559198b4a2c06e9f4c2e
spacy/tests/regression/test_issue1799.py
spacy/tests/regression/test_issue1799.py
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking for.' heads_deps = numpy.asarray([[...
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' from __future__ import unicode_literals import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking...
Fix unicode import in test
Fix unicode import in test
Python
mit
aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/...
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking for.' heads_deps = numpy.asarray([[...
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' from __future__ import unicode_literals import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking...
<commit_before>'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking for.' heads_deps = n...
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' from __future__ import unicode_literals import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking...
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking for.' heads_deps = numpy.asarray([[...
<commit_before>'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking for.' heads_deps = n...
2cd19b395f4320330b66dff1ef98d149f3a40a31
ckanext/syndicate/tests/test_plugin.py
ckanext/syndicate/tests/test_plugin.py
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestPlugin(unittest.TestCase): def test_notify_syndicates_task(self): entity = model.Package() entity.extras = ...
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestNotify(unittest.TestCase): def setUp(self): super(TestNotify, self).setUp() self.entity = model.Package() ...
Add test for notify dataset/update
Add test for notify dataset/update
Python
agpl-3.0
aptivate/ckanext-syndicate,sorki/ckanext-redmine-autoissues,aptivate/ckanext-syndicate,sorki/ckanext-redmine-autoissues
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestPlugin(unittest.TestCase): def test_notify_syndicates_task(self): entity = model.Package() entity.extras = ...
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestNotify(unittest.TestCase): def setUp(self): super(TestNotify, self).setUp() self.entity = model.Package() ...
<commit_before>from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestPlugin(unittest.TestCase): def test_notify_syndicates_task(self): entity = model.Package() e...
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestNotify(unittest.TestCase): def setUp(self): super(TestNotify, self).setUp() self.entity = model.Package() ...
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestPlugin(unittest.TestCase): def test_notify_syndicates_task(self): entity = model.Package() entity.extras = ...
<commit_before>from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestPlugin(unittest.TestCase): def test_notify_syndicates_task(self): entity = model.Package() e...
80a1912ce69fd356d6c54bb00f946fbc7874a9ce
bluecanary/set_cloudwatch_alarm.py
bluecanary/set_cloudwatch_alarm.py
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kw...
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kw...
Allow multiple alarms for same metric type
Allow multiple alarms for same metric type
Python
mit
voxy/bluecanary
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kw...
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kw...
<commit_before>import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmNam...
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kw...
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kw...
<commit_before>import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmNam...
7611a4b3e064868c37b9f52778c8fe9f721e86c5
polyaxon/events/management/commands/monitor_namespace.py
polyaxon/events/management/commands/monitor_namespace.py
import time from kubernetes.client.rest import ApiException from django.conf import settings from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from polyaxon_k8s.manager import K8SManager class Command(BaseMonitorCommand...
import time from kubernetes.client.rest import ApiException from django.conf import settings from django.db import InterfaceError, ProgrammingError, OperationalError from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from ...
Update namespace monitor with exception handling
Update namespace monitor with exception handling
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
import time from kubernetes.client.rest import ApiException from django.conf import settings from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from polyaxon_k8s.manager import K8SManager class Command(BaseMonitorCommand...
import time from kubernetes.client.rest import ApiException from django.conf import settings from django.db import InterfaceError, ProgrammingError, OperationalError from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from ...
<commit_before>import time from kubernetes.client.rest import ApiException from django.conf import settings from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from polyaxon_k8s.manager import K8SManager class Command(Bas...
import time from kubernetes.client.rest import ApiException from django.conf import settings from django.db import InterfaceError, ProgrammingError, OperationalError from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from ...
import time from kubernetes.client.rest import ApiException from django.conf import settings from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from polyaxon_k8s.manager import K8SManager class Command(BaseMonitorCommand...
<commit_before>import time from kubernetes.client.rest import ApiException from django.conf import settings from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from polyaxon_k8s.manager import K8SManager class Command(Bas...
2a852c3ca1ff30cb02740f7934d97c1fe2da3bbe
compress.py
compress.py
""" compression """ class Compress(): """Compress""" def encode(self, string): """Encodes string to byte representation""" return b'0' def decode(self, byteString): """Decodes bytes into a text string""" return ""
""" compression """ import Queue as queue class HuffmanNode: """Node in the Huffman coding tree""" def __init__(self, symbol, freq): self.parent = None self.children = [] self.symbol = symbol self.freq = freq def set_parent(self, node): node.add_child(self) ...
Build tree for huffman coding
Build tree for huffman coding
Python
apache-2.0
rylans/text-compression-english
""" compression """ class Compress(): """Compress""" def encode(self, string): """Encodes string to byte representation""" return b'0' def decode(self, byteString): """Decodes bytes into a text string""" return "" Build tree for huffman coding
""" compression """ import Queue as queue class HuffmanNode: """Node in the Huffman coding tree""" def __init__(self, symbol, freq): self.parent = None self.children = [] self.symbol = symbol self.freq = freq def set_parent(self, node): node.add_child(self) ...
<commit_before>""" compression """ class Compress(): """Compress""" def encode(self, string): """Encodes string to byte representation""" return b'0' def decode(self, byteString): """Decodes bytes into a text string""" return "" <commit_msg>Build tree for huffman coding<com...
""" compression """ import Queue as queue class HuffmanNode: """Node in the Huffman coding tree""" def __init__(self, symbol, freq): self.parent = None self.children = [] self.symbol = symbol self.freq = freq def set_parent(self, node): node.add_child(self) ...
""" compression """ class Compress(): """Compress""" def encode(self, string): """Encodes string to byte representation""" return b'0' def decode(self, byteString): """Decodes bytes into a text string""" return "" Build tree for huffman coding""" compression """ import Que...
<commit_before>""" compression """ class Compress(): """Compress""" def encode(self, string): """Encodes string to byte representation""" return b'0' def decode(self, byteString): """Decodes bytes into a text string""" return "" <commit_msg>Build tree for huffman coding<com...
3b412830710018abadacd148be544b4bfb1ec2f0
compare_mt/formatting.py
compare_mt/formatting.py
import re class Formatter(object): pat_square_open = re.compile("\[") pat_square_closed = re.compile("\]") pat_lt = re.compile("<") pat_gt = re.compile(">") latex_substitutions = { pat_square_open: "{[}", pat_square_closed: "{]}", pat_lt: r"\\textless", pat_gt: r...
import re class Formatter(object): latex_substitutions = { re.compile("\["): "{[}", re.compile("\]"): "{]}", re.compile("<"): r"\\textless", re.compile(">"): r"\\textgreater" } def __init__(self, decimals=4): self.set_decimals(decimals) def set_decimals(self, ...
Move definition of substitution patterns inside the latex_substitutions dictionary
Move definition of substitution patterns inside the latex_substitutions dictionary
Python
bsd-3-clause
neulab/compare-mt,neulab/compare-mt
import re class Formatter(object): pat_square_open = re.compile("\[") pat_square_closed = re.compile("\]") pat_lt = re.compile("<") pat_gt = re.compile(">") latex_substitutions = { pat_square_open: "{[}", pat_square_closed: "{]}", pat_lt: r"\\textless", pat_gt: r...
import re class Formatter(object): latex_substitutions = { re.compile("\["): "{[}", re.compile("\]"): "{]}", re.compile("<"): r"\\textless", re.compile(">"): r"\\textgreater" } def __init__(self, decimals=4): self.set_decimals(decimals) def set_decimals(self, ...
<commit_before>import re class Formatter(object): pat_square_open = re.compile("\[") pat_square_closed = re.compile("\]") pat_lt = re.compile("<") pat_gt = re.compile(">") latex_substitutions = { pat_square_open: "{[}", pat_square_closed: "{]}", pat_lt: r"\\textless", ...
import re class Formatter(object): latex_substitutions = { re.compile("\["): "{[}", re.compile("\]"): "{]}", re.compile("<"): r"\\textless", re.compile(">"): r"\\textgreater" } def __init__(self, decimals=4): self.set_decimals(decimals) def set_decimals(self, ...
import re class Formatter(object): pat_square_open = re.compile("\[") pat_square_closed = re.compile("\]") pat_lt = re.compile("<") pat_gt = re.compile(">") latex_substitutions = { pat_square_open: "{[}", pat_square_closed: "{]}", pat_lt: r"\\textless", pat_gt: r...
<commit_before>import re class Formatter(object): pat_square_open = re.compile("\[") pat_square_closed = re.compile("\]") pat_lt = re.compile("<") pat_gt = re.compile(">") latex_substitutions = { pat_square_open: "{[}", pat_square_closed: "{]}", pat_lt: r"\\textless", ...
8b598333c06698185762cc98e414853e03c427f2
src/reviews/resources.py
src/reviews/resources.py
from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True, ) cla...
from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True, ) stag...
Mark fields except appropriateness as readonly
Mark fields except appropriateness as readonly
Python
mit
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True, ) cla...
from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True, ) stag...
<commit_before>from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True,...
from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True, ) stag...
from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True, ) cla...
<commit_before>from import_export import fields, resources from .models import Review class ReviewResource(resources.ModelResource): reviewer = fields.Field( attribute='reviewer__email', readonly=True, ) proposal = fields.Field( attribute='proposal__title', readonly=True,...
b355d61edc413f8fd60c7ce3ac37d9c1da7caa67
tests/nimoy/runner/test_spec_finder.py
tests/nimoy/runner/test_spec_finder.py
import tempfile import unittest import os from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def tearDown(self): os.remove(self.temp_spec.name) def test_implicit_locatio...
import os import tempfile import unittest from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def test_implicit_location(self): spec_locations = SpecFinder(os.path.dirname(se...
Remove the code cleans up the temp file as temp files are already automatically cleaned
Remove the code cleans up the temp file as temp files are already automatically cleaned
Python
apache-2.0
Luftzig/nimoy,browncoat-ninjas/nimoy
import tempfile import unittest import os from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def tearDown(self): os.remove(self.temp_spec.name) def test_implicit_locatio...
import os import tempfile import unittest from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def test_implicit_location(self): spec_locations = SpecFinder(os.path.dirname(se...
<commit_before>import tempfile import unittest import os from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def tearDown(self): os.remove(self.temp_spec.name) def test_i...
import os import tempfile import unittest from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def test_implicit_location(self): spec_locations = SpecFinder(os.path.dirname(se...
import tempfile import unittest import os from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def tearDown(self): os.remove(self.temp_spec.name) def test_implicit_locatio...
<commit_before>import tempfile import unittest import os from nimoy.runner.spec_finder import SpecFinder class TestSpecFinder(unittest.TestCase): def setUp(self): self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py') def tearDown(self): os.remove(self.temp_spec.name) def test_i...
ddce385c22284ec68797b512fade8599c76ce3d1
datawire/manage.py
datawire/manage.py
from flask.ext.script import Manager from datawire.core import app, db from datawire.model import Service from datawire.views import index manager = Manager(app) @manager.command def create_db(): """ Create the database entities. """ db.create_all() if __name__ == "__main__": manager.run()
from flask.ext.script import Manager from datawire.core import app, db from datawire.model import User from datawire.views import index manager = Manager(app) @manager.command def createdb(): """ Create the database entities. """ db.create_all() admin_data = {'screen_name': 'admin', 'display_name': 'Sys...
Create an admin user on db initialisation.
Create an admin user on db initialisation.
Python
mit
arc64/datawi.re,arc64/datawi.re,arc64/datawi.re
from flask.ext.script import Manager from datawire.core import app, db from datawire.model import Service from datawire.views import index manager = Manager(app) @manager.command def create_db(): """ Create the database entities. """ db.create_all() if __name__ == "__main__": manager.run() Create an a...
from flask.ext.script import Manager from datawire.core import app, db from datawire.model import User from datawire.views import index manager = Manager(app) @manager.command def createdb(): """ Create the database entities. """ db.create_all() admin_data = {'screen_name': 'admin', 'display_name': 'Sys...
<commit_before>from flask.ext.script import Manager from datawire.core import app, db from datawire.model import Service from datawire.views import index manager = Manager(app) @manager.command def create_db(): """ Create the database entities. """ db.create_all() if __name__ == "__main__": manager.ru...
from flask.ext.script import Manager from datawire.core import app, db from datawire.model import User from datawire.views import index manager = Manager(app) @manager.command def createdb(): """ Create the database entities. """ db.create_all() admin_data = {'screen_name': 'admin', 'display_name': 'Sys...
from flask.ext.script import Manager from datawire.core import app, db from datawire.model import Service from datawire.views import index manager = Manager(app) @manager.command def create_db(): """ Create the database entities. """ db.create_all() if __name__ == "__main__": manager.run() Create an a...
<commit_before>from flask.ext.script import Manager from datawire.core import app, db from datawire.model import Service from datawire.views import index manager = Manager(app) @manager.command def create_db(): """ Create the database entities. """ db.create_all() if __name__ == "__main__": manager.ru...
b2ca081fbc10cc4c5d6b02ef2a4f5ce7bcab35e5
doc/conf.py
doc/conf.py
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/LICENS...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/LICENS...
Use sphinxdoc html theme, cleaner than alabast.
Use sphinxdoc html theme, cleaner than alabast.
Python
apache-2.0
probcomp/bayeslite,probcomp/bayeslite
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/LICENS...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/LICENS...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/LICENS...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/LICENS...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # 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/...
bdcdeee5c913f65dc2ea7f611a0ca0882b4e910f
tests/views/test_view.py
tests/views/test_view.py
# Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
Update test for the getattr method.
Update test for the getattr method.
Python
apache-2.0
rowhit/gitfs,PressLabs/gitfs,ksmaheshkumar/gitfs,PressLabs/gitfs,bussiere/gitfs
# Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
<commit_before># Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
<commit_before># Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
c37af8399decdbe3e1303f236891d694985b9040
consulrest/keyvalue.py
consulrest/keyvalue.py
import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = True if k...
import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = True if k...
Allow use of Check-And-Set option and raise exception if status is 4xx or 5xx
Allow use of Check-And-Set option and raise exception if status is 4xx or 5xx
Python
mit
vcoque/consul-ri
import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = True if k...
import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = True if k...
<commit_before>import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = Tr...
import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = True if k...
import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = True if k...
<commit_before>import json import re import requests class KeyValue(object): def __init__(self, url): self._url = "%s/kv" % url def _get(self, key, recurse=None, keys=None): url = self._url + '/' + key params = dict() if recurse is not None: params['recurse'] = Tr...
244f9ad92683a1b3a3bc8409724fea9c671f38b6
src/mcedit2/widgets/layout.py
src/mcedit2/widgets/layout.py
from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui.QLayout): ...
from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui.QLayout): ...
Check margin keyword to Row/Column is not None
Check margin keyword to Row/Column is not None
Python
bsd-3-clause
Rubisk/mcedit2,Rubisk/mcedit2,vorburger/mcedit2,vorburger/mcedit2
from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui.QLayout): ...
from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui.QLayout): ...
<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui...
from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui.QLayout): ...
from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui.QLayout): ...
<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui def _Box(box, *a): for arg in a: if isinstance(arg, tuple): item = arg[0] else: item = arg arg = (item,) if isinstance(item, QtGui...
bd6bb741db3b5403ec8ee590a919b0f9ff29bf14
plugins/logging.py
plugins/logging.py
import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Markdown changes in to get log level from user settings. ...
import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Preferences changes in to get log level from user settings...
Read logger config from Preferences
Plugins: Read logger config from Preferences required due to 9b30d85d1b60fef4f4d7c35868dd406f0c5d94f3
Python
mit
SublimeText-Markdown/MarkdownEditing
import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Markdown changes in to get log level from user settings. ...
import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Preferences changes in to get log level from user settings...
<commit_before>import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Markdown changes in to get log level from u...
import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Preferences changes in to get log level from user settings...
import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Markdown changes in to get log level from user settings. ...
<commit_before>import logging import sublime PACKAGE_NAME = __package__.split(".", 1)[0] logging.basicConfig( level=logging.ERROR, format="%(name)s [%(levelname)s]: %(message)s" ) logger = logging.getLogger(PACKAGE_NAME) def load_logger(): """ Subscribe to Markdown changes in to get log level from u...
c6298a573dc3188b8c57954287d78e7da253483a
lot/urls.py
lot/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from . import views urlpatterns = patterns("", url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), )
# -*- coding: utf-8 -*- from django.conf.urls import url from . import views urlpatterns = [ url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), ]
Update to new-style urlpatterns format
Update to new-style urlpatterns format
Python
bsd-3-clause
ABASystems/django-lot
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from . import views urlpatterns = patterns("", url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), ) Update to new-style urlpatterns format
# -*- coding: utf-8 -*- from django.conf.urls import url from . import views urlpatterns = [ url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), ]
<commit_before># -*- coding: utf-8 -*- from django.conf.urls import patterns, url from . import views urlpatterns = patterns("", url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), ) <commit_msg>Update to new-style urlpatterns format<commit_after>
# -*- coding: utf-8 -*- from django.conf.urls import url from . import views urlpatterns = [ url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), ]
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from . import views urlpatterns = patterns("", url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), ) Update to new-style urlpatterns format# -*- coding: utf-8 -*- from django.conf.urls impor...
<commit_before># -*- coding: utf-8 -*- from django.conf.urls import patterns, url from . import views urlpatterns = patterns("", url(r"^login/(?P<uuid>[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12})/$", views.LOTLogin.as_view(), name="login"), ) <commit_msg>Update to new-style urlpatterns format<commit_after># -*- codin...
d55920576d288e9cb703337c6183cfe071d274ce
cryptography/primitives/block/ciphers.py
cryptography/primitives/block/ciphers.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
Fix issue mixing %s and format for ValueError in AES
Fix issue mixing %s and format for ValueError in AES
Python
bsd-3-clause
skeuomorf/cryptography,dstufft/cryptography,dstufft/cryptography,bwhmather/cryptography,kimvais/cryptography,skeuomorf/cryptography,Ayrx/cryptography,sholsapp/cryptography,dstufft/cryptography,kimvais/cryptography,sholsapp/cryptography,dstufft/cryptography,Hasimir/cryptography,sholsapp/cryptography,Ayrx/cryptography,bw...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distri...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distri...
7beecc71b53a14f5515763f551613e381978dd3f
xbob/learn/linear/__init__.py
xbob/learn/linear/__init__.py
from ._library import * from ._library import __version__, __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(): """Returns a string containing the configuration info...
from ._library import * from . import version from .version import module as __version__ from .version import api as __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(...
Make use of the version module
Make use of the version module
Python
bsd-3-clause
tiagofrepereira2012/bob.learn.linear,tiagofrepereira2012/bob.learn.linear,tiagofrepereira2012/bob.learn.linear
from ._library import * from ._library import __version__, __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(): """Returns a string containing the configuration info...
from ._library import * from . import version from .version import module as __version__ from .version import api as __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(...
<commit_before>from ._library import * from ._library import __version__, __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(): """Returns a string containing the con...
from ._library import * from . import version from .version import module as __version__ from .version import api as __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(...
from ._library import * from ._library import __version__, __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(): """Returns a string containing the configuration info...
<commit_before>from ._library import * from ._library import __version__, __api_version__ def get_include(): """Returns the directory containing the C/C++ API include directives""" return __import__('pkg_resources').resource_filename(__name__, 'include') def get_config(): """Returns a string containing the con...
d86144aa09ea0d6a679a661b0b2f887d6a2a725d
examples/python/values.py
examples/python/values.py
#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue(1.0) print('{}...
#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue(1.0) print('{}...
Add example of Value to Python list conversion
Add example of Value to Python list conversion
Python
agpl-3.0
rTreutlein/atomspace,AmeBel/atomspace,AmeBel/atomspace,rTreutlein/atomspace,AmeBel/atomspace,rTreutlein/atomspace,rTreutlein/atomspace,AmeBel/atomspace,AmeBel/atomspace,rTreutlein/atomspace
#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue(1.0) print('{}...
#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue(1.0) print('{}...
<commit_before>#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue...
#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue(1.0) print('{}...
#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue(1.0) print('{}...
<commit_before>#! /usr/bin/env python # # values.py # """ An example of using values via Python API """ from opencog.atomspace import AtomSpace, TruthValue from opencog.type_constructors import * a = AtomSpace() set_type_ctor_atomspace(a) a = FloatValue([1.0, 2.0, 3.0]) b = FloatValue([1.0, 2.0, 3.0]) c = FloatValue...
c1fdbcf724ac7cc713cf3f5f3ca3cfca50007e34
application.py
application.py
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) if __name__ == '__main__': manager.run()
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) manager.add_command("runserver", Server(port=5002)) if __name__ == '__main__': manager.run()
Update to run on port 5002
Update to run on port 5002 For development we will want to run multiple apps, so they should each bind to a different port number.
Python
mit
mtekel/digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmar...
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) if __name__ == '__main__': manager.run() Update to run on port 5002 For development we will want to run multiple apps, s...
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) manager.add_command("runserver", Server(port=5002)) if __name__ == '__main__': manager.run()
<commit_before>#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) if __name__ == '__main__': manager.run() <commit_msg>Update to run on port 5002 For development we will w...
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) manager.add_command("runserver", Server(port=5002)) if __name__ == '__main__': manager.run()
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) if __name__ == '__main__': manager.run() Update to run on port 5002 For development we will want to run multiple apps, s...
<commit_before>#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'default') manager = Manager(application) if __name__ == '__main__': manager.run() <commit_msg>Update to run on port 5002 For development we will w...
864f5be90fb31529f8ae9b0cf765fcf77504c0c5
comics/comics/mortenm.py
comics/comics/mortenm.py
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
Add missing chars in URL for 'Morten M' crawler
Add missing chars in URL for 'Morten M' crawler
Python
agpl-3.0
klette/comics,jodal/comics,datagutten/comics,datagutten/comics,klette/comics,datagutten/comics,jodal/comics,jodal/comics,klette/comics,datagutten/comics,jodal/comics
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
<commit_before># encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 12...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
<commit_before># encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 12...
07fd8bf23917e18ba419859d788d9f51735f3b39
conda_gitenv/__init__.py
conda_gitenv/__init__.py
from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3.0') _conda_supp...
from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3.0') _conda_vers...
Update minimum conda version diagnostic
Update minimum conda version diagnostic
Python
bsd-3-clause
SciTools/conda-gitenv
from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3.0') _conda_supp...
from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3.0') _conda_vers...
<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3....
from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3.0') _conda_vers...
from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3.0') _conda_supp...
<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals from distutils.version import StrictVersion from conda import __version__ as CONDA_VERSION from ._version import get_versions __version__ = get_versions()['version'] del get_versions _conda_base = StrictVersion('4.3....
82c1b2c14977040f9e6251ed9616fc0f64a52779
system/slackhandler.py
system/slackhandler.py
import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): self.slack.chat.post_message('#leonard', text='ERROR ON {}\n{}'.format( ...
import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): if record.name != 'Unauthorized': self.slack.chat.post_messag...
Remove Unauthorized exception logging to slack
Remove Unauthorized exception logging to slack
Python
mit
sevazhidkov/leonard
import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): self.slack.chat.post_message('#leonard', text='ERROR ON {}\n{}'.format( ...
import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): if record.name != 'Unauthorized': self.slack.chat.post_messag...
<commit_before>import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): self.slack.chat.post_message('#leonard', text='ERROR ON {}...
import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): if record.name != 'Unauthorized': self.slack.chat.post_messag...
import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): self.slack.chat.post_message('#leonard', text='ERROR ON {}\n{}'.format( ...
<commit_before>import logging from slacker import Slacker import os class SlackHandler(logging.Handler): def __init__(self, slack_token): logging.Handler.__init__(self) self.slack = Slacker(slack_token) def emit(self, record): self.slack.chat.post_message('#leonard', text='ERROR ON {}...
845aee2341b3beeb6c96c0a2b830e2729f5f30d2
tests/GrammarCopyTest.py
tests/GrammarCopyTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import * class GrammarCopyTest(TestCase): pass if __name__ == '__main__': main()
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from copy import deepcopy, copy from unittest import main, TestCase from grammpy import * class A(Nonterminal): pass class B(Nonterminal): pass class RuleAtoB(Rule): rule = ([A], [B]) cla...
Add tests for grammar's __clone__ method
Add tests for grammar's __clone__ method
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import * class GrammarCopyTest(TestCase): pass if __name__ == '__main__': main() Add tests for grammar's __clone__ method
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from copy import deepcopy, copy from unittest import main, TestCase from grammpy import * class A(Nonterminal): pass class B(Nonterminal): pass class RuleAtoB(Rule): rule = ([A], [B]) cla...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import * class GrammarCopyTest(TestCase): pass if __name__ == '__main__': main() <commit_msg>Add tests for grammar's __clone__ meth...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from copy import deepcopy, copy from unittest import main, TestCase from grammpy import * class A(Nonterminal): pass class B(Nonterminal): pass class RuleAtoB(Rule): rule = ([A], [B]) cla...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import * class GrammarCopyTest(TestCase): pass if __name__ == '__main__': main() Add tests for grammar's __clone__ method#!/usr/bin/env python """...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.08.2017 19:16 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import * class GrammarCopyTest(TestCase): pass if __name__ == '__main__': main() <commit_msg>Add tests for grammar's __clone__ meth...