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
77caf4f14363c6f53631050d008bc852df465f5e
tests/repl_tests.py
tests/repl_tests.py
from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_session(f): strin = Pipe() strout = Pipe() strerr = Pipe() replthread = Thread(target=repl, args=(s...
from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_line(exp_line, strin, strout): expprompt = exp_line[:4] if expprompt in (">>> ", "... "): prompt =...
Stop the repl test on an error, making sure all Pipes are closed
Stop the repl test on an error, making sure all Pipes are closed
Python
mit
andybalaam/cell
from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_session(f): strin = Pipe() strout = Pipe() strerr = Pipe() replthread = Thread(target=repl, args=(s...
from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_line(exp_line, strin, strout): expprompt = exp_line[:4] if expprompt in (">>> ", "... "): prompt =...
<commit_before> from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_session(f): strin = Pipe() strout = Pipe() strerr = Pipe() replthread = Thread(targe...
from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_line(exp_line, strin, strout): expprompt = exp_line[:4] if expprompt in (">>> ", "... "): prompt =...
from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_session(f): strin = Pipe() strout = Pipe() strerr = Pipe() replthread = Thread(target=repl, args=(s...
<commit_before> from tests.util.pipe import Pipe from threading import Thread from pycell.repl import repl from tests.util.system_test import system_test from tests.util.all_examples import all_sessions def _validate_session(f): strin = Pipe() strout = Pipe() strerr = Pipe() replthread = Thread(targe...
534e7bf630670a5aa42ba4787e66f0b02fb55a7d
conductance_congestion_approx.py
conductance_congestion_approx.py
from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): return np.m...
from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): return np.m...
Add TODO regarding conductance congestion approximator
Add TODO regarding conductance congestion approximator
Python
mit
weinstein/FastMaxFlow
from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): return np.m...
from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): return np.m...
<commit_before>from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): ...
from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): return np.m...
from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): return np.m...
<commit_before>from __future__ import division import numpy as np from congestion_approx import CongestionApprox class ConductanceCongestionApprox(CongestionApprox): def __init__(s, g): s.vertex_degrees_inv = [ 1.0 / g.degree(v) if g.degree(v) > 0 else 0 for v in g.nodes()] def compute_dot(s, x): ...
93a4191b9cb79ee4ddb2efbb4962bef99bc2ec28
totp_bookmarklet.py
totp_bookmarklet.py
import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s' % (type, base6...
import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s' % (type, base6...
Change exemple code to generate OTP link
Change exemple code to generate OTP link
Python
mit
bdauvergne/totp-js,bdauvergne/totp-js
import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s' % (type, base6...
import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s' % (type, base6...
<commit_before>import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s'...
import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s' % (type, base6...
import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s' % (type, base6...
<commit_before>import binascii import base64 import os.path def __content(f): return open(os.path.join(os.path.dirname(__file__), f)).read() crypto_js = __content('crypto.js') hotp_js = __content('hotp.js') myotp_js = __content('my-otp.js') def dataize(document, type='text/html'): return 'data:%s;base64,%s'...
9f0c73eab846d9b2b35c3223fca2014c338e0617
active_link/templatetags/active_link_tags.py
active_link/templatetags/active_link_tags.py
from django import template from django.conf import settings from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag(takes_context=True) def active_link(context, viewname, css_class=None, strict=None): """ Renders the given CSS class if the request path matches the pat...
from django import VERSION as DJANGO_VERSION from django import template from django.conf import settings if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9: from django.core.urlresolvers import reverse else: from django.urls import reverse register = template.Library() @register.simple_tag(takes_context=T...
Fix import of 'reverse' for Django>1.9
Fix import of 'reverse' for Django>1.9
Python
bsd-3-clause
valerymelou/django-active-link
from django import template from django.conf import settings from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag(takes_context=True) def active_link(context, viewname, css_class=None, strict=None): """ Renders the given CSS class if the request path matches the pat...
from django import VERSION as DJANGO_VERSION from django import template from django.conf import settings if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9: from django.core.urlresolvers import reverse else: from django.urls import reverse register = template.Library() @register.simple_tag(takes_context=T...
<commit_before>from django import template from django.conf import settings from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag(takes_context=True) def active_link(context, viewname, css_class=None, strict=None): """ Renders the given CSS class if the request path ...
from django import VERSION as DJANGO_VERSION from django import template from django.conf import settings if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9: from django.core.urlresolvers import reverse else: from django.urls import reverse register = template.Library() @register.simple_tag(takes_context=T...
from django import template from django.conf import settings from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag(takes_context=True) def active_link(context, viewname, css_class=None, strict=None): """ Renders the given CSS class if the request path matches the pat...
<commit_before>from django import template from django.conf import settings from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag(takes_context=True) def active_link(context, viewname, css_class=None, strict=None): """ Renders the given CSS class if the request path ...
5062700980fe432653a11173ab3c3835caf206c9
scripts/generate_db.py
scripts/generate_db.py
#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(filename_db): conn = sqlite3.connect(filename_db) c = conn.cursor() # Create tables ...
#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(db=DEFAULT_DB): conn = sqlite3.connect(db) c = conn.cursor() # Create tables c.exe...
Add field 'creator' to table 'runs'
Add field 'creator' to table 'runs' Example of values stored into *.tcx files: runtastic - makes sports funtastic, http://www.runtastic.com
Python
mit
dubzzz/py-run-tracking,dubzzz/py-run-tracking,dubzzz/py-run-tracking
#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(filename_db): conn = sqlite3.connect(filename_db) c = conn.cursor() # Create tables ...
#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(db=DEFAULT_DB): conn = sqlite3.connect(db) c = conn.cursor() # Create tables c.exe...
<commit_before>#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(filename_db): conn = sqlite3.connect(filename_db) c = conn.cursor() # C...
#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(db=DEFAULT_DB): conn = sqlite3.connect(db) c = conn.cursor() # Create tables c.exe...
#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(filename_db): conn = sqlite3.connect(filename_db) c = conn.cursor() # Create tables ...
<commit_before>#!/usr/bin/python # This script has to generate the sqlite database # # Requirements (import from): # - sqlite3 # # Syntax: # ./generate_db.py import sqlite3 DEFAULT_DB = "run-tracking.db" def generate_tables(filename_db): conn = sqlite3.connect(filename_db) c = conn.cursor() # C...
5d8453f18689a67185472b20e7daf287ebbdb3ac
wafer/pages/urls.py
wafer/pages/urls.py
from django.conf.urls import patterns, url from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url='/')), url(r'^(.*)$', 'slug', name='wafer_page'), )
from django.conf.urls import patterns, url from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url=get_script_prefix())), url(r'^(.*)$', 'slug', name='wafer_page'), )...
Fix default redirect to use get_script_prefix
Fix default redirect to use get_script_prefix
Python
isc
CTPUG/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CarlFK/wafer,CarlFK/wafer
from django.conf.urls import patterns, url from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url='/')), url(r'^(.*)$', 'slug', name='wafer_page'), ) Fix default redirect to use get_script_prefix
from django.conf.urls import patterns, url from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url=get_script_prefix())), url(r'^(.*)$', 'slug', name='wafer_page'), )...
<commit_before>from django.conf.urls import patterns, url from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url='/')), url(r'^(.*)$', 'slug', name='wafer_page'), ) <commit_msg>Fix default redirect to use get_script_pref...
from django.conf.urls import patterns, url from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url=get_script_prefix())), url(r'^(.*)$', 'slug', name='wafer_page'), )...
from django.conf.urls import patterns, url from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url='/')), url(r'^(.*)$', 'slug', name='wafer_page'), ) Fix default redirect to use get_script_prefixfrom django.conf.urls imp...
<commit_before>from django.conf.urls import patterns, url from django.views.generic import RedirectView urlpatterns = patterns( 'wafer.pages.views', url('^index(?:\.html)?$', RedirectView.as_view(url='/')), url(r'^(.*)$', 'slug', name='wafer_page'), ) <commit_msg>Fix default redirect to use get_script_pref...
12866921945d01481f78602dd33eb568c71b5173
localore/people/wagtail_hooks.py
localore/people/wagtail_hooks.py
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
Add more search fields to admin team listing page.
Add more search fields to admin team listing page.
Python
mpl-2.0
ghostwords/localore,ghostwords/localore,ghostwords/localore
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
<commit_before>from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo',...
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
<commit_before>from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo',...
6f09f32684571306b15175e23ee1672fa74ae9a6
teamworkApp/lib/delete_data.py
teamworkApp/lib/delete_data.py
# muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import dbCalls def main(): print('Deleting everything from students, styles, and answers.') dbCalls.remove_all() if __name__ == "__main__": main()
# muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import os import dbCalls summary_file = 'app/assets/images/summary.png' overall_file = 'app/assets/images/overall.png' def main(): print('Deleting everything from students, s...
Remove picture files along with data
Remove picture files along with data
Python
mit
nathanljustin/teamwork-analysis,nathanljustin/teamwork-analysis,nathanljustin/teamwork-analysis,nathanljustin/teamwork-analysis
# muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import dbCalls def main(): print('Deleting everything from students, styles, and answers.') dbCalls.remove_all() if __name__ == "__main__": main() Remove picture file...
# muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import os import dbCalls summary_file = 'app/assets/images/summary.png' overall_file = 'app/assets/images/overall.png' def main(): print('Deleting everything from students, s...
<commit_before># muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import dbCalls def main(): print('Deleting everything from students, styles, and answers.') dbCalls.remove_all() if __name__ == "__main__": main() <com...
# muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import os import dbCalls summary_file = 'app/assets/images/summary.png' overall_file = 'app/assets/images/overall.png' def main(): print('Deleting everything from students, s...
# muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import dbCalls def main(): print('Deleting everything from students, styles, and answers.') dbCalls.remove_all() if __name__ == "__main__": main() Remove picture file...
<commit_before># muddersOnRails() # Sara McAllister November 17, 2017 # Last updated: 11-17-2017 # delete all data from database (this is super sketch) import dbCalls def main(): print('Deleting everything from students, styles, and answers.') dbCalls.remove_all() if __name__ == "__main__": main() <com...
c4a0b6a5b40f7ed964ef43533c4a761124b2ea06
organizer/views.py
organizer/views.py
from django.http.response import HttpResponse def homepage(request): return HttpResponse('Hello (again) World!')
from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() output = ", ".join([tag.name for tag in tag_list]) return HttpResponse(output)
Modify homepage view to list Tags.
Ch04: Modify homepage view to list Tags.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.http.response import HttpResponse def homepage(request): return HttpResponse('Hello (again) World!') Ch04: Modify homepage view to list Tags.
from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() output = ", ".join([tag.name for tag in tag_list]) return HttpResponse(output)
<commit_before>from django.http.response import HttpResponse def homepage(request): return HttpResponse('Hello (again) World!') <commit_msg>Ch04: Modify homepage view to list Tags.<commit_after>
from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() output = ", ".join([tag.name for tag in tag_list]) return HttpResponse(output)
from django.http.response import HttpResponse def homepage(request): return HttpResponse('Hello (again) World!') Ch04: Modify homepage view to list Tags.from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() output = ", ".join([tag.name...
<commit_before>from django.http.response import HttpResponse def homepage(request): return HttpResponse('Hello (again) World!') <commit_msg>Ch04: Modify homepage view to list Tags.<commit_after>from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objec...
4ab53bc73406396206ead375dd7b5e656fdc41b7
mycli/packages/special/utils.py
mycli/packages/special/utils.py
import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' command = arg.strip() directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(directory) ou...
import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(directory) output = subprocess.check_ou...
Remove unused variable from `handle_cd_command`
Remove unused variable from `handle_cd_command`
Python
bsd-3-clause
mdsrosa/mycli,mdsrosa/mycli
import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' command = arg.strip() directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(directory) ou...
import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(directory) output = subprocess.check_ou...
<commit_before>import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' command = arg.strip() directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(direct...
import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(directory) output = subprocess.check_ou...
import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' command = arg.strip() directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(directory) ou...
<commit_before>import os import subprocess def handle_cd_command(arg): """Handles a `cd` shell command by calling python's os.chdir.""" CD_CMD = 'cd' command = arg.strip() directory = '' error = False tokens = arg.split(CD_CMD + ' ') directory = tokens[-1] try: os.chdir(direct...
27591f150761eb78ba57b9a0ad027307122ac60c
src/shell/parser/type.py
src/shell/parser/type.py
#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(self): if ...
#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(self): if ...
Fix bug due to refacto
Fix bug due to refacto
Python
mit
Frky/scat,Frky/scat,Frky/scat,Frky/scat,Frky/scat
#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(self): if ...
#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(self): if ...
<commit_before>#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(sel...
#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(self): if ...
#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(self): if ...
<commit_before>#-*- coding: utf-8 -*- from src.shell.parser.i_log_parser import ILogParser class TypeLogParser(ILogParser): """ Parser for type log file """ def __init__(self, *args, **kwargs): self.__fn = None super(TypeLogParser, self).__init__(*args, **kwargs) def get(sel...
da6f3cd94e60e4792926bd9f924714bb8a7c1903
YaDiskClient/__init__.py
YaDiskClient/__init__.py
""" Client for Yandex.Disk. """ __version__ = '0.3.2' from .YaDiskClient import YaDiskException, YaDisk
""" Client for Yandex.Disk. """ __version__ = '0.3.3' from .YaDiskClient import YaDiskException, YaDisk
Change version, upload to pypi.
Change version, upload to pypi.
Python
mit
TyVik/YaDiskClient
""" Client for Yandex.Disk. """ __version__ = '0.3.2' from .YaDiskClient import YaDiskException, YaDisk Change version, upload to pypi.
""" Client for Yandex.Disk. """ __version__ = '0.3.3' from .YaDiskClient import YaDiskException, YaDisk
<commit_before>""" Client for Yandex.Disk. """ __version__ = '0.3.2' from .YaDiskClient import YaDiskException, YaDisk <commit_msg>Change version, upload to pypi.<commit_after>
""" Client for Yandex.Disk. """ __version__ = '0.3.3' from .YaDiskClient import YaDiskException, YaDisk
""" Client for Yandex.Disk. """ __version__ = '0.3.2' from .YaDiskClient import YaDiskException, YaDisk Change version, upload to pypi.""" Client for Yandex.Disk. """ __version__ = '0.3.3' from .YaDiskClient import YaDiskException, YaDisk
<commit_before>""" Client for Yandex.Disk. """ __version__ = '0.3.2' from .YaDiskClient import YaDiskException, YaDisk <commit_msg>Change version, upload to pypi.<commit_after>""" Client for Yandex.Disk. """ __version__ = '0.3.3' from .YaDiskClient import YaDiskException, YaDisk
e26b3ed4c96d0912f543d079f1ef016974483be5
falmer/matte/queries.py
falmer/matte/queries.py
import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, **kwargs): ...
import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, **kwargs): ...
Order images by created at
Order images by created at
Python
mit
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, **kwargs): ...
import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, **kwargs): ...
<commit_before>import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, ...
import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, **kwargs): ...
import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, **kwargs): ...
<commit_before>import graphene from falmer.schema.schema import DjangoConnectionField from . import types from . import models class Query(graphene.ObjectType): all_images = DjangoConnectionField(types.Image) image = graphene.Field(types.Image, media_id=graphene.Int()) def resolve_all_images(self, info, ...
5e4843b99f043bc5ad1ba9842e4bee452a5681e8
yarnitor/ui.py
yarnitor/ui.py
"""YARN monitoring built-in UI.""" from flask import Blueprint, render_template ui_bp = Blueprint('ui', __name__, static_folder='static') @ui_bp.route('/') def index(): return render_template('index.html')
"""YARN monitoring built-in UI.""" import time from flask import Blueprint, render_template, url_for ui_bp = Blueprint('ui', __name__, static_folder='static') version = str(time.time()) def versioned_url_for(endpoint, **args): """Inserts a query string `q` into the args dictionary with the version string ge...
Add static web asset cache busting
Add static web asset cache busting
Python
bsd-3-clause
maxpoint/yarnitor,maxpoint/yarnitor,maxpoint/yarnitor
"""YARN monitoring built-in UI.""" from flask import Blueprint, render_template ui_bp = Blueprint('ui', __name__, static_folder='static') @ui_bp.route('/') def index(): return render_template('index.html') Add static web asset cache busting
"""YARN monitoring built-in UI.""" import time from flask import Blueprint, render_template, url_for ui_bp = Blueprint('ui', __name__, static_folder='static') version = str(time.time()) def versioned_url_for(endpoint, **args): """Inserts a query string `q` into the args dictionary with the version string ge...
<commit_before>"""YARN monitoring built-in UI.""" from flask import Blueprint, render_template ui_bp = Blueprint('ui', __name__, static_folder='static') @ui_bp.route('/') def index(): return render_template('index.html') <commit_msg>Add static web asset cache busting<commit_after>
"""YARN monitoring built-in UI.""" import time from flask import Blueprint, render_template, url_for ui_bp = Blueprint('ui', __name__, static_folder='static') version = str(time.time()) def versioned_url_for(endpoint, **args): """Inserts a query string `q` into the args dictionary with the version string ge...
"""YARN monitoring built-in UI.""" from flask import Blueprint, render_template ui_bp = Blueprint('ui', __name__, static_folder='static') @ui_bp.route('/') def index(): return render_template('index.html') Add static web asset cache busting"""YARN monitoring built-in UI.""" import time from flask import Bluepr...
<commit_before>"""YARN monitoring built-in UI.""" from flask import Blueprint, render_template ui_bp = Blueprint('ui', __name__, static_folder='static') @ui_bp.route('/') def index(): return render_template('index.html') <commit_msg>Add static web asset cache busting<commit_after>"""YARN monitoring built-in UI....
03b2e8397414c761b5df7d123056e89b49312353
addons/zotero/serializer.py
addons/zotero/serializer.py
from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { 'name': ...
from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { 'name': ...
Add groups url to serialized urls.
Add groups url to serialized urls.
Python
apache-2.0
HalcyonChimera/osf.io,aaxelb/osf.io,caseyrollins/osf.io,aaxelb/osf.io,erinspace/osf.io,Johnetordoff/osf.io,binoculars/osf.io,felliott/osf.io,HalcyonChimera/osf.io,icereval/osf.io,erinspace/osf.io,Johnetordoff/osf.io,adlius/osf.io,sloria/osf.io,icereval/osf.io,baylee-d/osf.io,mattclark/osf.io,pattisdr/osf.io,cslzchen/os...
from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { 'name': ...
from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { 'name': ...
<commit_before>from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { ...
from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { 'name': ...
from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { 'name': ...
<commit_before>from addons.base.serializer import CitationsAddonSerializer class ZoteroSerializer(CitationsAddonSerializer): addon_short_name = 'zotero' @property def serialized_node_settings(self): result = super(ZoteroSerializer, self).serialized_node_settings result['library'] = { ...
86f33f301cc6a7215b4e0da21ac5fbcdc67cedcf
sappho/__init__.py
sappho/__init__.py
if __name__ == "__main__": __version__ = "0.3" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers
if __name__ == "__main__": __version__ = "0.3.1" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers
Fix version pin error from last release!
Fix version pin error from last release!
Python
mit
lillian-lemmer/sappho,lillian-gardenia-seabreeze/sappho,lily-seabreeze/sappho,lillian-gardenia-seabreeze/sappho,lillian-lemmer/sappho,lily-seabreeze/sappho
if __name__ == "__main__": __version__ = "0.3" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers Fix version pin error from last release!
if __name__ == "__main__": __version__ = "0.3.1" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers
<commit_before>if __name__ == "__main__": __version__ = "0.3" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers <commit_msg>Fix version pin error from last release!<commit_after>
if __name__ == "__main__": __version__ = "0.3.1" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers
if __name__ == "__main__": __version__ = "0.3" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers Fix version pin error from last release!if __name__ == "__main__": __version__ = "0.3.1" else: from animate...
<commit_before>if __name__ == "__main__": __version__ = "0.3" else: from animatedsprite import AnimatedSprite from tilemap import TileMap, Tilesheet, tmx_file_to_tilemaps from layers import SurfaceLayers <commit_msg>Fix version pin error from last release!<commit_after>if __name__ == "__main__": __v...
baf82d48125d51ae5f5f37cf761ade574a2f8fc1
services/flickr.py
services/flickr.py
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
Simplify Flickr's scope handling a bit
Simplify Flickr's scope handling a bit
Python
bsd-3-clause
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
<commit_before>import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
<commit_before>import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr...
852f067c7aab6bdcaabf2550fc5a0995a7e9b0ae
maediprojects/__init__.py
maediprojects/__init__.py
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) import routes @babel.localeselector def get_locale(): return app.conf...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel from flask.ext.mail import Mail import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) mail = Mail(app) import routes @babel.loc...
Add flask-mail to use for emailing updates
Add flask-mail to use for emailing updates
Python
agpl-3.0
markbrough/maedi-projects,markbrough/maedi-projects,markbrough/maedi-projects
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) import routes @babel.localeselector def get_locale(): return app.conf...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel from flask.ext.mail import Mail import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) mail = Mail(app) import routes @babel.loc...
<commit_before>from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) import routes @babel.localeselector def get_locale(): ...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel from flask.ext.mail import Mail import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) mail = Mail(app) import routes @babel.loc...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) import routes @babel.localeselector def get_locale(): return app.conf...
<commit_before>from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel import os app = Flask(__name__.split('.')[0]) app.config.from_pyfile(os.path.join('..', 'config.py')) db = SQLAlchemy(app) babel = Babel(app) import routes @babel.localeselector def get_locale(): ...
854bb642dd6a4800f57555187b9dfb1a27a7801c
nibble_aes/find_dist/find_ids.py
nibble_aes/find_dist/find_ids.py
""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differenti...
""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differenti...
Remove conversion to set, as the new file format uses sets in tuples.
Remove conversion to set, as the new file format uses sets in tuples.
Python
mit
wei2912/aes-idc,wei2912/idc,wei2912/idc,wei2912/idc,wei2912/aes-idc,wei2912/idc
""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differenti...
""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differenti...
<commit_before>""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [back...
""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differenti...
""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differenti...
<commit_before>""" Derive a list of impossible differentials. """ from ast import literal_eval import sys def parse(line): return literal_eval(line) def in_set(s, xs): return any(i in s for i in xs) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [back...
7c1dd8a6a547cb6183f66d73b27868a75451eb54
dsh.py
dsh.py
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
Revert "Revert "Testing NoOpDSH() when database commands are executed without a connection being opened.""
Revert "Revert "Testing NoOpDSH() when database commands are executed without a connection being opened."" This reverts commit 9c428fbfb69c93ef3da935d0d2ab098fbeb1c317.
Python
mit
mcmontero/tinyAPI,mcmontero/tinyAPI
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
<commit_before># ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ =...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
<commit_before># ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ =...
aa73c66b4069b63fa42ee91093e9967573cdf820
whitenoise/httpstatus_backport.py
whitenoise/httpstatus_backport.py
""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, code) i...
""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, code) ...
Fix whitespace error to keep flake8 happy
Fix whitespace error to keep flake8 happy
Python
mit
evansd/whitenoise,evansd/whitenoise,evansd/whitenoise
""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, code) i...
""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, code) ...
<commit_before>""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, ...
""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, code) ...
""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, code) i...
<commit_before>""" Very partial backport of the `http.HTTPStatus` enum from Python 3.5 This implements just enough of the interface for our purposes, it does not attempt to be a full implementation. """ class HTTPStatus(int): phrase = None def __new__(cls, code, phrase): instance = int.__new__(cls, ...
2a41cae0e1992b23647ebdc7d49c435e4a187cf2
jujubigdata/__init__.py
jujubigdata/__init__.py
# Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the i...
# Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the i...
Make relations import conditional for layers migration
Make relations import conditional for layers migration
Python
apache-2.0
tsakas/jujubigdata,johnsca/jujubigdata,ktsakalozos/jujubigdata-dev,juju-solutions/jujubigdata,juju-solutions/jujubigdata,ktsakalozos/jujubigdata-dev,andrewdmcleod/jujubigdata,andrewdmcleod/jujubigdata,johnsca/jujubigdata,ktsakalozos/jujubigdata,ktsakalozos/jujubigdata,tsakas/jujubigdata
# Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the i...
# Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the i...
<commit_before># Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wit...
# Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the i...
# Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the i...
<commit_before># Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wit...
dfcac48b5bbbf68a82089a3a500457a0c5e6e65e
CascadeCount.py
CascadeCount.py
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
Load from the pre processed data
Load from the pre processed data
Python
mit
danjamker/DiffusionSimulation
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
<commit_before>from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.proto...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
<commit_before>from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.proto...
a9581a26704f663f5d496ad07c4a6f4fd0ee641f
lampost/util/encrypt.py
lampost/util/encrypt.py
import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-8') salt = ...
import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-8') salt = ...
Remove password back door since database updates complete.
Remove password back door since database updates complete.
Python
mit
genzgd/Lampost-Mud,genzgd/Lampost-Mud,genzgd/Lampost-Mud
import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-8') salt = ...
import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-8') salt = ...
<commit_before>import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-...
import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-8') salt = ...
import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-8') salt = ...
<commit_before>import hashlib from os import urandom from base64 import b64encode, b64decode from itertools import izip from lampost.util.pdkdf2 import pbkdf2_bin SALT_LENGTH = 8 KEY_LENGTH = 20 COST_FACTOR = 800 def make_hash(password): if isinstance(password, unicode): password = password.encode('utf-...
fa11217da72fc403b94e9574f4f4e6ec506e5353
tests/commands/test_test.py
tests/commands/test_test.py
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
Fix Unit Test build environment
Fix Unit Test build environment
Python
apache-2.0
platformio/platformio,platformio/platformio-core,platformio/platformio-core
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
<commit_before># Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 requir...
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
<commit_before># Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 requir...
860c19f236cf1d064376c045c889fc2ba6a4b928
djangoautoconf/management/commands/dump_settings.py
djangoautoconf/management/commands/dump_settings.py
import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' help = 'Crea...
import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' help = 'Crea...
Fix bool setting dump issue.
Fix bool setting dump issue.
Python
bsd-3-clause
weijia/djangoautoconf,weijia/djangoautoconf
import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' help = 'Crea...
import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' help = 'Crea...
<commit_before>import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' ...
import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' help = 'Crea...
import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' help = 'Crea...
<commit_before>import os from django.core.management import BaseCommand from django.conf import settings def dump_attrs(obj_instance): for attr in dir(obj_instance): if attr != attr.upper(): continue yield attr, getattr(obj_instance, attr) class Command(BaseCommand): args = '' ...
1e62124cfb3b3c30cc10a9f8fb1ff25ee2e4aa56
examples/python/helloworld/greeter_server.py
examples/python/helloworld/greeter_server.py
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Revert changes to helloworld example
Revert changes to helloworld example
Python
apache-2.0
muxi/grpc,ctiller/grpc,firebase/grpc,firebase/grpc,pszemus/grpc,grpc/grpc,donnadionne/grpc,ctiller/grpc,grpc/grpc,pszemus/grpc,pszemus/grpc,vjpai/grpc,grpc/grpc,stanley-cheung/grpc,pszemus/grpc,pszemus/grpc,muxi/grpc,muxi/grpc,ctiller/grpc,ejona86/grpc,ctiller/grpc,grpc/grpc,stanley-cheung/grpc,ejona86/grpc,jboeuf/grpc...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
<commit_before># Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
<commit_before># Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
ab627a078eee3000806bfd0abcd01dc89e85d93c
src/test_read+write.py
src/test_read+write.py
#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/PMID-8557975-simplified-sentences.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences = bioc_reader.c...
#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/bcIVLearningCorpus.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences = bioc_reader.collection.docum...
Add BioC.dtd one level up
Add BioC.dtd one level up
Python
bsd-2-clause
SuLab/PyBioC
#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/PMID-8557975-simplified-sentences.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences = bioc_reader.c...
#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/bcIVLearningCorpus.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences = bioc_reader.collection.docum...
<commit_before>#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/PMID-8557975-simplified-sentences.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences ...
#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/bcIVLearningCorpus.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences = bioc_reader.collection.docum...
#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/PMID-8557975-simplified-sentences.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences = bioc_reader.c...
<commit_before>#!/usr/bin/env python from bioc import BioCReader from bioc import BioCWriter test_file = '../test_input/PMID-8557975-simplified-sentences.xml' dtd_file = '../test_input/BioC.dtd' def main(): bioc_reader = BioCReader(test_file, dtd_valid_file=dtd_file) bioc_reader.read() ''' sentences ...
ac900d1a42e5379e192b57cef67845db202e82c3
tests/test_signed_div.py
tests/test_signed_div.py
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_strtol(threads): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div") b = ang...
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_signed_div(): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div") b = angr.P...
Rename the signed_div test case, and ... disable the multithreaded test case.
Rename the signed_div test case, and ... disable the multithreaded test case.
Python
bsd-2-clause
tyb0807/angr,angr/angr,tyb0807/angr,chubbymaggie/angr,schieb/angr,f-prettyland/angr,f-prettyland/angr,iamahuman/angr,f-prettyland/angr,axt/angr,chubbymaggie/angr,schieb/angr,angr/angr,schieb/angr,tyb0807/angr,chubbymaggie/angr,iamahuman/angr,iamahuman/angr,angr/angr,axt/angr,axt/angr
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_strtol(threads): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div") b = ang...
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_signed_div(): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div") b = angr.P...
<commit_before>import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_strtol(threads): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_di...
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_signed_div(): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div") b = angr.P...
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_strtol(threads): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div") b = ang...
<commit_before>import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_strtol(threads): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_di...
58cc02faf08ec499f0d9239959b6d50a1b2b90ad
tests/unit/test_place.py
tests/unit/test_place.py
"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRSTPARTY asse...
"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRSTPARTY asse...
Add unit test case for desired placement behavior
Add unit test case for desired placement behavior
Python
mit
PyCQA/isort,PyCQA/isort
"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRSTPARTY asse...
"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRSTPARTY asse...
<commit_before>"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRS...
"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRSTPARTY asse...
"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRSTPARTY asse...
<commit_before>"""Tests for the isort import placement module""" from functools import partial from isort import place, sections from isort.settings import Config def test_module(src_path): place_tester = partial(place.module, config=Config(src_paths=[src_path])) assert place_tester("isort") == sections.FIRS...
8521d53b20e8f4874a82188b792dd1d4d0ecf419
djangae/db/backends/appengine/parsers/version_18.py
djangae/db/backends/appengine/parsers/version_18.py
from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.where import EmptyWhere if isinstance(self.django_qu...
from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.where import SubqueryConstraint from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.wh...
Fix empty Q() filters on Django 1.8
Fix empty Q() filters on Django 1.8
Python
bsd-3-clause
grzes/djangae,grzes/djangae,potatolondon/djangae,grzes/djangae,potatolondon/djangae
from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.where import EmptyWhere if isinstance(self.django_qu...
from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.where import SubqueryConstraint from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.wh...
<commit_before>from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.where import EmptyWhere if isinstance...
from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.where import SubqueryConstraint from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.wh...
from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.where import EmptyWhere if isinstance(self.django_qu...
<commit_before>from django.db.models.expressions import Star from django.db.models.sql.datastructures import EmptyResultSet from .version_19 import Parser as BaseParser class Parser(BaseParser): def _prepare_for_transformation(self): from django.db.models.sql.where import EmptyWhere if isinstance...
a382c448da054db4631bb9940d27d4b527d7d5ce
execute_all_tests.py
execute_all_tests.py
#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be us...
#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be us...
Test execution: Add bear tests
Test execution: Add bear tests
Python
agpl-3.0
Asalle/coala,incorrectusername/coala,AdeshAtole/coala,stevemontana1980/coala,Balaji2198/coala,NalinG/coala,abhiroyg/coala,SambitAcharya/coala,tushar-rishav/coala,RJ722/coala,arjunsinghy96/coala,netman92/coala,scriptnull/coala,damngamerz/coala,d6e/coala,FeodorFitsner/coala,stevemontana1980/coala,abhiroyg/coala,saurabhii...
#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be us...
#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be us...
<commit_before>#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope tha...
#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be us...
#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be us...
<commit_before>#! /bin/python3 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope tha...
b4e06f4e35355ed7502359d2ecffbee00d615f36
numba/tests/test_numpyadapt.py
numba/tests/test_numpyadapt.py
from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("strides", (c_ssiz...
from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("strides", (c_ssiz...
Fix test after changing array structure
Fix test after changing array structure
Python
bsd-2-clause
seibert/numba,GaZ3ll3/numba,pombredanne/numba,sklam/numba,stonebig/numba,gmarkall/numba,sklam/numba,seibert/numba,numba/numba,stuartarchibald/numba,sklam/numba,stonebig/numba,pombredanne/numba,IntelLabs/numba,ssarangi/numba,stuartarchibald/numba,cpcloud/numba,stefanseefeld/numba,gdementen/numba,ssarangi/numba,pitrou/nu...
from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("strides", (c_ssiz...
from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("strides", (c_ssiz...
<commit_before>from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("st...
from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("strides", (c_ssiz...
from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("strides", (c_ssiz...
<commit_before>from __future__ import print_function from numba.ctypes_support import * import numpy import numba.unittest_support as unittest from numba._numpyadapt import get_ndarray_adaptor class ArrayStruct3D(Structure): _fields_ = [ ("data", c_void_p), ("shape", (c_ssize_t * 3)), ("st...
0106108b2bb4f9ad5eaa4e02981293d5f5613aaf
cvmfs/webapi/cvmfs_api.py
cvmfs/webapi/cvmfs_api.py
import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs))]) return [response_body] def d...
import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs)), ('Content-Lengt...
Add Content-Length to message in the body of a bad request
Add Content-Length to message in the body of a bad request
Python
bsd-3-clause
reneme/cvmfs,cvmfs/cvmfs,djw8605/cvmfs,djw8605/cvmfs,alhowaidi/cvmfsNDN,cvmfs/cvmfs,djw8605/cvmfs,Gangbiao/cvmfs,trshaffer/cvmfs,cvmfs/cvmfs,reneme/cvmfs,reneme/cvmfs,cvmfs-testing/cvmfs,Moliholy/cvmfs,Gangbiao/cvmfs,reneme/cvmfs,MicBrain/cvmfs,DrDaveD/cvmfs,Moliholy/cvmfs,trshaffer/cvmfs,DrDaveD/cvmfs,MicBrain/cvmfs,G...
import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs))]) return [response_body] def d...
import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs)), ('Content-Lengt...
<commit_before>import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs))]) return [respon...
import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs)), ('Content-Lengt...
import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs))]) return [response_body] def d...
<commit_before>import os import cvmfs_geo negative_expire_secs = 60*5; # 5 minutes def bad_request(start_response, reason): response_body = 'Bad Request: ' + reason + "\n" start_response('400 Bad Request', [('Cache-control', 'max-age=' + str(negative_expire_secs))]) return [respon...
5488e6361359eb299e47814fd83e8e09187f45fd
draw_initials.py
draw_initials.py
import turtle def draw_initials(): #Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') ###THE LETTER B### letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) #Move pen into place letter.penup() letter.left(180)...
#!/usr/bin/env python import turtle def draw_initials(): """Draw the initials BC""" # Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) # Move pen into place lette...
Make minor improvements to comments and formatting
Make minor improvements to comments and formatting
Python
mit
bencam/turtle
import turtle def draw_initials(): #Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') ###THE LETTER B### letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) #Move pen into place letter.penup() letter.left(180)...
#!/usr/bin/env python import turtle def draw_initials(): """Draw the initials BC""" # Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) # Move pen into place lette...
<commit_before>import turtle def draw_initials(): #Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') ###THE LETTER B### letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) #Move pen into place letter.penup() l...
#!/usr/bin/env python import turtle def draw_initials(): """Draw the initials BC""" # Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) # Move pen into place lette...
import turtle def draw_initials(): #Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') ###THE LETTER B### letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) #Move pen into place letter.penup() letter.left(180)...
<commit_before>import turtle def draw_initials(): #Set up screen, etc. window = turtle.Screen() window.bgcolor('gray') ###THE LETTER B### letter = turtle.Turtle() letter.shape('turtle') letter.color('white', 'gray') letter.speed(8) #Move pen into place letter.penup() l...
dd6090464fa3eb1f95f6fd5efd7591b1c06c0ce6
fuel_plugin_builder/fuel_plugin_builder/messages.py
fuel_plugin_builder/fuel_plugin_builder/messages.py
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 requi...
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 requi...
Add rpm-build into environment setup message for CentOS
Add rpm-build into environment setup message for CentOS Change-Id: I44bd14f2f3c3e76c24f5efd26a5ff6a545dcaf72 Implements: blueprint plugin-major-version-for-releases
Python
apache-2.0
nebril/fuel-plugins,stackforge/fuel-plugins,stackforge/fuel-plugins,nebril/fuel-plugins
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 requi...
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 requi...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 # # ...
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 requi...
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 requi...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # 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 # # ...
02de9a6092549e1310adba9fd844cb9c67958d70
oneanddone/tasks/management/commands/taskcleanup.py
oneanddone/tasks/management/commands/taskcleanup.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.core.management.base import BaseCommand from oneanddone.tasks.models import Task, TaskAttempt class Comman...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from datetime import datetime from django.core.management.base import BaseCommand from oneanddone.tasks.models import T...
Add timestamps to management task output
Add timestamps to management task output
Python
mpl-2.0
adini121/oneanddone,glogiotatidis/oneanddone,tessie/oneanddone,jicksy/oneanddone_test,m8ttyB/oneanddone,tessie/oneanddone,jicksy/oneanddone_test,m8ttyB/oneanddone,bobsilverberg/oneanddone,VarnaSuresh/oneanddone,akatsoulas/oneanddone,VarnaSuresh/oneanddone,adini121/oneanddone,akatsoulas/oneanddone,adini121/oneanddone,Va...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.core.management.base import BaseCommand from oneanddone.tasks.models import Task, TaskAttempt class Comman...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from datetime import datetime from django.core.management.base import BaseCommand from oneanddone.tasks.models import T...
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.core.management.base import BaseCommand from oneanddone.tasks.models import Task, TaskAttempt...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from datetime import datetime from django.core.management.base import BaseCommand from oneanddone.tasks.models import T...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.core.management.base import BaseCommand from oneanddone.tasks.models import Task, TaskAttempt class Comman...
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.core.management.base import BaseCommand from oneanddone.tasks.models import Task, TaskAttempt...
eb60d0d226f08b90e2835aac0440560f392257f4
prolog/targetprologstandalone.py
prolog/targetprologstandalone.py
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic # for side effec...
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic # for side effec...
Initialize engine with load_system parameter.
Initialize engine with load_system parameter.
Python
mit
cosmoharrigan/pyrolog
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic # for side effec...
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic # for side effec...
<commit_before>""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic #...
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic # for side effec...
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic # for side effec...
<commit_before>""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic #...
ee2a6bb99d2a8fadecddd58366c20202c863c97c
geocoder/__init__.py
geocoder/__init__.py
#!/usr/bin/python # coding: utf8 # TODO: Move imports to specific modules that need them # CORE from .api import get, yahoo, bing, geonames, google, mapquest # noqa from .api import nokia, osm, tomtom, geolytica, arcgis, opencage # noqa from .api import maxmind, freegeoip, ottawa, here, baidu, w3w, yandex # noqa ...
#!/usr/bin/python # coding: utf8 """ Geocoder ~~~~~~~~ Geocoder is a geocoding library, written in python, simple and consistent. Many online providers such as Google & Bing have geocoding services, these providers do not include Python libraries and have different JSON responses between each other. Consistant JSON...
Add imports to init with noqa comments
Add imports to init with noqa comments
Python
mit
epyatopal/geocoder-1,akittas/geocoder,minimedj/geocoder,DenisCarriere/geocoder,ahlusar1989/geocoder,miraculixx/geocoder
#!/usr/bin/python # coding: utf8 # TODO: Move imports to specific modules that need them # CORE from .api import get, yahoo, bing, geonames, google, mapquest # noqa from .api import nokia, osm, tomtom, geolytica, arcgis, opencage # noqa from .api import maxmind, freegeoip, ottawa, here, baidu, w3w, yandex # noqa ...
#!/usr/bin/python # coding: utf8 """ Geocoder ~~~~~~~~ Geocoder is a geocoding library, written in python, simple and consistent. Many online providers such as Google & Bing have geocoding services, these providers do not include Python libraries and have different JSON responses between each other. Consistant JSON...
<commit_before>#!/usr/bin/python # coding: utf8 # TODO: Move imports to specific modules that need them # CORE from .api import get, yahoo, bing, geonames, google, mapquest # noqa from .api import nokia, osm, tomtom, geolytica, arcgis, opencage # noqa from .api import maxmind, freegeoip, ottawa, here, baidu, w3w, y...
#!/usr/bin/python # coding: utf8 """ Geocoder ~~~~~~~~ Geocoder is a geocoding library, written in python, simple and consistent. Many online providers such as Google & Bing have geocoding services, these providers do not include Python libraries and have different JSON responses between each other. Consistant JSON...
#!/usr/bin/python # coding: utf8 # TODO: Move imports to specific modules that need them # CORE from .api import get, yahoo, bing, geonames, google, mapquest # noqa from .api import nokia, osm, tomtom, geolytica, arcgis, opencage # noqa from .api import maxmind, freegeoip, ottawa, here, baidu, w3w, yandex # noqa ...
<commit_before>#!/usr/bin/python # coding: utf8 # TODO: Move imports to specific modules that need them # CORE from .api import get, yahoo, bing, geonames, google, mapquest # noqa from .api import nokia, osm, tomtom, geolytica, arcgis, opencage # noqa from .api import maxmind, freegeoip, ottawa, here, baidu, w3w, y...
64441102017e966895b8b082c40932148509f60d
dimod/package_info.py
dimod/package_info.py
__version__ = '1.0.0.dev6' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
__version__ = '1.0.0.dev7' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
Update version 1.0.0.dev6 -> 1.0.0.dev7
Update version 1.0.0.dev6 -> 1.0.0.dev7
Python
apache-2.0
oneklc/dimod,oneklc/dimod
__version__ = '1.0.0.dev6' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' Update version 1.0.0.dev6 -> 1.0.0.dev7
__version__ = '1.0.0.dev7' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
<commit_before>__version__ = '1.0.0.dev6' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' <commit_msg>Update version 1.0.0.dev6 -> 1.0.0.dev7<commit_after>
__version__ = '1.0.0.dev7' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
__version__ = '1.0.0.dev6' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' Update version 1.0.0.dev6 -> 1.0.0.dev7__version__ = '1.0.0.dev7' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' _...
<commit_before>__version__ = '1.0.0.dev6' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' <commit_msg>Update version 1.0.0.dev6 -> 1.0.0.dev7<commit_after>__version__ = '1.0.0.dev7' __author__ = 'D-Wave Systems Inc.' __a...
21e5ee2ad250c313ea0eb2c67c3d3cc32661d24d
examples/benchmarking/server.py
examples/benchmarking/server.py
import asyncore,time,signal,sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SecureSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): pass def start(self): SMTPServer.__init_...
from secure_smtpd import SMTPServer class SecureSMTPServer(SMTPServer): def process_message(self, peer, mailfrom, rcpttos, message_data): pass server = SecureSMTPServer(('0.0.0.0', 1025), None) server.run()
Switch to non-privledged port to make testing easier.
Switch to non-privledged port to make testing easier. User the new server.run() method.
Python
isc
bcoe/secure-smtpd
import asyncore,time,signal,sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SecureSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): pass def start(self): SMTPServer.__init_...
from secure_smtpd import SMTPServer class SecureSMTPServer(SMTPServer): def process_message(self, peer, mailfrom, rcpttos, message_data): pass server = SecureSMTPServer(('0.0.0.0', 1025), None) server.run()
<commit_before>import asyncore,time,signal,sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SecureSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): pass def start(self): SMT...
from secure_smtpd import SMTPServer class SecureSMTPServer(SMTPServer): def process_message(self, peer, mailfrom, rcpttos, message_data): pass server = SecureSMTPServer(('0.0.0.0', 1025), None) server.run()
import asyncore,time,signal,sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SecureSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): pass def start(self): SMTPServer.__init_...
<commit_before>import asyncore,time,signal,sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SecureSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): pass def start(self): SMT...
2041cd414df65d9b529a19fd589163af41ec082e
ocl/oclapi/management/commands/run_data_integrity_checks.py
ocl/oclapi/management/commands/run_data_integrity_checks.py
from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): data_integrity_checks.delay()
from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): pass #data_integrity_checks.delay()
Disable updating active counts on startup
Disable updating active counts on startup
Python
mpl-2.0
snyaggarwal/oclapi,snyaggarwal/oclapi,snyaggarwal/oclapi,snyaggarwal/oclapi,OpenConceptLab/oclapi,OpenConceptLab/oclapi,OpenConceptLab/oclapi,OpenConceptLab/oclapi,OpenConceptLab/oclapi
from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): data_integrity_checks.delay() Disable updating active counts on startup
from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): pass #data_integrity_checks.delay()
<commit_before>from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): data_integrity_checks.delay() <commit_msg>Disable updating active counts on startup<commit_after>
from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): pass #data_integrity_checks.delay()
from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): data_integrity_checks.delay() Disable updating active counts on startupfrom django.core.management import BaseComman...
<commit_before>from django.core.management import BaseCommand from tasks import data_integrity_checks class Command(BaseCommand): help = 'Run data integrity checks' def handle(self, *args, **options): data_integrity_checks.delay() <commit_msg>Disable updating active counts on startup<commit_after>from...
ff61fb41273b8bf94bd0c64ddb1a4c1e1c91bb5f
api/__init__.py
api/__init__.py
from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[config_name]) ...
from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[config_name]) ...
Add url rules for public unauthorised routes
Add url rules for public unauthorised routes
Python
mit
EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list
from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[config_name]) ...
from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[config_name]) ...
<commit_before>from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[co...
from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[config_name]) ...
from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[config_name]) ...
<commit_before>from flask_sqlalchemy import SQLAlchemy import connexion from config import config db = SQLAlchemy() def create_app(config_name): app = connexion.FlaskApp(__name__, specification_dir='swagger/') app.add_api('swagger.yaml') application = app.app application.config.from_object(config[co...
51781b95b629a31107d16a52b0ea184306fe6163
pyfakefs/pytest_plugin.py
pyfakefs/pytest_plugin.py
"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import py import pytest from pyfakefs.fake_filesystem_unitt...
"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import sys import py import pytest from pyfakefs.fake_files...
Fix pytest when pyfakefs + future is installed
Fix pytest when pyfakefs + future is installed `python-future` is notorious for breaking modules which use `try:` / `except:` to import modules based on version. In this case, `pyfakefs` imported the backported `builtins` module which changes the semantics of the `open()` function. `pyfakefs` then monkeypatches `lin...
Python
apache-2.0
mrbean-bremen/pyfakefs,mrbean-bremen/pyfakefs,pytest-dev/pyfakefs,jmcgeheeiv/pyfakefs
"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import py import pytest from pyfakefs.fake_filesystem_unitt...
"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import sys import py import pytest from pyfakefs.fake_files...
<commit_before>"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import py import pytest from pyfakefs.fake_f...
"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import sys import py import pytest from pyfakefs.fake_files...
"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import py import pytest from pyfakefs.fake_filesystem_unitt...
<commit_before>"""A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') """ import linecache import py import pytest from pyfakefs.fake_f...
3aa248a9ee40afb2c8c7725ae832c0d25ec92c9b
nose/orbitint4sigint.py
nose/orbitint4sigint.py
import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,100000.,10001) if sys.argv[2] == 'full' or sys.arg...
import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,10000000.,1000001) if sys.argv[2] == 'full' or sys...
Make integration longer bc now ends before interrupt?
Make integration longer bc now ends before interrupt?
Python
bsd-3-clause
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,100000.,10001) if sys.argv[2] == 'full' or sys.arg...
import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,10000000.,1000001) if sys.argv[2] == 'full' or sys...
<commit_before>import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,100000.,10001) if sys.argv[2] == 'f...
import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,10000000.,1000001) if sys.argv[2] == 'full' or sys...
import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,100000.,10001) if sys.argv[2] == 'full' or sys.arg...
<commit_before>import sys import numpy from galpy.orbit import Orbit from galpy.potential import MiyamotoNagaiPotential if __name__ == '__main__': # python orbitint4sigint.py symplec4_c full mp= MiyamotoNagaiPotential(normalize=1.,a=0.5,b=0.05) ts= numpy.linspace(0.,100000.,10001) if sys.argv[2] == 'f...
4b7e20c5640242a6e06392aaf9cbfe8e4ee8a498
mangopaysdk/types/payinpaymentdetailscard.py
mangopaysdk/types/payinpaymentdetailscard.py
from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = None
from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = None self.StatementDescriptor = None
Add StatementDescriptor for card web payins
Add StatementDescriptor for card web payins
Python
mit
chocopoche/mangopay2-python-sdk,Mangopay/mangopay2-python-sdk
from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = NoneAdd StatementDescriptor for card web payins
from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = None self.StatementDescriptor = None
<commit_before>from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = None<commit_msg>Add StatementDescr...
from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = None self.StatementDescriptor = None
from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = NoneAdd StatementDescriptor for card web payinsfr...
<commit_before>from mangopaysdk.types.payinpaymentdetails import PayInPaymentDetails class PayInPaymentDetailsCard(PayInPaymentDetails): """Class represents Card type for mean of payment in PayIn entity.""" def __init__(self): # CardType enum self.CardType = None<commit_msg>Add StatementDescr...
7bd82f6feb1a34dd7b855cfe2f421232229e19db
pages/search_indexes.py
pages/search_indexes.py
"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) publication_date = ...
"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) title = CharField(m...
Add a title attribute to the SearchIndex for pages.
Add a title attribute to the SearchIndex for pages. This is useful when displaying a list of search results because we can display the title of the result without hitting the database to actually pull the page.
Python
bsd-3-clause
remik/django-page-cms,pombredanne/django-page-cms-1,oliciv/django-page-cms,remik/django-page-cms,remik/django-page-cms,batiste/django-page-cms,oliciv/django-page-cms,batiste/django-page-cms,akaihola/django-page-cms,remik/django-page-cms,akaihola/django-page-cms,pombredanne/django-page-cms-1,oliciv/django-page-cms,batis...
"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) publication_date = ...
"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) title = CharField(m...
<commit_before>"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) publ...
"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) title = CharField(m...
"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) publication_date = ...
<commit_before>"""Django haystack `SearchIndex` module.""" from pages.models import Page from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True) publ...
9ce1f694a7581333d000a6a7b77e8d846bb4b507
imageutils/scaling/normalize.py
imageutils/scaling/normalize.py
""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): super(Ima...
""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): super(Ima...
Use in-place operations in ImageNormalize
Use in-place operations in ImageNormalize
Python
bsd-3-clause
dhomeier/astropy,bsipocz/astropy,MSeifert04/astropy,mhvk/astropy,MSeifert04/astropy,mhvk/astropy,joergdietrich/astropy,stargaser/astropy,StuartLittlefair/astropy,lpsinger/astropy,AustereCuriosity/astropy,AustereCuriosity/astropy,astropy/astropy,lpsinger/astropy,joergdietrich/astropy,lpsinger/astropy,AustereCuriosity/as...
""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): super(Ima...
""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): super(Ima...
<commit_before>""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): ...
""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): super(Ima...
""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): super(Ima...
<commit_before>""" Normalization class for Matplotlib that can be used to produce colorbars. """ import numpy as np from numpy import ma from matplotlib.colors import Normalize __all__ = ['ImageNormalize'] class ImageNormalize(Normalize): def __init__(self, vmin=None, vmax=None, stretch=None, clip=True): ...
a33f288bb2937bbf750b9d195861e311f293d94b
grortir/test/externals/pyswarm/test_pyswarm.py
grortir/test/externals/pyswarm/test_pyswarm.py
"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests PSO.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt, f_opt = pso(m...
"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests pyswarm.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt, f_opt = p...
Add pySwarm code - tests fixed.
Add pySwarm code - tests fixed.
Python
mit
qbahn/grortir
"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests PSO.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt, f_opt = pso(m...
"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests pyswarm.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt, f_opt = p...
<commit_before>"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests PSO.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt...
"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests pyswarm.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt, f_opt = p...
"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests PSO.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt, f_opt = pso(m...
<commit_before>"""Tests for pyswarm.""" from unittest import TestCase from grortir.externals.pyswarm.pso import pso class TestPso(TestCase): """Class for tests PSO.""" def test_run_simple_pso(self): """Test running library.""" lower_bound = [-3, -1] upper_bound = [2, 6] x_opt...
f19b66d42f67a6a45bec6fdaffe6c73366788b48
rules/RoleRelativePath.py
rules/RoleRelativePath.py
from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. if 'roles' n...
from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. if 'roles' n...
Add check for src field
Add check for src field Src field can be absent in copy task, and content field can be used instead, so we should check if src is present to avoid Keyerror exception.
Python
mit
tsukinowasha/ansible-lint-rules
from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. if 'roles' n...
from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. if 'roles' n...
<commit_before>from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. ...
from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. if 'roles' n...
from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. if 'roles' n...
<commit_before>from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. ...
fb26a66ab179fe375f50933c2be3f2e5da2f68a3
exercises/leap/leap_test.py
exercises/leap/leap_test.py
import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_100(self): ...
import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_100(self): ...
Swap '2016' for '1996' to stop faulty logic from passing unit test
Swap '2016' for '1996' to stop faulty logic from passing unit test [This leap solution](http://exercism.io/submissions/7ef5b0ab93b540f79cdee9f153e0a21c) should not pass the unit test, since it checks whether `year % 100` and `year % 400` are equal in order to tell whether the year it has been passed is a leap year. Th...
Python
mit
exercism/python,exercism/xpython,exercism/xpython,N-Parsons/exercism-python,pheanex/xpython,smalley/python,N-Parsons/exercism-python,jmluy/xpython,pheanex/xpython,exercism/python,behrtam/xpython,jmluy/xpython,behrtam/xpython,smalley/python
import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_100(self): ...
import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_100(self): ...
<commit_before>import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_...
import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_100(self): ...
import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_100(self): ...
<commit_before>import unittest from leap import is_leap_year # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class YearTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) def test_year_divisible_by_4_not_divisible_by_...
aaaaad77054658ad6c5d63a84bffe8d43b4e3180
falcom/tree/mutable_tree.py
falcom/tree/mutable_tree.py
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.length = 0 self.value = None @property def value (self): r...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.child = None self.value = None @property def value (self): ...
Rework tree to store inserted nodes
Rework tree to store inserted nodes
Python
bsd-3-clause
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.length = 0 self.value = None @property def value (self): r...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.child = None self.value = None @property def value (self): ...
<commit_before># Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.length = 0 self.value = None @property def value (s...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.child = None self.value = None @property def value (self): ...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.length = 0 self.value = None @property def value (self): r...
<commit_before># Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class MutableTree: def __init__ (self): self.length = 0 self.value = None @property def value (s...
7ddb1b3d0139ef8b6a7badcb2c6bef6a0e35e88a
hooks/post_gen_project.py
hooks/post_gen_project.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join(package_dir, '{{cookiecutter.app_class_name}}.kv') lower_app_class_name = '{{...
#!/usr/bin/env python # -*- coding: utf-8 -*- def rename_kv_file(): """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join( package_dir, '{{cookiecut...
Use a function to rename the kv file in hooks
Use a function to rename the kv file in hooks
Python
mit
hackebrot/cookiedozer,hackebrot/cookiedozer
#!/usr/bin/env python # -*- coding: utf-8 -*- """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join(package_dir, '{{cookiecutter.app_class_name}}.kv') lower_app_class_name = '{{...
#!/usr/bin/env python # -*- coding: utf-8 -*- def rename_kv_file(): """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join( package_dir, '{{cookiecut...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join(package_dir, '{{cookiecutter.app_class_name}}.kv') lower_app_c...
#!/usr/bin/env python # -*- coding: utf-8 -*- def rename_kv_file(): """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join( package_dir, '{{cookiecut...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join(package_dir, '{{cookiecutter.app_class_name}}.kv') lower_app_class_name = '{{...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Rename the generated kv file to be compatible with the original kivy kv file detection of `App.load_kv`. """ import os package_dir = '{{cookiecutter.repo_name}}' old_kv_file = os.path.join(package_dir, '{{cookiecutter.app_class_name}}.kv') lower_app_c...
bc32d6456dc2c2b6cef5d2d7b1ccf602b43b1e69
crabpy/client.py
crabpy/client.py
from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c = Client( ...
from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c = Client( ...
Add factory for capakey and utility method for doing a request.
Add factory for capakey and utility method for doing a request.
Python
mit
kmillet/crabpytest,OnroerendErfgoed/crabpy,kmillet/crabpytest
from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c = Client( ...
from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c = Client( ...
<commit_before>from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c =...
from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c = Client( ...
from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c = Client( ...
<commit_before>from suds.client import Client def crab_factory(**kwargs): if 'wsdl' in kwargs: wsdl = kwargs['wsdl'] del kwargs['wsdl'] else: wsdl = "http://crab.agiv.be/wscrab/wscrab.svc?wsdl" if 'proxy' in kwargs: proxy = kwargs['proxy'] del kwargs['proxy'] c =...
b3892da60507855aea56c5f0023187a196f87aff
axes/__init__.py
axes/__init__.py
import logging import os from django.conf import settings VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: LOGFILE = os.path.join(settings.DIRNAME, 'axes.log') except (ImportError, AttributeError): # if we have any problems, we most likely don't have a settings module # loaded...
import logging import os VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: # check for existing logging configuration # valid for Django>=1.3 from django.conf import settings if settings.LOGGING: pass except ImportError: # if we have any problems, we most likely...
Refactor for better logical flow.
Refactor for better logical flow.
Python
mit
SteveByerly/django-axes,grue/django-axes,nidhi-delhivery/django-axes,jazzband/django-axes,SteveByerly/django-axes,django-pci/django-axes,svenhertle/django-axes,zoten/django-axes
import logging import os from django.conf import settings VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: LOGFILE = os.path.join(settings.DIRNAME, 'axes.log') except (ImportError, AttributeError): # if we have any problems, we most likely don't have a settings module # loaded...
import logging import os VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: # check for existing logging configuration # valid for Django>=1.3 from django.conf import settings if settings.LOGGING: pass except ImportError: # if we have any problems, we most likely...
<commit_before>import logging import os from django.conf import settings VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: LOGFILE = os.path.join(settings.DIRNAME, 'axes.log') except (ImportError, AttributeError): # if we have any problems, we most likely don't have a settings modu...
import logging import os VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: # check for existing logging configuration # valid for Django>=1.3 from django.conf import settings if settings.LOGGING: pass except ImportError: # if we have any problems, we most likely...
import logging import os from django.conf import settings VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: LOGFILE = os.path.join(settings.DIRNAME, 'axes.log') except (ImportError, AttributeError): # if we have any problems, we most likely don't have a settings module # loaded...
<commit_before>import logging import os from django.conf import settings VERSION = (1, 2, 9) def get_version(): return '%s.%s.%s' % VERSION try: LOGFILE = os.path.join(settings.DIRNAME, 'axes.log') except (ImportError, AttributeError): # if we have any problems, we most likely don't have a settings modu...
caf8c08511042db195b359ed7fffac6d567f1e18
virtool/handlers/updates.py
virtool/handlers/updates.py
import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): # db = req.app["db"] settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updates.get_releases...
import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updates.get_releases(repo, server_version) ...
Return server version from update API
Return server version from update API
Python
mit
igboyes/virtool,igboyes/virtool,virtool/virtool,virtool/virtool
import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): # db = req.app["db"] settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updates.get_releases...
import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updates.get_releases(repo, server_version) ...
<commit_before>import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): # db = req.app["db"] settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updat...
import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updates.get_releases(repo, server_version) ...
import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): # db = req.app["db"] settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updates.get_releases...
<commit_before>import virtool.app import virtool.updates from virtool.handlers.utils import json_response async def get(req): # db = req.app["db"] settings = req.app["settings"] repo = settings.get("software_repo") server_version = virtool.app.find_server_version() releases = await virtool.updat...
1e5ec4a2923757ca79c8a55b056fd13872cac963
foyer/tests/test_xml_writer.py
foyer/tests/test_xml_writer.py
import glob import itertools as it import os import parmed as pmd from pkg_resources import resource_filename import pytest from foyer import Forcefield from foyer.tests.utils import atomtype from foyer.xml_writer import write_foyer def test_write_xml(filename, ff_file): structure = pmd.loadfile(filename) forc...
import parmed as pmd import pytest import os from pkg_resources import resource_filename from foyer import Forcefield from foyer.xml_writer import write_foyer OPLS_TESTFILES_DIR = resource_filename('foyer', 'opls_validation') def test_write_xml(): top = os.path.join(OPLS_TESTFILES_DIR, 'benzene/benzene.top') ...
Update xml writer test to work
Update xml writer test to work
Python
mit
iModels/foyer,mosdef-hub/foyer,mosdef-hub/foyer,iModels/foyer
import glob import itertools as it import os import parmed as pmd from pkg_resources import resource_filename import pytest from foyer import Forcefield from foyer.tests.utils import atomtype from foyer.xml_writer import write_foyer def test_write_xml(filename, ff_file): structure = pmd.loadfile(filename) forc...
import parmed as pmd import pytest import os from pkg_resources import resource_filename from foyer import Forcefield from foyer.xml_writer import write_foyer OPLS_TESTFILES_DIR = resource_filename('foyer', 'opls_validation') def test_write_xml(): top = os.path.join(OPLS_TESTFILES_DIR, 'benzene/benzene.top') ...
<commit_before>import glob import itertools as it import os import parmed as pmd from pkg_resources import resource_filename import pytest from foyer import Forcefield from foyer.tests.utils import atomtype from foyer.xml_writer import write_foyer def test_write_xml(filename, ff_file): structure = pmd.loadfile(fi...
import parmed as pmd import pytest import os from pkg_resources import resource_filename from foyer import Forcefield from foyer.xml_writer import write_foyer OPLS_TESTFILES_DIR = resource_filename('foyer', 'opls_validation') def test_write_xml(): top = os.path.join(OPLS_TESTFILES_DIR, 'benzene/benzene.top') ...
import glob import itertools as it import os import parmed as pmd from pkg_resources import resource_filename import pytest from foyer import Forcefield from foyer.tests.utils import atomtype from foyer.xml_writer import write_foyer def test_write_xml(filename, ff_file): structure = pmd.loadfile(filename) forc...
<commit_before>import glob import itertools as it import os import parmed as pmd from pkg_resources import resource_filename import pytest from foyer import Forcefield from foyer.tests.utils import atomtype from foyer.xml_writer import write_foyer def test_write_xml(filename, ff_file): structure = pmd.loadfile(fi...
142b9fa072e5958273e67ff38f8c7c7f6ea51373
laboratory/exceptions.py
laboratory/exceptions.py
class LaboratoryException(Exception): pass class MismatchException(LaboratoryException): pass
class LaboratoryException(Exception): def __init__(self, message, *a, **kw): self.message = message super(LaboratoryException, self).__init__(*a, **kw) class MismatchException(LaboratoryException): pass
Add message attr to LaboratoryException
Add message attr to LaboratoryException
Python
mit
joealcorn/laboratory
class LaboratoryException(Exception): pass class MismatchException(LaboratoryException): pass Add message attr to LaboratoryException
class LaboratoryException(Exception): def __init__(self, message, *a, **kw): self.message = message super(LaboratoryException, self).__init__(*a, **kw) class MismatchException(LaboratoryException): pass
<commit_before>class LaboratoryException(Exception): pass class MismatchException(LaboratoryException): pass <commit_msg>Add message attr to LaboratoryException<commit_after>
class LaboratoryException(Exception): def __init__(self, message, *a, **kw): self.message = message super(LaboratoryException, self).__init__(*a, **kw) class MismatchException(LaboratoryException): pass
class LaboratoryException(Exception): pass class MismatchException(LaboratoryException): pass Add message attr to LaboratoryExceptionclass LaboratoryException(Exception): def __init__(self, message, *a, **kw): self.message = message super(LaboratoryException, self).__init__(*a, **kw) cla...
<commit_before>class LaboratoryException(Exception): pass class MismatchException(LaboratoryException): pass <commit_msg>Add message attr to LaboratoryException<commit_after>class LaboratoryException(Exception): def __init__(self, message, *a, **kw): self.message = message super(Laboratory...
e6c3b8960213fecdd6392457124bf20b66a164ff
pytest_assume/plugin.py
pytest_assume/plugin.py
import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.basename(filename) context = cont...
import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.relpath(filename) context = conte...
Use relative path instead of only filename
Use relative path instead of only filename
Python
mit
astraw38/pytest-assume
import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.basename(filename) context = cont...
import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.relpath(filename) context = conte...
<commit_before>import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.basename(filename) ...
import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.relpath(filename) context = conte...
import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.basename(filename) context = cont...
<commit_before>import pytest import inspect import os.path def pytest_namespace(): def assume(expr, msg=''): if not expr: # get filename, line, and context (filename, line, funcname, contextlist) = inspect.stack()[1][1:5] filename = os.path.basename(filename) ...
a000706bba6cdd02da4fff4ca16063d43ed8fe85
greenfan/management/commands/create-job-from-testspec.py
greenfan/management/commands/create-job-from-testspec.py
# # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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...
# # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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...
Make output more easily parsable
Make output more easily parsable
Python
apache-2.0
sorenh/python-django-greenfan,sorenh/python-django-greenfan
# # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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...
# # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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...
<commit_before># # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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/l...
# # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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...
# # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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...
<commit_before># # Copyright 2012 Cisco Systems, Inc. # # Author: Soren Hansen <sorhanse@cisco.com> # # 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/l...
d9349d617a504381d65f412930126de8e7548300
setup/create_divisions.py
setup/create_divisions.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__file__), 'nhl_d...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__file__), 'nhl_d...
Truncate target table before creating division items
Truncate target table before creating division items
Python
mit
leaffan/pynhldb
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__file__), 'nhl_d...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__file__), 'nhl_d...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__file__), 'nhl_d...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__file__), 'nhl_d...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import traceback from db.common import session_scope from db.team import Team from db.division import Division def create_divisions(div_src_file=None): if not div_src_file: div_src_file = os.path.join( os.path.dirname(__...
fe6a1134a26f72833bcdfe16766fa0376396df4e
jinger/server.py
jinger/server.py
import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200...
import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200...
Fix generator being passed to the wfile.write method of the HttpHandler instead of string
Fix generator being passed to the wfile.write method of the HttpHandler instead of string
Python
mit
naiquevin/jinger,naiquevin/jinger
import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200...
import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200...
<commit_before>import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.se...
import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200...
import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200...
<commit_before>import os from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from jinger.config import get_config env = None class Http404(Exception): pass class JingerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.se...
8b5bab10bf49f35c0c0e9147e7bcbffb88f8b536
django_mailer/managers.py
django_mailer/managers.py
from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants.PRIORITY_HIGH)...
from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants.PRIORITY_HIGH)...
Fix the manager methods for deferred/non_deferred
Fix the manager methods for deferred/non_deferred
Python
mit
APSL/django-mailer-2,pegler/django-mailer-2,tclancy/django-mailer-2,davidmarble/django-mailer-2,maykinmedia/django-mailer-2,Giftovus/django-mailer-2,torchbox/django-mailer-2,APSL/django-mailer-2,SmileyChris/django-mailer-2,victorfontes/django-mailer-2,mfwarren/django-mailer-2,morenopc/django-mailer-2,k1000/django-maile...
from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants.PRIORITY_HIGH)...
from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants.PRIORITY_HIGH)...
<commit_before>from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants...
from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants.PRIORITY_HIGH)...
from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants.PRIORITY_HIGH)...
<commit_before>from django.db import models from django_mailer import constants class QueueManager(models.Manager): use_for_related_fields = True def high_priority(self): """ Return a QuerySet of high priority queued messages. """ return self.filter(priority=constants...
af9c686750d55ff786807f9175faadb8bb9087e7
test_quick_sort.py
test_quick_sort.py
from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] actual = expect...
from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] actual = expect...
Add a few more tests for edge cases
Add a few more tests for edge cases
Python
mit
jonathanstallings/data-structures
from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] actual = expect...
from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] actual = expect...
<commit_before>from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] ...
from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] actual = expect...
from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] actual = expect...
<commit_before>from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] ...
09668c1818ef028e10669b9652e2f0ae255cc47e
src/pyscaffold/extensions/no_skeleton.py
src/pyscaffold/extensions/no_skeleton.py
# -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension Args: actions (list...
# -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from pathlib import PurePath as Path from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension ...
Change extensions to use pathlib in helpers instead of lists
Change extensions to use pathlib in helpers instead of lists
Python
mit
blue-yonder/pyscaffold,blue-yonder/pyscaffold
# -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension Args: actions (list...
# -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from pathlib import PurePath as Path from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension ...
<commit_before># -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension Args: ...
# -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from pathlib import PurePath as Path from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension ...
# -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension Args: actions (list...
<commit_before># -*- coding: utf-8 -*- """ Extension that omits the creation of file `skeleton.py` """ from ..api import Extension, helpers class NoSkeleton(Extension): """Omit creation of skeleton.py and test_skeleton.py""" def activate(self, actions): """Activate extension Args: ...
27d34d851bcdf80559aff5f5d8cf83122da1953a
amqpy/concurrency.py
amqpy/concurrency.py
import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the `lock_name` :cl...
import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the `lock_name` :cl...
Change log level to warning
Change log level to warning
Python
mit
gst/amqpy,veegee/amqpy
import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the `lock_name` :cl...
import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the `lock_name` :cl...
<commit_before>import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the ...
import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the `lock_name` :cl...
import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the `lock_name` :cl...
<commit_before>import logging import time from functools import wraps from . import compat compat.patch() # monkey-patch time.perf_counter log = logging.getLogger('amqpy') def synchronized(lock_name): """Decorator for automatically acquiring and releasing lock for method call This decorator accesses the ...
221caf718c5aa53c2ef5b9b05c72764ae65eac44
SaudiStudentOrganization/models.py
SaudiStudentOrganization/models.py
from __future__ import unicode_literals from django.db import models # Create your models here.
from __future__ import unicode_literals from django.db import models class Student(models.Model): Frist_Name = models.CharField(max_length=200) Last_Name = models.CharField(max_length=200) Email = models.CharField(max_length=200) Phone_Number = models.CharField(max_length=200) class Responds(models.M...
Change to model from class on 10/10/2016
Change to model from class on 10/10/2016
Python
mit
UniversityOfDubuque/CIS405_DjangoProject,UniversityOfDubuque/CIS405_DjangoProject
from __future__ import unicode_literals from django.db import models # Create your models here. Change to model from class on 10/10/2016
from __future__ import unicode_literals from django.db import models class Student(models.Model): Frist_Name = models.CharField(max_length=200) Last_Name = models.CharField(max_length=200) Email = models.CharField(max_length=200) Phone_Number = models.CharField(max_length=200) class Responds(models.M...
<commit_before>from __future__ import unicode_literals from django.db import models # Create your models here. <commit_msg>Change to model from class on 10/10/2016<commit_after>
from __future__ import unicode_literals from django.db import models class Student(models.Model): Frist_Name = models.CharField(max_length=200) Last_Name = models.CharField(max_length=200) Email = models.CharField(max_length=200) Phone_Number = models.CharField(max_length=200) class Responds(models.M...
from __future__ import unicode_literals from django.db import models # Create your models here. Change to model from class on 10/10/2016from __future__ import unicode_literals from django.db import models class Student(models.Model): Frist_Name = models.CharField(max_length=200) Last_Name = models.CharField...
<commit_before>from __future__ import unicode_literals from django.db import models # Create your models here. <commit_msg>Change to model from class on 10/10/2016<commit_after>from __future__ import unicode_literals from django.db import models class Student(models.Model): Frist_Name = models.CharField(max_len...
4b6afd36114fbe1871f17998f9e3f4ec0e116f0f
spacy/lang/en/__init__.py
spacy/lang/en/__init__.py
from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemmatizer from ......
from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemmatizer from ......
Remove English [initialize] default block for now to get tests to pass
Remove English [initialize] default block for now to get tests to pass
Python
mit
spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy
from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemmatizer from ......
from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemmatizer from ......
<commit_before>from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemm...
from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemmatizer from ......
from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemmatizer from ......
<commit_before>from typing import Optional from thinc.api import Model from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .syntax_iterators import SYNTAX_ITERATORS from .punctuation import TOKENIZER_INFIXES from .lemmatizer import EnglishLemm...
fffe7392cb486f7218fc8afd2d42769660a1f558
tests/test_main.py
tests/test_main.py
# -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[])
# -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[]) with raises(TypeError): ...
Test when path not is a directory.
Test when path not is a directory.
Python
mit
yanqd0/csft
# -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[]) Test when path not is a directory...
# -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[]) with raises(TypeError): ...
<commit_before># -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[]) <commit_msg>Test w...
# -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[]) with raises(TypeError): ...
# -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[]) Test when path not is a directory...
<commit_before># -*- coding:utf-8 -*- from subprocess import check_call from pytest import raises from csft import __main__ as main def test_call(): check_call(['python', '-m', 'csft', '.']) def test_main(): main.main(argv=['.']) with raises(SystemExit): main.main(argv=[]) <commit_msg>Test w...
bc485e3deb47897fb5d87c80c299f2da240419db
app/__init__.py
app/__init__.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_user(id): r...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_user(id): r...
Add converter before blueprint registration
Add converter before blueprint registration
Python
mit
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_user(id): r...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_user(id): r...
<commit_before>from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_user(id): r...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_user(id): r...
<commit_before>from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oa = OAuth() lm = LoginManager() lm.login_view = "main.login" from app.models import User @lm.user_loader def load_...
c85fbf33d22a9775f9d22b863027eb50b41923c2
src/excel_sheet_column_title.py
src/excel_sheet_column_title.py
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @return a string...
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 732 -> ABC """ # @...
Add solution for excel sheet column title
Add solution for excel sheet column title
Python
mit
chancyWu/leetcode
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @return a string...
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 732 -> ABC """ # @...
<commit_before>""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @...
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 732 -> ABC """ # @...
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @return a string...
<commit_before>""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @...
0baf08c61348f4fa6a657e1c0e2ff9bdf65eaa15
leetcode/RemoveElement.py
leetcode/RemoveElement.py
# Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don't forget to ret...
# Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don't forget to ret...
Add one more if to speed up
Add one more if to speed up
Python
mit
aenon/OnlineJudge,aenon/OnlineJudge
# Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don't forget to ret...
# Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don't forget to ret...
<commit_before># Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don'...
# Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don't forget to ret...
# Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don't forget to ret...
<commit_before># Remove Element https://oj.leetcode.com/problems/remove-element/ # Given an array and a value, remove all instances of that value in place and return the new length. # The order of elements can be changed. It doesn't matter what you leave beyond the new length. #Arrays # Xilin SUN # Jan 8 2015 # Don'...
6c122daaf50bba2c7c28b67e40b3ca6eb30f99ee
yikbot.py
yikbot.py
import pyak import time class YikBot(Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = yikBot.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): yikBot.respond(yak) print "DEBUG: Going ...
import pyak import time class YikBot(pyak.Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = self.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): print "DEBUG: Found a targeted yak" ...
Add capability to upvote/downvote yaks many times
Add capability to upvote/downvote yaks many times
Python
mit
congrieb/yikBot
import pyak import time class YikBot(Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = yikBot.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): yikBot.respond(yak) print "DEBUG: Going ...
import pyak import time class YikBot(pyak.Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = self.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): print "DEBUG: Found a targeted yak" ...
<commit_before>import pyak import time class YikBot(Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = yikBot.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): yikBot.respond(yak) print...
import pyak import time class YikBot(pyak.Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = self.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): print "DEBUG: Found a targeted yak" ...
import pyak import time class YikBot(Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = yikBot.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): yikBot.respond(yak) print "DEBUG: Going ...
<commit_before>import pyak import time class YikBot(Yakker): def boot(self): while True: print "DEBUG: Scanning feed" yaks = yikBot.get_yaks() for yak in yaks: if yak.message.startswith("@yikBot"): yikBot.respond(yak) print...
7a68599ca8794d1d1b7d358e6f79791547f7740f
setuptools/tests/test_build.py
setuptools/tests/test_build.py
from setuptools.dist import Distribution from setuptools.command.build import build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ dist = Distribution(dict( script_name='setup.py', ...
from setuptools.dist import Distribution from setuptools.command.build import build from distutils.command.build import build as distutils_build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ d...
Test that extending setuptools' build sub_commands does not extend distutils
Test that extending setuptools' build sub_commands does not extend distutils
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
from setuptools.dist import Distribution from setuptools.command.build import build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ dist = Distribution(dict( script_name='setup.py', ...
from setuptools.dist import Distribution from setuptools.command.build import build from distutils.command.build import build as distutils_build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ d...
<commit_before>from setuptools.dist import Distribution from setuptools.command.build import build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ dist = Distribution(dict( script_name='...
from setuptools.dist import Distribution from setuptools.command.build import build from distutils.command.build import build as distutils_build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ d...
from setuptools.dist import Distribution from setuptools.command.build import build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ dist = Distribution(dict( script_name='setup.py', ...
<commit_before>from setuptools.dist import Distribution from setuptools.command.build import build def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): """ Check that the setuptools Distribution uses the setuptools specific build object. """ dist = Distribution(dict( script_name='...
dd3b135ab5e229c5f717fc4d296389e187a49f9a
one_time_eval.py
one_time_eval.py
# usage: python one_time_eval.py as8sqdtc from deuces.deuces import Card from convenience import find_pcts, pr, str2cards import sys cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] cards = str2cards(cards_str) board = str2cards(board_str) assert len(cards) == 4 p1 = cards[0:...
# usage: python one_time_eval.py as8sqdtc # usage: python one_time_eval.py as8sqdtc 2skskd from convenience import find_pcts, pr, str2cards import sys ## argv to strings hole_cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] ## strings to lists of Card objects hole_cards = str2...
Prepare the main script to accept multi-way pots.
Prepare the main script to accept multi-way pots.
Python
mit
zimolzak/poker-experiments,zimolzak/poker-experiments,zimolzak/poker-experiments
# usage: python one_time_eval.py as8sqdtc from deuces.deuces import Card from convenience import find_pcts, pr, str2cards import sys cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] cards = str2cards(cards_str) board = str2cards(board_str) assert len(cards) == 4 p1 = cards[0:...
# usage: python one_time_eval.py as8sqdtc # usage: python one_time_eval.py as8sqdtc 2skskd from convenience import find_pcts, pr, str2cards import sys ## argv to strings hole_cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] ## strings to lists of Card objects hole_cards = str2...
<commit_before># usage: python one_time_eval.py as8sqdtc from deuces.deuces import Card from convenience import find_pcts, pr, str2cards import sys cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] cards = str2cards(cards_str) board = str2cards(board_str) assert len(cards) == ...
# usage: python one_time_eval.py as8sqdtc # usage: python one_time_eval.py as8sqdtc 2skskd from convenience import find_pcts, pr, str2cards import sys ## argv to strings hole_cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] ## strings to lists of Card objects hole_cards = str2...
# usage: python one_time_eval.py as8sqdtc from deuces.deuces import Card from convenience import find_pcts, pr, str2cards import sys cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] cards = str2cards(cards_str) board = str2cards(board_str) assert len(cards) == 4 p1 = cards[0:...
<commit_before># usage: python one_time_eval.py as8sqdtc from deuces.deuces import Card from convenience import find_pcts, pr, str2cards import sys cards_str = sys.argv[1] board_str = '' if len(sys.argv) > 2: board_str = sys.argv[2] cards = str2cards(cards_str) board = str2cards(board_str) assert len(cards) == ...
b9156a522410bf39de8653bce22bb2cb56e435a0
parktain/main.py
parktain/main.py
#!/usr/bin/env python from os.path import abspath, dirname, join from gendo import Gendo HERE = dirname(abspath(__file__)) config_path = join(HERE, 'config.yaml') bot = Gendo.config_from_yaml(config_path) @bot.listen_for('morning') def morning(user, message): # make sure message is "morning" and doesn't just co...
#!/usr/bin/env python # Standard library from os.path import abspath, dirname, join import re # 3rd party library from gendo import Gendo class Parktain(Gendo): """Overridden to add simple additional functionality.""" @property def id(self): """Get id of the bot.""" if not hasattr(self...
Add 'where do you live' answer.
Add 'where do you live' answer.
Python
bsd-3-clause
punchagan/parktain,punchagan/parktain,punchagan/parktain
#!/usr/bin/env python from os.path import abspath, dirname, join from gendo import Gendo HERE = dirname(abspath(__file__)) config_path = join(HERE, 'config.yaml') bot = Gendo.config_from_yaml(config_path) @bot.listen_for('morning') def morning(user, message): # make sure message is "morning" and doesn't just co...
#!/usr/bin/env python # Standard library from os.path import abspath, dirname, join import re # 3rd party library from gendo import Gendo class Parktain(Gendo): """Overridden to add simple additional functionality.""" @property def id(self): """Get id of the bot.""" if not hasattr(self...
<commit_before>#!/usr/bin/env python from os.path import abspath, dirname, join from gendo import Gendo HERE = dirname(abspath(__file__)) config_path = join(HERE, 'config.yaml') bot = Gendo.config_from_yaml(config_path) @bot.listen_for('morning') def morning(user, message): # make sure message is "morning" and ...
#!/usr/bin/env python # Standard library from os.path import abspath, dirname, join import re # 3rd party library from gendo import Gendo class Parktain(Gendo): """Overridden to add simple additional functionality.""" @property def id(self): """Get id of the bot.""" if not hasattr(self...
#!/usr/bin/env python from os.path import abspath, dirname, join from gendo import Gendo HERE = dirname(abspath(__file__)) config_path = join(HERE, 'config.yaml') bot = Gendo.config_from_yaml(config_path) @bot.listen_for('morning') def morning(user, message): # make sure message is "morning" and doesn't just co...
<commit_before>#!/usr/bin/env python from os.path import abspath, dirname, join from gendo import Gendo HERE = dirname(abspath(__file__)) config_path = join(HERE, 'config.yaml') bot = Gendo.config_from_yaml(config_path) @bot.listen_for('morning') def morning(user, message): # make sure message is "morning" and ...
5ee77b7294af840a47e11a8a9a3da109e33f4a63
lib/stats_backend.py
lib/stats_backend.py
import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":"/tmp/stats.jso...
import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":"/tmp/stats.jso...
Remove some test code that got left behind
Remove some test code that got left behind
Python
agpl-3.0
dexX7/omniwallet,habibmasuro/omniwallet,habibmasuro/omniwallet,achamely/omniwallet,habibmasuro/omniwallet,VukDukic/omniwallet,OmniLayer/omniwallet,dexX7/omniwallet,achamely/omniwallet,OmniLayer/omniwallet,arowser/omniwallet,OmniLayer/omniwallet,arowser/omniwallet,curtislacy/omniwallet,ripper234/omniwallet,FuzzyBearBTC/...
import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":"/tmp/stats.jso...
import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":"/tmp/stats.jso...
<commit_before>import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":...
import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":"/tmp/stats.jso...
import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":"/tmp/stats.jso...
<commit_before>import platform from stats_file_backend import StatsFileBackend class StatsBackend: """ This is a class to manage the Stats backend. """ def __init__(self, options={}): if options == {}: if platform.system() == "Darwin": # For my local dev I need this hack options = {"db_path":...
5d2a4ac0e48d404a16b81d2f290be5ec13bdf8f1
logintokens/forms.py
logintokens/forms.py
"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintokens.tokens import default_token_generator USER = get...
"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UsernameField from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintoken...
Update form to pass new test
Update form to pass new test
Python
mit
randomic/aniauth-tdd,randomic/aniauth-tdd
"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintokens.tokens import default_token_generator USER = get...
"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UsernameField from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintoken...
<commit_before>"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintokens.tokens import default_token_generat...
"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UsernameField from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintoken...
"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintokens.tokens import default_token_generator USER = get...
<commit_before>"""forms for accounts app """ from django import forms from django.contrib.auth import get_user_model from django.core.mail import EmailMultiAlternatives from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse_lazy from logintokens.tokens import default_token_generat...
0b7a1904ef5511916fc4978c325862241a46aef3
lib/pyfrc/mains/cli_profiler.py
lib/pyfrc/mains/cli_profiler.py
import argparse import inspect import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile only profiles the main thread)...
import argparse import inspect from os.path import abspath import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile on...
Add output option for profiler
Add output option for profiler
Python
mit
robotpy/pyfrc
import argparse import inspect import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile only profiles the main thread)...
import argparse import inspect from os.path import abspath import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile on...
<commit_before> import argparse import inspect import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile only profiles t...
import argparse import inspect from os.path import abspath import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile on...
import argparse import inspect import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile only profiles the main thread)...
<commit_before> import argparse import inspect import subprocess import sys class PyFrcProfiler: """ Wraps other commands by running them via the built in cProfile module. Use this to profile your program and figure out where you're spending a lot of time (note that cProfile only profiles t...
3786ebdf37820bc7b59342302c5858d7805a323c
planner/forms.py
planner/forms.py
from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-cont...
from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-cont...
Add documentation for SearchTrip form
Add documentation for SearchTrip form
Python
mit
livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride
from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-cont...
from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-cont...
<commit_before>from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'cla...
from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-cont...
from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-cont...
<commit_before>from django.contrib.auth.forms import AuthenticationForm from django import forms from .models import PoolingUser class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'cla...
8f0b72dcad39fbd6072185bf2244eb75f0f45a96
better_od/core.py
better_od/core.py
from collections import MutableMapping class BetterOrderedDict(MutableMapping): def __init__(self, **kwargs): self._d = dict() self._keys = [] def __len__(self): return len(self._d) def __iter__(self): for key in self._keys: yield key def __setitem__(self...
from collections import MutableMapping class BetterOrderedDict(MutableMapping): '''BetterOrderedDict is a mapping object that allows for ordered access and insertion of keys. With the exception of the key_index, insert, and reorder_keys methods behavior is identical to stock dictionary objects.''' de...
Add docstrings for most public API methods.
Add docstrings for most public API methods.
Python
mit
JustusW/BetterOrderedDict,therealfakemoot/collections2
from collections import MutableMapping class BetterOrderedDict(MutableMapping): def __init__(self, **kwargs): self._d = dict() self._keys = [] def __len__(self): return len(self._d) def __iter__(self): for key in self._keys: yield key def __setitem__(self...
from collections import MutableMapping class BetterOrderedDict(MutableMapping): '''BetterOrderedDict is a mapping object that allows for ordered access and insertion of keys. With the exception of the key_index, insert, and reorder_keys methods behavior is identical to stock dictionary objects.''' de...
<commit_before>from collections import MutableMapping class BetterOrderedDict(MutableMapping): def __init__(self, **kwargs): self._d = dict() self._keys = [] def __len__(self): return len(self._d) def __iter__(self): for key in self._keys: yield key def _...
from collections import MutableMapping class BetterOrderedDict(MutableMapping): '''BetterOrderedDict is a mapping object that allows for ordered access and insertion of keys. With the exception of the key_index, insert, and reorder_keys methods behavior is identical to stock dictionary objects.''' de...
from collections import MutableMapping class BetterOrderedDict(MutableMapping): def __init__(self, **kwargs): self._d = dict() self._keys = [] def __len__(self): return len(self._d) def __iter__(self): for key in self._keys: yield key def __setitem__(self...
<commit_before>from collections import MutableMapping class BetterOrderedDict(MutableMapping): def __init__(self, **kwargs): self._d = dict() self._keys = [] def __len__(self): return len(self._d) def __iter__(self): for key in self._keys: yield key def _...
98335de4b87638eff9613279bdd106651d4aefe1
catt/__init__.py
catt/__init__.py
# -*- coding: utf-8 -*- __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3"
# -*- coding: utf-8 -*- import sys if sys.version_info.major < 3: print("This program requires Python 3 and above to run.") sys.exit(1) __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3"
Make catt refuse to install under 2 more
fix: Make catt refuse to install under 2 more
Python
bsd-2-clause
skorokithakis/catt,skorokithakis/catt
# -*- coding: utf-8 -*- __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3" fix: Make catt refuse to install under 2 more
# -*- coding: utf-8 -*- import sys if sys.version_info.major < 3: print("This program requires Python 3 and above to run.") sys.exit(1) __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3"
<commit_before># -*- coding: utf-8 -*- __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3" <commit_msg>fix: Make catt refuse to install under 2 more<commit_after>
# -*- coding: utf-8 -*- import sys if sys.version_info.major < 3: print("This program requires Python 3 and above to run.") sys.exit(1) __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3"
# -*- coding: utf-8 -*- __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3" fix: Make catt refuse to install under 2 more# -*- coding: utf-8 -*- import sys if sys.version_info.major < 3: print("This program requires Python 3 and above to run.") sys.exit(1) __author__ = "Sta...
<commit_before># -*- coding: utf-8 -*- __author__ = "Stavros Korokithakis" __email__ = "hi@stavros.io" __version__ = "0.9.3" <commit_msg>fix: Make catt refuse to install under 2 more<commit_after># -*- coding: utf-8 -*- import sys if sys.version_info.major < 3: print("This program requires Python 3 and above to ...
f6ce2439f1f1ba299d0579c2dd4e57a58398aca5
printer/PrinterApplication.py
printer/PrinterApplication.py
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() super(Print...
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): self._plugin_registry.loadPlugins({ "type": "StorageDevice" }) ...
Load all storage plugins in the printer application
Load all storage plugins in the printer application
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() super(Print...
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): self._plugin_registry.loadPlugins({ "type": "StorageDevice" }) ...
<commit_before>from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() ...
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): self._plugin_registry.loadPlugins({ "type": "StorageDevice" }) ...
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() super(Print...
<commit_before>from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() ...
7b72dbb331c120eb5657ce9a81e725c550779485
dataportal/broker/__init__.py
dataportal/broker/__init__.py
from .simple_broker import _DataBrokerClass, EventQueue, Header from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers()
from .simple_broker import (_DataBrokerClass, EventQueue, Header, LocationError, IntegrityError) from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers()
Add Errors to the public API.
DOC: Add Errors to the public API.
Python
bsd-3-clause
danielballan/dataportal,ericdill/datamuxer,tacaswell/dataportal,ericdill/datamuxer,tacaswell/dataportal,NSLS-II/dataportal,danielballan/datamuxer,danielballan/datamuxer,ericdill/databroker,NSLS-II/datamuxer,danielballan/dataportal,NSLS-II/dataportal,ericdill/databroker
from .simple_broker import _DataBrokerClass, EventQueue, Header from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers() DOC: Add Errors to the public API.
from .simple_broker import (_DataBrokerClass, EventQueue, Header, LocationError, IntegrityError) from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers()
<commit_before>from .simple_broker import _DataBrokerClass, EventQueue, Header from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers() <commit_msg>DOC: Add Errors to the public API.<commit_after>
from .simple_broker import (_DataBrokerClass, EventQueue, Header, LocationError, IntegrityError) from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers()
from .simple_broker import _DataBrokerClass, EventQueue, Header from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers() DOC: Add Errors to the public API.from .simple_broker import (_DataBrokerClass, EventQueue, Header, ...
<commit_before>from .simple_broker import _DataBrokerClass, EventQueue, Header from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton register_builtin_handlers() <commit_msg>DOC: Add Errors to the public API.<commit_after>from .simple_broker import (_DataBrokerClass, E...
b40cb43eb2a3afcc08a207b66e1dededd1ff1eaa
count-inversions/count_inversions.py
count-inversions/count_inversions.py
from random import randint import sys def count(arr): n = len(arr) if n == 1: return 0 else: first_half = count(arr[:n/2]) second_half = count(arr[n/2:]) split = count_split(arr) return first_half + second_half + split def count_split(arr): return 0 def main(arr_len): test_arr = [randint(0,arr_len)...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = sort_and_count(arr[:n/2]) second_half = sort_and_count(arr[n/2:]) split = merge_and_count_split(arr) return first_half + second_half + split def merge_and_count_split(arr): return 0 def...
Rename functions to include sorting and merging
Rename functions to include sorting and merging The algorithm will require sorting in order to run in O(nlogn) time. The implementation will closely follow that of merge-sort, so the functions were renamed to reflect this.
Python
mit
timpel/stanford-algs,timpel/stanford-algs
from random import randint import sys def count(arr): n = len(arr) if n == 1: return 0 else: first_half = count(arr[:n/2]) second_half = count(arr[n/2:]) split = count_split(arr) return first_half + second_half + split def count_split(arr): return 0 def main(arr_len): test_arr = [randint(0,arr_len)...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = sort_and_count(arr[:n/2]) second_half = sort_and_count(arr[n/2:]) split = merge_and_count_split(arr) return first_half + second_half + split def merge_and_count_split(arr): return 0 def...
<commit_before>from random import randint import sys def count(arr): n = len(arr) if n == 1: return 0 else: first_half = count(arr[:n/2]) second_half = count(arr[n/2:]) split = count_split(arr) return first_half + second_half + split def count_split(arr): return 0 def main(arr_len): test_arr = [ran...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = sort_and_count(arr[:n/2]) second_half = sort_and_count(arr[n/2:]) split = merge_and_count_split(arr) return first_half + second_half + split def merge_and_count_split(arr): return 0 def...
from random import randint import sys def count(arr): n = len(arr) if n == 1: return 0 else: first_half = count(arr[:n/2]) second_half = count(arr[n/2:]) split = count_split(arr) return first_half + second_half + split def count_split(arr): return 0 def main(arr_len): test_arr = [randint(0,arr_len)...
<commit_before>from random import randint import sys def count(arr): n = len(arr) if n == 1: return 0 else: first_half = count(arr[:n/2]) second_half = count(arr[n/2:]) split = count_split(arr) return first_half + second_half + split def count_split(arr): return 0 def main(arr_len): test_arr = [ran...
7ad0aa082114811a1638916060c6b18f93d09824
books/services.py
books/services.py
from datetime import date from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = date(today.year, today.month, 1) qs = Transaction.objects.filter(created__gte=first_day_of_a_month)...
from datetime import datetime from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = datetime(today.year, today.month, 1, tzinfo=today.tzinfo) q...
Add service functions to get transactions by time
Add service functions to get transactions by time
Python
mit
trimailov/finance,trimailov/finance,trimailov/finance
from datetime import date from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = date(today.year, today.month, 1) qs = Transaction.objects.filter(created__gte=first_day_of_a_month)...
from datetime import datetime from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = datetime(today.year, today.month, 1, tzinfo=today.tzinfo) q...
<commit_before>from datetime import date from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = date(today.year, today.month, 1) qs = Transaction.objects.filter(created__gte=first_...
from datetime import datetime from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = datetime(today.year, today.month, 1, tzinfo=today.tzinfo) q...
from datetime import date from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = date(today.year, today.month, 1) qs = Transaction.objects.filter(created__gte=first_day_of_a_month)...
<commit_before>from datetime import date from datetime import timedelta from django.utils import timezone from books.models import Transaction def get_months_transactions(): today = timezone.now() first_day_of_a_month = date(today.year, today.month, 1) qs = Transaction.objects.filter(created__gte=first_...
6d15281487dd7769fa60585e7c6497c3993e0e94
services/topology-engine/app/app/__init__.py
services/topology-engine/app/app/__init__.py
from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////var/data...
from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////var/data...
Add OK_TESTS and DISABLE_LOGIN to TE
Add OK_TESTS and DISABLE_LOGIN to TE The OK_TESTS environment variable can be used to disable logins by setting OK_TESTS=DISABLE_LOGIN. The test isn't equality, but 'in'. So, you can add more things to that flag.
Python
apache-2.0
jonvestal/open-kilda,nikitamarchenko/open-kilda,telstra/open-kilda,carmine/open-kilda,jonvestal/open-kilda,nikitamarchenko/open-kilda,telstra/open-kilda,telstra/open-kilda,jonvestal/open-kilda,telstra/open-kilda,nikitamarchenko/open-kilda,jonvestal/open-kilda,carmine/open-kilda,nikitamarchenko/open-kilda,jonvestal/open...
from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////var/data...
from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////var/data...
<commit_before>from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqli...
from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////var/data...
from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////var/data...
<commit_before>from flask import Flask, flash, redirect, render_template, request, session, abort from flask_sqlalchemy import SQLAlchemy import os application = Flask(__name__) application.secret_key = '123456789' application.config['PROPAGATE_EXCEPTIONS'] = True application.config['SQLALCHEMY_DATABASE_URI'] = "sqli...
aa14a6036d262fab1d213d021640204419d3c9e1
daemon/__init__.py
daemon/__init__.py
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
Prepare development of new version.
Prepare development of new version.
Python
apache-2.0
wting/python-daemon,eaufavor/python-daemon
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
<commit_before># -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Pyt...
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
<commit_before># -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Pyt...
d538e4fd59d714b7a7826937c50b66ec3f697b05
mygpo/api/backend.py
mygpo/api/backend.py
import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by user, uid. ...
import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by user, uid. ...
Fix validation of Client objects
Fix validation of Client objects
Python
agpl-3.0
gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo
import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by user, uid. ...
import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by user, uid. ...
<commit_before>import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by...
import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by user, uid. ...
import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by user, uid. ...
<commit_before>import uuid from django.db import transaction, IntegrityError from mygpo.users.settings import STORE_UA from mygpo.users.models import Client import logging logger = logging.getLogger(__name__) def get_device(user, uid, user_agent, undelete=True): """ Loads or creates the device indicated by...
08ea2c257780f23cec5dfb923e80966fdf9c5ac8
IPython/zmq/zmqshell.py
IPython/zmq/zmqshell.py
import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) p = Popen(cmd, sh...
import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) sys.stdout.flush(...
Add flushing to stdout/stderr in system calls.
Add flushing to stdout/stderr in system calls.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) p = Popen(cmd, sh...
import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) sys.stdout.flush(...
<commit_before>import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) p ...
import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) sys.stdout.flush(...
import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) p = Popen(cmd, sh...
<commit_before>import sys from subprocess import Popen, PIPE from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC class ZMQInteractiveShell(InteractiveShell): """A subclass of InteractiveShell for ZMQ.""" def system(self, cmd): cmd = self.var_expand(cmd, depth=2) p ...
5a9bf08b78176097d918d0ec7174e68094ee63a2
Lib/test/test_binhex.py
Lib/test/test_binhex.py
#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() f = open...
#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() f = open...
Stop creating an unbounded number of "Jack is my hero" files under Windows. Not that Jack doesn't deserve them, but saying it so often cheapens the sentiment.
Stop creating an unbounded number of "Jack is my hero" files under Windows. Not that Jack doesn't deserve them, but saying it so often cheapens the sentiment.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() f = open...
#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() f = open...
<commit_before>#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() ...
#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() f = open...
#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() f = open...
<commit_before>#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Roger E. Masse """ import binhex import tempfile from test_support import verbose, TestSkipped def test(): try: fname1 = tempfile.mktemp() fname2 = tempfile.mktemp() ...
3bd1135bba97cf616fc7c990c12cb8b3f93a25da
nextcloudappstore/urls.py
nextcloudappstore/urls.py
from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')), url(r'^cat...
from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')), url(r'^cat...
Allow trailing slash at the end of URLs
Allow trailing slash at the end of URLs Specifically app detail page and category app list.
Python
agpl-3.0
clone1612/appstore,nextcloud/appstore,clone1612/appstore,clone1612/appstore,nextcloud/appstore,nextcloud/appstore,clone1612/appstore,clone1612/appstore,nextcloud/appstore,nextcloud/appstore,nextcloud/appstore
from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')), url(r'^cat...
from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')), url(r'^cat...
<commit_before>from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')),...
from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')), url(r'^cat...
from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')), url(r'^cat...
<commit_before>from django.conf.urls import url, include from django.contrib import admin from nextcloudappstore.core.views import CategoryAppListView, AppDetailView, \ app_description urlpatterns = [ url(r'^$', CategoryAppListView.as_view(), {'id': None}, name='home'), url(r'^', include('allauth.urls')),...
3b6ddce7c0db0f0b1fbd9febd9bf68ceeda51f44
della/user_manager/forms.py
della/user_manager/forms.py
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed.') class Sig...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed.') class Sig...
Raise ValidationError properly in SignupForm
Raise ValidationError properly in SignupForm
Python
mit
avinassh/della,avinassh/della,avinassh/della
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed.') class Sig...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed.') class Sig...
<commit_before>from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed.') class Sig...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed.') class Sig...
<commit_before>from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import RegexValidator alphanumericu = RegexValidator( regex=r'^[0-9a-zA-Z_]*$', message='Only alphanumeric characters and underscore are allowed...
6f24dc967a082251d0bc62ab66c9263235174f9f
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/test_views.py
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/test_views.py
from django.core.urlresolvers import reverse from django.test import Client, TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): self.client = Client() User.objects.create_user( username="testuser", email="test@example.com", ...
from django.core.urlresolvers import reverse from django.test import TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): User.objects.create_user( username="testuser", email="test@example.com", password="testpass" ...
Remove unnecessary assignment to self.client in test cases.
Remove unnecessary assignment to self.client in test cases.
Python
bsd-3-clause
wldcordeiro/cookiecutter-django-essentials,wldcordeiro/cookiecutter-django-essentials,wldcordeiro/cookiecutter-django-essentials
from django.core.urlresolvers import reverse from django.test import Client, TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): self.client = Client() User.objects.create_user( username="testuser", email="test@example.com", ...
from django.core.urlresolvers import reverse from django.test import TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): User.objects.create_user( username="testuser", email="test@example.com", password="testpass" ...
<commit_before>from django.core.urlresolvers import reverse from django.test import Client, TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): self.client = Client() User.objects.create_user( username="testuser", email="test@...
from django.core.urlresolvers import reverse from django.test import TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): User.objects.create_user( username="testuser", email="test@example.com", password="testpass" ...
from django.core.urlresolvers import reverse from django.test import Client, TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): self.client = Client() User.objects.create_user( username="testuser", email="test@example.com", ...
<commit_before>from django.core.urlresolvers import reverse from django.test import Client, TestCase from users.models import User class UserRedirectViewTestCase(TestCase): def setUp(self): self.client = Client() User.objects.create_user( username="testuser", email="test@...
a696e9740920018d726c0c54987f6dc6ba2128d6
eppread.py
eppread.py
#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PRO...
#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PRO...
Improve printing of signature and version
Improve printing of signature and version
Python
isc
ra1fh/eppconvert
#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PRO...
#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PRO...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE ...
#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PRO...
#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PRO...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2017 Ralf Horstmann <ralf@ackstorm.de> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE ...
fb665cf8d6c0eb6c794a41eaf312c35473d1bdf0
tests/settings_complex.py
tests/settings_complex.py
from settings import * INSTALLED_APPS.append('complex') INSTALLED_APPS.append('django.contrib.comments') ROOT_URLCONF = 'complex.urls'
from settings import * INSTALLED_APPS += [ 'complex', 'django.contrib.comments', 'django.contrib.sites', ] ROOT_URLCONF = 'complex.urls'
Add sites app, change how installed_apps are edited.
Add sites app, change how installed_apps are edited.
Python
bsd-3-clause
esatterwhite/django-tastypie,beni55/django-tastypie,Eksmo/django-tastypie,SeanHayes/django-tastypie,cbxcube/bezrealitky.py,ywarezk/nerdeez-tastypie,mohabusama/django-tastypie,ocadotechnology/django-tastypie,ocadotechnology/django-tastypie,waveaccounting/django-tastypie,SeanHayes/django-tastypie,Eksmo/django-tastypie,be...
from settings import * INSTALLED_APPS.append('complex') INSTALLED_APPS.append('django.contrib.comments') ROOT_URLCONF = 'complex.urls' Add sites app, change how installed_apps are edited.
from settings import * INSTALLED_APPS += [ 'complex', 'django.contrib.comments', 'django.contrib.sites', ] ROOT_URLCONF = 'complex.urls'
<commit_before>from settings import * INSTALLED_APPS.append('complex') INSTALLED_APPS.append('django.contrib.comments') ROOT_URLCONF = 'complex.urls' <commit_msg>Add sites app, change how installed_apps are edited.<commit_after>
from settings import * INSTALLED_APPS += [ 'complex', 'django.contrib.comments', 'django.contrib.sites', ] ROOT_URLCONF = 'complex.urls'
from settings import * INSTALLED_APPS.append('complex') INSTALLED_APPS.append('django.contrib.comments') ROOT_URLCONF = 'complex.urls' Add sites app, change how installed_apps are edited.from settings import * INSTALLED_APPS += [ 'complex', 'django.contrib.comments', 'django.contrib.sites', ] ROOT_URLCON...
<commit_before>from settings import * INSTALLED_APPS.append('complex') INSTALLED_APPS.append('django.contrib.comments') ROOT_URLCONF = 'complex.urls' <commit_msg>Add sites app, change how installed_apps are edited.<commit_after>from settings import * INSTALLED_APPS += [ 'complex', 'django.contrib.comments', ...
855ed8bcef8fc17655ccc28f70ce34a6b3b58d65
official/utils/misc/tpu_lib.py
official/utils/misc/tpu_lib.py
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Remove explicit initialize_tpu_system call from model garden.
Remove explicit initialize_tpu_system call from model garden. PiperOrigin-RevId: 290354680
Python
apache-2.0
tombstone/models,alexgorban/models,alexgorban/models,alexgorban/models,tombstone/models,tombstone/models,tombstone/models,tombstone/models,alexgorban/models,alexgorban/models,tombstone/models
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
345056a7a6a801013cdc340f0f9cd8b4f5d48173
convert-bookmarks.py
convert-bookmarks.py
#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup from datetime import datetime, timezone from bson import json_util import json parser = ArgumentParser(description='Convert Netscape bookmarks to JSON...
#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup import json parser = ArgumentParser(description='Convert Netscape bookmarks to JSON') parser.add_argument(dest='filenames', metavar='filename', nargs='...
Remove bson, datetime, and mongo
Remove bson, datetime, and mongo Current BSON fails to work datetime can't be serialized by json_util mongodb is not needed; just use JSON
Python
mit
jhh/netscape-bookmark-converter
#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup from datetime import datetime, timezone from bson import json_util import json parser = ArgumentParser(description='Convert Netscape bookmarks to JSON...
#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup import json parser = ArgumentParser(description='Convert Netscape bookmarks to JSON') parser.add_argument(dest='filenames', metavar='filename', nargs='...
<commit_before>#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup from datetime import datetime, timezone from bson import json_util import json parser = ArgumentParser(description='Convert Netscape bo...
#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup import json parser = ArgumentParser(description='Convert Netscape bookmarks to JSON') parser.add_argument(dest='filenames', metavar='filename', nargs='...
#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup from datetime import datetime, timezone from bson import json_util import json parser = ArgumentParser(description='Convert Netscape bookmarks to JSON...
<commit_before>#!/usr/bin/env python # # Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json # from argparse import ArgumentParser from bs4 import BeautifulSoup from datetime import datetime, timezone from bson import json_util import json parser = ArgumentParser(description='Convert Netscape bo...
05de6db4aab5f6705bb2867422fab5f7aca3a13a
thinglang/execution/builtins.py
thinglang/execution/builtins.py
class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item) def __contains__(self, item): return hasattr(self, item) class ThingObjectOutput(ThingObjectBase): def __init__(self): self.data = [] def write(self, *args): self.data.append(' '....
class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item.value) def __contains__(self, item): return hasattr(self, item.value) class ThingObjectOutput(ThingObjectBase): INTERNAL_NAME = "Output" def __init__(self, heap): self.data = [] sel...
Unify access in Pythonic built ins
Unify access in Pythonic built ins
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item) def __contains__(self, item): return hasattr(self, item) class ThingObjectOutput(ThingObjectBase): def __init__(self): self.data = [] def write(self, *args): self.data.append(' '....
class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item.value) def __contains__(self, item): return hasattr(self, item.value) class ThingObjectOutput(ThingObjectBase): INTERNAL_NAME = "Output" def __init__(self, heap): self.data = [] sel...
<commit_before>class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item) def __contains__(self, item): return hasattr(self, item) class ThingObjectOutput(ThingObjectBase): def __init__(self): self.data = [] def write(self, *args): self.d...
class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item.value) def __contains__(self, item): return hasattr(self, item.value) class ThingObjectOutput(ThingObjectBase): INTERNAL_NAME = "Output" def __init__(self, heap): self.data = [] sel...
class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item) def __contains__(self, item): return hasattr(self, item) class ThingObjectOutput(ThingObjectBase): def __init__(self): self.data = [] def write(self, *args): self.data.append(' '....
<commit_before>class ThingObjectBase(object): def __getitem__(self, item): return getattr(self, item) def __contains__(self, item): return hasattr(self, item) class ThingObjectOutput(ThingObjectBase): def __init__(self): self.data = [] def write(self, *args): self.d...
7afedf19ff9dfcbf8872a7a9a6090c4ed235a206
phantasy/apps/__init__.py
phantasy/apps/__init__.py
# encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp from phantasy_apps import *
# encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp try: from phantasy_apps import * except ImportError: print("Package 'python-phantasy-apps' is required.")
Add warning if 'phantasy_apps' cannot be found.
Add warning if 'phantasy_apps' cannot be found.
Python
bsd-3-clause
archman/phantasy,archman/phantasy
# encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp from phantasy_apps import * Add warning if 'phantasy_apps' cannot be found.
# encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp try: from phantasy_apps import * except ImportError: print("Package 'python-phantasy-apps' is required.")
<commit_before># encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp from phantasy_apps import * <commit_msg>Add warning if 'phantasy_apps' cannot be found.<commit_after>
# encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp try: from phantasy_apps import * except ImportError: print("Package 'python-phantasy-apps' is required.")
# encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp from phantasy_apps import * Add warning if 'phantasy_apps' cannot be found.# encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applicat...
<commit_before># encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for Rare Isotope Beams # """ Physics Applications """ from .latticemodel import lmapp from phantasy_apps import * <commit_msg>Add warning if 'phantasy_apps' cannot be found.<commit_after># encoding: UTF-8 # # Copyright (c) 2015-2016 Facility for R...